6 天以前 452e5c5e9a340367c8fdb14b0bdecc96dcb29491
src/views/mes/qc/iqc/data.ts
@@ -11,10 +11,11 @@
import { Button } from 'ant-design-vue';
import { generateAutoCode } from '#/api/mes/md/autocode/record';
import { getSupplierSimpleList } from '#/api/srm/supplier';
import { getSimpleUserList } from '#/api/system/user';
import { getRangePickerDefaultProps } from '#/utils';
import { MdItemSelect } from '#/views/mes/md/item/components';
import { MdVendorSelect } from '#/views/mes/md/vendor/components';
import { MdmItemSelect } from '#/views/basicData/mdm/components';
/** 表单类型 */
export type FormType = 'create' | 'detail' | 'update';
@@ -120,7 +121,7 @@
    {
      fieldName: 'itemId',
      label: '产品物料',
      component: markRaw(MdItemSelect),
      component: markRaw(MdmItemSelect),
      componentProps: {
        placeholder: '请选择产品物料',
      },
@@ -136,16 +137,23 @@
    {
      fieldName: 'vendorId',
      label: '供应商',
      component: markRaw(MdVendorSelect),
      component: 'ApiSelect',
      componentProps: {
        allowClear: true,
        api: getSupplierSimpleList,
        labelField: 'name',
        placeholder: '请选择供应商',
        valueField: 'id',
      },
      rules: 'selectRequired',
      dependencies: {
        triggerFields: ['sourceDocId'],
        componentProps: (values) => ({
          disabled: !!values.sourceDocId,
          allowClear: true,
          api: getSupplierSimpleList,
          labelField: 'name',
          placeholder: '请选择供应商',
          valueField: 'id',
        }),
      },
    },
@@ -200,6 +208,7 @@
        placeholder: '请输入不合格品数量',
      },
      rules: 'required',
      help: '不合格品数量大于0时,保存后将自动生成不合格处理单',
    },
    {
      fieldName: 'receiveDate',
@@ -208,7 +217,7 @@
      componentProps: {
        format: 'YYYY-MM-DD',
        placeholder: '请选择来料日期',
        valueFormat: 'x',
        valueFormat: 'YYYY-MM-DD',
      },
      rules: 'required',
    },
@@ -232,7 +241,7 @@
      componentProps: {
        format: 'YYYY-MM-DD',
        placeholder: '请选择检测日期',
        valueFormat: 'x',
        valueFormat: 'YYYY-MM-DD',
      },
      rules: 'required',
    },
@@ -274,9 +283,13 @@
    {
      fieldName: 'vendorId',
      label: '供应商',
      component: markRaw(MdVendorSelect),
      component: 'ApiSelect',
      componentProps: {
        allowClear: true,
        api: getSupplierSimpleList,
        labelField: 'name',
        placeholder: '请选择供应商',
        valueField: 'id',
      },
    },
    {
@@ -291,7 +304,7 @@
    {
      fieldName: 'itemId',
      label: '产品物料',
      component: markRaw(MdItemSelect),
      component: markRaw(MdmItemSelect),
      componentProps: {
        placeholder: '请选择产品物料',
      },