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