Mr.Shi
2023-09-21 3205c5f275b6947ba4812c8b19c24d2b1a2b4d93
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 => {