src/views/basicData/mdm/data.ts
@@ -72,10 +72,19 @@
      rules: 'required',
    },
    {
      component: 'Input',
      fieldName: 'specification',
      label: '规格型号',
      componentProps: {
        placeholder: '请输入规格型号',
      },
    },
    {
      component: 'ApiSelect',
      fieldName: 'unitMeasureId',
      label: '计量单位',
      rules: 'required',
      formItemClass: 'col-span-1',
      componentProps: {
        placeholder: '请选择计量单位',
        allowClear: true,
@@ -85,6 +94,70 @@
        },
        labelField: 'name',
        valueField: 'id',
      },
    },
    {
      component: 'ApiSelect',
      fieldName: 'unitMeasureId2',
      label: '辅单位1',
      formItemClass: 'col-span-1',
      componentProps: {
        placeholder: '请选择辅单位1',
        allowClear: true,
        api: async () => {
          const res = await getUnitPage({ pageNo: 1, pageSize: 100, status: 0 });
          return res.list || [];
        },
        labelField: 'name',
        valueField: 'id',
      },
    },
    {
      component: 'InputNumber',
      fieldName: 'unitMeasureRate1',
      label: '辅单位1换算比率',
      formItemClass: 'col-span-1',
      componentProps: {
        class: '!w-full',
        min: 0,
        precision: 6,
        placeholder: '请输入换算比率',
      },
    },
    {
      component: 'ApiSelect',
      fieldName: 'unitMeasureId3',
      label: '辅单位2',
      formItemClass: 'col-span-1',
      componentProps: {
        placeholder: '请选择辅单位2',
        allowClear: true,
        api: async () => {
          const res = await getUnitPage({ pageNo: 1, pageSize: 100, status: 0 });
          return res.list || [];
        },
        labelField: 'name',
        valueField: 'id',
      },
    },
    {
      component: 'InputNumber',
      fieldName: 'unitMeasureRate2',
      label: '辅单位2换算比率',
      formItemClass: 'col-span-1',
      componentProps: {
        class: '!w-full',
        min: 0,
        precision: 6,
        placeholder: '请输入换算比率',
      },
    },
    {
      component: 'Input',
      fieldName: 'warehouseId',
      label: '默认仓库',
      componentProps: {
        placeholder: '请输入默认仓库ID',
      },
    },
    {
@@ -165,6 +238,7 @@
      component: 'Switch',
      fieldName: 'isBatchManaged',
      label: '批次管理',
      defaultValue: true,
      componentProps: {
        class: 'w-auto',
        checkedChildren: '是',
@@ -275,6 +349,31 @@
      minWidth: 80,
    },
    {
      field: 'unitMeasureName2',
      title: '辅单位1',
      minWidth: 80,
    },
    {
      field: 'unitMeasureRate1',
      title: '辅单位1换算比率',
      minWidth: 130,
    },
    {
      field: 'unitMeasureName3',
      title: '辅单位2',
      minWidth: 80,
    },
    {
      field: 'unitMeasureRate2',
      title: '辅单位2换算比率',
      minWidth: 130,
    },
    {
      field: 'warehouseName',
      title: '默认仓库',
      minWidth: 100,
    },
    {
      field: 'itemType',
      title: '物料类型',
      minWidth: 100,