This commit is contained in:
2026-06-30 09:54:17 +08:00
parent 2326752b5d
commit 0b578df215
4 changed files with 508 additions and 99 deletions
+52 -17
View File
@@ -247,7 +247,7 @@
}}</a
>
<a v-if="canCollect(row)" @click="handleMockCollect(row)">{{
isSingleAgreementRecord(row) ? "测试生效" : "测试采集"
isSingleAgreementRecord(row) ? "测试生效" : "合同采集"
}}</a>
<a v-if="canArchive(row)" @click="handleArchive(row)">{{
isSingleAgreementRecord(row) ? "办结" : "归档"
@@ -278,6 +278,10 @@
ref="contractModalRef"
@save="handleModalSave"
/>
<ContractCollectModal
ref="contractCollectModalRef"
@done="handleCollectDone"
/>
<MixedSignModal
ref="mixedSignModalRef"
@business-updated="handleSignBusinessUpdated"
@@ -303,6 +307,7 @@ import {
} from "@ant-design/icons-vue";
import { Input, message, Modal } from "ant-design-vue";
import ContractPartyPlaceholderModal from "./components/ContractPartyPlaceholderModal.vue";
import ContractCollectModal from "./components/ContractCollectModal.vue";
import MixedSignModal from "./components/mixedSignModal.vue";
import UploadSignedModal from "./components/UploadSignedModal.vue";
import ContractArchiveModal from "./components/ContractArchiveModal.vue";
@@ -318,7 +323,6 @@ import {
getLaunchDetail,
getLawApproveCallbackSample,
mockApproveLaunch,
mockCollectLaunch,
mockRejectLaunch,
finishLaunchSeal,
queryApproveViewUrl,
@@ -347,6 +351,7 @@ const pageWrapperRef = ref(null);
const tableRef = ref(null);
const toolbarRef = ref(null);
const contractModalRef = ref(null);
const contractCollectModalRef = ref(null);
const mixedSignModalRef = ref(null);
const uploadSignedModalRef = ref(null);
const contractArchiveModalRef = ref(null);
@@ -699,6 +704,41 @@ function handleChange(row) {
function handleSubmit(row) {
const singleAgreement = isSingleAgreementRecord(row);
// 非单方协议:提交法务前校验必填项完整性
if (!singleAgreement) {
return getLaunchDetail(row.id).then((res) => {
if (!isSuccessResponse(res) || !getDataResult(res)) {
message.error(getResponseMessage(res, "获取合同详情失败"));
return;
}
const detail = getDataResult(res);
const missingFields = [];
if (!detail.contractTypeCode) missingFields.push("合同类型");
if (!detail.valuationMode) missingFields.push("计价方式");
if (!detail.currencyName) missingFields.push("币种");
if (!detail.sealType) missingFields.push("签订方式");
if (!detail.isElectron) missingFields.push("签署方式");
if (!detail.paymentDirection) missingFields.push("收支方向");
if (!detail.textSource) missingFields.push("文本来源");
if (!detail.contractSource) missingFields.push("合同来源");
if (!detail.executorAccount) missingFields.push("合同执行人");
if (detail.isMajorContract === null || detail.isMajorContract === undefined) missingFields.push("是否重大合同");
if (detail.isOpenBidding === null || detail.isOpenBidding === undefined) missingFields.push("是否公开招标");
if (detail.isSgat === null || detail.isSgat === undefined) missingFields.push("是否涉及港澳台");
if (!detail.performancePlans || !detail.performancePlans.length) missingFields.push("履行计划");
if (!detail.contractTextFileName) missingFields.push("合同正文");
if (missingFields.length) {
message.warning(`以下必填项不完整,请先在编辑草稿中补全后再提交:\n${missingFields.join("")}`);
return;
}
showSubmitConfirm(row, detail, false);
});
}
// 单方协议:直接提交内部审批
showSubmitConfirm(row, null, true);
}
function showSubmitConfirm(row, detail, singleAgreement) {
Modal.confirm({
title: singleAgreement ? "确认提交内部审批" : "确认提交法务审批",
content: h("div", [
@@ -1032,24 +1072,19 @@ function handleModalSave(payload) {
}
function handleMockCollect(row) {
Modal.confirm({
title: "测试操作模拟合同采集",
content: `模拟将合同【${row.contractName}】信息采集同步至法务系统,状态将变为「待归档」。`,
okText: "确认模拟",
cancelText: "取消",
onOk: () =>
mockCollectLaunch(row.id).then((res) => {
if (!isSuccessResponse(res)) {
message.error(getResponseMessage(res, "模拟合同采集失败"));
return;
}
message.success("测试合同采集完成合同已流转到待归档");
getList();
}),
icon: null,
getLaunchDetail(row.id).then((res) => {
if (!isSuccessResponse(res) || !getDataResult(res)) {
message.error(getResponseMessage(res, "获取合同详情失败"));
return;
}
contractCollectModalRef.value?.showModal(getDataResult(res));
});
}
function handleCollectDone() {
getList();
}
function handleArchive(row) {
getLaunchDetail(row.id).then((res) => {
if (!isSuccessResponse(res) || !getDataResult(res)) {