From b6f7824846b0e1439628829f27ff4ac760f5aa75 Mon Sep 17 00:00:00 2001 From: dzq Date: Tue, 30 Dec 2025 08:34:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=9C=BA=E6=9F=9C):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9C=BA=E6=9F=9C=E6=A8=A1=E5=BC=8F=E5=88=86=E7=B1=BB=E5=92=8C?= =?UTF-8?q?=E5=95=86=E5=BA=97=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 MODE_MAP 常量定义机柜模式映射关系 - 重构商店列表为分类侧边栏+列表布局 - 添加一键全开功能 - 优化商店列表样式和响应式设计 - 修改 getShopListApi 接口参数为对象形式 - 添加 getModeListApi 接口获取模式列表 --- src/App.vue | 2 + src/common/apis/shop/index.ts | 22 +- src/common/utils/maps/mode.ts | 8 + src/pages/cabinet/index.vue | 397 +++++++++++++++++++---- src/pages/cabinet/storage-horizontal.vue | 2 +- src/pages/product/ProductList.vue | 4 +- 6 files changed, 355 insertions(+), 80 deletions(-) create mode 100644 src/common/utils/maps/mode.ts diff --git a/src/App.vue b/src/App.vue index 9e505a7..4b343ec 100644 --- a/src/App.vue +++ b/src/App.vue @@ -39,6 +39,8 @@ onMounted(async () => { let corpid = urlParams.get('corpid') || undefined; const cid = urlParams.get('cid') || undefined; let isAdmin = urlParams.get('isAdmin') || undefined; + // 模拟管理员 + // isAdmin = '1'; if (cid && Number(cid)) { try { diff --git a/src/common/apis/shop/index.ts b/src/common/apis/shop/index.ts index 5a31e4f..ae227f6 100644 --- a/src/common/apis/shop/index.ts +++ b/src/common/apis/shop/index.ts @@ -99,16 +99,24 @@ export function getBalanceByQyUserid(corpid: string, userid: string) { }) } -export function getShopListApi(corpid: string, mode?: number) { - const params: any = { - corpid - }; - if (typeof mode !== 'undefined') { - params.mode = mode; - } +export interface GetShopListParams { + corpid: string; + mode?: number; + eqMode?: number; +} + +export function getShopListApi(params: GetShopListParams) { return request>({ url: "shop/list", method: "get", params }) +} + +/** 获取模式列表 */ +export function getModeListApi() { + return request>({ + url: "shop/mode/list", + method: "get" + }) } \ No newline at end of file diff --git a/src/common/utils/maps/mode.ts b/src/common/utils/maps/mode.ts new file mode 100644 index 0000000..eb50d50 --- /dev/null +++ b/src/common/utils/maps/mode.ts @@ -0,0 +1,8 @@ +export const MODE_MAP: Record = { + 0: '支付柜', + 1: '审批柜', + 2: '借还柜', + 3: '会员柜', + 4: '耗材柜', + 5: '暂存柜', +} \ No newline at end of file diff --git a/src/pages/cabinet/index.vue b/src/pages/cabinet/index.vue index 8629f1f..14447d3 100644 --- a/src/pages/cabinet/index.vue +++ b/src/pages/cabinet/index.vue @@ -1,20 +1,50 @@