From 51fe757b6a81b2b6e6f6db1960b2d9bdd3cebb5e Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Fri, 29 May 2026 10:28:04 +0800 Subject: [PATCH 1/8] 11 --- src/pages/merchant/merchant-activity.vue | 25 ++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/pages/merchant/merchant-activity.vue b/src/pages/merchant/merchant-activity.vue index 6efbaa9..998e04c 100644 --- a/src/pages/merchant/merchant-activity.vue +++ b/src/pages/merchant/merchant-activity.vue @@ -1,6 +1,6 @@ + + + diff --git a/src/pages/order/detail.vue b/src/pages/order/detail.vue index c62817d..07e85a2 100644 --- a/src/pages/order/detail.vue +++ b/src/pages/order/detail.vue @@ -1,18 +1,40 @@ diff --git a/src/sheep/components/order/order-status-tag.vue b/src/sheep/components/order/order-status-tag.vue new file mode 100644 index 0000000..61feb64 --- /dev/null +++ b/src/sheep/components/order/order-status-tag.vue @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/src/sheep/constant/service-enum.ts b/src/sheep/constant/service-enum.ts index 7daa6c2..5748d1b 100644 --- a/src/sheep/constant/service-enum.ts +++ b/src/sheep/constant/service-enum.ts @@ -36,6 +36,13 @@ const hardwareRefundStatusEnum = { 30: "售后失败", } +const hardSaleStatusEnum = { + 0: "售后中", + 50: "售后完成", + 61: "买家取消", + 62: "卖家拒绝", +} + const carTypeEnum = { 1: "私家车", 2: "公车", @@ -98,4 +105,5 @@ export default { actCouponLimitTypeEnum, actCouponTypeEnum, actUserReceiveEnum, + hardSaleStatusEnum, } diff --git a/src/sheep/hooks/use-scan-code.ts b/src/sheep/hooks/use-scan-code.ts index 8a004c2..ebde816 100644 --- a/src/sheep/hooks/use-scan-code.ts +++ b/src/sheep/hooks/use-scan-code.ts @@ -7,6 +7,7 @@ export function useScanCode(actModalShow) { const appInfo = await getAppInfo() if (isDevEnv()) { + let testQrCode = "" // 开发环境模拟扫码 // const testQrCode = "eyJpZCI6IjE5MDU4ODg4NjQ0NTQ1MzMxMjEiLCJuYW1lIjoi6ICB5Y6/5bqc6aOf5aCCIn0=" // 测试线上-老县府食堂-收款二维码 // const testQrCode = "eyJoYXJkRG9vcklkIjoiMTkxNDIxNTYwODQzNzQxMTg0MSIsImNhYmluZXRObyI6IjEifQ==" // 测试线上-智能柜-收款二维码 @@ -15,7 +16,13 @@ export function useScanCode(actModalShow) { // const testQrCode = "http://192.168.101.45:8889/h5/#/pages/pay/scanPay?id=1905816751043452930&name=测试新县府超市" // 邓本地-测试环境-新县府超市收款二维码 // const testQrCode = "http://192.168.101.45:8889/h5/#/pages/pay/scanPay?hardDoorId=1913157080418295809&cabinetNo=1" // 测试智能柜柜门二维码 // const testQrCode = "eyJjYW5jZWxJZCI6IjE5ODQyNDA4MzM5NDMyMDc5MzcifQ==" // 测试商户活动核销 - const testQrCode = "https://stgl.pj.gov.cn/h5/#/pages/pay/scanPay?id=1931916121241079810" + // const testQrCode = "https://stgl.pj.gov.cn/h5/#/pages/pay/scanPay?id=1931916121241079810" + // 测试环境(自营食堂)-新县府食堂 + // testQrCode = "https://stgl.pj.gov.cn/h5/#/pages/pay/scanPay?id=1905816666859577346" + // 测试环境(合作商家)-测试部门超市 + testQrCode = "https://stgl.pj.gov.cn/h5/#/pages/pay/scanPay?id=1931916121241079810" + // 测试环境(自营商家)-老县府超市 + // testQrCode = "https://stgl.pj.gov.cn/h5/#/pages/pay/scanPay?id=1905816898011865090" uni.showModal({ content: "开发环境不是浙政钉和诗画环境,扫码仅供测试" }) return Promise.resolve(testQrCode) } diff --git a/src/sheep/scss/font/iconfont.scss b/src/sheep/scss/font/iconfont.scss index dd51a98..a0ee45d 100644 --- a/src/sheep/scss/font/iconfont.scss +++ b/src/sheep/scss/font/iconfont.scss @@ -1,9 +1,9 @@ @font-face { font-family: "iconfont"; /* Project id 4740692 */ - src: url('//at.alicdn.com/t/c/font_4740692_uwg9mtj0d0p.woff2?t=1770172172940') format('woff2'), - url('//at.alicdn.com/t/c/font_4740692_uwg9mtj0d0p.woff?t=1770172172940') format('woff'), - url('//at.alicdn.com/t/c/font_4740692_uwg9mtj0d0p.ttf?t=1770172172940') format('truetype'); + src: url('https://at.alicdn.com/t/c/font_4740692_ol93veips6n.woff2?t=1782372215492') format('woff2'), + url('https://at.alicdn.com/t/c/font_4740692_ol93veips6n.woff?t=1782372215492') format('woff'), + url('https://at.alicdn.com/t/c/font_4740692_ol93veips6n.ttf?t=1782372215492') format('truetype'); } .iconfont { @@ -14,6 +14,114 @@ -moz-osx-font-smoothing: grayscale; } +.icon-jisuwuliu:before { + content: "\e61a"; +} + +.icon-add:before { + content: "\e79e"; +} + +.icon-add1:before { + content: "\e6aa"; +} + +.icon-bianji:before { + content: "\e763"; +} + +.icon-address1:before { + content: "\e605"; +} + +.icon-address:before { + content: "\e659"; +} + +.icon-address-f:before { + content: "\e604"; +} + +.icon-zhifufangshi:before { + content: "\e759"; +} + +.icon-zhifufangshi-yuezhifu:before { + content: "\e68c"; +} + +.icon-zhifufangshi1:before { + content: "\e603"; +} + +.icon-rili:before { + content: "\e60e"; +} + +.icon-hexiaoicon:before { + content: "\e602"; +} + +.icon-hexiao1:before { + content: "\e7fe"; +} + +.icon-hexiao:before { + content: "\e63f"; +} + +.icon-fanhui:before { + content: "\e8fb"; +} + +.icon-tongzhi:before { + content: "\e61b"; +} + +.icon-dangqianweizhi:before { + content: "\e678"; +} + +.icon-sousuo:before { + content: "\e619"; +} + +.icon-yizuofei1:before { + content: "\e60d"; +} + +.icon-yizuofei:before { + content: "\f2d8"; +} + +.icon-jilu1:before { + content: "\e631"; +} + +.icon-jilu:before { + content: "\e664"; +} + +.icon-kefu:before { + content: "\e677"; +} + +.icon-kefu1:before { + content: "\e612"; +} + +.icon-info:before { + content: "\e64a"; +} + +.icon-setting:before { + content: "\e8d8"; +} + +.icon-shezhi:before { + content: "\e601"; +} + .icon-yiguoqi:before { content: "\e642"; } diff --git a/src/sheep/utils/user-role.ts b/src/sheep/utils/user-role.ts new file mode 100644 index 0000000..97b4d53 --- /dev/null +++ b/src/sheep/utils/user-role.ts @@ -0,0 +1,76 @@ +import { constant } from "@@/index" +import { userApi } from "@@/api" + +export const ROLE_ONLINE_CANTEEN_MCH = "ONLINE_CANTEEN_MCH" +export const ROLE_CANTEEN_RIDER = "CANTEEN_RIDER" +// 移动端商户角色(核销订餐二维码) +export const MCH_USER = "MCH_USER" +/** 移动端后台管理入口角色 */ +export const ROLE_MOBILE_ADMIN_PC = "MOBILE_ADMIN_PC" +/** 新增用户默认角色 */ +export const ROLE_GENERAL_USER = "GENERAL_USER" +export const ROLE_WALLET_AUTO_CREATE = "WALLET_AUTO_CREATE" + +const DEFAULT_NEW_USER_ROLES = [ + { roleCode: ROLE_GENERAL_USER, roleId: "2" }, + { roleCode: ROLE_WALLET_AUTO_CREATE, roleId: "1873557615006810113" }, +] as const + +/** 新增用户时默认勾选的角色 ID(优先按 roleCode 从列表解析) */ +export const resolveDefaultNewUserRoleIds = (roleList: { roleId?: string | number; roleCode?: string }[]): string[] => + DEFAULT_NEW_USER_ROLES.map(({ roleCode, roleId }) => { + const hit = roleList.find((r) => r.roleCode === roleCode) + return hit ? String(hit.roleId) : roleId + }) + +export const getUserRoleCodes = (): string[] => { + const userInfo: any = uni.getStorageSync(constant.storageConstant.USERINFO) || {} + const codes = userInfo?.roleCodes + if (Array.isArray(codes)) return codes.filter(Boolean) + return [] +} + +export const hasRoleCode = (code: string) => getUserRoleCodes().includes(code) + +/** 刷新用户信息中的 roleCodes(我的页菜单、统计页鉴权用) */ +export const refreshUserRoleCodes = async (): Promise => { + try { + const res: any = await userApi.userInfo() + if (res?.code === 0 && res.data) { + uni.setStorageSync(constant.storageConstant.USERINFO, res.data) + return Array.isArray(res.data.roleCodes) ? res.data.roleCodes : [] + } + } catch (e) { + console.warn("refreshUserRoleCodes failed", e) + } + return getUserRoleCodes() +} + +/** 移动端后台管理 - 权限码(与 PC 角色菜单分配一致) */ +export const PERM_SYS_USER_ADD = "sys_user_add" +export const PERM_SYS_USER_EDIT = "sys_user_edit" +export const PERM_SYS_USER_DEL = "sys_user_del" +export const PERM_WALLET_MANAGE_VIEW = "wallet_walletManage_view" +export const PERM_WALLET_MANAGE_EDIT = "wallet_walletManage_edit" +export const PERM_WALLET_UPDATE_BALANCE = "wallet_walletTransaction_update_balance" + +export const ADMIN_USER_PERMS = [PERM_SYS_USER_ADD, PERM_SYS_USER_EDIT, PERM_SYS_USER_DEL] +export const ADMIN_WALLET_PERMS = [PERM_WALLET_MANAGE_VIEW, PERM_WALLET_MANAGE_EDIT, PERM_WALLET_UPDATE_BALANCE] +export const ADMIN_HUB_PERMS = [...ADMIN_USER_PERMS, ...ADMIN_WALLET_PERMS] + +export const getUserPermissions = (): string[] => { + const userInfo: any = uni.getStorageSync(constant.storageConstant.USERINFO) || {} + const perms = userInfo?.permissions + if (Array.isArray(perms)) return perms.filter(Boolean) + return [] +} + +export const hasPermission = (code: string) => getUserPermissions().includes(code) + +export const hasAnyPermission = (codes: string[]) => codes.some((code) => hasPermission(code)) + +/** 刷新 permissions(顺带刷新 roleCodes) */ +export const refreshUserPermissions = async (): Promise => { + await refreshUserRoleCodes() + return getUserPermissions() +} From 1b3ead7a0ed3517a42e5732327f52ae18d30410d Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Mon, 13 Jul 2026 09:39:18 +0800 Subject: [PATCH 5/8] 11 --- src/sheep/components/order/order-car.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/sheep/components/order/order-car.vue b/src/sheep/components/order/order-car.vue index 0cfcf72..1e1c60e 100644 --- a/src/sheep/components/order/order-car.vue +++ b/src/sheep/components/order/order-car.vue @@ -222,7 +222,11 @@ const doCancel = (v: any) => { - ¥{{ hooks.useMoney(props.cardetail.payPrice) }} + + ¥{{ hooks.useMoney(props.cardetail.totalPrice) }} + + ¥{{ hooks.useMoney(props.cardetail.payPrice) }} 共 {{ props.cardetail.carList?.length || 0 }} 件 @@ -243,8 +247,14 @@ const doCancel = (v: any) => { {{ hooks.useEnum('hardwarePayTypeEnum', props.cardetail.payType) }} - - ¥{{ hooks.useMoney(props.cardetail.payPrice) }} + + + ¥{{ hooks.useMoney(props.cardetail.totalPrice) }} + + + ¥{{ hooks.useMoney(props.cardetail.payPrice) }} + From feb4776d8567c3f30a879835c83893accbbe33c0 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Tue, 14 Jul 2026 10:21:51 +0800 Subject: [PATCH 6/8] 11 --- src/pages/tabbar/index.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/tabbar/index.vue b/src/pages/tabbar/index.vue index 5d130e1..b1f72f3 100644 --- a/src/pages/tabbar/index.vue +++ b/src/pages/tabbar/index.vue @@ -65,7 +65,9 @@ onShow(() => { if (fromUrl) { uni.setStorageSync("launchParam", fromUrl) } - // jumpByParam() + if (!isDevEnv()) { + jumpByParam() + } }) const jumpByParam = async () => { From 352df06fabda5234c7b328a950e742be392b20d0 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 16 Jul 2026 11:30:39 +0800 Subject: [PATCH 7/8] =?UTF-8?q?feat:=E9=80=80=E6=AC=BE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 8 ++++---- src/pages/tabbar/order.vue | 28 +++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.env b/.env index 6200335..4b14a59 100644 --- a/.env +++ b/.env @@ -25,16 +25,16 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' # VITE_ZZD_CORP_ID= # --------------------------- 开发环境 api地址 ---------------------------------- -# VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 +VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 #VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 - VITE_APP_DEV_SERVICE = https://dzc-test-1.fy.takin.cc # 邓-本地 +# VITE_APP_DEV_SERVICE = https://dzc-test-1.fy.takin.cc # 邓-本地 # VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 开发环境 图片访问基础地址 --------------------------- -# VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 +VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 #VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上 -VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地 +# VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地 # VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 # VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 diff --git a/src/pages/tabbar/order.vue b/src/pages/tabbar/order.vue index f59d681..58511e8 100644 --- a/src/pages/tabbar/order.vue +++ b/src/pages/tabbar/order.vue @@ -8,6 +8,7 @@ import { orderApi } from "@@/api" import zTabs from "@@/components/other/z-tabs/z-tabs.vue" import OrderCar from "@/sheep/components/order/order-car.vue" import { getLaunchParam } from "@/sheep/utils/app" +import { hasRoleCode, MCH_USER } from "@@/utils/user-role" const data = { tabs: [ @@ -28,6 +29,8 @@ const state = reactive({ }, // 维护当前多选的售后状态,用于文字高亮和切换。 activeRefundStatusList: [] as string[], + currentUser: {}, + currentUserRole: "", }) const refundStatusList = computed(() => { @@ -48,8 +51,31 @@ onShow(async () => { if (pageRef.value) { pageRef.value.reload(false) } + getCurrentUserDetail() }) +const computedCardBtn = (v: any): any => { + if (state.currentUserRole && state.currentUserRole == "merchant") { + const orderUserId = v.userId + const currentUserId = state.currentUser?.sysUser?.userId + if (hasRoleCode(MCH_USER) || orderUserId != currentUserId) { + return ['qrCodeDetail'] + } + } + return ['refund', 'qrCodeDetail'] +} + +const getCurrentUserDetail = () => { + const userRole = uni.getStorageSync("userRole") ?? "" + state.currentUserRole = userRole + + const userInfo: any = uni.getStorageSync(constant.storageConstant.USERINFO) || {} + if (userInfo) { + state.currentUser = userInfo + } + +} + const doTab = (e: any) => { const target = data.tabs[e] state.pa = target.pa @@ -129,7 +155,7 @@ const isRefundStatusActive = (statusId: string) => { - + From e37868b878fd85c708ef479469f725a9d2dec5dc Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 23 Jul 2026 09:34:00 +0800 Subject: [PATCH 8/8] =?UTF-8?q?feat:=E5=90=88=E4=BD=9C=E5=95=86=E5=AE=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BA=97=E9=93=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/tabbar/individualOrder.vue | 3 ++- src/sheep/components/order/order-car.vue | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/pages/tabbar/individualOrder.vue b/src/pages/tabbar/individualOrder.vue index 72b011b..cd56b60 100644 --- a/src/pages/tabbar/individualOrder.vue +++ b/src/pages/tabbar/individualOrder.vue @@ -35,7 +35,8 @@ - + diff --git a/src/sheep/components/order/order-car.vue b/src/sheep/components/order/order-car.vue index 1e1c60e..26de2c7 100644 --- a/src/sheep/components/order/order-car.vue +++ b/src/sheep/components/order/order-car.vue @@ -20,6 +20,8 @@ export type Props = { goodsCollapsed?: boolean // 是否显示商户信息 visibleMch?: boolean + // 是否显示商户订单状态 + visibleMchOrderStatus?: boolean // 是否显示用户信息 visibleUser?: boolean // 是否显示底部边框 @@ -36,6 +38,7 @@ const props = withDefaults(defineProps(), { cardetail: {}, goodsCollapsed: true, visibleMch: true, + visibleMchOrderStatus: true, visibleUser: false, visibleBottomBorder: false, isLast: false, @@ -167,7 +170,9 @@ const doCancel = (v: any) => { :src="filePath(props.cardetail.logoPic) || '/static/logo/zax.png'" mode="aspectFill" /> - {{ props.cardetail.merchantName }} + + {{ props.cardetail.merchantName }} + @@ -180,7 +185,8 @@ const doCancel = (v: any) => { 正在下单 - + {{ hooks.useEnum("hardwareRefundStatusEnum", props.cardetail.refundStatus) }}