This commit is contained in:
zlwu committed 2026-08-27 19:38:01 +08:00
1 parent 4611dbc2b2
commit ebf006eeff
46 files changed
+36802 -20974

No files matched your search

+91 -6
View File
@@ -360,6 +360,22 @@
</div>
</template>
</el-table-column>
<el-table-column
v-if="isColumnVisible('stopContract')"
label="合同"
min-width="180"
align="left"
header-align="left"
class-name="col-name-wrap pl-plan-stop-col"
label-class-name="col-name-wrap"
>
<template #default="{ row }">
<PlPlanContractCell
:lines="getStopContractLines(row)"
@open="openContractDetail"
/>
</template>
</el-table-column>
<el-table-column
v-if="isColumnVisible('productName')"
label="产品名称"
@@ -436,6 +452,9 @@
>
<template #default="{ row }">
<PlPlanListProductCell
archive-list-mode
:stop-kind="row.kind"
:stop-customer-name="row.stop.customerName"
:stop-products="getStopProducts(row)"
:plan-products="row.plan.products"
field="actualQty"
@@ -452,6 +471,9 @@
>
<template #default="{ row }">
<PlPlanListProductCell
archive-list-mode
:stop-kind="row.kind"
:stop-customer-name="row.stop.customerName"
:stop-products="getStopProducts(row)"
:plan-products="row.plan.products"
field="inboundQty"
@@ -468,12 +490,53 @@
>
<template #default="{ row }">
<PlPlanListProductCell
archive-list-mode
:stop-kind="row.kind"
:stop-customer-name="row.stop.customerName"
:stop-products="getStopProducts(row)"
:plan-products="row.plan.products"
field="outboundQty"
/>
</template>
</el-table-column>
<el-table-column
v-if="isColumnVisible('productUnitPrice')"
label="单价(元)"
min-width="100"
align="right"
header-align="right"
class-name="pl-plan-stop-col"
>
<template #default="{ row }">
<PlPlanListProductCell
archive-list-mode
:stop-kind="row.kind"
:stop-customer-name="row.stop.customerName"
:stop-products="getStopProducts(row)"
:plan-products="row.plan.products"
field="unitPrice"
/>
</template>
</el-table-column>
<el-table-column
v-if="isColumnVisible('productAmount')"
label="金额(元)"
min-width="100"
align="right"
header-align="right"
class-name="pl-plan-stop-col"
>
<template #default="{ row }">
<PlPlanListProductCell
archive-list-mode
:stop-kind="row.kind"
:stop-customer-name="row.stop.customerName"
:stop-products="getStopProducts(row)"
:plan-products="row.plan.products"
field="amount"
/>
</template>
</el-table-column>
</ListTable>
<ListColumnStatsRow
ref="archiveStatsRowRef"
@@ -521,6 +584,8 @@
</template>
</PlPlanViewDialog>
<ContractDetailDialog ref="contractDetailRef" hide-product-price />
<PlPlanArchiveDialog
v-model:visible="archiveDialogVisible"
:plan-id="archivePlanId"
@@ -535,6 +600,7 @@ import ListToolbarEndActions from '@/components/business/list-toolbar-end-action
import ListExportDropdown from '@/components/business/list-export-dropdown/index.vue'
import ListColumnStatsRow from '@/components/business/list-column-stats-row/index.vue'
import type { StatsRowColumn } from '@/utils/list-column-stats'
import { useContractDetailDialog } from '@/composables/useContractDetailDialog'
import { usePersistedListColumns } from '@/composables/usePersistedListColumns'
import { usePlPlanMergeListTable } from '@/composables/usePlPlanMergeListTable'
import {
@@ -550,6 +616,7 @@ import {
enrichPlanProductsHazardFromCrm
} from '@/composables/usePlToxicProductCertCheck'
import { pickBxData } from '@/utils/http/bx'
import PlPlanContractCell from '@/components/business/pl-plan-contract-cell/index.vue'
import PlPlanArchiveDialog from '@/components/business/pl-plan-archive-dialog/index.vue'
import PlPlanDocumentAttachmentCell from '@/components/business/pl-plan-document-attachment-cell/index.vue'
import PlPlanListCertCell from '@/components/business/pl-plan-list-cert-cell/index.vue'
@@ -574,11 +641,14 @@ import { syncViewRowFromFlatList } from '@/utils/view-dialog-refresh'
import {
getPlPlanListRowClassName,
getStopAddress,
getStopContractLines,
getStopCustomerName,
getStopKindLabel,
getStopProducts,
getStopTime,
sumStopActualQty,
sumStopArchiveActualQty,
sumStopArchiveAmount,
sumStopArchiveIoQty,
sumStopProductsField,
type PlPlanListDisplayRow
} from '@/utils/pl-plan-list-display-rows'
@@ -587,6 +657,7 @@ import { refreshMenuBadges } from '@/utils/menu-badge-registry'
import { useMenuStore } from '@/store/modules/menu'
const menuStore = useMenuStore()
const { ContractDetailDialog, contractDetailRef, openContractDetail } = useContractDetailDialog()
/** 计划区可合并列(顺序须与表格左侧列一致,不含勾选/序号/计划编号) */
const PLAN_MERGE_COLUMN_PROPS = [
@@ -627,13 +698,16 @@ const listColumnDefs = [
{ prop: 'stopKind', label: '段次' },
{ prop: 'stopCustomer', label: '客户' },
{ prop: 'stopAddressTime', label: '地址 / 时间' },
{ prop: 'stopContract', label: '合同' },
{ prop: 'productName', label: '产品名称' },
{ prop: 'productSpec', label: '型号/规格' },
{ prop: 'productUnit', label: '单位' },
{ prop: 'productPlanQty', label: '计划数量' },
{ prop: 'productActualQty', label: '实际数量' },
{ prop: 'productInboundQty', label: '入库数量' },
{ prop: 'productOutboundQty', label: '出库数量' }
{ prop: 'productOutboundQty', label: '出库数量' },
{ prop: 'productUnitPrice', label: '单价(元)' },
{ prop: 'productAmount', label: '金额(元)' }
]
const {
@@ -642,7 +716,7 @@ const {
isIndeterminate,
isColumnVisible,
resetToDefault
} = usePersistedListColumns('pl-plan-archive-list-columns-v3', listColumnDefs)
} = usePersistedListColumns('pl-plan-archive-list-columns-v5', listColumnDefs)
const selectedRows = ref<Plan[]>([])
@@ -701,10 +775,21 @@ function getArchiveStatCellValue(row: PlPlanListDisplayRow, prop: string): unkno
if (prop === 'stopAddressTime') {
return `${getStopAddress(row)} ${getStopTime(row)}`.trim()
}
if (prop === 'stopContract') {
return getStopContractLines(row)
.map((l) => `${l.side}${l.no}`)
.join(' ')
}
if (prop === 'productPlanQty') return sumStopProductsField(stopProducts, 'planQty')
if (prop === 'productActualQty') return sumStopActualQty(plan, stopProducts)
if (prop === 'productInboundQty') return sumStopProductsField(stopProducts, 'inboundQty')
if (prop === 'productOutboundQty') return sumStopProductsField(stopProducts, 'outboundQty')
if (prop === 'productActualQty') return sumStopArchiveActualQty(stopProducts, row.kind)
if (prop === 'productInboundQty') {
return sumStopArchiveIoQty(stopProducts, row.kind, row.stop.customerName, 'inbound')
}
if (prop === 'productOutboundQty') {
return sumStopArchiveIoQty(stopProducts, row.kind, row.stop.customerName, 'outbound')
}
if (prop === 'productUnitPrice') return ''
if (prop === 'productAmount') return sumStopArchiveAmount(stopProducts, row.kind)
if (prop === 'productName') {
return stopProducts
.map((p) => p.productName || '')