From 5960d731989c58e887b6cca103edfe23dec5e06b Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 23 七月 2026 09:03:34 +0800
Subject: [PATCH] feat(workorder): 添加工单工序管理功能并优化API服务
---
src/views/wls/returnsales/data.ts | 34 ++++++++++++++++++++++++++--------
1 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/src/views/wls/returnsales/data.ts b/src/views/wls/returnsales/data.ts
index b7b99db..4c983da 100644
--- a/src/views/wls/returnsales/data.ts
+++ b/src/views/wls/returnsales/data.ts
@@ -6,14 +6,15 @@
import { h, markRaw } from 'vue';
-import { DICT_TYPE, MesAutoCodeRuleCode } from '../../../packages/constants/src';
-import { getDictOptions } from '../../../packages/effects/hooks/src';
+import { DICT_TYPE, MesAutoCodeRuleCode } from '@vben/constants';
+import { getDictOptions } from '@vben/hooks';
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 {
@@ -88,16 +89,33 @@
},
{
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: '璇烽�夋嫨瀹㈡埛',
},
@@ -172,7 +190,7 @@
{
fieldName: 'clientId',
label: '瀹㈡埛',
- component: markRaw(MdClientSelect),
+ component: markRaw(CrmCustomerSelect),
componentProps: {
placeholder: '璇烽�夋嫨瀹㈡埛',
},
--
Gitblit v1.9.3