feat(M08-B): 补联调待补证据清单
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
<span>阻断 <strong>{{ blockedCount }}</strong></span>
|
||||
<span>待处理 <strong>{{ pendingCount }}</strong></span>
|
||||
<span>证据 <strong>{{ evidenceRecordedCount }}</strong></span>
|
||||
<span>待补证据 <strong>{{ evidenceMissingCount }}</strong></span>
|
||||
<span>更新 <strong>{{ sessionMeta.updatedAt || '未记录' }}</strong></span>
|
||||
</div>
|
||||
<div class="toolbar-actions">
|
||||
@@ -144,6 +145,21 @@
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section v-if="evidenceMissingItems.length" class="handoff-blockers handoff-evidence-gaps">
|
||||
<header>
|
||||
<div>
|
||||
<h3>待补证据</h3>
|
||||
<span>{{ evidenceMissingItems.length }} 个现场检查项仍缺少截图、流水或回包记录</span>
|
||||
</div>
|
||||
<el-button :icon="Copy" @click="copyEvidenceSummary">复制证据清单</el-button>
|
||||
</header>
|
||||
<ul>
|
||||
<li v-for="item in evidenceMissingItems" :key="item.id">
|
||||
<strong>{{ item.category }} · {{ item.title }}</strong>
|
||||
<span>{{ draft[item.id].owner || '未分派' }} / {{ item.evidence }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<el-table :data="filteredChecklist" class="data-table" row-key="id">
|
||||
<el-table-column prop="category" label="类别" width="120" />
|
||||
@@ -316,6 +332,10 @@ const passedCount = computed(() => checklist.filter((item) => draft[item.id].sta
|
||||
const blockedCount = computed(() => checklist.filter((item) => draft[item.id].status === 'BLOCKED').length);
|
||||
const pendingCount = computed(() => checklist.filter((item) => draft[item.id].status === 'PENDING').length);
|
||||
const evidenceRecordedCount = computed(() => checklist.filter((item) => draft[item.id].evidenceRef.trim()).length);
|
||||
const evidenceMissingItems = computed(() => checklist.filter((item) => (
|
||||
draft[item.id].status !== 'SKIP' && !draft[item.id].evidenceRef.trim()
|
||||
)));
|
||||
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);
|
||||
@@ -422,6 +442,27 @@ async function copyBlockedSummary() {
|
||||
}
|
||||
}
|
||||
|
||||
async function copyEvidenceSummary() {
|
||||
const header = [
|
||||
`联调批次:${sessionMeta.batchNo || '未填写'}`,
|
||||
`现场/门店:${sessionMeta.site || '未填写'}`,
|
||||
`负责人:${sessionMeta.coordinator || '未填写'}`,
|
||||
`执行时间:${sessionMeta.executedAt || '未填写'}`,
|
||||
`最后更新:${sessionMeta.updatedAt || '未记录'}`,
|
||||
`待补证据:${evidenceMissingCount.value}`
|
||||
].join('\n');
|
||||
const content = evidenceMissingItems.value.map((item) => {
|
||||
const itemDraft = draft[item.id];
|
||||
return `[${item.category}] ${item.title} - ${itemDraft.owner || '未分派'} - 应留证据:${item.evidence}`;
|
||||
}).join('\n');
|
||||
try {
|
||||
await navigator.clipboard.writeText(`${header}\n\n${content}`);
|
||||
ElMessage.success('待补证据清单已复制');
|
||||
} catch {
|
||||
ElMessage.warning('当前浏览器不允许自动复制,请使用导出 CSV 留存');
|
||||
}
|
||||
}
|
||||
|
||||
async function copyVerdict() {
|
||||
const verdict = [
|
||||
`联调批次:${sessionMeta.batchNo || '未填写'}`,
|
||||
@@ -430,7 +471,7 @@ async function copyVerdict() {
|
||||
`执行时间:${sessionMeta.executedAt || '未填写'}`,
|
||||
`最后更新:${sessionMeta.updatedAt || '未记录'}`,
|
||||
`结论:${handoffReady.value ? '可进入现场验收收口' : '仍不可收口'}`,
|
||||
`统计:通过 ${passedCount.value},阻断 ${blockedCount.value},待处理 ${pendingCount.value},证据 ${evidenceRecordedCount.value}/${checklist.length}`
|
||||
`统计:通过 ${passedCount.value},阻断 ${blockedCount.value},待处理 ${pendingCount.value},证据 ${evidenceRecordedCount.value}/${checklist.length},待补证据 ${evidenceMissingCount.value}`
|
||||
].join('\n');
|
||||
try {
|
||||
await navigator.clipboard.writeText(verdict);
|
||||
@@ -449,6 +490,7 @@ function exportChecklist() {
|
||||
['session', '执行时间', sessionMeta.executedAt, '', '', '', '', '', ''],
|
||||
['session', '最后更新', sessionMeta.updatedAt, '', '', '', '', '', ''],
|
||||
['session', '证据记录数', `${evidenceRecordedCount.value}/${checklist.length}`, '', '', '', '', '', ''],
|
||||
['session', '待补证据数', String(evidenceMissingCount.value), '', '', '', '', '', ''],
|
||||
['ID', '类别', '检查项', '期望', '状态', '负责人', '结果记录', '应留证据', '证据记录'],
|
||||
...checklist.map((item) => [
|
||||
item.id,
|
||||
|
||||
Reference in New Issue
Block a user