From b64a0deae5b5d33f9e20671a68936b27f0b9b00b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 21 七月 2026 18:03:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_pro2.0' into dev_pro2.0

---
 src/views/wls/returnsales/data.ts |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/src/views/wls/returnsales/data.ts b/src/views/wls/returnsales/data.ts
index e926283..4c983da 100644
--- a/src/views/wls/returnsales/data.ts
+++ b/src/views/wls/returnsales/data.ts
@@ -12,8 +12,9 @@
 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