增加代客下单结账权限校验

This commit is contained in:
2024-10-21 11:19:52 +08:00
parent 03d1cf28e6
commit 5465657eab
5 changed files with 43 additions and 11 deletions

View File

@@ -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')

View File

@@ -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) => {