增加支付检测是否锁定
This commit is contained in:
@@ -401,6 +401,7 @@ async function payTypeChange(index, item) {
|
||||
// if (item.disabled) return
|
||||
payActive.value = index;
|
||||
payType.value = item.payType;
|
||||
|
||||
if (item.payType == "scanCode") {
|
||||
scanModalRef.value.show();
|
||||
}
|
||||
@@ -426,6 +427,10 @@ async function payTypeChange(index, item) {
|
||||
// 结算支付
|
||||
async function confirmOrder() {
|
||||
try {
|
||||
// 判断订单是否锁定
|
||||
await goodsStore.isOrderLock({
|
||||
table_code: goodsStore.orderListInfo.tableCode
|
||||
})
|
||||
if (payLoading.value) return
|
||||
// await staffPermission("yun_xu_shou_kuan");
|
||||
if (payList.value[payActive.value].payType == "arrears") {
|
||||
@@ -448,7 +453,6 @@ async function confirmOrder() {
|
||||
if (props.selecttype == 0) {
|
||||
payLoading.loading = true
|
||||
await cashPay(payData.value);
|
||||
} else {
|
||||
}
|
||||
break
|
||||
case "member-account":
|
||||
@@ -467,12 +471,16 @@ async function confirmOrder() {
|
||||
emit("paySuccess");
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
payLoading.value = false;
|
||||
if (error.code == 1003) {
|
||||
ElMessage.error(error.msg)
|
||||
return
|
||||
}
|
||||
if (error.code == 701) {
|
||||
// 订单已过期需刷新购物车和订单
|
||||
emit('orderExpired')
|
||||
}
|
||||
console.log(error);
|
||||
payLoading.value = false;
|
||||
scanModalRef.value.loading = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user