From 8f9e65a587ee29b607010f83025456ee28c9b0d6 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 13 一月 2026 16:28:35 +0800
Subject: [PATCH] 修改产品结构详情

---
 src/views/basicData/product/index.vue |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/views/basicData/product/index.vue b/src/views/basicData/product/index.vue
index 42cf147..e652c53 100644
--- a/src/views/basicData/product/index.vue
+++ b/src/views/basicData/product/index.vue
@@ -235,6 +235,10 @@
 const expandedKeys = ref([]);
 const tableColumn = ref([
   {
+    label: "浜у搧瑙勬牸缂栧彿",
+    prop: "productCode",
+  },
+  {
     label: "瑙勬牸鍨嬪彿",
     prop: "model",
   },
@@ -408,16 +412,21 @@
   proxy.$refs.modelFormRef.validate((valid) => {
     if (valid) {
       let _modelForm = { ...modelForm.value };
-      
+
       if(_modelForm.otherModel){
         _modelForm.model = _modelForm.otherModel;
       }
       delete _modelForm.otherModel;
-      // 灏嗛�変腑鐨勬満鍣ㄦ暟缁勮浆鎹负閫楀彿鍒嗛殧鐨勫瓧绗︿覆
+      // 纭繚 speculativeTradingName 鏄暟缁勭被鍨嬶紝鐒跺悗杞崲涓洪�楀彿鍒嗛殧鐨勫瓧绗︿覆
+      let speculativeTradingNameValue = modelForm.value.speculativeTradingName;
+      if (!Array.isArray(speculativeTradingNameValue)) {
+        // 濡傛灉涓嶆槸鏁扮粍锛岃浆鎹负鏁扮粍
+        speculativeTradingNameValue = speculativeTradingNameValue.split(',').filter(item => item);
+      }
       const submitData = {
         ..._modelForm,
         productId: currentId.value,
-        speculativeTradingName: modelForm.value.speculativeTradingName.join(',')
+        speculativeTradingName: speculativeTradingNameValue.join(',')
       };
       addOrEditProductModel(submitData).then((res) => {
         proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");

--
Gitblit v1.9.3