From 862812caa35bcc24a5dce7465984322fa2f32041 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 21 Nov 2024 15:24:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81=E5=88=B8?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=97=B6=E5=A2=9E=E5=8A=A0=E6=89=93=E6=8A=98?= =?UTF-8?q?=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/Instead/components/discount.vue | 1 + src/views/tool/Instead/components/quans.vue | 7 +++++-- src/views/tool/Instead/index.vue | 10 ++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/views/tool/Instead/components/discount.vue b/src/views/tool/Instead/components/discount.vue index b281a44..9831ed0 100644 --- a/src/views/tool/Instead/components/discount.vue +++ b/src/views/tool/Instead/components/discount.vue @@ -168,6 +168,7 @@ export default { }, confirm() { + console.log(this.form.discount / 100) this.$emit("confirm", (this.form.discount / 100)); this.close(); }, diff --git a/src/views/tool/Instead/components/quans.vue b/src/views/tool/Instead/components/quans.vue index 7540356..a804bcf 100644 --- a/src/views/tool/Instead/components/quans.vue +++ b/src/views/tool/Instead/components/quans.vue @@ -229,6 +229,7 @@ export default { }, data() { return { + discount:1, orderPrice: 0, fullReductionCouponSel: { id: "", @@ -286,11 +287,12 @@ export default { const arr = this.quans.productCoupon.filter((v) => v.proId == row.proId); const index = arr.findIndex((v) => v.id == row.id); if (index != -1) { - return returnProductCoupAllPrice( + const n=returnProductCoupAllPrice( $goodsPayPriceMap[row.proId], index, row.num - ).toFixed(2); + ) + return (n*this.discount).toFixed(2); } else { return 0; } @@ -439,6 +441,7 @@ export default { async open(data, propSelCoup) { console.log(data); this.orderPrice = data.orderPrice; + this.discount=data.discount||1 this.quansSelArr = [...propSelCoup]; $goodsPayPriceMap = returnGoodsPayPriceMap(this.goodsArr || []); if (data.memberId) { diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue index 2d367a1..019d78d 100644 --- a/src/views/tool/Instead/index.vue +++ b/src/views/tool/Instead/index.vue @@ -1725,11 +1725,11 @@ export default { return this.vipUser.isVip ? true : false; }, coupdiscount() { - return returnCouponAllPrice( + return (this.createOrder.discount*returnCouponAllPrice( this.quansSelArr, this.createOrder.data.detailList || [], this.vipUser - ); + )).toFixed(2) }, goodsDisCount() { const goodsQuanArr = this.quansSelArr.filter((v) => v.type == 2); @@ -2195,11 +2195,12 @@ export default { const arr = this.quansSelArr.filter((v) => v.proId == row.proId); const index = arr.findIndex((v) => v.id == row.id); if (index != -1) { - return returnProductCoupAllPrice( + const n=returnProductCoupAllPrice( $goodsPayPriceMap[row.proId], index, row.num - ).toFixed(2); + ) + return (n*this.createOrder.discount).toFixed(2); } else { return 0; } @@ -2265,6 +2266,7 @@ export default { id: this.createOrder.data.id, memberId: this.createOrder.data.memberId || this.vipUser.id, orderPrice: (this.yinFuJinE * 1 + this.coupdiscount * 1).toFixed(2), + discount:this.createOrder.discount }, [...this.quansSelArr] );