feat(M08-B): 补联调收口门禁
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
<span>待处理 <strong>{{ pendingCount }}</strong></span>
|
||||
<span>证据 <strong>{{ evidenceRecordedCount }}</strong></span>
|
||||
<span>待补证据 <strong>{{ evidenceMissingCount }}</strong></span>
|
||||
<span>收口 <strong>{{ closeoutReady ? '可归档' : '待补齐' }}</strong></span>
|
||||
<span>更新 <strong>{{ sessionMeta.updatedAt || '未记录' }}</strong></span>
|
||||
</div>
|
||||
<div class="toolbar-actions">
|
||||
@@ -153,6 +154,17 @@
|
||||
</div>
|
||||
<el-button :icon="Copy" @click="copyVerdict">复制结论</el-button>
|
||||
</section>
|
||||
<section class="handoff-verdict" :class="{ ready: closeoutReady }">
|
||||
<div>
|
||||
<h3>{{ closeoutReady ? '现场记录可归档' : '收口资料待补齐' }}</h3>
|
||||
<p>
|
||||
{{ closeoutReady
|
||||
? '检查项、证据和签署信息均已补齐,可将快照、CSV 和交接报告归档。'
|
||||
: `仍需补齐:${missingCloseoutFields.join('、')}` }}
|
||||
</p>
|
||||
</div>
|
||||
<el-button :icon="Copy" @click="copyCloseoutGate">复制门禁</el-button>
|
||||
</section>
|
||||
<section v-if="blockedItems.length" class="handoff-blockers">
|
||||
<header>
|
||||
<div>
|
||||
@@ -365,6 +377,15 @@ const evidenceMissingCount = computed(() => evidenceMissingItems.value.length);
|
||||
const blockedItems = computed(() => checklist.filter((item) => draft[item.id].status === 'BLOCKED'));
|
||||
const checklistIds = new Set(checklist.map((item) => item.id));
|
||||
const handoffReady = computed(() => pendingCount.value === 0 && blockedCount.value === 0);
|
||||
const missingCloseoutFields = computed(() => {
|
||||
const fields: string[] = [];
|
||||
if (!handoffReady.value) fields.push('检查项状态');
|
||||
if (evidenceMissingCount.value > 0) fields.push('现场证据');
|
||||
if (!sessionMeta.acceptor.trim()) fields.push('验收人');
|
||||
if (!sessionMeta.closeoutVerdict.trim()) fields.push('收口结论');
|
||||
return fields;
|
||||
});
|
||||
const closeoutReady = computed(() => missingCloseoutFields.value.length === 0);
|
||||
const categoryProgress = computed(() => categoryOptions
|
||||
.filter((item): item is HandoffItem['category'] => item !== '全部')
|
||||
.map((item) => {
|
||||
@@ -522,6 +543,7 @@ async function copyVerdict() {
|
||||
`下一步:${sessionMeta.nextAction || '未填写'}`,
|
||||
`最后更新:${sessionMeta.updatedAt || '未记录'}`,
|
||||
`结论:${handoffReady.value ? '可进入现场验收收口' : '仍不可收口'}`,
|
||||
`归档门禁:${closeoutReady.value ? '可归档' : `待补齐 ${missingCloseoutFields.value.join('、')}`}`,
|
||||
`统计:通过 ${passedCount.value},阻断 ${blockedCount.value},待处理 ${pendingCount.value},证据 ${evidenceRecordedCount.value}/${checklist.length},待补证据 ${evidenceMissingCount.value}`
|
||||
].join('\n');
|
||||
try {
|
||||
@@ -532,6 +554,25 @@ async function copyVerdict() {
|
||||
}
|
||||
}
|
||||
|
||||
async function copyCloseoutGate() {
|
||||
const content = [
|
||||
`联调批次:${sessionMeta.batchNo || '未填写'}`,
|
||||
`现场/门店:${sessionMeta.site || '未填写'}`,
|
||||
`归档门禁:${closeoutReady.value ? '可归档' : '待补齐'}`,
|
||||
`缺口:${missingCloseoutFields.value.length ? missingCloseoutFields.value.join('、') : '无'}`,
|
||||
`验收人:${sessionMeta.acceptor || '未填写'}`,
|
||||
`收口结论:${sessionMeta.closeoutVerdict || '未填写'}`,
|
||||
`下一步:${sessionMeta.nextAction || '未填写'}`,
|
||||
`最后更新:${sessionMeta.updatedAt || '未记录'}`
|
||||
].join('\n');
|
||||
try {
|
||||
await navigator.clipboard.writeText(content);
|
||||
ElMessage.success('收口门禁已复制');
|
||||
} catch {
|
||||
ElMessage.warning('当前浏览器不允许自动复制,请使用报告导出留存');
|
||||
}
|
||||
}
|
||||
|
||||
async function copyHandoffReport() {
|
||||
try {
|
||||
await navigator.clipboard.writeText(buildHandoffReport());
|
||||
@@ -561,6 +602,7 @@ function buildHandoffReport() {
|
||||
`下一步:${sessionMeta.nextAction || '未填写'}`,
|
||||
`最后更新:${sessionMeta.updatedAt || '未记录'}`,
|
||||
`结论:${handoffReady.value ? '可进入现场验收收口' : '仍不可收口'}`,
|
||||
`归档门禁:${closeoutReady.value ? '可归档' : `待补齐 ${missingCloseoutFields.value.join('、')}`}`,
|
||||
`汇总:总项 ${checklist.length},通过 ${passedCount.value},阻断 ${blockedCount.value},待处理 ${pendingCount.value},证据 ${evidenceRecordedCount.value}/${checklist.length},待补证据 ${evidenceMissingCount.value}`
|
||||
];
|
||||
const progress = categoryProgress.value.map((item) => (
|
||||
@@ -623,6 +665,7 @@ function exportChecklist() {
|
||||
['session', '收口结论', sessionMeta.closeoutVerdict, '', '', '', '', '', ''],
|
||||
['session', '下一步', sessionMeta.nextAction, '', '', '', '', '', ''],
|
||||
['session', '最后更新', sessionMeta.updatedAt, '', '', '', '', '', ''],
|
||||
['session', '归档门禁', closeoutReady.value ? '可归档' : `待补齐 ${missingCloseoutFields.value.join('、')}`, '', '', '', '', '', ''],
|
||||
['session', '证据记录数', `${evidenceRecordedCount.value}/${checklist.length}`, '', '', '', '', '', ''],
|
||||
['session', '待补证据数', String(evidenceMissingCount.value), '', '', '', '', '', ''],
|
||||
['ID', '类别', '检查项', '期望', '状态', '负责人', '结果记录', '应留证据', '证据记录'],
|
||||
|
||||
Reference in New Issue
Block a user