fix: 应收转结算与开票申请点击结算单号跳转收款结算单
This commit is contained in:
@@ -129,7 +129,39 @@ export default [
|
||||
name: '新增编辑结算单',
|
||||
meta: {
|
||||
keepAlive: false,
|
||||
// 付款/收款结算单共用表单页,具体高亮菜单由页面按 settlementType 回写
|
||||
// 付款结算单表单入口,高亮付款结算单菜单
|
||||
activeMenu: '/settlement/payment-settlement',
|
||||
},
|
||||
component: loadView(() => import('@/views/settlement/formal-settlement-form.vue')),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
// 收款结算单表单入口:与付款结算单共用表单组件,仅高亮菜单不同
|
||||
path: '/settlement/receipt-settlement/form',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: '新增编辑收款结算单',
|
||||
meta: {
|
||||
keepAlive: false,
|
||||
activeMenu: '/settlement/receipt-settlement',
|
||||
},
|
||||
component: loadView(() => import('@/views/settlement/formal-settlement-form.vue')),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
// 付款结算单表单入口:与 settlementListPath('payable') + '/form' 对应
|
||||
path: '/settlement/payment-settlement/form',
|
||||
component: Layout,
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: '新增编辑付款结算单',
|
||||
meta: {
|
||||
keepAlive: false,
|
||||
activeMenu: '/settlement/payment-settlement',
|
||||
},
|
||||
component: loadView(() => import('@/views/settlement/formal-settlement-form.vue')),
|
||||
|
||||
@@ -250,6 +250,7 @@ import organizationSearch from '@/mixins/organization-search';
|
||||
import { getMKApprovalUrl } from '@/api/system/business-process';
|
||||
import { loadMkEnabled, submitMkApprovalFlow } from '@/utils/mk-approval';
|
||||
import { kingdeeStatusType } from '@/utils/kingdee';
|
||||
import { settlementListPath } from '@/utils/settlement-menu';
|
||||
|
||||
// 表单提交成功后带标记返回,keep-alive 缓存的列表页据此重新拉取
|
||||
const invoiceApplicationListRefreshKey = 'invoice-application-list-refresh';
|
||||
@@ -397,12 +398,18 @@ export default {
|
||||
item => String(item.formalSettlementNo || '').trim() === normalizedNo
|
||||
);
|
||||
if (!row?.id) {
|
||||
this.$message.warning('未找到对应的付款结算单');
|
||||
this.$message.warning('未找到对应的结算单');
|
||||
return;
|
||||
}
|
||||
// 开票申请关联的多为收款结算单,按单据类型路由到对应表单入口,避免误落付款结算单
|
||||
this.$router.push({
|
||||
path: '/settlement/formal-settlement/form',
|
||||
query: { mode: 'view', id: row.id, name: '查看正式结算' },
|
||||
path: settlementListPath(row.settlementType) + '/form',
|
||||
query: {
|
||||
mode: 'view',
|
||||
id: row.id,
|
||||
settlementType: row.settlementType,
|
||||
name: '查看正式结算',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
this.$message.error('正式结算单详情加载失败');
|
||||
|
||||
@@ -436,8 +436,9 @@ export default {
|
||||
(handlers[type] || (() => {}))();
|
||||
},
|
||||
openCreate() {
|
||||
// 按列表锁定的结算类型路由到对应表单入口,保证菜单高亮与关闭回落列表正确
|
||||
this.$router.push({
|
||||
path: '/settlement/formal-settlement/form',
|
||||
path: settlementListPath(this.activeSettlementType) + '/form',
|
||||
query: {
|
||||
mode: 'add',
|
||||
name: `新增${this.billLabel}`,
|
||||
@@ -448,8 +449,9 @@ export default {
|
||||
},
|
||||
openEdit(row) {
|
||||
const settlementType = row.settlementType || this.activeSettlementType;
|
||||
// 行类型可能与列表锁定类型不同,按行类型路由
|
||||
this.$router.push({
|
||||
path: '/settlement/formal-settlement/form',
|
||||
path: settlementListPath(settlementType) + '/form',
|
||||
query: {
|
||||
mode: 'edit',
|
||||
id: row.id,
|
||||
|
||||
@@ -1060,6 +1060,7 @@ import { formatContractOptionLabel } from '@/utils/contract';
|
||||
import { isTierUnitPrice, isUnitPriceAdjustable } from '@/utils/settlement-adjust-rule';
|
||||
import { downloadXls } from '@/utils/util';
|
||||
import { createSettlementTransfer } from '@/utils/settlement-transfer';
|
||||
import { settlementListPath } from '@/utils/settlement-menu';
|
||||
import {
|
||||
contractApprovalStatusOptions,
|
||||
contractCategoryOptions,
|
||||
@@ -2659,10 +2660,11 @@ export default {
|
||||
});
|
||||
const isPreSettlement = settlementBillType === 'pre';
|
||||
this.transferDialog.visible = false;
|
||||
// 按结算类型路由到对应表单入口,保证收款/付款菜单各自高亮正确
|
||||
await this.$router.push({
|
||||
path: isPreSettlement
|
||||
? '/settlement/pre-settlement/form'
|
||||
: '/settlement/formal-settlement/form',
|
||||
: settlementListPath(this.settlementType) + '/form',
|
||||
query: {
|
||||
mode: 'add',
|
||||
transferToken,
|
||||
|
||||
Reference in New Issue
Block a user