From f5b608affb3f5b9dfd3eb19e8a4ecfaa238cc4f3 Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Mon, 1 Nov 2021 15:19:15 +0800 Subject: [PATCH] fix order bug --- .../pages/mall/check_logistic/check_logistic.vue | 11 ++++++++++- .../pages/mall/refund_operate/refund_operate.vue | 11 ++++++++++- .../order/pages/mall/send_out/send_out.vue | 21 +++++++++++++++++---- 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/subpackage/order/pages/mall/check_logistic/check_logistic.vue b/src/subpackage/order/pages/mall/check_logistic/check_logistic.vue index 51806b9..b8f1bca 100644 --- a/src/subpackage/order/pages/mall/check_logistic/check_logistic.vue +++ b/src/subpackage/order/pages/mall/check_logistic/check_logistic.vue @@ -13,7 +13,7 @@ {{ k.product_name || '-' }} - 共{{ e.logistics_product_lite_list.length || 0 }}件商品 + 共{{ totalGoodsNum || 0 }}件商品 @@ -32,6 +32,15 @@ export default { } return [] }, + totalGoodsNum(){ + let { orderInfo } = this; + if(!orderInfo)return 0; + let _ls = orderInfo.product_order_goods || []; + return _ls.reduce((total, item)=>{ + total += +item.product_nums || 0; + return total + }, 0) + } }, onLoad(options){ this.getInfo(options.order_no); diff --git a/src/subpackage/order/pages/mall/refund_operate/refund_operate.vue b/src/subpackage/order/pages/mall/refund_operate/refund_operate.vue index 3b34291..fa78a91 100644 --- a/src/subpackage/order/pages/mall/refund_operate/refund_operate.vue +++ b/src/subpackage/order/pages/mall/refund_operate/refund_operate.vue @@ -17,7 +17,7 @@ - 共{{ refundLs.length || 0 }}件 + 共{{ totalGoodsNum || 0 }}件 @@ -69,6 +69,15 @@ export default { // return _selectedArr.includes((ele.product_id + '')); // }) }, + totalGoodsNum(){ + let { orderInfo } = this; + if(!orderInfo)return 0; + let _ls = orderInfo.product_order_goods || []; + return _ls.reduce((total, item)=>{ + total += +item.product_nums || 0; + return total + }, 0) + } }, data(){ return { diff --git a/src/subpackage/order/pages/mall/send_out/send_out.vue b/src/subpackage/order/pages/mall/send_out/send_out.vue index df81259..36f153e 100644 --- a/src/subpackage/order/pages/mall/send_out/send_out.vue +++ b/src/subpackage/order/pages/mall/send_out/send_out.vue @@ -47,11 +47,14 @@ {{ e.product_name || '-' }} - - - {{ k + ';' }} + + + + {{ k + ';' }} + + ×{{ e.product_nums || 0 }} @@ -141,7 +144,7 @@ {{ k.product_name || '-' }} - 共{{ e.logistics_product_lite_list.length || 0 }}件商品 + 共{{ e.logistics_product_total || 0 }}件商品 @@ -495,6 +498,7 @@ export default { } .oi-info{ align-self: flex-start; + flex-grow: 1; .oi-tit{ margin-bottom: 12upx; line-height: 40upx; @@ -503,12 +507,21 @@ export default { @include textHide(2); } .oi-spec{ + height: 34upx; + line-height: 34upx; + font-size: 24upx; + color: #1a1a1a; + @include textHide(1); + } + .oi-amount{ line-height: 34upx; font-size: 24upx; color: #9a9a9d; + text-align: right; @include textHide(1); } } + } } }