优化订单退款
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
<span class="num">{{ money }}</span>
|
||||
</div>
|
||||
<div class="t2">
|
||||
<span>原价:¥{{ formatDecimal(props.amount - goodsStore.tableInfo.tableFee) }}</span>
|
||||
<span style="margin-left: 20px">餐位费:¥{{ formatDecimal(goodsStore.tableInfo.tableFee) }}</span>
|
||||
<span>原价:¥{{ formatDecimal(props.amount - (goodsStore.tableInfo.tableFee || 0)) }}</span>
|
||||
<span style="margin-left: 20px">餐位费:¥{{ formatDecimal(+goodsStore.tableInfo.tableFee || 0) }}</span>
|
||||
<span style="margin-left: 20px">优惠:¥{{ formatDecimal(props.amount - money) }}</span>
|
||||
<span style="margin-left: 20px" v-if="discountRateVlaue" @click="cancelDiscount">
|
||||
折扣:{{ discountRateVlaue }}折
|
||||
@@ -404,8 +404,7 @@ async function payTypeChange(index, item) {
|
||||
// 结算支付
|
||||
async function confirmOrder() {
|
||||
try {
|
||||
payLoading.value = true;
|
||||
|
||||
if (payLoading.value) return
|
||||
payData.value.checkOrderPay.orderAmount = formatDecimal(+money.value);
|
||||
payData.value.checkOrderPay.roundAmount = roundAmount.value;
|
||||
payData.value.checkOrderPay.vipPrice = goodsStore.vipUserInfo.userId ? 1 : 0;
|
||||
@@ -414,8 +413,10 @@ async function confirmOrder() {
|
||||
// await staffPermission("yun_xu_shou_kuan");
|
||||
if (payActive.value == "buyer") {
|
||||
showBuyerHandle();
|
||||
return
|
||||
} else if (payList.value[payActive.value].payType == "scanCode") {
|
||||
scanModalRef.value.show();
|
||||
return
|
||||
} else {
|
||||
// if (money.value < props.amount) return
|
||||
payLoading.value = true;
|
||||
@@ -424,21 +425,21 @@ async function confirmOrder() {
|
||||
// 会员码支付
|
||||
payLoading.value = false;
|
||||
scanModalRef.value.show();
|
||||
break;
|
||||
return;
|
||||
case "cash":
|
||||
//现金
|
||||
if (props.selecttype == 0) {
|
||||
payLoading.loading = true
|
||||
await cashPay(payData.value);
|
||||
} else {
|
||||
}
|
||||
break;
|
||||
break
|
||||
case "vipPay":
|
||||
// 会员支付
|
||||
console.log("使用会员id支付");
|
||||
payLoading.value = false;
|
||||
showDialog.value = true;
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -677,7 +678,7 @@ const calcPointMoney = _.debounce(async function () {
|
||||
|
||||
// 当dialog打开时
|
||||
function couponDialogOpen() {
|
||||
couponForm.value.amount = formatDecimal(money.value - goodsStore.tableInfo.tableFee)
|
||||
couponForm.value.amount = formatDecimal(money.value - (goodsStore.tableInfo.tableFee || 0))
|
||||
couponForm.value.originAmount = couponForm.value.amount
|
||||
resetCouponForm.value = { ...couponForm.value }
|
||||
|
||||
@@ -840,7 +841,7 @@ function discountConfirm() {
|
||||
payData.value.checkOrderPay.orderAmount = couponForm.value.amount
|
||||
|
||||
// 优惠完之后加上餐位费
|
||||
money.value = formatDecimal(+couponForm.value.amount + +goodsStore.tableInfo.tableFee)
|
||||
money.value = formatDecimal(+couponForm.value.amount + +(goodsStore.tableInfo.tableFee || 0))
|
||||
|
||||
payData.value.checkOrderPay.fullCouponDiscountAmount = couponForm.value.fullCouponDiscountAmount
|
||||
|
||||
|
||||
Reference in New Issue
Block a user