From f7490c5b05906399fe754fecdb1f32172a01170d Mon Sep 17 00:00:00 2001
From: zhangback <zhangback@163.com>
Date: 星期二, 18 十一月 2025 22:27:29 +0800
Subject: [PATCH] 提交

---
 ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue |   33 +++++++++++++--------------------
 1 files changed, 13 insertions(+), 20 deletions(-)

diff --git a/ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue b/ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue
index d3d268a..7fcdd5f 100644
--- a/ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue
+++ b/ui/admin-ui3/src/views/tms/tmsProductInfo/index.vue
@@ -161,7 +161,19 @@
               })
             }
 
-          }
+          },
+          change: (val: any) => {
+            const table = crudRef.value?.getPropRef?.('customerId')?.$refs?.temp;
+            if (!table) return;
+            let active = table.active;
+            if (Array.isArray(active)) active = active[0];
+            if (active) {
+              Object.assign(form.value, {
+                customerId: active.id,
+                customer: active.customerShortName,
+              });
+            }
+          },
         },
         productCode: {
           label: '璐у搧缂栫爜',
@@ -541,25 +553,6 @@
   }
 })
 
-onMounted(() => {
-  watch(() => form.value.customerId, () => {
 
-    if (!form.value.customerId){
-      return;
-    }
-    const table = crudRef.value?.getPropRef?.('customerId')?.$refs?.temp;
-    if (!table) return;
-
-    let active = table.active;
-    if (Array.isArray(active)) active = active[0];
-
-    if (active) {
-      Object.assign(form.value, {
-        customerId: active.id,
-        customer: active.customerShortName,
-      });
-    }
-  });
-});
 
 </script>

--
Gitblit v1.8.0