128 lines
4.0 KiB
JavaScript
128 lines
4.0 KiB
JavaScript
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
||
import request from "@/utils/request";
|
||
import { timeFilter } from "@/utils/filters";
|
||
|
||
import StateSelect from '@/components/StateSelect.vue';
|
||
|
||
export default function () {
|
||
const tableProps = [
|
||
// { type: "index", label: "序号" },
|
||
// { prop: "createTime", label: "添加时间", filter: timeFilter },
|
||
{ prop: "code", label: "窑车号" },
|
||
{ prop: "stateDictValue", label: "状态", subcomponent: StateSelect },
|
||
// { prop: "stateDictValue", label: "状态", filter: (v) => (v !== null && v !== undefined ? ["没有数据", "正常", "判废", "过渡"][v] : "-") }, // subcomponent
|
||
{ prop: "orderCode", label: "订单号" },
|
||
{ prop: "posCode", label: "位置" },
|
||
{ prop: "startTime", label: "开始时间", filter: timeFilter },
|
||
{ prop: "endTime", label: "结束时间", filter: timeFilter },
|
||
{
|
||
prop: "operations",
|
||
name: "操作",
|
||
fixed: "right",
|
||
width: 90,
|
||
subcomponent: TableOperaionComponent,
|
||
options: [
|
||
{ name: "to-car-payload", label: "装载详情", icon: "document" },
|
||
{ name: "to-car-history", label: "查看历史", emitFull: true, icon: "time" },
|
||
// { name: "edit", label: "编辑", icon: "edit-outline" },
|
||
// { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:car:delete" }
|
||
],
|
||
},
|
||
];
|
||
// 设置页面默认的 page size 为 100 条数据
|
||
tableProps.defaultPageSize = 100;
|
||
|
||
const headFormFields = [
|
||
{
|
||
prop: "code",
|
||
label: "窑车号",
|
||
input: true,
|
||
default: { value: "" },
|
||
bind: {
|
||
// placeholder: '请输入产线名称或编码'
|
||
placeholder: "请输入窑车号",
|
||
},
|
||
},
|
||
{
|
||
prop: 'orderId',
|
||
label: '订单号',
|
||
fieldOptionLabel: 'code',
|
||
customLabel: 'cate',
|
||
select: [],
|
||
fn: () => this.$http.post("/pms/order/pageView", { page: 1, limit: 999 }),
|
||
bind: {
|
||
placeholder: '请选择订单号',
|
||
filterable: true
|
||
}
|
||
},
|
||
{
|
||
button: {
|
||
type: "primary",
|
||
name: "查询",
|
||
},
|
||
},
|
||
// {
|
||
// button: {
|
||
// type: "primary",
|
||
// name: "新增",
|
||
// permission: "pms:materialStorage:save"
|
||
// },
|
||
// bind: {
|
||
// plain: true,
|
||
// }
|
||
// },
|
||
];
|
||
|
||
const dialogJustFormConfigs = null;
|
||
|
||
const carPayloadDialogConfigs = {
|
||
dialogWidth: '70%',
|
||
carPayloadDialog: true,
|
||
clickModalToClose: false,
|
||
tableConfig: {
|
||
table: null,
|
||
column: [
|
||
// 窑车的 装载详情
|
||
// tableProps
|
||
{ width: 56, type: "index", label: "序号" },
|
||
{ prop: "orderCode", label: "订单号" },
|
||
{ width: 80, prop: "orderCate", label: "订单子号" },
|
||
{ prop: "brand", label: "配方" },
|
||
{ prop: "shapeCode", label: "砖型" },
|
||
{ prop: "weight", label: "重量" },
|
||
{ width: 128, prop: "gas", label: "燃气用量(m³)" },
|
||
{ width: 144, prop: "gp", label: "燃气(m³)/砖(kg)" },
|
||
{ width: 80, prop: "qty", label: "订单数量" },
|
||
{ width: 72, prop: "goodqty", label: "合格数" },
|
||
{ width: 72, prop: "badqty", label: "废砖数" },
|
||
// { prop: "startTime", label: "开始时间" },
|
||
// { prop: "endTime", label: "结束时间" },
|
||
// { prop: "remark", label: "备注" },
|
||
],
|
||
},
|
||
};
|
||
|
||
|
||
|
||
return {
|
||
carPayloadDialogConfigs,
|
||
dialogConfigs: dialogJustFormConfigs,
|
||
tableConfig: {
|
||
table: null, // 此处可省略,el-table 上的配置项
|
||
column: tableProps, // el-column-item 上的配置项
|
||
},
|
||
headFormConfigs: {
|
||
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
|
||
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
|
||
},
|
||
urls: {
|
||
base: "/pms/carHandle",
|
||
page: "/pms/carHandle/pageView",
|
||
pageIsPostApi: true,
|
||
// subase: '/pms/blenderStepParam',
|
||
// subpage: '/pms/blenderStepParam/page',
|
||
// more...
|
||
},
|
||
};
|
||
}
|