订单支付详情修改部分逻辑
This commit is contained in:
@@ -168,10 +168,19 @@
|
|||||||
</template>
|
</template>
|
||||||
<view class="u-flex u-row-between u-m-t-20">
|
<view class="u-flex u-row-between u-m-t-20">
|
||||||
<view></view>
|
<view></view>
|
||||||
<view>
|
<template v-if="orderInfo.status=='unpaid'">
|
||||||
<text>总计¥</text>
|
<view>
|
||||||
<text class="font-bold u-font-32">{{to2(allPrice*1+seatFeePrice*1+packFee*1) }}</text>
|
<text>总计¥</text>
|
||||||
</view>
|
<text class="font-bold u-font-32">{{to2(allPrice*1+seatFeePrice*1+packFee*1) }}</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<view>
|
||||||
|
<text>总计¥</text>
|
||||||
|
<text class="font-bold u-font-32">{{orderInfo.amount}}</text>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="u-flex u-row-between u-m-t-20" v-if="orderInfo.status=='closed'">
|
<!-- <view class="u-flex u-row-between u-m-t-20" v-if="orderInfo.status=='closed'">
|
||||||
<view></view>
|
<view></view>
|
||||||
@@ -466,7 +475,8 @@
|
|||||||
|
|
||||||
const youhuiAllPrice = computed(() => {
|
const youhuiAllPrice = computed(() => {
|
||||||
if(props.orderInfo.status!='unpaid'){
|
if(props.orderInfo.status!='unpaid'){
|
||||||
return (goodsOriginAllPrice.value-allPrice.value-discountAmount.value).toFixed(2)
|
const seatfee=(props.orderInfo.amount==0&&allPrice.value==0)?seatFeePrice.value:0
|
||||||
|
return (goodsOriginAllPrice.value-allPrice.value-discountAmount.value+seatfee*1).toFixed(2)
|
||||||
}
|
}
|
||||||
return (freePrice.value * 1 + vipDiscountPrice.value * 1 + props.orderInfo.fullCouponDiscountAmount + props
|
return (freePrice.value * 1 + vipDiscountPrice.value * 1 + props.orderInfo.fullCouponDiscountAmount + props
|
||||||
.orderInfo.pointsDiscountAmount + (props.orderInfo.status == 'unpaid' ? productCoupPrice.value :
|
.orderInfo.pointsDiscountAmount + (props.orderInfo.status == 'unpaid' ? productCoupPrice.value :
|
||||||
@@ -494,7 +504,8 @@
|
|||||||
const seatFee=props.orderInfo.seatInfo?(props.orderInfo.seatInfo.priceAmount||props.orderInfo.seatInfo.returnAmount):0
|
const seatFee=props.orderInfo.seatInfo?(props.orderInfo.seatInfo.priceAmount||props.orderInfo.seatInfo.returnAmount):0
|
||||||
console.log('seatFee');
|
console.log('seatFee');
|
||||||
console.log(seatFee);
|
console.log(seatFee);
|
||||||
return (props.orderInfo.amount-seatFee).toFixed(2)
|
const total=props.orderInfo.amount-seatFee
|
||||||
|
return (total<=0?0:total).toFixed(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
const goodsNumber = computed(() => {
|
const goodsNumber = computed(() => {
|
||||||
|
|||||||
@@ -91,7 +91,8 @@
|
|||||||
<text class="u-m-l-10 no-wrap">{{item.payName}}</text>
|
<text class="u-m-l-10 no-wrap">{{item.payName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex color-999 u-font-24">
|
<view class="u-flex color-999 u-font-24">
|
||||||
<view class="u-m-r-20" v-if="item.payType=='vipPay'&&user.id" @click.stop="chooseUser">
|
<view class="u-m-r-20" v-if="item.payType=='vipPay'&&user.id"
|
||||||
|
@click.stop="chooseUser">
|
||||||
<view>
|
<view>
|
||||||
<text>会员:</text>
|
<text>会员:</text>
|
||||||
<text class="u-m-r-4">{{user.telephone||user.nickName}}</text>
|
<text class="u-m-r-4">{{user.telephone||user.nickName}}</text>
|
||||||
@@ -210,6 +211,7 @@
|
|||||||
|
|
||||||
<edit-accountPoints @confirm="pointsConfirm" :price="accountPoints.num" :accountPoints="accountPoints"
|
<edit-accountPoints @confirm="pointsConfirm" :price="accountPoints.num" :accountPoints="accountPoints"
|
||||||
ref="refPoints"></edit-accountPoints>
|
ref="refPoints"></edit-accountPoints>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -257,6 +259,14 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
function confirmModelCancel() {
|
function confirmModelCancel() {
|
||||||
|
if (modal.key == 'fullCoupon') {
|
||||||
|
// 取消改价
|
||||||
|
discount.discount = 100
|
||||||
|
discount.value = 0
|
||||||
|
}
|
||||||
|
confirmModelClose()
|
||||||
|
}
|
||||||
|
function confirmModelClose() {
|
||||||
modal.show = false
|
modal.show = false
|
||||||
modal.key = ''
|
modal.key = ''
|
||||||
modal.data = ''
|
modal.data = ''
|
||||||
@@ -271,6 +281,13 @@
|
|||||||
if (modal.key == 'cash') {
|
if (modal.key == 'cash') {
|
||||||
await pay()
|
await pay()
|
||||||
confirmModelCancel()
|
confirmModelCancel()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (modal.key == 'fullCoupon') {
|
||||||
|
//删除满减券
|
||||||
|
const index = pays.quan.findIndex(v => v.type == 1)
|
||||||
|
pays.quan.splice(index, 1)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -310,7 +327,7 @@
|
|||||||
}
|
}
|
||||||
const res = await Api.$calcUsablePoints({
|
const res = await Api.$calcUsablePoints({
|
||||||
memberId: order.memberId,
|
memberId: order.memberId,
|
||||||
orderAmount:payPrice.value
|
orderAmount: payPrice.value
|
||||||
})
|
})
|
||||||
accountPoints.calcRes = res
|
accountPoints.calcRes = res
|
||||||
accountPoints.num = res.maxUsablePoints
|
accountPoints.num = res.maxUsablePoints
|
||||||
@@ -535,6 +552,14 @@
|
|||||||
...form,
|
...form,
|
||||||
value: form.price - form.currentPrice
|
value: form.price - form.currentPrice
|
||||||
})
|
})
|
||||||
|
const fullCoupon = pays.quan.find(v => v.type == 1)
|
||||||
|
if (fullCoupon && form.currentPrice < fullCoupon.fullAmount) {
|
||||||
|
modal.content = '改价后价格不满足满减券最低满减需求' + fullCoupon.fullAmount + '元'
|
||||||
|
modal.key = 'fullCoupon'
|
||||||
|
modal.show = true
|
||||||
|
modal.cancelText = '取消改价'
|
||||||
|
modal.confirmText = '删除满减券'
|
||||||
|
}
|
||||||
getPayUrl()
|
getPayUrl()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -553,7 +578,7 @@
|
|||||||
return infoBox.showToast(item.payName + '不可用')
|
return infoBox.showToast(item.payName + '不可用')
|
||||||
}
|
}
|
||||||
pays.payTypes.selIndex = i
|
pays.payTypes.selIndex = i
|
||||||
if (item.payType == 'vipPay'&&!user.value.id) {
|
if (item.payType == 'vipPay' && !user.value.id) {
|
||||||
chooseUser()
|
chooseUser()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user