优化配送订单详情中文字段显示
This commit is contained in:
@@ -4,8 +4,12 @@ import fs from 'node:fs';
|
||||
|
||||
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 detailPage = fs.readFileSync(new URL('../src/views/resource/ResourceDetailContent.vue', import.meta.url), 'utf8');
|
||||
|
||||
const assertions = [
|
||||
[resources.includes("product_amount: '商品金额(元)'"), '订单商品金额缺少中文名称'],
|
||||
[resources.includes("payable_amount: '应付金额(元)'"), '订单应付金额缺少中文名称'],
|
||||
[detailPage.includes("'contract_display_name'"), '订单详情未隐藏重复的合同标题辅助字段'],
|
||||
[resources.includes("listDisplayKey: 'creator_display_name'"), '创建方未配置可读名称字段'],
|
||||
[resources.includes('listDisplayIdentityCopy: true'), '创建方未保留唯一标识复制入口'],
|
||||
[resources.includes("detailDisplayKey: 'contract_display_name'"), '订单详情未配置合同标题展示字段'],
|
||||
|
||||
@@ -250,7 +250,9 @@ const fieldLabels: Record<string, string> = {
|
||||
creator_identity: '创建方标识',
|
||||
contact_name: '联系人',
|
||||
contact_phone: '联系电话',
|
||||
product_amount: '商品金额(元)',
|
||||
discount_amount: '优惠金额(元)',
|
||||
payable_amount: '应付金额(元)',
|
||||
total_amount: '总金额(元)',
|
||||
delivery_fee: '配送费(元)',
|
||||
assigned_at: '分配时间',
|
||||
@@ -331,8 +333,8 @@ const numbers = new Set([
|
||||
const money = new Set([
|
||||
'unit_price', 'amount', 'fee', 'balance', 'withdrawal_balance',
|
||||
'balance_after', 'withdrawal_balance_after', 'default_delivery_fee',
|
||||
'discount_amount', 'total_amount', 'delivery_fee', 'price_amount',
|
||||
'sale_amount', 'difference_amount',
|
||||
'product_amount', 'discount_amount', 'total_amount', 'delivery_fee', 'price_amount',
|
||||
'payable_amount', 'sale_amount', 'difference_amount',
|
||||
]);
|
||||
const booleans = new Set(['is_default', 'is_cover', 'selected', 'withdrawable']);
|
||||
const dates = new Set(['bill_date']);
|
||||
|
||||
@@ -86,6 +86,8 @@ const entries = computed<DetailEntry[]>(() => {
|
||||
'password_hash',
|
||||
'avatar',
|
||||
'attachment',
|
||||
// 合同可读名称只负责渲染“配送合同”,不作为独立业务字段重复展示。
|
||||
'contract_display_name',
|
||||
]);
|
||||
if (props.accountSummary) {
|
||||
for (const key of ['username', 'identity', 'created_at']) excluded.add(key);
|
||||
|
||||
Reference in New Issue
Block a user