日志
This commit is contained in:
@@ -101,11 +101,12 @@
|
||||
<vxe-column field="initiatorDept" title="所属部门" width="140" show-overflow="title" />
|
||||
<vxe-column field="createTime" title="发起时间" width="170" show-overflow="title" />
|
||||
<vxe-column field="updateTime" title="最后更新时间" width="170" show-overflow="title" />
|
||||
<vxe-column title="操作" width="580" fixed="right">
|
||||
<vxe-column title="操作" width="720" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<div class="table-actions">
|
||||
<a @click="handleView(row)">查看</a>
|
||||
<a @click="handleCopy(row)">复制</a>
|
||||
<a @click="handleChange(row)">变更</a>
|
||||
<a v-if="canEdit(row)" @click="handleEdit(row)">编辑</a>
|
||||
<a v-if="canSubmit(row)" @click="handleSubmit(row)">提交法务</a>
|
||||
<a v-if="canViewApprove(row)" @click="handleViewApprove(row)">审批记录</a>
|
||||
@@ -117,6 +118,7 @@
|
||||
<a v-if="canMockFinishSign(row)" @click="handleMockFinishSign(row)">测试签署完成</a>
|
||||
<a v-if="canCollect(row)" @click="handleMockCollect(row)">测试采集</a>
|
||||
<a v-if="canArchive(row)" @click="handleArchive(row)">测试归档</a>
|
||||
<a v-if="canTerminate(row)" @click="handleTerminate(row)">终止</a>
|
||||
<a v-if="canDelete(row)" @click="handleDelete(row)">删除</a>
|
||||
</div>
|
||||
</template>
|
||||
@@ -151,13 +153,14 @@ import {
|
||||
RedoOutlined,
|
||||
SearchOutlined,
|
||||
} from "@ant-design/icons-vue";
|
||||
import { message, Modal } from "ant-design-vue";
|
||||
import { Input, message, Modal } from "ant-design-vue";
|
||||
import ContractPartyPlaceholderModal from "./components/ContractPartyPlaceholderModal.vue";
|
||||
import MixedSignModal from "./components/mixedSignModal.vue";
|
||||
import { getContractTypeSimpleLabel } from "./contractLaunchOptions.js";
|
||||
import {
|
||||
archiveLaunch,
|
||||
copyLaunchDraft,
|
||||
createLaunchChangeDraft,
|
||||
createLaunchDraft,
|
||||
deleteLaunchRecord,
|
||||
getLaunchDetail,
|
||||
@@ -168,6 +171,7 @@ import {
|
||||
queryApproveViewUrl,
|
||||
queryLaunchList,
|
||||
submitLaunchRecord,
|
||||
terminateLaunchRecord,
|
||||
updateLaunchDraft,
|
||||
} from "@/api/launch.js";
|
||||
|
||||
@@ -315,6 +319,10 @@ function canViewApprove(row) {
|
||||
return ["reviewing", "pending_sign", "signing", "pending_collect", "pending_archive", "completed"].includes(row.status);
|
||||
}
|
||||
|
||||
function canTerminate(row) {
|
||||
return row.status !== "completed" && row.status !== "terminated";
|
||||
}
|
||||
|
||||
function selectChangeEvent({ records }) {
|
||||
selectedRows.value = records;
|
||||
selectedRowKeys.value = records.map((item) => item.id);
|
||||
@@ -418,6 +426,19 @@ function handleCopy(row) {
|
||||
});
|
||||
}
|
||||
|
||||
function handleChange(row) {
|
||||
createLaunchChangeDraft(row.id).then((res) => {
|
||||
if (!isSuccessResponse(res) || !getDataResult(res)) {
|
||||
message.error(getResponseMessage(res, "发起变更合同失败"));
|
||||
return;
|
||||
}
|
||||
const changedRecord = getDataResult(res);
|
||||
message.success("已生成变更草稿,并自动关联主合同编码");
|
||||
getList();
|
||||
contractModalRef.value?.showModal(changedRecord, "edit");
|
||||
});
|
||||
}
|
||||
|
||||
function handleSubmit(row) {
|
||||
submitLaunchRecord(row.id).then((res) => {
|
||||
if (!isSuccessResponse(res)) {
|
||||
@@ -548,6 +569,36 @@ function handleArchive(row) {
|
||||
});
|
||||
}
|
||||
|
||||
function handleTerminate(row) {
|
||||
let terminateReason = "";
|
||||
Modal.confirm({
|
||||
title: `确认终止合同【${row.contractName}】吗?`,
|
||||
content: h("div", { style: { display: "flex", flexDirection: "column", gap: "12px" } }, [
|
||||
h("div", "除已完成外,任意环节都可终止。当前仅终止业务系统内流程,法务系统需分别操作。"),
|
||||
h(Input.TextArea, {
|
||||
rows: 4,
|
||||
placeholder: "可选:请输入终止原因",
|
||||
onChange: (event) => {
|
||||
terminateReason = event?.target?.value || "";
|
||||
},
|
||||
}),
|
||||
]),
|
||||
okText: "确认终止",
|
||||
cancelText: "取消",
|
||||
okType: "danger",
|
||||
onOk: () =>
|
||||
terminateLaunchRecord(row.id, { terminateReason }).then((res) => {
|
||||
if (!isSuccessResponse(res)) {
|
||||
message.error(getResponseMessage(res, "终止合同失败"));
|
||||
return;
|
||||
}
|
||||
message.success("合同已终止");
|
||||
getList();
|
||||
}),
|
||||
icon: null,
|
||||
});
|
||||
}
|
||||
|
||||
function handleDelete(row) {
|
||||
Modal.confirm({
|
||||
title: `确认删除合同【${row.contractName}】吗?`,
|
||||
|
||||
Reference in New Issue
Block a user