diff --git a/src/views/contract/launch/index.vue b/src/views/contract/launch/index.vue index d5e7ad7..16b903e 100644 --- a/src/views/contract/launch/index.vue +++ b/src/views/contract/launch/index.vue @@ -111,10 +111,8 @@ 提交法务 审批记录 测试通过 - 测试驳回 - - {{ row.status === "completed" ? "查看签署" : "在线签订" }} - + 在线签订 + 下载签署文件 上传已签署版本 测试签署完成 测试采集 @@ -174,6 +172,7 @@ import { queryApproveViewUrl, queryLaunchList, submitLaunchRecord, + downloadLaunchFile, terminateLaunchRecord, updateLaunchDraft, } from "@/api/launch.js"; @@ -522,6 +521,28 @@ function handleMockFinishSign(row) { }); } +function handleDownloadSigned(row) { + const filePath = row.signedFilePath; + const fileName = row.signedFileName || `${row.contractName || "合同"}-已签署版.pdf`; + if (!filePath) { + message.warning("暂无签署文件可下载"); + return; + } + downloadLaunchFile(filePath).then((arrayBuffer) => { + const blob = new Blob([arrayBuffer]); + const url = window.URL.createObjectURL(blob); + const link = document.createElement("a"); + link.href = url; + link.download = fileName; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + window.URL.revokeObjectURL(url); + }).catch(() => { + message.error("签署文件下载失败"); + }); +} + function handleUploadSigned(row) { uploadSignedModalRef.value?.showModal(row); }