feat(web-admin): add deliveryTimes column on plan archive and cert lists
Match main plan list display and column-header filter behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
afc0b5e1bf
commit
754113a6d2
2 files changed
+93
No files matched your search
@@ -152,6 +152,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('archiveStatus')"
|
||||
prop="archiveStatus"
|
||||
@@ -709,6 +744,7 @@ const { ContractDetailDialog, contractDetailRef, openContractDetail } = useContr
|
||||
/** 计划区可合并列(顺序须与表格左侧列一致,不含勾选/序号/计划编号) */
|
||||
const PLAN_MERGE_COLUMN_PROPS = [
|
||||
'planDate',
|
||||
'deliveryTimes',
|
||||
'archiveStatus',
|
||||
'followStatus',
|
||||
'planType',
|
||||
@@ -736,6 +772,7 @@ const PRICE_COLUMN_PROPS = new Set(['productUnitPrice', 'productAmount'])
|
||||
|
||||
const allListColumnDefs = [
|
||||
{ prop: 'planDate', label: '计划日期' },
|
||||
{ prop: 'deliveryTimes', label: '送货时间' },
|
||||
{ prop: 'archiveStatus', label: '归档状态' },
|
||||
{ prop: 'followStatus', label: '跟进状态' },
|
||||
{ prop: 'planType', label: '单据类型' },
|
||||
@@ -954,6 +991,9 @@ function getArchiveStatCellValue(row: PlPlanListDisplayRow, prop: string): unkno
|
||||
}
|
||||
if (prop === 'followUserName') return plan.followUserName
|
||||
if (prop === 'planDate') return plan.planDate
|
||||
if (prop === 'deliveryTimes') {
|
||||
return (plan.deliveryTimes || []).join('\n') || '—'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
@@ -1208,4 +1248,12 @@ onMounted(() => {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.pl-delivery-times-cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
</style>
|
||||
@@ -160,6 +160,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"
|
||||
@@ -634,6 +669,7 @@
|
||||
|
||||
const PLAN_MERGE_COLUMN_PROPS = [
|
||||
'planDate',
|
||||
'deliveryTimes',
|
||||
'planType',
|
||||
'followStatus',
|
||||
'hazardCertReady',
|
||||
@@ -657,6 +693,7 @@
|
||||
|
||||
const listColumnDefs = [
|
||||
{ prop: 'planDate', label: '计划日期' },
|
||||
{ prop: 'deliveryTimes', label: '送货时间' },
|
||||
{ prop: 'planType', label: '单据类型' },
|
||||
{ prop: 'followStatus', label: '跟进状态' },
|
||||
{ prop: 'hazardCertReady', label: '证书齐备' },
|
||||
@@ -1175,4 +1212,12 @@ tableEl: planCertTableWrapRef,
|
||||
.pl-plan-list-toolbar-row {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.pl-delivery-times-cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
line-height: 1.35;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user