修复气站订单用户名称与合同上下文展示

This commit is contained in:
czl231
2026-08-19 00:14:42 +08:00
parent 569ac314b1
commit aefd80599e
5 changed files with 80 additions and 13 deletions

View File

@@ -116,7 +116,7 @@ if (
!recordSource.includes('record.value.contract_readonly === true') ||
!recordSource.includes('record.contract_readonly !== true') ||
!recordSource.includes("definition.value.name === 'user_account'") ||
!listSource.includes("contract_identity: String(row.identity ?? '')") ||
!listSource.includes("String(row.gasorder_contract_identity ?? '')") ||
!displaySource.includes("contract_readonly: '账户权限'") ||
!displaySource.includes("return '仅查看当前合同关联资料'")
) {

View File

@@ -1,6 +1,6 @@
<!--
功能展示标准资源列表并将新建详情和编辑入口导航到独立页面
版本v2.5.0
版本v2.6.0
-->
<template>
<a-card :title="listTitle" :bordered="false">
@@ -424,17 +424,20 @@ function openRelation(field: ResourceField, row: ResourceRow) {
item.meta.recordMode === 'detail',
);
if (!target?.name) return;
const contractIdentity =
field.key === 'user_account_identity'
? props.definition.name === 'gasorder_contract'
? String(row.identity ?? '')
: props.definition.name === 'gasorder_basic'
? String(row.gasorder_contract_identity ?? '')
: ''
: '';
void router.push({
name: target.name,
params: { identity: identityFieldValue(field, row) },
query:
props.definition.name === 'gasorder_contract' &&
field.key === 'user_account_identity'
? {
contract_identity: String(row.identity ?? ''),
return_to: route.fullPath,
}
: { return_to: route.fullPath },
query: contractIdentity
? { contract_identity: contractIdentity, return_to: route.fullPath }
: { return_to: route.fullPath },
});
}