From fb20919d312b7f3bf81805eda670f42fa2d18e39 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 28 二月 2024 14:38:41 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/crm-web

---
 src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue |   35 ++++++++++++++++++++++++-----------
 1 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
index 35cbbe7..62d4db1 100644
--- a/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
+++ b/src/views/sales/salesOpportunity/AddSalesOpportunityDialog.vue
@@ -327,9 +327,11 @@
           <div class="product-view">
             <CommonFormTableView
               :show-summary="showSummary"
+              :addTypeIdMultiple="true"
               :product-table-list="productTableList"
               @inputContent="inputContent"
               @addProductClick="addProductClick"
+              @getSelectArray="getSelectArray"
               @emptyProductClick="emptyProductClick"
               @recalculateProductClick="recalculateProductClick"
               @clearupProduct="clearupProduct"
@@ -1000,17 +1002,28 @@
     },
     // 浜у搧鏂板
     addProductClick() {
-      this.productId++
-      this.tableData.push({
-        productId: this.productId,
-        id: 0,
-        amount: 0,
-        desc: "",
-        name: "",
-        number: "",
-        price: 0,
-        total: 0
-      })
+      // this.productId++
+      // this.tableData.push({
+      //   productId: this.productId,
+      //   id: 0,
+      //   amount: 0,
+      //   desc: "",
+      //   name: "",
+      //   number: "",
+      //   price: 0,
+      //   total: 0
+      // })
+      // this.showSummary.show = true
+    },
+    // 鏂板鏂瑰紡淇敼
+    getSelectArray(val) {
+      if (val.length > 0) {
+        val.map((item, index) => {
+          item.productId = this.tableData.length + index + 1
+        })
+      }
+      this.tableData = this.tableData.concat(val)
+      this.productTableList.tableData = this.tableData
       this.showSummary.show = true
     },
     //  浜у搧娓呯┖

--
Gitblit v1.8.0