2 Commits

Author SHA1 Message Date
zhangrenyuan 47ccf7809f Merge branch 'milestone-20260128-日常优化1.0' of http://39.101.133.168:8807/huangqizhen/gold-vue into milestone-20260128-日常优化1.0 4 weeks ago
zhangrenyuan d32b2c0c7c feat(消息跳转): 支持从消息跳转到收款详情页时自动切换标签页 4 weeks ago
  1. 8
      src/views/home.vue
  2. 18
      src/views/moneyManage/receiveDetail/receiveFinance.vue
  3. 19
      src/views/moneyManage/receiveDetail/receiveManage.vue

8
src/views/home.vue

@ -291,7 +291,7 @@ const scrollToTop = () => scrollContainer.value?.scrollTo({top: 0, behavior: 'sm
const getPathByQueryId = (queryId) => {
const qid = Number(queryId)
if (!Number.isFinite(qid)) return null
//
const matchedRoutes = router.getRoutes().filter(r => {
const pid = r.meta?.permissionId
if (Array.isArray(pid)) return pid.includes(qid)
@ -320,7 +320,13 @@ const handleMessageClick = async (item) => {
if (res.code === 200) {
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'))) {
await router.push({ path: targetPath, query: { tab } })
} else {
await router.push(targetPath || getOrderPage(item.status) || '/noPermission')
}
await getMessage()
ElMessage.success(t('elmessage.jumpSuccess'))
} else {

18
src/views/moneyManage/receiveDetail/receiveFinance.vue

@ -658,6 +658,7 @@ import { editFormRule } from './utils/recriveFormRules.js';
import { productList, MarketNameForId, CurrencyForId, marketList, normalizeSubmitterMarket } from './utils/staticData.js';
import { useAdminStore } from '@/store/index.js';
import { hasMenuPermission } from '@/utils/menuTreePermission.js';
import { useRoute } from 'vue-router';
//
import { useI18n } from 'vue-i18n'
@ -666,6 +667,7 @@ const { t } = useI18n()
// ===================== 1. =====================
const adminStore = useAdminStore();
const { menuTree } = storeToRefs(adminStore);
const route = useRoute();
// caiwu=true
const kefu = ref(false);
@ -689,6 +691,15 @@ const getTime = ref([]);
//
const activeTab = ref('wait');
const applyTabFromRoute = (tabRaw) => {
const tab = typeof tabRaw === 'string' ? tabRaw : null;
if (tab !== 'wait' && tab !== 'pass' && tab !== 'reject' && tab !== 'done') return false;
if (tab === activeTab.value) return false;
activeTab.value = tab;
pageInfo.value.pageNum = 1;
return true;
};
//
const auditFormisible = ref(false);
const auditFormData = ref({});
@ -1082,6 +1093,12 @@ const navigateTo = async (tab) => {
await getlist();
};
watch(() => route.query?.tab, async (tab) => {
if (applyTabFromRoute(tab)) {
await getlist();
}
});
// 2.4
//
const openAuditForm = (row) => {
@ -1361,6 +1378,7 @@ const throttledsubmitRefund = _.throttle(submitRefund, 5000, {
onMounted(async () => {
await getAdminData();
await getActivitys();
applyTabFromRoute(route.query?.tab);
//
await getlist();

19
src/views/moneyManage/receiveDetail/receiveManage.vue

@ -658,6 +658,7 @@ import { editFormRule } from './utils/recriveFormRules.js';
import { productList, MarketNameForId, CurrencyForId, marketList, normalizeSubmitterMarket } from './utils/staticData.js';
import { useAdminStore } from '@/store/index.js';
import { hasMenuPermission } from '@/utils/menuTreePermission.js';
import { useRoute } from 'vue-router';
//
import { useI18n } from 'vue-i18n'
@ -666,6 +667,7 @@ const { t } = useI18n()
// ===================== 1. =====================
const adminStore = useAdminStore();
const { menuTree } = storeToRefs(adminStore);
const route = useRoute();
// caiwu=true
const kefu = ref(false);
@ -689,6 +691,15 @@ const getTime = ref([]);
//
const activeTab = ref('wait');
const applyTabFromRoute = (tabRaw) => {
const tab = typeof tabRaw === 'string' ? tabRaw : null;
if (tab !== 'wait' && tab !== 'pass' && tab !== 'reject' && tab !== 'done') return false;
if (tab === activeTab.value) return false;
activeTab.value = tab;
pageInfo.value.pageNum = 1;
return true;
};
//
const auditFormisible = ref(false);
const auditFormData = ref({});
@ -1079,9 +1090,16 @@ const reset = () => {
// 2.3
const navigateTo = async (tab) => {
activeTab.value = tab;
pageInfo.value.pageNum = 1;
await getlist();
};
watch(() => route.query?.tab, async (tab) => {
if (applyTabFromRoute(tab)) {
await getlist();
}
});
// 2.4
//
const openAuditForm = (row) => {
@ -1361,6 +1379,7 @@ const throttledsubmitRefund = _.throttle(submitRefund, 5000, {
onMounted(async () => {
await getAdminData();
await getActivitys();
applyTabFromRoute(route.query?.tab);
//
await getlist();

Loading…
Cancel
Save