feat(business): 优化待调度列表汇总数字高亮显示

- 新增 computed 属性 dispatchSummarySegments,实现待调度列表汇总文本结构化拆分
- 将模板中 dispatchSummaryText 替换为 v-for 渲染,待调度件数字显示为蓝色加粗
- 修正「件」字未分离导致整词变色问题,改为数字与单位拆分渲染
- 用户反馈后,扩展高亮范围至所有单位数字,包括「吨」「方」等
- 维持文本格式与原串完全一致,未改动原有业务逻辑和校验
- 优化部分样式,调整页面内间距,如 section-card 间距和工具栏内边距等
- 修正部分组件结构,如 master-order
This commit is contained in:
2026-08-13 17:55:59 +08:00
parent 8b35fcaa0d
commit fb633e27c6
6 changed files with 58 additions and 15 deletions
@@ -2543,9 +2543,7 @@
<section-card>
<template #title>
<span>待调度列表</span>
<span class="business-crud-page__dispatch-list-summary">
{{ dispatchSummaryText }}
</span>
<span class="business-crud-page__dispatch-list-summary"><template v-for="(seg, si) in dispatchSummarySegments" :key="si"><span class="dispatch-summary-prefix">{{ seg.prefix }}</span><span class="dispatch-summary-label">{{ seg.label }}</span><template v-for="(item, ii) in seg.items" :key="item.unit"><span :class="['dispatch-summary-value', { 'is-piece': item.isPiece }]">{{ item.value }}</span><span class="dispatch-summary-unit">{{ item.unit }}</span><span v-if="ii < seg.items.length - 1" class="dispatch-summary-sep"></span></template></template></span>
</template>
<template #extra>
<el-button
@@ -4659,6 +4657,22 @@ export default {
'remaining'
)}`;
},
dispatchSummarySegments() {
const segments = [
{ prefix: '', label: '共', field: 'total' },
{ prefix: ' | ', label: '已调度 ', field: 'assigned' },
{ prefix: '', label: '剩余', field: 'remaining' },
];
return segments.map(seg => ({
prefix: seg.prefix,
label: seg.label,
items: this.dispatchSummaryItems.map(item => ({
unit: item.unit,
value: this.formatDispatchQuantity(item[seg.field]),
isPiece: true,
})),
}));
},
dispatchAttachmentRows() {
return this.parseJsonArray(this.dispatchRow.attachmentsJson);
},
@@ -10268,13 +10282,24 @@ export default {
grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
gap: 16px;
align-items: stretch;
margin-bottom: 8px;
margin-bottom: 12px;
.section-card {
margin-bottom: 0 !important;
}
}
&__dispatch-summary-card,
&__dispatch-route-card {
display: flex;
flex-direction: column;
min-height: 260px;
:deep(.section-card) {
flex: 1;
display: flex;
flex-direction: column;
}
:deep(.section-card__body) {
flex: 1;
@@ -10447,6 +10472,13 @@ export default {
margin-left: 8px;
font-size: 14px;
color: #3c3c3c;
.dispatch-summary-value {
&.is-piece {
color: #409eff;
font-weight: 600;
}
}
}
&__dispatch-table {
@@ -10702,10 +10734,9 @@ export default {
&__detail-content {
display: flex;
flex-direction: column;
gap: 8px;
//gap: 8px;
.section-card {
margin-bottom: 0 !important;
:deep(.el-descriptions__label) {
width: 140px;
@@ -10806,7 +10837,6 @@ export default {
}
}
.section-card {
margin-bottom: 8px !important;
&:last-child {
margin-bottom: 0 !important;