Browse Source

fix(首页消息跳转): 修复收款处理消息跳转时tab参数错误的问题

修复消息状态与目标路径匹配逻辑,确保只有对应角色的收款处理消息才设置tab为'pass'。避免非相关消息跳转时携带错误的查询参数。
milestone-20260128-日常优化1.0
zhangrenyuan 4 weeks ago
parent
commit
a7b67a31da
  1. 12
      src/views/home.vue

12
src/views/home.vue

@ -321,8 +321,16 @@ const handleMessageClick = async (item) => {
closeMessageDialog()
const targetPath = item?.queryId ? getPathByQueryId(item.queryId) : null
const messageStatus = Number(item?.status)
const tab = messageStatus === 7 ? 'pass' : (messageStatus === 1 ? 'wait' : null)
if (targetPath && tab && (targetPath.includes('/moneyManage/receiveDetail/receiveFinance') || targetPath.includes('/moneyManage/receiveDetail/receiveManager'))) {
// 17
let tab = null
if (messageStatus === 1 && targetPath?.includes('/moneyManage/receiveDetail/receiveFinance')) {
tab = 'pass'
} else if (messageStatus === 7 && targetPath?.includes('/moneyManage/receiveDetail/receiveManager')) {
tab = 'pass'
}
if (targetPath && tab) {
await router.push({ path: targetPath, query: { tab } })
} else {
await router.push(targetPath || getOrderPage(item.status) || '/noPermission')

Loading…
Cancel
Save