优化配送订单详情中文字段显示
This commit is contained in:
32
docs/操作日志_配送订单详情中文字段优化_20260815.md
Normal file
32
docs/操作日志_配送订单详情中文字段优化_20260815.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# 配送订单详情中文字段优化操作日志
|
||||||
|
|
||||||
|
操作时间:2026-08-15
|
||||||
|
操作类型:修改
|
||||||
|
影响模块:平台总后台、气体配送订单详情
|
||||||
|
|
||||||
|
## 操作前状态
|
||||||
|
|
||||||
|
- 订单详情将接口辅助字段 `contract_display_name` 作为独立字段重复展示。
|
||||||
|
- `product_amount`、`payable_amount` 缺少中文名称,页面直接显示英文键名。
|
||||||
|
|
||||||
|
## 具体操作
|
||||||
|
|
||||||
|
- 将 `product_amount`、`payable_amount` 的页面名称分别统一为“商品金额(元)”“应付金额(元)”,并沿用金额分转元格式。
|
||||||
|
- 将 `contract_display_name` 从通用详情字段中排除;该字段继续用于“配送合同”显示“标题(合同编号)”。
|
||||||
|
- 保持后端 JSON 字段、数据库结构和敏感信息保护规则不变。
|
||||||
|
|
||||||
|
## 操作后状态
|
||||||
|
|
||||||
|
- 配送订单详情不再出现重复的合同辅助字段。
|
||||||
|
- 商品金额和应付金额均使用中文业务名称展示。
|
||||||
|
- 配送合同的可读标题和唯一标识复制入口不受影响。
|
||||||
|
|
||||||
|
## 验证结果
|
||||||
|
|
||||||
|
- 配送订单可读显示专项检查通过。
|
||||||
|
- 平台总后台 TypeScript 类型检查与生产构建通过。
|
||||||
|
|
||||||
|
## 风险评估
|
||||||
|
|
||||||
|
- 改动仅影响展示层,不改变接口兼容性和业务计算口径。
|
||||||
|
- 联系人及联系电话继续执行既有订单敏感信息脱敏规则。
|
||||||
@@ -4,8 +4,12 @@ import fs from 'node:fs';
|
|||||||
|
|
||||||
const resources = fs.readFileSync(new URL('../src/api/resources.ts', import.meta.url), 'utf8');
|
const resources = fs.readFileSync(new URL('../src/api/resources.ts', import.meta.url), 'utf8');
|
||||||
const listPage = fs.readFileSync(new URL('../src/views/shared/CrudListPage.vue', import.meta.url), 'utf8');
|
const listPage = fs.readFileSync(new URL('../src/views/shared/CrudListPage.vue', import.meta.url), 'utf8');
|
||||||
|
const detailPage = fs.readFileSync(new URL('../src/views/resource/ResourceDetailContent.vue', import.meta.url), 'utf8');
|
||||||
|
|
||||||
const assertions = [
|
const assertions = [
|
||||||
|
[resources.includes("product_amount: '商品金额(元)'"), '订单商品金额缺少中文名称'],
|
||||||
|
[resources.includes("payable_amount: '应付金额(元)'"), '订单应付金额缺少中文名称'],
|
||||||
|
[detailPage.includes("'contract_display_name'"), '订单详情未隐藏重复的合同标题辅助字段'],
|
||||||
[resources.includes("listDisplayKey: 'creator_display_name'"), '创建方未配置可读名称字段'],
|
[resources.includes("listDisplayKey: 'creator_display_name'"), '创建方未配置可读名称字段'],
|
||||||
[resources.includes('listDisplayIdentityCopy: true'), '创建方未保留唯一标识复制入口'],
|
[resources.includes('listDisplayIdentityCopy: true'), '创建方未保留唯一标识复制入口'],
|
||||||
[resources.includes("detailDisplayKey: 'contract_display_name'"), '订单详情未配置合同标题展示字段'],
|
[resources.includes("detailDisplayKey: 'contract_display_name'"), '订单详情未配置合同标题展示字段'],
|
||||||
|
|||||||
@@ -250,7 +250,9 @@ const fieldLabels: Record<string, string> = {
|
|||||||
creator_identity: '创建方标识',
|
creator_identity: '创建方标识',
|
||||||
contact_name: '联系人',
|
contact_name: '联系人',
|
||||||
contact_phone: '联系电话',
|
contact_phone: '联系电话',
|
||||||
|
product_amount: '商品金额(元)',
|
||||||
discount_amount: '优惠金额(元)',
|
discount_amount: '优惠金额(元)',
|
||||||
|
payable_amount: '应付金额(元)',
|
||||||
total_amount: '总金额(元)',
|
total_amount: '总金额(元)',
|
||||||
delivery_fee: '配送费(元)',
|
delivery_fee: '配送费(元)',
|
||||||
assigned_at: '分配时间',
|
assigned_at: '分配时间',
|
||||||
@@ -331,8 +333,8 @@ const numbers = new Set([
|
|||||||
const money = new Set([
|
const money = new Set([
|
||||||
'unit_price', 'amount', 'fee', 'balance', 'withdrawal_balance',
|
'unit_price', 'amount', 'fee', 'balance', 'withdrawal_balance',
|
||||||
'balance_after', 'withdrawal_balance_after', 'default_delivery_fee',
|
'balance_after', 'withdrawal_balance_after', 'default_delivery_fee',
|
||||||
'discount_amount', 'total_amount', 'delivery_fee', 'price_amount',
|
'product_amount', 'discount_amount', 'total_amount', 'delivery_fee', 'price_amount',
|
||||||
'sale_amount', 'difference_amount',
|
'payable_amount', 'sale_amount', 'difference_amount',
|
||||||
]);
|
]);
|
||||||
const booleans = new Set(['is_default', 'is_cover', 'selected', 'withdrawable']);
|
const booleans = new Set(['is_default', 'is_cover', 'selected', 'withdrawable']);
|
||||||
const dates = new Set(['bill_date']);
|
const dates = new Set(['bill_date']);
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ const entries = computed<DetailEntry[]>(() => {
|
|||||||
'password_hash',
|
'password_hash',
|
||||||
'avatar',
|
'avatar',
|
||||||
'attachment',
|
'attachment',
|
||||||
|
// 合同可读名称只负责渲染“配送合同”,不作为独立业务字段重复展示。
|
||||||
|
'contract_display_name',
|
||||||
]);
|
]);
|
||||||
if (props.accountSummary) {
|
if (props.accountSummary) {
|
||||||
for (const key of ['username', 'identity', 'created_at']) excluded.add(key);
|
for (const key of ['username', 'identity', 'created_at']) excluded.add(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user