优化配送合同列表金额展示
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
7. 当签约用户不再属于合同气站时,仅保留终止合同操作。
|
||||
8. 根据修复后页面截图收尾:合同关系字段使用“所属气站、所属配送点”,状态标签改为内容宽度,避免在详情网格中拉伸成整条色块。
|
||||
9. 补齐合同详情接口的气站、配送点只读名称字段,使三个主体关系统一显示“名称 + 唯一标识复制”,不再把 UUID 当作主要文案。
|
||||
10. 优化合同列表金额展示:列表表头缩短为“默认配送费”,金额列扩展至 160px,并增加横向滚动容器,避免表头省略和窄屏挤压。
|
||||
|
||||
## 行为变化
|
||||
|
||||
@@ -27,6 +28,7 @@
|
||||
- 兼容性:不修改 API 原字段、数据库和原始业务值,仅新增只读名称;未知历史状态或动作仍保留原编码用于排障。
|
||||
- 视觉变化:状态标签保留状态颜色但紧凑展示;合同关联对象使用业务称呼,不再显示“气站唯一标识、配送点唯一标识”等技术标签。
|
||||
- 接口变化:合同详情兼容性新增 `gas_basic_display_name`、`delivery_basic_display_name`;原 identity 字段、数据库结构和写入协议不变。
|
||||
- 列表变化:详情页仍保留“默认配送费(元)”的完整字段名;列表因金额自带人民币符号,使用更紧凑的“默认配送费”。
|
||||
|
||||
## 验证结果
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ backend/api/internal/logic/platform/gasorder/
|
||||
- 名称字段与唯一标识组合展示;`product_params` 通过弹层完整查看格式化 JSON。
|
||||
- 合同主记录中的气站、配送点关系分别标为“所属气站、所属配送点”;状态标签按内容宽度紧凑展示。
|
||||
- 用户、气站、配送点关系均以服务端返回的当前名称为主文案,并保留唯一标识复制;名称失效时显示明确的失效占位,不把 UUID 退化成主要名称。
|
||||
- 合同列表金额自带人民币符号,表头使用“默认配送费”;金额列保持足够宽度,窄屏时允许表格横向滚动,禁止挤压成省略表头。
|
||||
|
||||
## 4. 合同气瓶语义
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@ for (const name of ['delivery_profile', 'user_address', 'wallet_bank']) {
|
||||
}
|
||||
assert(listPage.includes('v-if="searchEnabled"'), '列表搜索区域未按后端契约控制显示');
|
||||
assert(listPage.includes('label="模糊搜索"'), '列表搜索标签未明确说明模糊匹配');
|
||||
assert(listPage.includes('resource-table-shell'), '标准列表缺少窄屏横向滚动容器');
|
||||
assert(definitions.includes("f('default_delivery_fee', { listLabel: '默认配送费' })"), '合同列表配送费表头仍可能被单位文案挤压');
|
||||
assert(!listPage.includes('label="关键字"'), '列表仍使用含义不清的关键字标签');
|
||||
assert(!listPage.includes('placeholder="关键字段模糊搜索"'), '列表仍使用无意义的通用搜索提示');
|
||||
assert(listPage.includes('ensureCredentialContext'), '人员资质列表缺少服务端人员上下文校验');
|
||||
|
||||
@@ -520,7 +520,7 @@ const deliveryOverrides: ResourceUiDefinition[] = [
|
||||
{ name: '重置密码', resource: '/user_account/:identity/password', method: 'PUT', fields: [f('password', { required: true })] },
|
||||
]),
|
||||
define('user_address', '用户地址', 'writable', [relation('user_account_identity', '/user_account', true), f('address', { required: true }), f('longitude'), f('latitude'), f('is_default')]),
|
||||
define('gasorder_contract', '配送合同', 'managed', [f('contract_no', { required: true, listCopyable: true }), relation('user_account_identity', '/user_account', true, { label: '用户账户', listLabel: '用户账户', listRelationNameOnly: true, showIdentityCopy: true, readonlyRelationText: true }), f('title', { required: true }), f('terms'), f('file_uri', { label: '合同附件', type: 'contract-file' }), f('default_delivery_fee'), f('signed_at', { required: true }), f('effective_at', { required: true }), f('expired_at')], 'list', [
|
||||
define('gasorder_contract', '配送合同', 'managed', [f('contract_no', { required: true, listCopyable: true }), relation('user_account_identity', '/user_account', true, { label: '用户账户', listLabel: '用户账户', listRelationNameOnly: true, showIdentityCopy: true, readonlyRelationText: true }), f('title', { required: true }), f('terms'), f('file_uri', { label: '合同附件', type: 'contract-file' }), f('default_delivery_fee', { listLabel: '默认配送费' }), f('signed_at', { required: true }), f('effective_at', { required: true }), f('expired_at')], 'list', [
|
||||
{ name: '启用合同', resource: '/gasorder_contract/:identity/activate', fields: reason, visibleFor: { field: 'contract_status', values: [0] } },
|
||||
{ name: '续签合同', resource: '/gasorder_contract/:identity/renew', fields: [f('effective_at', { required: true }), f('expired_at'), ...reason], visibleFor: { field: 'contract_status', values: [11, 12, 13] } },
|
||||
{ name: '终止合同', resource: '/gasorder_contract/:identity/terminate', danger: true, fields: reason, visibleFor: { field: 'contract_status', values: [11] } },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- 功能描述:展示配送点标准资源列表并导航到独立记录页。版本:v1.0.0。 -->
|
||||
<!-- 功能描述:展示配送点标准资源列表并导航到独立记录页。版本:v1.1.0。 -->
|
||||
<template>
|
||||
<a-card :title="listTitle" :bordered="false">
|
||||
<template v-if="isCredentialList" #extra>
|
||||
@@ -47,6 +47,7 @@
|
||||
</a-space>
|
||||
</div>
|
||||
|
||||
<div class="resource-table-shell">
|
||||
<a-table :data="list" :loading="loading" :pagination="false" row-key="identity">
|
||||
<template #columns>
|
||||
<a-table-column
|
||||
@@ -110,6 +111,7 @@
|
||||
</a-table-column>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
<div class="pagination">
|
||||
<a-pagination
|
||||
:total="total"
|
||||
@@ -212,7 +214,8 @@ function columnWidth(field: ResourceField) {
|
||||
if (isProtectedListAvatarField(props.definition.name, field.key)) return 72;
|
||||
if (field.type === 'contract-file') return 120;
|
||||
if (field.type === 'datetime' || field.type === 'date') return 180;
|
||||
if (field.type === 'money' || field.type === 'number') return 140;
|
||||
if (field.type === 'money') return 160;
|
||||
if (field.type === 'number') return 140;
|
||||
return field.type === 'textarea' ? 240 : 160;
|
||||
}
|
||||
|
||||
@@ -360,6 +363,7 @@ watch(() => [props.definition.resource, ownerIdentity.value], async () => {
|
||||
background: var(--color-fill-1);
|
||||
}
|
||||
.owner-label { margin-bottom: 4px; color: var(--color-text-3); font-size: 12px; }
|
||||
.resource-table-shell { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
|
||||
.pagination { display: flex; justify-content: flex-end; margin-top: 16px; }
|
||||
@media (max-width: 768px) { .list-toolbar { align-items: stretch; flex-direction: column; } }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user