优化配送合同列表金额展示

This commit is contained in:
czl231
2026-08-23 10:18:42 +08:00
parent 48cf44bc99
commit c07c9ea6f2
5 changed files with 12 additions and 3 deletions

View File

@@ -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'), '人员资质列表缺少服务端人员上下文校验');

View File

@@ -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] } },

View File

@@ -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>