69 lines
3.9 KiB
Vue
69 lines
3.9 KiB
Vue
import { BasicColumn, FormSchema } from '/@/components/Table';
|
|
|
|
function statusText(v: unknown) {
|
|
if (v === 1) return '进行中';
|
|
if (v === 2) return '已完成';
|
|
return '未开始';
|
|
}
|
|
|
|
const statusOptions = [
|
|
{ label: '未开始', value: 0 },
|
|
{ label: '进行中', value: 1 },
|
|
{ label: '已完成', value: 2 },
|
|
];
|
|
|
|
export const columns: BasicColumn[] = [
|
|
{ title: '订单流水', align: 'center', dataIndex: 'orderSerialNo', width: 180 },
|
|
{ title: '订单编号', align: 'center', dataIndex: 'orderNo', width: 150 },
|
|
{ title: '生产段数', align: 'center', dataIndex: 'productionSegmentCount', width: 100 },
|
|
{ title: '订单日期', align: 'center', dataIndex: 'orderDate', width: 130 },
|
|
{ title: '物料编码', align: 'center', dataIndex: 'materialCode', width: 130 },
|
|
{ title: 'MES胶料信息', align: 'center', dataIndex: 'mesMaterialName', width: 150 },
|
|
{ title: '计划重量', align: 'center', dataIndex: 'planWeight', width: 110 },
|
|
{ title: '每车重量', align: 'center', dataIndex: 'perCarWeight', width: 110 },
|
|
{ title: '计划车数', align: 'center', dataIndex: 'plannedCarCount', width: 100 },
|
|
{ title: '已排产车数', align: 'center', dataIndex: 'scheduledCarCount', width: 110 },
|
|
{ title: '完成车数', align: 'center', dataIndex: 'finishedCarCount', width: 100 },
|
|
{ title: '状态', align: 'center', dataIndex: 'status', width: 100, customRender: ({ text }) => statusText(text) },
|
|
{ title: '创建人', align: 'center', dataIndex: 'createBy', width: 100 },
|
|
{ title: '创建时间', align: 'center', dataIndex: 'createTime', width: 170 },
|
|
{ title: '修改人', align: 'center', dataIndex: 'updateBy', width: 100 },
|
|
{ title: '修改时间', align: 'center', dataIndex: 'updateTime', width: 170 },
|
|
];
|
|
|
|
export const searchFormSchema: FormSchema[] = [
|
|
{ label: '订单流水', field: 'orderSerialNo', component: 'Input', colProps: { span: 6 } },
|
|
{ label: '订单编号', field: 'orderNo', component: 'Input', colProps: { span: 6 } },
|
|
{ label: '物料编码', field: 'materialCode', component: 'Input', colProps: { span: 6 } },
|
|
{ label: 'MES胶料信息', field: 'mesMaterialName', component: 'Input', colProps: { span: 6 } },
|
|
{
|
|
label: '状态',
|
|
field: 'status',
|
|
component: 'Select',
|
|
componentProps: { options: statusOptions },
|
|
colProps: { span: 6 },
|
|
},
|
|
];
|
|
|
|
export const formSchema: FormSchema[] = [
|
|
{ label: '', field: 'id', component: 'Input', show: false },
|
|
{ label: '', field: 'sourceOrderId', component: 'Input', show: false },
|
|
{ label: '订单流水', field: 'orderSerialNo', component: 'Input', componentProps: { disabled: true } },
|
|
{ label: '订单编号', field: 'orderNo', component: 'Input', componentProps: { disabled: true } },
|
|
{ label: '生产段数', field: 'productionSegmentCount', component: 'InputNumber', componentProps: { disabled: true } },
|
|
{
|
|
label: '订单日期',
|
|
field: 'orderDate',
|
|
component: 'DatePicker',
|
|
componentProps: { valueFormat: 'YYYY-MM-DD', style: { width: '100%' }, disabled: true },
|
|
},
|
|
{ label: '物料编码', field: 'materialCode', component: 'Input', componentProps: { disabled: true } },
|
|
{ label: 'MES胶料信息', field: 'mesMaterialName', component: 'Input', componentProps: { disabled: true } },
|
|
{ label: '计划重量', field: 'planWeight', component: 'InputNumber', componentProps: { disabled: true } },
|
|
{ label: '每车重量', field: 'perCarWeight', component: 'InputNumber', componentProps: { min: 0 } },
|
|
{ label: '计划车数', field: 'plannedCarCount', component: 'InputNumber', componentProps: { disabled: true } },
|
|
{ label: '已排产车数', field: 'scheduledCarCount', component: 'InputNumber', componentProps: { min: 0, precision: 0 } },
|
|
{ label: '完成车数', field: 'finishedCarCount', component: 'InputNumber', componentProps: { min: 0, precision: 0 } },
|
|
{ label: '状态', field: 'status', component: 'Select', componentProps: { options: statusOptions } },
|
|
];
|