法务回调审批样例
This commit is contained in:
@@ -83,6 +83,13 @@ export function mockRejectLaunch(id, data = {}) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getLawApproveCallbackSample(id) {
|
||||||
|
return request({
|
||||||
|
url: `/contract/launch/${id}/callback/law/approve/sample`,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export function saveLaunchSealInfo(id, data) {
|
export function saveLaunchSealInfo(id, data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/contract/launch/${id}/seal/save`,
|
url: `/contract/launch/${id}/seal/save`,
|
||||||
|
|||||||
@@ -424,6 +424,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-if="detailState.signedFilePath" class="upload-block">
|
||||||
|
<div class="upload-label">已签署文件</div>
|
||||||
|
<div class="readonly-upload-box">
|
||||||
|
<div class="contract-body-entry-name">
|
||||||
|
{{ detailState.signedFileName || "已签署文件" }}
|
||||||
|
</div>
|
||||||
|
<div class="contract-body-entry-hint">
|
||||||
|
当前合同的签署完成版本
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a-space style="margin-top: 8px">
|
||||||
|
<a-button
|
||||||
|
size="small"
|
||||||
|
@click="downloadFile(detailState.signedFilePath, detailState.signedFileName || '已签署合同.pdf')"
|
||||||
|
>
|
||||||
|
下载
|
||||||
|
</a-button>
|
||||||
|
</a-space>
|
||||||
|
</div>
|
||||||
|
|
||||||
<a-form-item class="tight-item" label="主要内容">
|
<a-form-item class="tight-item" label="主要内容">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="detailState.primaryContent"
|
v-model:value="detailState.primaryContent"
|
||||||
|
|||||||
@@ -110,9 +110,10 @@
|
|||||||
<a v-if="canEdit(row)" @click="handleEdit(row)">编辑</a>
|
<a v-if="canEdit(row)" @click="handleEdit(row)">编辑</a>
|
||||||
<a v-if="canSubmit(row)" @click="handleSubmit(row)">提交法务</a>
|
<a v-if="canSubmit(row)" @click="handleSubmit(row)">提交法务</a>
|
||||||
<a v-if="canViewApprove(row)" @click="handleViewApprove(row)">审批记录</a>
|
<a v-if="canViewApprove(row)" @click="handleViewApprove(row)">审批记录</a>
|
||||||
|
<a v-if="canViewLawCallback(row)" @click="handleViewLawCallback(row)">回调data</a>
|
||||||
<a v-if="canMockApprove(row)" @click="handleMockApprove(row)">测试通过</a>
|
<a v-if="canMockApprove(row)" @click="handleMockApprove(row)">测试通过</a>
|
||||||
<a v-if="canOnlineSign(row)" @click="handleOnlineSign(row)">在线签订</a>
|
<a v-if="canOnlineSign(row)" @click="handleOnlineSign(row)">在线签订</a>
|
||||||
<a v-if="row.status === 'completed' && row.signedFilePath" @click="handleDownloadSigned(row)">下载签署文件</a>
|
<a v-if="canDownloadSigned(row)" @click="handleDownloadSigned(row)">下载签署文件</a>
|
||||||
<a v-if="canUploadSigned(row)" @click="handleUploadSigned(row)">上传已签署版本</a>
|
<a v-if="canUploadSigned(row)" @click="handleUploadSigned(row)">上传已签署版本</a>
|
||||||
<a v-if="canMockFinishSign(row)" @click="handleMockFinishSign(row)">测试签署完成</a>
|
<a v-if="canMockFinishSign(row)" @click="handleMockFinishSign(row)">测试签署完成</a>
|
||||||
<a v-if="canCollect(row)" @click="handleMockCollect(row)">测试采集</a>
|
<a v-if="canCollect(row)" @click="handleMockCollect(row)">测试采集</a>
|
||||||
@@ -166,6 +167,7 @@ import {
|
|||||||
createLaunchDraft,
|
createLaunchDraft,
|
||||||
deleteLaunchRecord,
|
deleteLaunchRecord,
|
||||||
getLaunchDetail,
|
getLaunchDetail,
|
||||||
|
getLawApproveCallbackSample,
|
||||||
mockApproveLaunch,
|
mockApproveLaunch,
|
||||||
mockCollectLaunch,
|
mockCollectLaunch,
|
||||||
mockRejectLaunch,
|
mockRejectLaunch,
|
||||||
@@ -325,12 +327,12 @@ function canMockReject(row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function canOnlineSign(row) {
|
function canOnlineSign(row) {
|
||||||
// 签署中也可以再次调起签署(续签/补签),已完成则不能再签
|
// 在线签订只对电子合同开放;纸质/线下签署走“上传已签署版本”兜底。
|
||||||
return ["pending_sign", "signing"].includes(row.status);
|
return String(row.isElectron || "1") === "1" && ["pending_sign", "signing"].includes(row.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
function canMockFinishSign(row) {
|
function canMockFinishSign(row) {
|
||||||
return ["pending_sign", "signing"].includes(row.status);
|
return String(row.isElectron || "1") === "1" && ["pending_sign", "signing"].includes(row.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
function canUploadSigned(row) {
|
function canUploadSigned(row) {
|
||||||
@@ -346,7 +348,15 @@ function canArchive(row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function canViewApprove(row) {
|
function canViewApprove(row) {
|
||||||
return ["reviewing", "pending_sign", "signing", "pending_collect", "pending_archive", "completed"].includes(row.status);
|
return Boolean(row.lawContractId) && ["reviewing", "rejected", "pending_sign", "signing", "pending_collect", "pending_archive", "completed"].includes(row.status);
|
||||||
|
}
|
||||||
|
|
||||||
|
function canViewLawCallback(row) {
|
||||||
|
return ["reviewing", "rejected", "pending_sign", "signing", "pending_collect", "pending_archive", "completed"].includes(row.status);
|
||||||
|
}
|
||||||
|
|
||||||
|
function canDownloadSigned(row) {
|
||||||
|
return Boolean(row.signedFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
function canTerminate(row) {
|
function canTerminate(row) {
|
||||||
@@ -533,6 +543,67 @@ function handleViewApprove(row) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buildLawCallbackModalContent(sample) {
|
||||||
|
const approvedJson = JSON.stringify({ data: sample?.approvedData || {} }, null, 2);
|
||||||
|
const rejectedJson = JSON.stringify({ data: sample?.rejectedData || {} }, null, 2);
|
||||||
|
return h("div", { style: { display: "flex", flexDirection: "column", gap: "12px" } }, [
|
||||||
|
h("div", [
|
||||||
|
h("div", { style: { marginBottom: "6px", fontWeight: 600 } }, "回调地址"),
|
||||||
|
h("div", { style: { color: "#666", wordBreak: "break-all" } }, `${sample?.callbackMethod || "POST"} ${sample?.callbackUrl || "/contract/launch/callback/law/approve"}`),
|
||||||
|
]),
|
||||||
|
h("div", [
|
||||||
|
h("div", { style: { marginBottom: "6px", fontWeight: 600 } }, "审批通过 data"),
|
||||||
|
h("pre", {
|
||||||
|
style: {
|
||||||
|
margin: 0,
|
||||||
|
maxHeight: "260px",
|
||||||
|
overflow: "auto",
|
||||||
|
padding: "12px",
|
||||||
|
borderRadius: "8px",
|
||||||
|
background: "#f6f8fa",
|
||||||
|
fontSize: "12px",
|
||||||
|
lineHeight: "1.6",
|
||||||
|
whiteSpace: "pre-wrap",
|
||||||
|
wordBreak: "break-word",
|
||||||
|
},
|
||||||
|
}, approvedJson),
|
||||||
|
]),
|
||||||
|
h("div", [
|
||||||
|
h("div", { style: { marginBottom: "6px", fontWeight: 600 } }, "审批驳回 data"),
|
||||||
|
h("pre", {
|
||||||
|
style: {
|
||||||
|
margin: 0,
|
||||||
|
maxHeight: "220px",
|
||||||
|
overflow: "auto",
|
||||||
|
padding: "12px",
|
||||||
|
borderRadius: "8px",
|
||||||
|
background: "#f6f8fa",
|
||||||
|
fontSize: "12px",
|
||||||
|
lineHeight: "1.6",
|
||||||
|
whiteSpace: "pre-wrap",
|
||||||
|
wordBreak: "break-word",
|
||||||
|
},
|
||||||
|
}, rejectedJson),
|
||||||
|
]),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleViewLawCallback(row) {
|
||||||
|
getLawApproveCallbackSample(row.id).then((res) => {
|
||||||
|
if (!isSuccessResponse(res) || !getDataResult(res)) {
|
||||||
|
message.error(getResponseMessage(res, "获取法务回调样例失败"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const sample = getDataResult(res);
|
||||||
|
Modal.info({
|
||||||
|
title: `法务回调 data 结构:${row.contractName}`,
|
||||||
|
width: 900,
|
||||||
|
okText: "知道了",
|
||||||
|
content: buildLawCallbackModalContent(sample),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function handleMockApprove(row) {
|
function handleMockApprove(row) {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "测试操作:模拟审批通过",
|
title: "测试操作:模拟审批通过",
|
||||||
|
|||||||
Reference in New Issue
Block a user