合同复制
This commit is contained in:
@@ -46,6 +46,13 @@ export function updateLaunchDraft(data) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function copyLaunchDraft(id) {
|
||||||
|
return request({
|
||||||
|
url: `/contract/launch/${id}/copy`,
|
||||||
|
method: "post",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export function submitLaunchRecord(id) {
|
export function submitLaunchRecord(id) {
|
||||||
return request({
|
return request({
|
||||||
url: `/contract/launch/${id}/submit`,
|
url: `/contract/launch/${id}/submit`,
|
||||||
|
|||||||
@@ -101,10 +101,11 @@
|
|||||||
<vxe-column field="initiatorDept" title="所属部门" width="140" show-overflow="title" />
|
<vxe-column field="initiatorDept" title="所属部门" width="140" show-overflow="title" />
|
||||||
<vxe-column field="createTime" title="发起时间" width="170" 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 field="updateTime" title="最后更新时间" width="170" show-overflow="title" />
|
||||||
<vxe-column title="操作" width="520" fixed="right">
|
<vxe-column title="操作" width="580" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="table-actions">
|
<div class="table-actions">
|
||||||
<a @click="handleView(row)">查看</a>
|
<a @click="handleView(row)">查看</a>
|
||||||
|
<a @click="handleCopy(row)">复制</a>
|
||||||
<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>
|
||||||
@@ -156,6 +157,7 @@ import MixedSignModal from "./components/mixedSignModal.vue";
|
|||||||
import { getContractTypeSimpleLabel } from "./contractLaunchOptions.js";
|
import { getContractTypeSimpleLabel } from "./contractLaunchOptions.js";
|
||||||
import {
|
import {
|
||||||
archiveLaunch,
|
archiveLaunch,
|
||||||
|
copyLaunchDraft,
|
||||||
createLaunchDraft,
|
createLaunchDraft,
|
||||||
deleteLaunchRecord,
|
deleteLaunchRecord,
|
||||||
getLaunchDetail,
|
getLaunchDetail,
|
||||||
@@ -403,6 +405,19 @@ function handleEdit(row) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleCopy(row) {
|
||||||
|
copyLaunchDraft(row.id).then((res) => {
|
||||||
|
if (!isSuccessResponse(res) || !getDataResult(res)) {
|
||||||
|
message.error(getResponseMessage(res, "复制合同失败"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const copiedRecord = getDataResult(res);
|
||||||
|
message.success("合同已复制为新草稿,请继续完善后保存");
|
||||||
|
getList();
|
||||||
|
contractModalRef.value?.showModal(copiedRecord, "edit");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function handleSubmit(row) {
|
function handleSubmit(row) {
|
||||||
submitLaunchRecord(row.id).then((res) => {
|
submitLaunchRecord(row.id).then((res) => {
|
||||||
if (!isSuccessResponse(res)) {
|
if (!isSuccessResponse(res)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user