From 75161519f278a619b7dffddfe466d9b79f835816 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 22 Nov 2024 16:56:51 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E4=BB=B7=E6=A0=BC=E5=B1=95=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesOrder/detail/components/list.vue | 38 ++++++++++++++++++---------
pagesOrder/pay-order/pay-order.vue | 4 +--
2 files changed, 27 insertions(+), 15 deletions(-)
diff --git a/pagesOrder/detail/components/list.vue b/pagesOrder/detail/components/list.vue
index e60b411..f152c0f 100644
--- a/pagesOrder/detail/components/list.vue
+++ b/pagesOrder/detail/components/list.vue
@@ -47,6 +47,10 @@
custom-style="background-color: #E6F0FF; border-color: #E6F0FF; color: #318AFE;"
size="small" text="打包" inverted type="success" />
+
+ 退款金额:
+ {{item.returnAmount}}
+
{{item.productSkuName||''}}
@@ -192,7 +196,7 @@
优惠详情
-
+
会员优惠
¥
@@ -336,17 +340,22 @@
const canTuiKuanPrice = computed(() => {
return props.data.reduce((prve,cur)=>{
- const curTotal=cur.info.filter(v=>!v.userCouponId).reduce((a,b)=>{
- return a+b.priceAmount*1
- },0)
- // const curTotal=cur.info.filter(v=>canTuiKuan(props.orderInfo,v)&&!v.userCouponId).reduce((a,b)=>{
+ // const curTotal=cur.info.filter(v=>!v.userCouponId).reduce((a,b)=>{
// return a+b.priceAmount*1
// },0)
+ const curTotal=cur.info.filter(v=>canTuiKuan(props.orderInfo,v)&&!v.userCouponId).reduce((a,b)=>{
+ return a+b.priceAmount*1
+ },0)
return prve+curTotal
},0)
})
function returnCanTuiMoney(item) {
- return (item.priceAmount/canTuiKuanPrice.value*props.orderInfo.amount).toFixed(2)
+ console.log(canTuiKuanPrice.value);
+ if(props.orderInfo.status=='unpaid'){
+ return returnTotalMoney(item)
+ }else{
+ return (item.priceAmount/canTuiKuanPrice.value*props.orderInfo.amount).toFixed(2)
+ }
}
function to2(n) {
@@ -454,8 +463,9 @@
})
const packFee = computed(() => {
+ //不是退菜只要有打包费的都计算,包括赠送
const goodsPrice = props.data.reduce((prve, cur) => {
- const curTotal = cur.info.filter(v => v.gift != true && v.status !== "return").reduce((a,
+ const curTotal = cur.info.filter(v => v.status !== "return").reduce((a,
b) => {
return a + b.packAmount
}, 0)
@@ -465,12 +475,14 @@
})
const allPrice = computed(() => {
-
- if (props.orderInfo.status == 'unpaid') {
- const n = goodsOriginAllPrice.value - youhuiAllPrice.value
- return (n < 0 ? 0 : n).toFixed(2)
- }
- return props.orderInfo.amount
+ const n = goodsOriginAllPrice.value - youhuiAllPrice.value
+ return (n < 0 ? 0 : n).toFixed(2)
+
+ // if (props.orderInfo.status == 'unpaid') {
+ // const n = goodsOriginAllPrice.value - youhuiAllPrice.value
+ // return (n < 0 ? 0 : n).toFixed(2)
+ // }
+ // return props.orderInfo.amount
})
const goodsNumber = computed(() => {
diff --git a/pagesOrder/pay-order/pay-order.vue b/pagesOrder/pay-order/pay-order.vue
index 705cf19..8e85467 100644
--- a/pagesOrder/pay-order/pay-order.vue
+++ b/pagesOrder/pay-order/pay-order.vue
@@ -91,7 +91,7 @@
{{item.payName}}
-
+
会员:
{{user.telephone||user.nickName}}
@@ -553,7 +553,7 @@
return infoBox.showToast(item.payName + '不可用')
}
pays.payTypes.selIndex = i
- if (item.payType == 'vipPay') {
+ if (item.payType == 'vipPay'&&!user.value.id) {
chooseUser()
}
}