订单支付详情修改部分逻辑
This commit is contained in:
@@ -91,7 +91,8 @@
|
||||
<text class="u-m-l-10 no-wrap">{{item.payName}}</text>
|
||||
</view>
|
||||
<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>
|
||||
<text>会员:</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"
|
||||
ref="refPoints"></edit-accountPoints>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -257,6 +259,14 @@
|
||||
})
|
||||
|
||||
function confirmModelCancel() {
|
||||
if (modal.key == 'fullCoupon') {
|
||||
// 取消改价
|
||||
discount.discount = 100
|
||||
discount.value = 0
|
||||
}
|
||||
confirmModelClose()
|
||||
}
|
||||
function confirmModelClose() {
|
||||
modal.show = false
|
||||
modal.key = ''
|
||||
modal.data = ''
|
||||
@@ -271,6 +281,13 @@
|
||||
if (modal.key == 'cash') {
|
||||
await pay()
|
||||
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({
|
||||
memberId: order.memberId,
|
||||
orderAmount:payPrice.value
|
||||
orderAmount: payPrice.value
|
||||
})
|
||||
accountPoints.calcRes = res
|
||||
accountPoints.num = res.maxUsablePoints
|
||||
@@ -535,6 +552,14 @@
|
||||
...form,
|
||||
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()
|
||||
}
|
||||
|
||||
@@ -553,7 +578,7 @@
|
||||
return infoBox.showToast(item.payName + '不可用')
|
||||
}
|
||||
pays.payTypes.selIndex = i
|
||||
if (item.payType == 'vipPay'&&!user.value.id) {
|
||||
if (item.payType == 'vipPay' && !user.value.id) {
|
||||
chooseUser()
|
||||
}
|
||||
}
|
||||
@@ -732,7 +757,7 @@
|
||||
})
|
||||
const pointCanDicountPrice = computed(() => {
|
||||
const total = (order.amount || 0) - productCouponDiscountAmount.value - discount.value -
|
||||
fullCouponDiscountAmount.value
|
||||
fullCouponDiscountAmount.value
|
||||
return (total < 0 ? 0 : total).toFixed(2)
|
||||
})
|
||||
watch(() => pointCanDicountPrice.value, (newval) => {
|
||||
|
||||
Reference in New Issue
Block a user