feat(web-admin): show deliveryTimes column on transport plan list
Multi-line YYYY-MM-DD with header range filter after planDate. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
fb608cea7f
commit
afc0b5e1bf
1 file changed
+48
@@ -221,6 +221,41 @@
|
||||
|
||||
<template #default="{ row }">{{ row.plan.planDate || '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('deliveryTimes')"
|
||||
prop="deliveryTimes"
|
||||
label="送货时间"
|
||||
min-width="130"
|
||||
align="center"
|
||||
>
|
||||
<template #header>
|
||||
<div class="col-header-with-filter">
|
||||
<span class="col-header-with-filter__label">送货时间</span>
|
||||
<ColumnHeaderFilter
|
||||
prop="deliveryTimes"
|
||||
label="送货时间"
|
||||
type="datetime"
|
||||
:is-active="isFilterActive('deliveryTimes')"
|
||||
:model-value="filters.deliveryTimes || null"
|
||||
@update:model-value="(v) => setFilterState('deliveryTimes', v)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<template #default="{ row }">
|
||||
<div
|
||||
v-if="(row.plan.deliveryTimes || []).length"
|
||||
class="pl-delivery-times-cell"
|
||||
>
|
||||
<div
|
||||
v-for="(t, i) in row.plan.deliveryTimes"
|
||||
:key="`${row.plan.id}-dt-${i}`"
|
||||
>
|
||||
{{ t }}
|
||||
</div>
|
||||
</div>
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="isColumnVisible('planType')"
|
||||
prop="planType"
|
||||
@@ -875,6 +910,7 @@ import { useListTableViewportHeight } from '@/composables/useListTableViewportHe
|
||||
const PLAN_MERGE_COLUMN_PROPS = [
|
||||
'followStatus',
|
||||
'planDate',
|
||||
'deliveryTimes',
|
||||
'planType',
|
||||
'licensePlate',
|
||||
'personnelSummary',
|
||||
@@ -909,6 +945,7 @@ import { useListTableViewportHeight } from '@/composables/useListTableViewportHe
|
||||
const listColumnDefs = [
|
||||
{ prop: 'followStatus', label: '跟进状态' },
|
||||
{ prop: 'planDate', label: '计划日期' },
|
||||
{ prop: 'deliveryTimes', label: '送货时间' },
|
||||
{ prop: 'planType', label: '单据类型' },
|
||||
{ prop: 'licensePlate', label: '车牌号' },
|
||||
{ prop: 'personnelSummary', label: '人员' },
|
||||
@@ -1067,6 +1104,9 @@ tableEl: planTableWrapRef,
|
||||
if (prop === 'followStatus') return getPlPlanFollowStatusLabel(plan.followStatus)
|
||||
if (prop === 'planType') return getPlanTypeLabel(plan.planType)
|
||||
if (prop === 'planDate') return plan.planDate
|
||||
if (prop === 'deliveryTimes') {
|
||||
return (plan.deliveryTimes || []).join('\n') || '—'
|
||||
}
|
||||
if (prop === 'licensePlate') {
|
||||
return formatPlVehiclePlateDisplay(plan.licensePlate, plan.trailerNo)
|
||||
}
|
||||
@@ -1699,6 +1739,14 @@ tableEl: planTableWrapRef,
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.pl-delivery-times-cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.list-pager-selected {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in new issue
Block a user