| | |
| | | { |
| | | component: "Input", |
| | | fieldName: "code", |
| | | label: "物料编码", |
| | | label: "品种编码", |
| | | componentProps: { |
| | | maxLength: 64, |
| | | placeholder: "请输入物料编码", |
| | | placeholder: "请输入品种编码", |
| | | }, |
| | | rules: z.string().min(1, '物料编码不能为空').max(64), |
| | | rules: z.string().min(1, '品种编码不能为空').max(64), |
| | | suffix: () => |
| | | h( |
| | | Button, |
| | |
| | | { |
| | | component: "Input", |
| | | fieldName: "name", |
| | | label: "物料名称", |
| | | label: "品种名称", |
| | | componentProps: { |
| | | placeholder: "请输入物料名称", |
| | | placeholder: "请输入品种名称", |
| | | }, |
| | | rules: "required", |
| | | }, |
| | | { |
| | | component: "TreeSelect", |
| | | fieldName: "categoryId", |
| | | label: "物料分类", |
| | | label: "品种分类", |
| | | rules: "selectRequired", |
| | | componentProps: { |
| | | placeholder: "请选择物料分类", |
| | | placeholder: "请选择品种分类", |
| | | allowClear: true, |
| | | treeDefaultExpandAll: true, |
| | | treeData: categoryTreeData, |
| | |
| | | }, |
| | | }, |
| | | { |
| | | component: 'Switch', |
| | | fieldName: 'syncMes', |
| | | label: '同步到MES', |
| | | defaultValue: true, |
| | | componentProps: { |
| | | checkedChildren: '是', |
| | | unCheckedChildren: '否', |
| | | }, |
| | | rules: z.boolean().default(true), |
| | | }, |
| | | { |
| | | component: "RadioGroup", |
| | | fieldName: "status", |
| | | label: "状态", |
| | |
| | | return [ |
| | | { |
| | | fieldName: "code", |
| | | label: "物料编码", |
| | | label: "品种编码", |
| | | component: "Input", |
| | | componentProps: { |
| | | placeholder: "请输入物料编码", |
| | | placeholder: "请输入品种编码", |
| | | allowClear: true, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: "name", |
| | | label: "物料名称", |
| | | label: "品种名称", |
| | | component: "Input", |
| | | componentProps: { |
| | | placeholder: "请输入物料名称", |
| | | placeholder: "请输入品种名称", |
| | | allowClear: true, |
| | | }, |
| | | }, |
| | |
| | | { type: "checkbox", width: 40 }, |
| | | { |
| | | field: "code", |
| | | title: "物料编码", |
| | | title: "品种编码", |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: "name", |
| | | title: "物料名称", |
| | | title: "品种名称", |
| | | minWidth: 180, |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | field: "categoryName", |
| | | title: "物料分类", |
| | | title: "品种分类", |
| | | minWidth: 120, |
| | | slots: { default: "categoryName" }, |
| | | }, |
| | |
| | | { |
| | | field: "syncedMes", |
| | | title: "同步状态", |
| | | width: 90, |
| | | width: 100, |
| | | fixed: "right", |
| | | slots: { default: "syncedMes" }, |
| | | }, |