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