From 0d17e59721df8386120156f045b1900a7e435097 Mon Sep 17 00:00:00 2001
From: jiaosong <jiaosong6760@dingtalk.com>
Date: 星期四, 21 九月 2023 11:02:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 company_admin/src/components/business/selectProductItem.vue |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/company_admin/src/components/business/selectProductItem.vue b/company_admin/src/components/business/selectProductItem.vue
index 88d80be..39acc7d 100644
--- a/company_admin/src/components/business/selectProductItem.vue
+++ b/company_admin/src/components/business/selectProductItem.vue
@@ -135,8 +135,11 @@
         handleSelectionChange(e) {
             let arr = []
             e.forEach(item => {
-                arr.push({ goodsId: item.id, price: item.purchasePrice })
+                arr.push({ id: item.id })
             })
+            // e.forEach(item => {
+            //     arr.push({ goodsId: item.id, price: item.purchasePrice })
+            // })
             this.form.goodsParamList = arr
             console.log(arr)
         },
@@ -145,11 +148,19 @@
                 this.$message.warning({ message: '璇峰厛鍕鹃�夊晢鍝�' })
                 return
             }
+            let goodsParamList = []
+            this.form.goodsParamList.forEach(item => {
+                this.tableData.forEach(child => {
+                    if (item.id === child.id) {
+                        goodsParamList.push({ goodsId: child.id, price: child.purchasePrice })
+                    }
+                })
+            })
             // 璋冪敤鏂板缓鎺ュ彛
             this.isWorking = true
             createPlat({
                 categoryId: this.form.categoryId1,
-                goodsParamList: this.form.goodsParamList,
+                goodsParamList,
                 rate: this.form.rate,
                 type: this.form.type
             }).then(res => {

--
Gitblit v1.9.3