From 66a1637e1331fe354f0fdcd8682c2453ab6c6dde Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Fri, 21 Nov 2025 17:54:07 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home.vue | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/src/views/home.vue b/src/views/home.vue index fc9ce6d..30f1612 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -14,7 +14,7 @@ import goTop from '@/assets/SvgIcons/go-top.svg' import {getOrderPage} from '@/utils/goToCheck.js' import {groupMessages} from "@/utils/getMessage.js" - +import {findMenuById,permissionMapping} from "@/utils/menuTreePermission.js" import {useMessageStore} from '@/store/index.js' // ------------------ ICONS ------------------ @@ -128,13 +128,57 @@ const toggleFlag = () => { const messageStore = useMessageStore() const {messages} = storeToRefs(messageStore) + +//根据用户id查询消息状态 +const selectStatusById = () => { + // 定义权限检查函数 + const hasPermission = (permission) => findMenuById(menuTree.value, permission); + + // 初始化状态数组 + const status = []; + + // ===== 收款流程状态 ===== + // 地区财务收款待审核 + if (hasPermission(permissionMapping.area_finance_collection_pending)) { + status.push(0); + } + // 地区负责人收款待审核 + else if (hasPermission(permissionMapping.area_manager_collection_pending)) { + status.push(0); + } + + + // ===== 退款流程状态 ===== + // 地区财务退款审核 + if (hasPermission(permissionMapping.audit_area_finance_refund)) { + status.push(10); + } + // 地区负责人退款审核 + else if (hasPermission(permissionMapping.audit_area_manager_refund)) { + status.push(20); + } + // 总部财务退款审核 + else if (hasPermission(permissionMapping.audit_headquarters_refund)) { + status.push(30); + } + // 执行人待处理 + else if (hasPermission(permissionMapping.view_execution_details)) { + status.push(40); + } + + // 去重并返回结果(单一角色下实际不会有重复) + return [...new Set(status)]; +}; +console.log('权限测试',selectStatusById()); + // 获取消息 const getMessage = async () => { try { + let params = selectStatusById(); const res = await API({ url: '/getMessage', method: 'POST', - data: {} + data: params }); if (res?.data) { From 957e464c84e1dd58de893d068adb49e02d0a06b3 Mon Sep 17 00:00:00 2001 From: lhl Date: Fri, 21 Nov 2025 18:00:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=94=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/moneyManage/executor/executor.vue | 6 +++--- src/views/moneyManage/refundDetail/refundCharge.vue | 4 ++-- src/views/moneyManage/refundDetail/refundFinance.vue | 4 ++-- src/views/moneyManage/refundDetail/refundHeader.vue | 18 +++++++++--------- src/views/moneyManage/refundDetail/refundService.vue | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/views/moneyManage/executor/executor.vue b/src/views/moneyManage/executor/executor.vue index 7ded87c..242a742 100644 --- a/src/views/moneyManage/executor/executor.vue +++ b/src/views/moneyManage/executor/executor.vue @@ -13,7 +13,7 @@ 产品名称 -
@@ -1190,6 +1198,20 @@ const handlePagination = (type, val) => { border-radius: 5px; } } + + .info-tooltip { + display: flex; + align-items: center; + } + + .service-icon { + color: #666; + cursor: pointer; + font-size: 18px; + transition: all 0.3s ease; + padding: 4px; + border-radius: 50%; + } } diff --git a/src/views/moneyManage/receiveDetail/receiveManage.vue b/src/views/moneyManage/receiveDetail/receiveManage.vue index 1513fc0..580c71a 100644 --- a/src/views/moneyManage/receiveDetail/receiveManage.vue +++ b/src/views/moneyManage/receiveDetail/receiveManage.vue @@ -94,6 +94,16 @@ 已驳回 +
+ + + +
@@ -612,9 +622,6 @@ import _ from 'lodash'; import { Plus } from '@element-plus/icons-vue'; import { startsWith } from './utils/util.js' -// 筛选地区树 -const market = ref([]) - // 地区财务专属组件 import CurrencySelect from '@/components/MoneyManage/CurrencySelect.vue'; @@ -639,6 +646,9 @@ const tableData = ref([]); const total = ref(0); const pageInfo = ref({ pageSize: 10, pageNum: 1 }); +// 筛选地区树 +const market = ref([]) + // 搜索条件 const searchData = ref({}); const defaultTime = [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)]; @@ -894,7 +904,7 @@ const getlist = async () => { paymentCurrency: payCurrencySelect, submitterMarket: receivedMarket, goodsName: goodsName, - //market: MarketNameForId(searchData.value.market) + // market: MarketNameForId(searchData.value.market) market: markets.value } } @@ -1373,18 +1383,37 @@ const handlePagination = (type, val) => { } .btns { + width: 100%; display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; .tabs { + width: 100%; min-width: 300px; + display: flex; + align-items: center; + justify-content: space-between; .btnItem { margin-left: 10px; border-radius: 5px; } + + .info-tooltip { + display: flex; + align-items: center; + } + + .service-icon { + color: #666; + cursor: pointer; + font-size: 18px; + transition: all 0.3s ease; + padding: 4px; + border-radius: 50%; + } } } diff --git a/src/views/moneyManage/receiveDetail/receiveService.vue b/src/views/moneyManage/receiveDetail/receiveService.vue index 78c511e..938ef7d 100644 --- a/src/views/moneyManage/receiveDetail/receiveService.vue +++ b/src/views/moneyManage/receiveDetail/receiveService.vue @@ -68,6 +68,16 @@
添加收款
+
+ + + +
@@ -1112,6 +1122,20 @@ onMounted(async () => { .btnAdd { padding-left: 10px; } + + .info-tooltip { + display: flex; + align-items: center; + } + + .service-icon { + color: #666; + cursor: pointer; + font-size: 18px; + transition: all 0.3s ease; + padding: 4px; + border-radius: 50%; + } } .table {