From 4835968df9f6b0efd9bb075d348e841bed4b96ee Mon Sep 17 00:00:00 2001 From: "tianyi@bogon" Date: Mon, 6 Nov 2023 18:01:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/inventory/goodsList1.vue | 46 +++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/pages/inventory/goodsList1.vue b/pages/inventory/goodsList1.vue index b3cf485..5ce7c37 100644 --- a/pages/inventory/goodsList1.vue +++ b/pages/inventory/goodsList1.vue @@ -69,7 +69,7 @@ 单价 - + 折扣(100%) @@ -77,7 +77,7 @@ 折后价 - + 数量 @@ -101,7 +101,7 @@ 总金额 - + @@ -119,7 +119,7 @@ 欠款 - + @@ -461,7 +461,8 @@ // console.log(this.lbgName) // console.log(this.wlName) let obj = { - orderByWorker: this.lbgName.workerId, + orderByWorker: this.lbgName.workerId, + transCompany: this.wlName.id, sale: { alreadyEarn: 100, realAmount: 100, @@ -478,21 +479,26 @@ createBy: this.xsyId, createByName:this.createByName, userId: "1704126992443641856", - remark: '123' - }, - saleDetailList: [{ - discount: 10, - discountAmount: 1111, - productCount: 1, - productId: "1695314088038633472", - realPrice: 1111, - saleDetailQueryDTO: [{ - attributeList: '{"颜色":"s","尺码":"m"}', - productCount: 2 - }] - }], - transCompany: this.wlName.id, - } + remark: '123', + discountNum:10 + }, + + saleDetailList: [] + } + let purchaseDetails = []; + this.carList.forEach(function(value, key) { + console.log(value.stockLogList) + value.stockLogList.forEach(function(values, keys) { + let obj = { + productCount: values, + attributeList: keys + } + value.stockLogList1.push(obj) + }) + console.log(value) + purchaseDetails.push(value) + }) + obj.saleDetailList = purchaseDetails; this.tui.request("/app/sale/buyNew", "post", obj, false, false).then((res) => { if (res.code == 200) { uni.showToast({