增加代客下单结账权限校验
This commit is contained in:
parent
03d1cf28e6
commit
5465657eab
|
|
@ -66,6 +66,7 @@
|
|||
import * as Api from '@/http/yskApi/Instead.js'
|
||||
import myButton from '@/components/my-components/my-button'
|
||||
import go from '@/commons/utils/go.js'
|
||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||
import {
|
||||
$status
|
||||
} from '@/commons/table-status.js'
|
||||
|
|
@ -147,14 +148,19 @@
|
|||
}
|
||||
|
||||
|
||||
function diancan() {
|
||||
const useType = props.status == 'using' ? props.data.useType : undefined
|
||||
go.to('PAGES_CREATE_ORDER', {
|
||||
tableId: props.data.tableId,
|
||||
name: props.data.name,
|
||||
maxCapacity: props.data.maxCapacity,
|
||||
status: props.data.status,
|
||||
async function diancan() {
|
||||
hasPermission('允许下单').then(res=>{
|
||||
if(res){
|
||||
const useType = props.status == 'using' ? props.data.useType : undefined
|
||||
go.to('PAGES_CREATE_ORDER', {
|
||||
tableId: props.data.tableId,
|
||||
name: props.data.name,
|
||||
maxCapacity: props.data.maxCapacity,
|
||||
status: props.data.status,
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function toOrderDetail() {
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@
|
|||
watch
|
||||
} from 'vue';
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||
const refMoreSheet = ref(null)
|
||||
const actionSheet = reactive({
|
||||
list: ['结账', '清台', '增减菜', '换台', '打印订单', '历史订单'],
|
||||
|
|
@ -139,6 +140,10 @@
|
|||
if (!item.orderId) {
|
||||
return infoBox.showToast('该桌台暂无要结账的订单!')
|
||||
}
|
||||
const canJieZhang=await hasPermission('允许收款')
|
||||
if(!canJieZhang){
|
||||
return
|
||||
}
|
||||
return toPay(item)
|
||||
}
|
||||
if (index == 1) {
|
||||
|
|
|
|||
|
|
@ -291,6 +291,7 @@
|
|||
import {
|
||||
getNowCart
|
||||
} from '@/pagesCreateOrder/util.js'
|
||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||
const models = new Map();
|
||||
const modelData = reactive({
|
||||
data: {},
|
||||
|
|
@ -561,6 +562,12 @@
|
|||
num: userNumbers.defaultCateIndex+1,
|
||||
})
|
||||
}
|
||||
if ($shop.value.registerType == 'munchies'||eatTypes.active=='takeout') {
|
||||
const canJiesuan=await hasPermission('允许收款')
|
||||
if(!canJiesuan){
|
||||
return
|
||||
}
|
||||
}
|
||||
// updateChoseCount()
|
||||
const res = await Api.$createOrder(par)
|
||||
uni.$emit('update:createOrderIndex')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="u-wrap">
|
||||
|
||||
<view class="u-fixed position-all" style="z-index: 999;" v-if="!canXiadan" @click="xiadanClick"></view>
|
||||
<view class="top bg-fff w-full">
|
||||
<template v-if="option.type!='add'">
|
||||
<view class="u-flex u-row-between choose-user" @tap="chooseTable">
|
||||
|
|
@ -173,6 +173,12 @@
|
|||
import {
|
||||
tbShopInfo
|
||||
} from '@/http/yskApi/user.js'
|
||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||
let canXiadan=ref(false)
|
||||
async function xiadanClick(){
|
||||
canXiadan.value=await hasPermission('允许下单')
|
||||
}
|
||||
xiadanClick()
|
||||
const instance = getCurrentInstance();
|
||||
//临时菜
|
||||
const lingshi = reactive({
|
||||
|
|
@ -416,6 +422,7 @@
|
|||
});
|
||||
return [...prve, ...cur.childrenList];
|
||||
}, []);
|
||||
console.log(category);
|
||||
$category = category
|
||||
const goodsRes = await getGoods()
|
||||
const goods = goodsRes.records.filter((v) => {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@
|
|||
import tuicaiVue from './components/tuicai.vue';
|
||||
import go from '@/commons/utils/go.js'
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
import {$hasPermission} from '@/http/yskApi/shop.js'
|
||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
||||
import {
|
||||
onLoad,
|
||||
|
|
@ -201,7 +200,11 @@
|
|||
})
|
||||
}, 1500)
|
||||
|
||||
function diancan() {
|
||||
async function diancan() {
|
||||
const canXiadan=await hasPermission('允许下单')
|
||||
if(!canXiadan){
|
||||
return
|
||||
}
|
||||
clearEmit()
|
||||
go.to('PAGES_CREATE_ORDER', {
|
||||
tableId: options.tableId || orderDetail.info.tableId,
|
||||
|
|
@ -210,7 +213,11 @@
|
|||
})
|
||||
}
|
||||
|
||||
function toPay() {
|
||||
async function toPay() {
|
||||
const canJieZhang=await hasPermission('允许收款')
|
||||
if(!canJieZhang){
|
||||
return
|
||||
}
|
||||
const userId=orderDetail.info.userId||''
|
||||
clearEmit()
|
||||
go.to('PAGES_ORDER_PAY', {
|
||||
|
|
|
|||
Loading…
Reference in New Issue