From 3205c5f275b6947ba4812c8b19c24d2b1a2b4d93 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期四, 21 九月 2023 10:17:53 +0800
Subject: [PATCH] 企业端

---
 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