gaoluyang
3 天以前 cd8b52bdf89a4d1101f72e0ece9f4df22a3d3f7a
src/views/mes/qc/iqc/data.ts
@@ -12,9 +12,8 @@
import { generateAutoCode } from '#/api/mes/md/autocode/record';
import { getTemplateItemOptionList } from '#/api/mes/qc/template/item';
import { getSupplierSimpleList } from '#/api/srm/supplier';
import { getSimpleUserList } from '#/api/system/user';
import { getRangePickerDefaultProps } from '#/utils';
import { getDateRangePickerDefaultProps } from '#/utils';
import { MdmItemSelect } from '#/views/basicData/mdm/components';
@@ -163,26 +162,13 @@
      },
    },
    {
      fieldName: 'vendorId',
      fieldName: 'vendorName',
      label: '供应商',
      component: 'ApiSelect',
      component: 'Input',
      componentProps: {
        allowClear: true,
        api: getSupplierSimpleList,
        labelField: 'name',
        placeholder: '请选择供应商',
        valueField: 'id',
      },
      dependencies: {
        triggerFields: ['sourceDocId'],
        componentProps: (values) => ({
          disabled: !!values.sourceDocId,
          allowClear: true,
          api: getSupplierSimpleList,
          labelField: 'name',
          placeholder: '请选择供应商',
          valueField: 'id',
        }),
        maxlength: 255,
        placeholder: '请输入供应商名称(可留空)',
      },
    },
    {
@@ -192,6 +178,21 @@
      componentProps: {
        placeholder: '请输入供应商批次号',
      },
      suffix: () =>
        h(
          Button,
          {
            disabled: formType === 'detail',
            type: 'default',
            onClick: async () => {
              const code = await generateAutoCode(
                MesAutoCodeRuleCode.QC_IQC_VENDOR_BATCH_CODE,
              );
              await formApi?.setFieldValue('vendorBatch', code);
            },
          },
          { default: () => '生成' },
        ),
    },
    {
      fieldName: 'receivedQuantity',
@@ -309,15 +310,12 @@
      },
    },
    {
      fieldName: 'vendorId',
      fieldName: 'vendorName',
      label: '供应商',
      component: 'ApiSelect',
      component: 'Input',
      componentProps: {
        allowClear: true,
        api: getSupplierSimpleList,
        labelField: 'name',
        placeholder: '请选择供应商',
        valueField: 'id',
        placeholder: '请输入供应商名称',
      },
    },
    {
@@ -352,7 +350,7 @@
      label: '来料日期',
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        ...getDateRangePickerDefaultProps(),
      },
    },
    {
@@ -360,7 +358,7 @@
      label: '检测日期',
      component: 'RangePicker',
      componentProps: {
        ...getRangePickerDefaultProps(),
        ...getDateRangePickerDefaultProps(),
      },
    },
    {
@@ -393,8 +391,8 @@
      minWidth: 180,
    },
    {
      field: 'vendorNickname',
      title: '供应商简称',
      field: 'vendorName',
      title: '供应商',
      width: 120,
    },
    {
@@ -437,6 +435,12 @@
      },
    },
    {
      field: 'indicatorResultSummary',
      title: '检测结果(检验项)',
      minWidth: 200,
      showOverflow: 'tooltip',
    },
    {
      field: 'receiveDate',
      title: '来料日期',
      width: 120,