提交
This commit is contained in:
1 parent
b9ff9c9d67
commit
44749ae716
87 files changed
+35089
-21918
No files matched your search
@@ -1,12 +1,8 @@
|
||||
<!-- eslint-disable vue/no-v-model-argument -->
|
||||
<!-- 运输计划合同完善:仅缺合同计划,行内展开分侧保存 -->
|
||||
<template>
|
||||
<div class="page-container">
|
||||
<section class="panel">
|
||||
<div class="panel-top pl-plan-contract-panel-top">
|
||||
<h2 class="title-bar-heading">运输计划合同完善</h2>
|
||||
<span class="pl-plan-contract-stat">待完善 {{ pagination.total }} 条</span>
|
||||
</div>
|
||||
|
||||
<div class="filter-block">
|
||||
<el-form :model="searchForm" class="filter-form" @submit.prevent>
|
||||
<div class="filter-grid">
|
||||
@@ -77,6 +73,7 @@
|
||||
<el-button class="btn-ghost" :loading="loading" @click="fetchData">
|
||||
<el-icon><Refresh /></el-icon>刷新
|
||||
</el-button>
|
||||
<span class="pl-plan-contract-stat">待完善 {{ pagination.total }} 条</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -92,7 +89,7 @@
|
||||
@expand-change="handleExpandChange"
|
||||
@row-dblclick="handleView"
|
||||
>
|
||||
<el-table-column type="expand" min-width="48">
|
||||
<el-table-column type="expand" class-name="pl-contract-expand-col" width="1">
|
||||
<template #default="{ row }">
|
||||
<div class="pl-contract-expand" v-if="expandDraft[row.id]">
|
||||
<div class="pl-contract-expand__grid">
|
||||
@@ -200,6 +197,52 @@
|
||||
{{ getPlanTypeLabel(row.planType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合同缺口"
|
||||
min-width="260"
|
||||
align="left"
|
||||
header-align="left"
|
||||
class-name="col-name-wrap"
|
||||
label-class-name="col-name-wrap"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<div class="pl-gap-contract-cell">
|
||||
<div class="pl-plan-contract-cell">
|
||||
<div
|
||||
v-for="(line, index) in planContractLines(row)"
|
||||
:key="`${line.side}-${line.no}-${index}`"
|
||||
class="pl-plan-contract-cell__row"
|
||||
>
|
||||
<span class="pl-plan-contract-cell__side">{{ line.side }}</span>
|
||||
<span
|
||||
class="pl-plan-contract-cell__no"
|
||||
:class="{ 'is-pending': line.pending }"
|
||||
>{{ line.no }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-button
|
||||
link
|
||||
type="warning"
|
||||
class="pl-gap-contract-cell__action"
|
||||
@click.stop="toggleExpand(row)"
|
||||
>
|
||||
<el-icon><EditPen /></el-icon>
|
||||
{{ isExpanded(row.id) ? '收起' : '补充' }}
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="followStatus" label="跟进状态" min-width="110" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag
|
||||
:type="getPlPlanFollowStatusTagType(row.followStatus)"
|
||||
size="small"
|
||||
effect="dark"
|
||||
>
|
||||
{{ getPlPlanFollowStatusLabel(row.followStatus) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="supplierName"
|
||||
label="供方"
|
||||
@@ -234,7 +277,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
min-width="240"
|
||||
min-width="160"
|
||||
align="left"
|
||||
class-name="col-name-wrap"
|
||||
label-class-name="col-name-wrap"
|
||||
@@ -268,39 +311,6 @@
|
||||
<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">
|
||||
{{ gapTag(row).text }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="followStatus" label="跟进状态" min-width="110" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag
|
||||
:type="getPlPlanFollowStatusTagType(row.followStatus)"
|
||||
size="small"
|
||||
effect="dark"
|
||||
>
|
||||
{{ getPlPlanFollowStatusLabel(row.followStatus) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" min-width="200" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
link
|
||||
type="warning"
|
||||
@click="toggleExpand(row)"
|
||||
>
|
||||
<el-icon><EditPen /></el-icon>
|
||||
{{ isExpanded(row.id) ? '收起' : '展开补充' }}
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="handleView(row)">
|
||||
<el-icon><View /></el-icon>查看计划
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="pagination list-pager-bar">
|
||||
@@ -327,7 +337,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Check, EditPen, Refresh, RefreshLeft, Search, View } from '@element-plus/icons-vue'
|
||||
import { Check, EditPen, Refresh, RefreshLeft, Search } from '@element-plus/icons-vue'
|
||||
import {
|
||||
planApi,
|
||||
type PlanContractGapItem,
|
||||
@@ -343,6 +353,7 @@ import {
|
||||
getPlPlanFollowStatusLabel,
|
||||
getPlPlanFollowStatusTagType
|
||||
} from '@/utils/pl-display'
|
||||
import { planContractLines } from '@/utils/pl-plan-contract-display'
|
||||
import { refreshMenuBadges } from '@/utils/menu-badge-registry'
|
||||
import { useMenuStore } from '@/store/modules/menu'
|
||||
|
||||
@@ -395,20 +406,6 @@ function linksFingerprint(links: PlanContractLink[]) {
|
||||
.join(',')
|
||||
}
|
||||
|
||||
function gapTag(row: PlanContractGapItem) {
|
||||
const sides = row.gapSides || []
|
||||
if (sides.includes('supplier') && sides.includes('demander')) {
|
||||
return { text: '两侧均缺', type: 'danger' as const }
|
||||
}
|
||||
if (sides.includes('supplier')) {
|
||||
return { text: '缺供方合同', type: 'warning' as const }
|
||||
}
|
||||
if (sides.includes('demander')) {
|
||||
return { text: '缺需方合同', type: 'warning' as const }
|
||||
}
|
||||
return { text: '—', type: 'info' as const }
|
||||
}
|
||||
|
||||
function getPlanTypeLabel(type?: string | null) {
|
||||
const map: Record<string, string> = {
|
||||
direct: '直销单',
|
||||
@@ -422,11 +419,11 @@ function partySubText(row: PlanContractGapItem, side: 'supplier' | 'demander') {
|
||||
if (side === 'supplier') {
|
||||
if (row.supplierContractExempt) return '内置 · 合同可免'
|
||||
const n = row.supplierContracts?.length || 0
|
||||
return n ? `已关联 ${n} 份` : '未关联'
|
||||
return n ? `已关联${n}份合同` : '未关联合同'
|
||||
}
|
||||
if (row.demanderContractExempt) return '内置 · 合同可免'
|
||||
const n = row.demanderContracts?.length || 0
|
||||
return n ? `已关联 ${n} 份` : '未关联'
|
||||
return n ? `已关联${n}份合同` : '未关联合同'
|
||||
}
|
||||
|
||||
function sideBoxClass(row: PlanContractGapItem, side: 'supplier' | 'demander') {
|
||||
@@ -647,18 +644,24 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.pl-plan-contract-panel-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 16px 20px 12px;
|
||||
border-bottom: 1px solid #eef2f6;
|
||||
.pl-plan-list-toolbar-row {
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
> .list-toolbar-date-shortcuts,
|
||||
> .quick-search-input,
|
||||
> .quick-search-group,
|
||||
> .el-button,
|
||||
> .pl-plan-contract-stat {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pl-plan-contract-stat {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-left: auto;
|
||||
padding: 4px 10px;
|
||||
border-radius: 8px;
|
||||
font-size: 12px;
|
||||
@@ -755,4 +758,66 @@ onMounted(() => {
|
||||
gap: 8px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
:deep(.pl-contract-expand-col) {
|
||||
.cell {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.el-table__expand-icon {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.pl-gap-contract-cell {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pl-gap-contract-cell__action {
|
||||
flex-shrink: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.pl-plan-contract-cell {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.pl-plan-contract-cell__row {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 6px;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: var(--text, #1e293b);
|
||||
}
|
||||
|
||||
.pl-plan-contract-cell__side {
|
||||
flex-shrink: 0;
|
||||
font-weight: 600;
|
||||
color: var(--mint-text-muted, #64748b);
|
||||
}
|
||||
|
||||
.pl-plan-contract-cell__no {
|
||||
min-width: 0;
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
overflow-wrap: anywhere;
|
||||
|
||||
&.is-pending {
|
||||
font-weight: 600;
|
||||
color: #d97706;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user