相对方修改
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -108,10 +108,11 @@
|
||||
<a @click="handleCopy(row)">复制</a>
|
||||
<a v-if="canChange(row)" @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="canSubmit(row)" @click="handleSubmit(row)">{{ isSingleAgreementRecord(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)">{{ isSingleAgreementRecord(row) ? "审批通过" : "测试通过" }}</a>
|
||||
<a v-if="canMockReject(row)" @click="handleMockReject(row)">{{ isSingleAgreementRecord(row) ? "审批驳回" : "测试驳回" }}</a>
|
||||
<a v-if="canOnlineSign(row)" @click="handleOnlineSign(row)">在线签订</a>
|
||||
<a v-if="canDownloadSigned(row)" @click="handleDownloadSigned(row)">下载签署文件</a>
|
||||
<a v-if="canUploadSigned(row)" @click="handleUploadSigned(row)">上传已签署版本</a>
|
||||
@@ -347,12 +348,19 @@ function canArchive(row) {
|
||||
return row.status === "pending_archive";
|
||||
}
|
||||
|
||||
function isSingleAgreementRecord(row) {
|
||||
return String(row?.isSingleAgreement || "0") === "1";
|
||||
}
|
||||
|
||||
function canViewApprove(row) {
|
||||
return Boolean(row.lawContractId) && ["reviewing", "rejected", "pending_sign", "signing", "pending_collect", "pending_archive", "completed"].includes(row.status);
|
||||
return !isSingleAgreementRecord(row)
|
||||
&& 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);
|
||||
return !isSingleAgreementRecord(row)
|
||||
&& ["reviewing", "rejected", "pending_sign", "signing", "pending_collect", "pending_archive", "completed"].includes(row.status);
|
||||
}
|
||||
|
||||
function canDownloadSigned(row) {
|
||||
@@ -499,10 +507,13 @@ function handleChange(row) {
|
||||
}
|
||||
|
||||
function handleSubmit(row) {
|
||||
const singleAgreement = isSingleAgreementRecord(row);
|
||||
Modal.confirm({
|
||||
title: "确认提交法务审批",
|
||||
title: singleAgreement ? "确认提交内部审批" : "确认提交法务审批",
|
||||
content: h("div", [
|
||||
h("p", `确定将合同【${row.contractName}】提交法务系统审批吗?`),
|
||||
h("p", singleAgreement
|
||||
? `确定将单方协议【${row.contractName}】提交内部审批吗?`
|
||||
: `确定将合同【${row.contractName}】提交法务系统审批吗?`),
|
||||
h("p", { style: { color: "#999", fontSize: "12px" } }, "提交后合同进入「审批中」状态,审批完成前不可编辑。"),
|
||||
]),
|
||||
okText: "确认提交",
|
||||
@@ -510,10 +521,10 @@ function handleSubmit(row) {
|
||||
onOk: () =>
|
||||
submitLaunchRecord(row.id).then((res) => {
|
||||
if (!isSuccessResponse(res)) {
|
||||
message.error(getResponseMessage(res, "提交法务失败"));
|
||||
message.error(getResponseMessage(res, singleAgreement ? "提交内部审批失败" : "提交法务失败"));
|
||||
return;
|
||||
}
|
||||
message.success("已提交法务,等待审批");
|
||||
message.success(singleAgreement ? "已提交内部审批,等待审批" : "已提交法务,等待审批");
|
||||
getList();
|
||||
}),
|
||||
icon: null,
|
||||
@@ -605,9 +616,12 @@ function handleViewLawCallback(row) {
|
||||
}
|
||||
|
||||
function handleMockApprove(row) {
|
||||
const singleAgreement = isSingleAgreementRecord(row);
|
||||
Modal.confirm({
|
||||
title: "测试操作:模拟审批通过",
|
||||
content: `模拟法务审批通过合同【${row.contractName}】,状态将变为「待签署」。`,
|
||||
title: singleAgreement ? "测试操作:模拟内部审批通过" : "测试操作:模拟审批通过",
|
||||
content: singleAgreement
|
||||
? `模拟单方协议【${row.contractName}】内部审批通过,状态将变为「待签署」。`
|
||||
: `模拟法务审批通过合同【${row.contractName}】,状态将变为「待签署」。`,
|
||||
okText: "确认模拟",
|
||||
cancelText: "取消",
|
||||
onOk: () =>
|
||||
@@ -624,10 +638,13 @@ function handleMockApprove(row) {
|
||||
}
|
||||
|
||||
function handleMockReject(row) {
|
||||
const singleAgreement = isSingleAgreementRecord(row);
|
||||
Modal.confirm({
|
||||
title: "测试操作:模拟审批驳回",
|
||||
title: singleAgreement ? "测试操作:模拟内部审批驳回" : "测试操作:模拟审批驳回",
|
||||
content: h("div", [
|
||||
h("p", `模拟法务审批驳回合同【${row.contractName}】,状态将回到「已驳回」。`),
|
||||
h("p", singleAgreement
|
||||
? `模拟单方协议【${row.contractName}】内部审批驳回,状态将回到「已驳回」。`
|
||||
: `模拟法务审批驳回合同【${row.contractName}】,状态将回到「已驳回」。`),
|
||||
h("p", { style: { color: "#999", fontSize: "12px" } }, "驳回后可重新编辑再提交。"),
|
||||
]),
|
||||
okText: "确认驳回",
|
||||
|
||||
Reference in New Issue
Block a user