优化气站唯一标识排版与创建方类型展示

This commit is contained in:
czl231
2026-08-19 20:03:48 +08:00
parent aefd80599e
commit 2d793db38b
4 changed files with 98 additions and 2 deletions

View File

@@ -380,6 +380,17 @@ export function displayRawValue(key: string, value: unknown) {
if (key === 'contract_readonly' && value === true)
return '仅查看当前合同关联资料';
if (typeof value === 'boolean') return value ? '是' : '否';
// 创建方类型由接口编码转换为业务名称,详情页不直接暴露英文枚举值。
if (key === 'creator_type') {
return (
{
user: '用户',
staff: '工作人员',
delivery: '配送点',
gas: '气站',
}[String(value)] ?? `未知创建方类型(${String(value)}`
);
}
if (key === 'status') return recordStatusLabel(Number(value));
if (key === 'contract_status') return contractStatusLabel(Number(value));
if (key === 'previous_order_status' && Number(value) === 0) return '无';