From 352795d52fe79362aa06602b873165ccb4948015 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 30 May 2025 18:29:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=B7=BB=E5=8A=A0=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/order/index/config/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/order/index/config/content.ts b/src/views/order/index/config/content.ts index 801afa2..3e1ec3c 100644 --- a/src/views/order/index/config/content.ts +++ b/src/views/order/index/config/content.ts @@ -29,7 +29,7 @@ const contentConfig: IContentConfig = { // // return OrderApi.edit(data); // }, pk: "id", - toolbar: ["add"], + toolbar: [], defaultToolbar: ["refresh", "filter", "search"], cols: [ { type: "selection", width: 50, align: "center" }, From 863bab3eba234faffa7f11800b29250c01c27abc Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Fri, 30 May 2025 18:30:18 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E8=8F=9C=E5=8D=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/account/menu.ts | 13 ++ src/api/account/role.ts | 4 +- src/data/menus.ts | 98 +++++++++++ src/store/modules/carts.ts | 7 +- src/views/admin/system/menu/index.vue | 62 ++++++- src/views/admin/system/role/index.vue | 225 ++++++++++++++++++-------- src/views/shop/staff/index.vue | 8 +- src/views/tool/table/index.vue | 2 +- 8 files changed, 340 insertions(+), 79 deletions(-) create mode 100644 src/data/menus.ts diff --git a/src/api/account/menu.ts b/src/api/account/menu.ts index 34c496a..9438ec4 100644 --- a/src/api/account/menu.ts +++ b/src/api/account/menu.ts @@ -9,6 +9,12 @@ const MenuApi = { method: "get", }); }, + getCashMenus() { + return request({ + url: `${baseURL}/list/cash`, + method: "get", + }); + }, /**获取所有菜单 */ getList(data: getListRequest) { return request({ @@ -48,6 +54,13 @@ const MenuApi = { }; export default MenuApi; +export interface CashMenu { + component?: null | string; + menuId: number; + name: null | string; + path?: null | string; + [property: string]: any; +} /** RouteVO,路由对象 */ export interface RouteVO { diff --git a/src/api/account/role.ts b/src/api/account/role.ts index 7393e11..b51a900 100644 --- a/src/api/account/role.ts +++ b/src/api/account/role.ts @@ -33,11 +33,11 @@ const RoleApi = { }); }, // 获取角色对应的菜单id - getMenu(id: number) { + getMenu(id: number, type: number = 0) { return request({ url: `${baseURL}/menu`, method: "get", - params: { id }, + params: { id, type }, }); }, }; diff --git a/src/data/menus.ts b/src/data/menus.ts new file mode 100644 index 0000000..9bf08fd --- /dev/null +++ b/src/data/menus.ts @@ -0,0 +1,98 @@ +//收银机菜单列表 +export const casher_windows_menus = [ + { + title: '销售汇总', + icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg', + pageUrl: 'PAGES_SALES_SUMMARY' + }, + { + title: '代客下单', + icon: '/static/indexImg/icon-substitute-ordering.svg', + pageUrl: 'PAGES_CREATE_ORDER', + }, + { + title: '桌台', + icon: '/static/indexImg/icon-table.svg', + pageUrl: 'PAGES_TABLE' + }, + { + title: '商品管理', + icon: '/static/indexImg/icon-product-control.svg', + pageUrl: 'PAGES_PRODUCT' + }, + { + title: '分组管理', + icon: '/static/indexImg/goods-group.svg', + pageUrl: 'PAGES_GOODS_GROUP' + }, + { + title: '分类管理', + icon: '/static/indexImg/icon-category.svg', + pageUrl: 'PAGES_CATEGORY' + }, + { + title: '会员管理', + icon: '/static/indexImg/icon-user.svg', + pageUrl: 'PAGES_USER_CONTROL' + }, + { + title: '员工管理', + icon: '/static/indexImg/icon-staff.svg', + pageUrl: 'PAGES_STAFF' + }, + { + title: '耗材管理', + icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg', + pageUrl: 'PAGES_SALES_CONSUMABLES' + }, + { + title: '订单管理', + icon: '/static/indexImg/icon-order.svg', + pageUrl: 'PAGES_ORDER_INDEX' + }, + { + title: '设备管理', + icon: '/static/indexImg/icon-printer.svg', + pageUrl: 'PAGES_PRINTER_INDEX' + }, + { + title: '交班', + icon: '/static/indexImg/icon-work.svg', + pageUrl: 'PAGES_WORK_INDEX' + }, + { + title: '排队', + icon: '/static/indexImg/icon-line-up.svg', + pageUrl: 'PAGES_LINE_UP' + }, + { + title: '霸王餐', + icon: '/static/indexImg/icon-bwc.svg', + pageUrl: 'PAGES_BWC' + }, + { + title: '优惠券', + icon: '/static/coupon/icon_coupon.svg', + pageUrl: 'PAGES_COUPON_INDEX' + }, + { + title: '订阅通知', + icon: '/static/indexImg/icon-notification.svg', + pageUrl: 'PAGES_NOTIFICATION_INDEX' + }, + { + title: '挂账管理', + icon: '/static/indexImg/icon_credit.svg', + pageUrl: 'PAGES_CREDIT_BUYER_INDEX' + }, + { + title: '核销管理', + icon: '/static/indexImg/pagewriteoff.svg', + pageUrl: 'PAGES_WEITEOFF' + }, + { + title: '退出登录', + icon: '/static/indexImg/icon-login-out.svg', + pageUrl: 'PAGES_LOGIN', + } +] \ No newline at end of file diff --git a/src/store/modules/carts.ts b/src/store/modules/carts.ts index c911ddb..8073d2f 100644 --- a/src/store/modules/carts.ts +++ b/src/store/modules/carts.ts @@ -22,6 +22,11 @@ export const useCartsStore = defineStore("carts", () => { let dinnerType = ref('dine-in'); + //就餐模式 先付 后付 + const isPayBefore = computed(() => { + return shopUser.userInfo.registerType == 'before' ? true : false; + }); + //是否启用会员价 const useVipPrice = computed(() => { @@ -776,7 +781,7 @@ export const useCartsStore = defineStore("carts", () => { changeTable, rotTable, getGoods, - setGoodsMap + setGoodsMap, isPayBefore }; }); diff --git a/src/views/admin/system/menu/index.vue b/src/views/admin/system/menu/index.vue index 3cc209b..a847f50 100644 --- a/src/views/admin/system/menu/index.vue +++ b/src/views/admin/system/menu/index.vue @@ -233,6 +233,49 @@ + + + + + + + + + + +
+
+ 添加 +
+
+ + + + {{ item.label }} + + + + + + + + + +
+
+
隐藏 @@ -302,7 +345,19 @@ const dialog = reactive({ title: "新增菜单", visible: false, }); - +const apiMethodOptions = ref([ + { value: "All", label: "All" }, + { value: "GET", label: "GET" }, + { value: "POST", label: "POST" }, + { value: "PUT", label: "PUT" }, + { value: "DELETE", label: "DELETE" }, +]); +function apiInfoPush() { + if (!formData.value.apiInfo) { + formData.value.apiInfo = []; + } + formData.value.apiInfo.push({ method: "All", url: "" }); +} // 查询参数 const queryParams = reactive({}); // 菜单表格数据 @@ -326,6 +381,10 @@ const initialeditRequestData = ref({ path: "", component: "", name: "", + miniPath: "", + miniComponent: "", + miniIcon: "", + apiInfo: [], }); // 菜单表单数据 const formData = ref({ ...initialeditRequestData.value }); @@ -414,6 +473,7 @@ function handleOpenDialog(pid?: string, menuId?: string) { path: data.path || "", // Ensure path is always a string title: data.title || "", // Ensure title is always a string type: data.type ?? 0, // Ensure type is always a number + apiInfo: data.apiInfo ? JSON.parse(data.apiInfo) : [], }; }); } else { diff --git a/src/views/admin/system/role/index.vue b/src/views/admin/system/role/index.vue index ba710a9..0a56550 100644 --- a/src/views/admin/system/role/index.vue +++ b/src/views/admin/system/role/index.vue @@ -108,10 +108,10 @@ - - + +