| | |
| | | import { Button } from 'ant-design-vue'; |
| | | |
| | | import { z } from '#/adapter/form'; |
| | | import CrmCustomerSelect from '#/components/crm-customer-select.vue'; |
| | | import { generateAutoCode } from '#/api/mes/md/autocode/record'; |
| | | import { MdClientSelect } from '#/views/mes/md/client/components'; |
| | | import { ErpSaleOrderSelect } from '#/views/erp/sale/order/components'; |
| | | import { MdItemSelect } from '#/views/mes/md/item/components'; |
| | | import { WmBatchSelect } from '#/views/wls/batch/components'; |
| | | import { |
| | |
| | | }, |
| | | { |
| | | fieldName: 'salesOrderCode', |
| | | label: '销售订单号', |
| | | component: 'Input', |
| | | componentProps: { |
| | | placeholder: '请输入销售订单号', |
| | | dependencies: { |
| | | triggerFields: [''], |
| | | show: () => false, |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'saleOrderId', |
| | | label: '销售订单号', |
| | | component: markRaw(ErpSaleOrderSelect), |
| | | componentProps: { |
| | | placeholder: '请选择销售订单', |
| | | onChange: (item: any) => { |
| | | if (formApi) { |
| | | formApi.setFieldValue('salesOrderCode', item?.no ?? ''); |
| | | if (item?.customerId) { |
| | | formApi.setFieldValue('clientId', item.customerId); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | rules: 'selectRequired', |
| | | }, |
| | | { |
| | | fieldName: 'clientId', |
| | | label: '客户', |
| | | component: markRaw(MdClientSelect), |
| | | component: markRaw(CrmCustomerSelect), |
| | | componentProps: { |
| | | placeholder: '请选择客户', |
| | | }, |
| | |
| | | { |
| | | fieldName: 'clientId', |
| | | label: '客户', |
| | | component: markRaw(MdClientSelect), |
| | | component: markRaw(CrmCustomerSelect), |
| | | componentProps: { |
| | | placeholder: '请选择客户', |
| | | }, |