This commit is contained in:
zlwu committed 2026-08-26 11:10:40 +08:00
1 parent dd1acdc787
commit 4222eaa593
47 files changed
+1054350 -9663

No files matched your search

+23 -23
View File
@@ -173,15 +173,6 @@
>
<el-icon><DocumentCopy /></el-icon>三方人车快速创建
</el-button>
<el-button
v-if="canForceFollowStatus"
class="btn-ghost"
:disabled="!selectedPlan"
@click="openForceFollowStatusDialog"
>
<el-icon><EditPen /></el-icon>强制改状态
</el-button>
<ListExportDropdown
:export-fn="planApi.export"
:get-filter-params="getPlanExportFilterParams"
@@ -571,6 +562,13 @@
</el-dropdown-menu>
</template>
</el-dropdown>
<el-button
v-if="canForceFollowStatus"
class="btn-ghost"
@click="openForceFollowStatusDialog"
>
<el-icon><EditPen /></el-icon>强制改状态
</el-button>
<el-button
v-if="canVoidPlan(viewingPlan)"
class="btn-ghost"
@@ -614,27 +612,27 @@
>
<el-form label-position="top" class="form-grid-2">
<el-form-item label="计划编号" style="margin-bottom: 0">
<span>{{ selectedPlan?.planNo || '—' }}</span>
<span>{{ viewingPlan?.planNo || '—' }}</span>
</el-form-item>
<el-form-item label="单据类型" style="margin-bottom: 0">
<span>{{ getPlanTypeLabel(selectedPlan?.planType) }}</span>
<span>{{ getPlanTypeLabel(viewingPlan?.planType) }}</span>
</el-form-item>
<el-form-item label="供方" style="margin-bottom: 0">
<span>{{ selectedPlan?.supplierName || '—' }}</span>
<span>{{ viewingPlan?.supplierName || '—' }}</span>
</el-form-item>
<el-form-item label="需方" style="margin-bottom: 0">
<span>{{ selectedPlan?.customerName || '—' }}</span>
<span>{{ viewingPlan?.customerName || '—' }}</span>
</el-form-item>
<el-form-item label="产品信息" class="form-col-span-2" style="margin-bottom: 0">
<PlPlanListProductCell :products="selectedPlan?.products || []" />
<PlPlanListProductCell :products="viewingPlan?.products || []" />
</el-form-item>
<el-form-item label="当前跟进状态" style="margin-bottom: 0">
<el-tag
v-if="selectedPlan"
:type="getPlPlanFollowStatusTagType(selectedPlan.followStatus)"
v-if="viewingPlan"
:type="getPlPlanFollowStatusTagType(viewingPlan.followStatus)"
size="small"
>
{{ getPlPlanFollowStatusLabel(selectedPlan.followStatus) }}
{{ getPlPlanFollowStatusLabel(viewingPlan.followStatus) }}
</el-tag>
<span v-else>—</span>
</el-form-item>
@@ -1284,8 +1282,8 @@ function handleToolbarVoid() {
}
function openForceFollowStatusDialog() {
if (!selectedPlan.value) return
forceFollowStatusValue.value = selectedPlan.value.followStatus || ''
if (!viewingPlan.value) return
forceFollowStatusValue.value = viewingPlan.value.followStatus || ''
forceFollowDialogVisible.value = true
}
@@ -1294,22 +1292,24 @@ function resetForceFollowDialog() {
}
async function submitForceFollowStatus() {
if (!selectedPlan.value) return
if (!viewingPlan.value) return
const next = (forceFollowStatusValue.value || '').trim()
if (!next) {
ElMessage.warning('请选择目标跟进状态')
return
}
if (next === selectedPlan.value.followStatus) {
if (next === viewingPlan.value.followStatus) {
ElMessage.warning('目标状态与当前状态相同')
return
}
forceFollowLoading.value = true
try {
await planApi.forceFollowStatus(selectedPlan.value.id, next)
await planApi.forceFollowStatus(viewingPlan.value.id, next)
ElMessage.success('跟进状态已更新')
forceFollowDialogVisible.value = false
fetchData()
syncViewingPlan({ ...viewingPlan.value, followStatus: next })
await fetchData()
await refreshViewIfOpen()
} catch (e) {
const message = e instanceof Error ? e.message : '修改失败'
ElMessage.error(message)