gaoluyang
7 天以前 6ebcfebf58fe23ea401de1050b15ba85e41763a9
src/views/wls/salesnotice/data.ts
@@ -14,8 +14,6 @@
import { z } from '#/adapter/form';
import { generateAutoCode } from '#/api/mes/md/autocode/record';
import CrmCustomerSelect from '#/components/crm-customer-select.vue';
import { ErpSaleOrderSelect } from '#/views/erp/sale/order/components';
import { MdItemSelect } from '#/views/mes/md/item/components';
/** 表单类型 */
@@ -83,28 +81,21 @@
      rules: 'required',
    },
    {
      fieldName: 'saleOrderId',
      label: '销售订单',
      component: markRaw(ErpSaleOrderSelect),
      fieldName: 'saleOrderCode',
      label: '销售订单编号',
      component: 'Input',
      componentProps: {
        placeholder: '请选择销售订单',
        // 选择销售订单后,自动回填客户信息
        onChange: (item: any) => {
          if (item?.customerId && formApi) {
            formApi.setFieldValue('clientId', item.customerId);
          }
        },
        placeholder: '请输入销售订单编号',
      },
    },
    {
      fieldName: 'clientId',
      fieldName: 'clientName',
      label: '客户',
      component: markRaw(CrmCustomerSelect),
      component: 'Input',
      componentProps: {
        placeholder: '请选择客户',
        disabled: true,
        placeholder: '请输入客户名称',
      },
      rules: 'selectRequired',
      rules: 'required',
    },
    {
      fieldName: 'salesDate',
@@ -186,11 +177,12 @@
      },
    },
    {
      fieldName: 'clientId',
      fieldName: 'clientName',
      label: '客户',
      component: markRaw(CrmCustomerSelect),
      component: 'Input',
      componentProps: {
        placeholder: '请选择客户',
        allowClear: true,
        placeholder: '请输入客户名称',
      },
    },
  ];