This commit is contained in:
fuenmao
2026-08-25 13:54:25 +08:00
parent 49a1a3ee6a
commit aec6c1f36c
4 changed files with 60 additions and 1 deletions
@@ -174,6 +174,15 @@
>
停用
</el-button>
<el-button
link
type="danger"
icon="Delete"
@click="removeVersion(scope.row)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
@@ -565,6 +574,13 @@ async function changeVersionStatus(row: OnboardingContractVersion, status: strin
ElMessage.success(`版本状态已更新为:${versionText(status)}`);
}
async function removeVersion(row: OnboardingContractVersion) {
await ElMessageBox.confirm(`确认删除合同版本“${row.versionNo}”?此操作不可撤销。`, "删除确认", { type: "warning" });
await onboardingTaskApi.deleteVersion(row.id);
await loadVersions();
ElMessage.success("版本删除成功");
}
function downloadDocx(fileId?: number) {
if (!fileId) return ElMessage.warning("暂无 DOCX 源文件");
window.open(`/api/sys/dev/file/download?id=${fileId}`, "_blank");