From 68349eb8c0aa6cd8ef58c1f883e98d05e15ddb04 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Sat, 11 Jul 2026 17:29:55 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E9=80=80=E6=AC=BE=EF=BC=8C=E6=94=AF?=
=?UTF-8?q?=E4=BB=98=E8=BF=94=E5=9B=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 8 +-
src/pages/order/components/reject-chechk.vue | 79 ++++
src/pages/order/detail.vue | 101 ++++-
src/pages/pay/payComplete.vue | 64 +++-
src/pages/pay/transferMoney.vue | 10 +-
src/pages/refund/apply.vue | 40 +-
src/pages/tabbar/individualOrder.vue | 359 ++++--------------
src/pages/tabbar/order.vue | 159 +++-----
src/pages/tabbar/order_v1.vue | 169 +++++++++
src/pages/tabbar/~individualOrder.vue | 24 +-
src/pages/user/userRole.vue | 23 +-
src/sheep/components/order/order-car.vue | 314 +++++++++++++++
.../components/order/order-status-tag.vue | 26 ++
src/sheep/constant/service-enum.ts | 8 +
src/sheep/hooks/use-scan-code.ts | 9 +-
src/sheep/scss/font/iconfont.scss | 114 +++++-
src/sheep/utils/user-role.ts | 76 ++++
17 files changed, 1092 insertions(+), 491 deletions(-)
create mode 100644 src/pages/order/components/reject-chechk.vue
create mode 100644 src/pages/tabbar/order_v1.vue
create mode 100644 src/sheep/components/order/order-car.vue
create mode 100644 src/sheep/components/order/order-status-tag.vue
create mode 100644 src/sheep/utils/user-role.ts
diff --git a/.env b/.env
index 03ac351..6200335 100644
--- a/.env
+++ b/.env
@@ -25,17 +25,17 @@ 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 = http://59.202.170.152:81/api # 信创线上
-#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 = 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 # 测试线上
# --------------------------- 生产环境 api地址 ----------------------------------
diff --git a/src/pages/order/components/reject-chechk.vue b/src/pages/order/components/reject-chechk.vue
new file mode 100644
index 0000000..b0b198f
--- /dev/null
+++ b/src/pages/order/components/reject-chechk.vue
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 拒绝退款
+
+
+
+
+
+
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 @@
@@ -170,6 +221,13 @@ const doCancelRefund = async () => {
售后类型:
{{ state.refundDetail.applyReason }}
+
+ 补充图片:
+
+
+
+
相关描述:
{{ state.refundDetail.applyDescription }}
@@ -194,18 +252,33 @@ const doCancelRefund = async () => {
-
- 取消申请
-
-
- 重新申请
-
+
+
+
+ 拒绝退款
+
+
+ 同意退款
+
+
+
+
+
+ 取消申请
+
+
+ 重新申请
+
+
+
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()
+}