feat(pl): show product and plan type columns on contract completion list
Align the合同完善 table with运输计划 by returning products/planType from contract-gaps and rendering them via PlPlanListProductCell. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
8e42fe1640
commit
09a57a7af9
4 files changed
+89
-2
No files matched your search
@@ -658,6 +658,7 @@ export interface PlanContractGapItem {
|
||||
id: string
|
||||
planNo: string
|
||||
planDate?: string
|
||||
planType?: string
|
||||
followStatus: string
|
||||
supplierId?: string
|
||||
supplierName?: string
|
||||
@@ -668,6 +669,7 @@ export interface PlanContractGapItem {
|
||||
demanderContractExempt: boolean
|
||||
supplierContracts: PlanContractLink[]
|
||||
demanderContracts: PlanContractLink[]
|
||||
products?: PlanProduct[]
|
||||
}
|
||||
|
||||
export interface PlanContractGapQuery {
|
||||
|
||||
@@ -195,11 +195,18 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="planDate" label="计划日期" min-width="120" align="center" />
|
||||
<el-table-column prop="planType" label="单据类型" min-width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
{{ getPlanTypeLabel(row.planType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="supplierName"
|
||||
label="供方"
|
||||
min-width="200"
|
||||
align="left"
|
||||
class-name="col-name-wrap"
|
||||
label-class-name="col-name-wrap"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
@@ -214,6 +221,8 @@
|
||||
label="需方"
|
||||
min-width="200"
|
||||
align="left"
|
||||
class-name="col-name-wrap"
|
||||
label-class-name="col-name-wrap"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template #default="{ row }">
|
||||
@@ -223,6 +232,42 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
min-width="240"
|
||||
align="left"
|
||||
class-name="col-name-wrap"
|
||||
label-class-name="col-name-wrap"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<PlPlanListProductCell :products="row.products" field="name" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号/规格" min-width="120" align="center" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<PlPlanListProductCell :products="row.products" field="model" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="包装规格" min-width="120" align="center" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<PlPlanListProductCell :products="row.products" field="packageSpec" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" min-width="80" align="center">
|
||||
<template #default="{ row }">
|
||||
<PlPlanListProductCell :products="row.products" field="unit" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数量" min-width="100" align="right" header-align="right">
|
||||
<template #default="{ row }">
|
||||
<PlPlanListProductCell :products="row.products" field="planQty" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际数量" min-width="100" align="right" header-align="right">
|
||||
<template #default="{ row }">
|
||||
<PlPlanListProductCell :products="row.products" field="actualQty" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同缺口" min-width="130" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="gapTag(row).type" size="small" effect="dark">
|
||||
@@ -289,6 +334,7 @@ import {
|
||||
type PlanContractLink
|
||||
} from '@/api/pl'
|
||||
import PlPlanContractMultiSelect from '@/components/business/pl-plan-contract-multi-select/index.vue'
|
||||
import PlPlanListProductCell from '@/components/business/pl-plan-list-product-cell/index.vue'
|
||||
import PlPlanViewDialog from '@/components/business/pl-plan-view-dialog/index.vue'
|
||||
import ListQuickSearchInput from '@/components/business/list-quick-search-input/index.vue'
|
||||
import ListToolbarDateShortcuts from '@/components/core/list-toolbar-date-shortcuts/index.vue'
|
||||
@@ -363,6 +409,15 @@ function gapTag(row: PlanContractGapItem) {
|
||||
return { text: '—', type: 'info' as const }
|
||||
}
|
||||
|
||||
function getPlanTypeLabel(type?: string | null) {
|
||||
const map: Record<string, string> = {
|
||||
direct: '直销单',
|
||||
inbound: '入库单',
|
||||
outbound: '出库单'
|
||||
}
|
||||
return type ? map[type] || type : '—'
|
||||
}
|
||||
|
||||
function partySubText(row: PlanContractGapItem, side: 'supplier' | 'demander') {
|
||||
if (side === 'supplier') {
|
||||
if (row.supplierContractExempt) return '内置 · 合同可免'
|
||||
|
||||
Reference in new issue
Block a user