diff --git a/src/views/home.vue b/src/views/home.vue index fc9ce6d..729e362 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 = {status: selectStatusById()}; const res = await API({ url: '/getMessage', method: 'POST', - data: {} + data: params }); if (res?.data) { 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 { diff --git a/src/views/moneyManage/refundDetail/refundCharge.vue b/src/views/moneyManage/refundDetail/refundCharge.vue index 6ff72ff..aa989b9 100644 --- a/src/views/moneyManage/refundDetail/refundCharge.vue +++ b/src/views/moneyManage/refundDetail/refundCharge.vue @@ -436,7 +436,7 @@ const getRefund = async function () { cashRecordDTO: { jwcode: searchForm.value.jwcode,//精网号 name: searchForm.value.name,//姓名 - markets: searchForm.value.markets,//地区 + markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [], goodsName: goodsName,//商品名 statuses: statuses.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回; @@ -607,7 +607,7 @@ const exportExcel = async function () { cashRecordDTO: { jwcode: searchForm.value.jwcode,//精网号 name: searchForm.value.name,//姓名 - markets: searchForm.value.markets,//地区 + markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [], goodsName: goodsName,//商品名 statuses: statuses.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回; diff --git a/src/views/moneyManage/refundDetail/refundFinance.vue b/src/views/moneyManage/refundDetail/refundFinance.vue index 5e16485..3d1c377 100644 --- a/src/views/moneyManage/refundDetail/refundFinance.vue +++ b/src/views/moneyManage/refundDetail/refundFinance.vue @@ -490,7 +490,7 @@ const getRefund = async function () { cashRecordDTO: { jwcode: searchForm.value.jwcode,//精网号 name: searchForm.value.name,//姓名 - markets: searchForm.value.markets,//地区 + markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [], goodsName: goodsName,//商品名 statuses: statusParam.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回; @@ -658,7 +658,7 @@ const exportExcel = async function () { cashRecordDTO: { jwcode: searchForm.value.jwcode,//精网号 name: searchForm.value.name,//姓名 - markets: searchForm.value.markets,//地区 + markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [], goodsName: goodsName,//商品名 statuses: statusParam.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回; diff --git a/src/views/moneyManage/refundDetail/refundHeader.vue b/src/views/moneyManage/refundDetail/refundHeader.vue index 865a3ff..8623f93 100644 --- a/src/views/moneyManage/refundDetail/refundHeader.vue +++ b/src/views/moneyManage/refundDetail/refundHeader.vue @@ -37,7 +37,7 @@
支付方式 - +
@@ -477,7 +477,7 @@ const getRefund = async function () { const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' - if(searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)){ + if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) { ElMessage.error('精网号必须为数字') return } @@ -488,7 +488,7 @@ const getRefund = async function () { cashRecordDTO: { jwcode: searchForm.value.jwcode, name: searchForm.value.name, - markets: searchForm.value.markets, + markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [], goodsName: goodsName, statuses: statusParam.value, paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency), @@ -622,12 +622,12 @@ const exportExcel = async function () { } const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0 - ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' + ? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '' - if(searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)){ - ElMessage.error('精网号必须为数字') - return - } + if (searchForm.value.jwcode && !isNumber(searchForm.value.jwcode)) { + ElMessage.error('精网号必须为数字') + return + } const params = { pageNum: pagination.value.pageNum, @@ -635,7 +635,7 @@ const exportExcel = async function () { cashRecordDTO: { jwcode: searchForm.value.jwcode, name: searchForm.value.name, - markets: searchForm.value.markets, + markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [], goodsName: goodsName, statuses: statusParam.value, paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency), diff --git a/src/views/moneyManage/refundDetail/refundService.vue b/src/views/moneyManage/refundDetail/refundService.vue index 780a556..b4c7fd6 100644 --- a/src/views/moneyManage/refundDetail/refundService.vue +++ b/src/views/moneyManage/refundDetail/refundService.vue @@ -297,7 +297,7 @@ const getRefund = async function () { cashRecordDTO: { jwcode: searchForm.value.jwcode,//精网号 name: searchForm.value.name,//姓名 - markets: searchForm.value.market,//地区 + markets: searchForm.value.market && searchForm.value.market.length > 0 ? [searchForm.value.market[searchForm.value.market.length - 1]] : [], goodsName: goodsName,//商品名 statuses: statusParam.value,//10:地区财务待审核;12:地区财务驳回; // 20:地区负责人待审核;22:地区负责人驳回;