修复合同详情字段中文显示
通用详情页复用中文字段字典,并为合同气瓶快照补充上下文名称。 合同状态按模型常量显示中文,数据库字段和 API 保持不变。 已通过资源页面检查、类型检查和生产构建。
This commit is contained in:
@@ -184,6 +184,7 @@ const fieldLabels: Record<string, string> = {
|
||||
default_delivery_fee: '默认配送费(元)',
|
||||
signed_at: '签署时间',
|
||||
effective_at: '生效时间',
|
||||
bound_at: '绑定时间',
|
||||
unit_price: '单价(元)',
|
||||
unbound_at: '解绑时间',
|
||||
revision_no: '修订号',
|
||||
@@ -203,6 +204,8 @@ const fieldLabels: Record<string, string> = {
|
||||
confirmed_at: '确认时间',
|
||||
sort_no: '排序',
|
||||
product_code: '商品编码',
|
||||
product_type_name: '产品类型名称',
|
||||
product_params: '产品规格参数',
|
||||
price_amount: '售价(元)',
|
||||
stock_quantity: '库存',
|
||||
value: '属性值',
|
||||
@@ -258,6 +261,11 @@ const fieldLabels: Record<string, string> = {
|
||||
withdrawable: '计入可提现余额',
|
||||
};
|
||||
|
||||
/** 返回字段的全局中文名称,供未显式声明字段的只读页面统一兜底。 */
|
||||
export function defaultResourceFieldLabel(key: string) {
|
||||
return fieldLabels[key];
|
||||
}
|
||||
|
||||
const numbers = new Set([
|
||||
'sort_no', 'stock_quantity', 'quantity', 'score', 'version_no',
|
||||
'attempt_no', 'target_product_status',
|
||||
|
||||
Reference in New Issue
Block a user