liu
2 天以前 08b86cccfc8227ab065ee913f809609ef708486d
src/views/basicData/mdm/data.ts
@@ -333,6 +333,17 @@
      },
    },
    {
      component: 'Switch',
      fieldName: 'syncMes',
      label: '同步到MES',
      defaultValue: true,
      componentProps: {
        checkedChildren: '是',
        unCheckedChildren: '否',
      },
      rules: z.boolean().default(true),
    },
    {
      component: "RadioGroup",
      fieldName: "status",
      label: "状态",
@@ -597,7 +608,7 @@
    {
      field: "syncedMes",
      title: "同步状态",
      width: 90,
      width: 100,
      fixed: "right",
      slots: { default: "syncedMes" },
    },
@@ -619,3 +630,27 @@
    },
  ];
}
/** 物料导入的表单 */
export function useImportFormSchema(): VbenFormSchema[] {
  return [
    {
      fieldName: 'file',
      label: '物料数据',
      component: 'Upload',
      rules: 'required',
      help: '仅允许导入 xls、xlsx 格式文件',
    },
    {
      fieldName: 'updateSupport',
      label: '是否覆盖',
      component: 'Switch',
      componentProps: {
        checkedChildren: '是',
        unCheckedChildren: '否',
      },
      rules: z.boolean().default(false),
      help: '是否更新已经存在的物料数据',
    },
  ];
}