diff --git a/pageTable/index/components/table-item.vue b/pageTable/index/components/table-item.vue index dfdb9e9..f8b1df1 100644 --- a/pageTable/index/components/table-item.vue +++ b/pageTable/index/components/table-item.vue @@ -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() { diff --git a/pageTable/index/index.vue b/pageTable/index/index.vue index fc88f35..47ea6c3 100644 --- a/pageTable/index/index.vue +++ b/pageTable/index/index.vue @@ -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) { diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue index af73441..ce83ee3 100644 --- a/pagesCreateOrder/confirm-order/confirm-order.vue +++ b/pagesCreateOrder/confirm-order/confirm-order.vue @@ -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') diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue index 3768fde..b4f706c 100644 --- a/pagesCreateOrder/index/index.vue +++ b/pagesCreateOrder/index/index.vue @@ -1,6 +1,6 @@