From 441f8436a70c22fba6f25154f2f38a072c85b76b Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期二, 27 二月 2024 18:45:02 +0800 Subject: [PATCH] 公共选择产品弹窗相关页面修改 --- 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