feat(M08-B): 补联调验收结论
This commit is contained in:
@@ -116,6 +116,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="handoff-verdict" :class="{ ready: handoffReady }">
|
||||
<div>
|
||||
<h3>{{ handoffReady ? '可进入现场验收收口' : '仍不可收口' }}</h3>
|
||||
<p>
|
||||
{{ handoffReady
|
||||
? '全部现场检查项已通过或标记不适用,可进入真实商户、微信和硬件现场验收结果整理。'
|
||||
: `仍有 ${pendingCount} 个待处理、${blockedCount} 个阻断项,需要继续处理。` }}
|
||||
</p>
|
||||
</div>
|
||||
<el-button :icon="Copy" @click="copyVerdict">复制结论</el-button>
|
||||
</section>
|
||||
<section v-if="blockedItems.length" class="handoff-blockers">
|
||||
<header>
|
||||
<div>
|
||||
@@ -292,6 +303,7 @@ const blockedCount = computed(() => checklist.filter((item) => draft[item.id].st
|
||||
const pendingCount = computed(() => checklist.filter((item) => draft[item.id].status === 'PENDING').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 categoryProgress = computed(() => categoryOptions
|
||||
.filter((item): item is HandoffItem['category'] => item !== '全部')
|
||||
.map((item) => {
|
||||
@@ -384,6 +396,23 @@ async function copyBlockedSummary() {
|
||||
}
|
||||
}
|
||||
|
||||
async function copyVerdict() {
|
||||
const verdict = [
|
||||
`联调批次:${sessionMeta.batchNo || '未填写'}`,
|
||||
`现场/门店:${sessionMeta.site || '未填写'}`,
|
||||
`负责人:${sessionMeta.coordinator || '未填写'}`,
|
||||
`执行时间:${sessionMeta.executedAt || '未填写'}`,
|
||||
`结论:${handoffReady.value ? '可进入现场验收收口' : '仍不可收口'}`,
|
||||
`统计:通过 ${passedCount.value},阻断 ${blockedCount.value},待处理 ${pendingCount.value}`
|
||||
].join('\n');
|
||||
try {
|
||||
await navigator.clipboard.writeText(verdict);
|
||||
ElMessage.success('联调结论已复制');
|
||||
} catch {
|
||||
ElMessage.warning('当前浏览器不允许自动复制,请使用导出 CSV 留存');
|
||||
}
|
||||
}
|
||||
|
||||
function exportChecklist() {
|
||||
downloadCsv(`cleaning-field-handoff-${Date.now()}.csv`, [
|
||||
['类别', '字段', '值', '', '', '', '', ''],
|
||||
|
||||
@@ -569,6 +569,37 @@ textarea {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.handoff-verdict {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
border: 1px solid #f0c7c7;
|
||||
border-radius: 8px;
|
||||
background: #fff7f7;
|
||||
}
|
||||
|
||||
.handoff-verdict.ready {
|
||||
border-color: #b8dec4;
|
||||
background: #f3fbf5;
|
||||
}
|
||||
|
||||
.handoff-verdict h3,
|
||||
.handoff-verdict p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.handoff-verdict h3 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.handoff-verdict p {
|
||||
margin-top: 4px;
|
||||
color: #60708a;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.handoff-status-select {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user