优化台桌下单问题
This commit is contained in:
@@ -95,6 +95,7 @@ import { clearNoNum, formatDecimal } from '@/utils'
|
||||
import scanModal from '@/components/payCard/scanModal.vue'
|
||||
import { ElMessage } from "element-plus";
|
||||
import { useGlobal } from '@/store/global.js'
|
||||
import { staffPermission } from '@/api/user.js'
|
||||
|
||||
const global = useGlobal()
|
||||
|
||||
@@ -148,26 +149,33 @@ function scanCodeSuccess() {
|
||||
}
|
||||
|
||||
// 切换支付类型
|
||||
function payTypeChange(index, item) {
|
||||
if (item.disabled) return
|
||||
payActive.value = index
|
||||
payType.value = item.payType
|
||||
if (item.payType == 'scanCode') {
|
||||
scanModalRef.value.show()
|
||||
}
|
||||
if (item.payType == 'vipPay') {
|
||||
showDialog.value = true
|
||||
getMemberList()
|
||||
}
|
||||
if (payList.value[payActive.value].payType == 'deposit' && !global.orderMemberInfo.id) {
|
||||
scanModalRef.value.show()
|
||||
async function payTypeChange(index, item) {
|
||||
try {
|
||||
await staffPermission('yun_xu_shou_kuan')
|
||||
if (item.disabled) return
|
||||
payActive.value = index
|
||||
payType.value = item.payType
|
||||
if (item.payType == 'scanCode') {
|
||||
scanModalRef.value.show()
|
||||
}
|
||||
if (item.payType == 'vipPay') {
|
||||
showDialog.value = true
|
||||
getMemberList()
|
||||
}
|
||||
if (payList.value[payActive.value].payType == 'deposit' && !global.orderMemberInfo.id) {
|
||||
scanModalRef.value.show()
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
// 结算支付
|
||||
async function confirmOrder() {
|
||||
if (payLoading.value) return
|
||||
try {
|
||||
await staffPermission('yun_xu_shou_kuan')
|
||||
|
||||
if (payLoading.value) return
|
||||
if (payList.value[payActive.value].payType == 'scanCode') {
|
||||
scanModalRef.value.show()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user