Files
qhmes/jeecgboot-vue3/src/views/xslmes/mesXslProductionOrder/MesXslProductionOrder.data.ts
2026-06-17 15:47:53 +08:00

72 lines
3.2 KiB
Vue

import { BasicColumn, FormSchema } from '/@/components/Table';
function splitStatusText(v: unknown) {
if (v === 1) return '已拆分';
if (v === 0) return '未拆分';
return '-';
}
const splitStatusOptions = [
{ label: '未拆分', value: 0 },
{ label: '已拆分', value: 1 },
];
export const columns: BasicColumn[] = [
{ title: '销售订单号', align: 'center', dataIndex: 'salesOrderNo', width: 150 },
{ title: '生产订单号', align: 'center', dataIndex: 'productionOrderNo', width: 150 },
{ title: '订单日期', align: 'center', dataIndex: 'orderDate', width: 130 },
{ title: '生产车间', align: 'center', dataIndex: 'productionWorkshop', width: 130 },
{ title: '加工段数', align: 'center', dataIndex: 'processSegmentCount', width: 100 },
{ title: '物料编号', align: 'center', dataIndex: 'materialCode', width: 130 },
{ title: 'MES胶料名称', align: 'center', dataIndex: 'mesMaterialName', width: 150 },
{ title: '金蝶物料名称', align: 'center', dataIndex: 'kingdeeMaterialName', width: 150 },
{ title: '金蝶物料规格', align: 'center', dataIndex: 'kingdeeMaterialSpec', width: 150 },
{ title: '计划数量', align: 'center', dataIndex: 'planQty', width: 110 },
{ title: '拆分状态', align: 'center', dataIndex: 'splitStatus', width: 100, customRender: ({ text }) => splitStatusText(text) },
];
export const searchFormSchema: FormSchema[] = [
{ label: '销售订单号', field: 'salesOrderNo', component: 'Input', colProps: { span: 6 } },
{ label: '生产订单号', field: 'productionOrderNo', component: 'Input', colProps: { span: 6 } },
{ label: '物料编号', field: 'materialCode', component: 'Input', colProps: { span: 6 } },
{ label: 'MES胶料名称', field: 'mesMaterialName', component: 'Input', colProps: { span: 6 } },
{
label: '拆分状态',
field: 'splitStatus',
component: 'Select',
componentProps: { options: splitStatusOptions },
colProps: { span: 6 },
},
];
export const formSchema: FormSchema[] = [
{ label: '', field: 'id', component: 'Input', show: false },
{ label: '销售订单号', field: 'salesOrderNo', component: 'Input' },
{ label: '生产订单号', field: 'productionOrderNo', component: 'Input' },
{
label: '订单日期',
field: 'orderDate',
component: 'DatePicker',
componentProps: { valueFormat: 'YYYY-MM-DD', style: { width: '100%' } },
},
{ label: '生产车间', field: 'productionWorkshop', component: 'Input' },
{ label: '加工段数', field: 'processSegmentCount', component: 'InputNumber', componentProps: { min: 0, precision: 0 } },
{
label: '物料编号',
field: 'materialCode',
component: 'Input',
slot: 'materialCodeSlot',
},
{ label: 'MES胶料名称', field: 'mesMaterialName', component: 'Input' },
{ label: '金蝶物料名称', field: 'kingdeeMaterialName', component: 'Input' },
{ label: '金蝶物料规格', field: 'kingdeeMaterialSpec', component: 'Input' },
{ label: '计划数量', field: 'planQty', component: 'InputNumber', componentProps: { min: 0 } },
{
label: '拆分状态',
field: 'splitStatus',
component: 'Select',
defaultValue: 0,
componentProps: { options: splitStatusOptions },
},
];