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 @@
产品名称
-
+
所属地区
@@ -295,7 +295,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: statusesParam.value,//10:地区财务待审核;12:地区财务驳回;
// 20:地区负责人待审核;22:地区负责人驳回;
@@ -306,7 +306,7 @@ const getRefund = async function () {
sTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
eTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id,
- account: adminData.value.account,
+ executor: adminData.value.account,
refundChannels: searchForm.value.refundChannels
}
}
diff --git a/src/views/moneyManage/receiveDetail/receiveFinance.vue b/src/views/moneyManage/receiveDetail/receiveFinance.vue
index 0e10eab..580c71a 100644
--- a/src/views/moneyManage/receiveDetail/receiveFinance.vue
+++ b/src/views/moneyManage/receiveDetail/receiveFinance.vue
@@ -94,6 +94,16 @@
已驳回
+
+
+
+
+
+
+
+
+
@@ -877,7 +887,7 @@ const getlist = async () => {
// 地区处理
const markets = ref(null)
- if(searchData.value.markets) {
+ if (searchData.value.markets) {
markets.value = searchData.value.markets[searchData.value.markets.length - 1]
console.log('地区转换', markets.value)
}
@@ -895,7 +905,7 @@ const getlist = async () => {
submitterMarket: receivedMarket,
goodsName: goodsName,
// market: MarketNameForId(searchData.value.market)
- market:markets.value
+ 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/receiveHead.vue b/src/views/moneyManage/receiveDetail/receiveHead.vue
index 7529bdf..d010e96 100644
--- a/src/views/moneyManage/receiveDetail/receiveHead.vue
+++ b/src/views/moneyManage/receiveDetail/receiveHead.vue
@@ -87,8 +87,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:地区负责人驳回;