更新生成合同发送合同的流程

This commit is contained in:
weipengfei 2023-09-04 13:47:56 +08:00
parent 720dbbc17b
commit 9aaab87c2b
3 changed files with 283 additions and 10 deletions

View File

@ -151,7 +151,7 @@
<el-table-column
label="操作"
align="center"
width="360"
width="430"
fixed="right"
>
<template #default="{ row }">
@ -212,6 +212,58 @@
@click="handleDelete(row.id)"
>删除</el-button
>
<el-button
v-if="row.is_authentication == 0"
v-perms="['company/authentication']"
type="primary"
link
@click="handleAuthentication(row.id)"
>企业认证</el-button
>
<template v-if="row.is_authentication && row.is_contract == 0">
<el-button
v-if="
Array.isArray(row.contract) && row.contract.length == 0
"
v-perms="['company/initiate_contract']"
type="primary"
link
@click="showChangeCompany(row)"
>生成合同</el-button
>
<el-button
v-else-if="row.contract?.status == 0"
v-perms="['company/initiate_contract']"
type="warning"
link
@click="auditing"
>签约中</el-button
>
<!-- <el-button
v-else-if="row.contract?.check_status == 1"
v-perms="['company/initiate_contract']"
type="warning"
link
@click="auditing"
>审核中</el-button
>
<el-button
v-else-if="row.contract?.check_status == 2"
v-perms="['company/Draftingcontracts']"
type="primary"
link
@click="showCreateConctPop(row)"
>发送合同</el-button
>
<el-button
v-else-if="row.contract?.check_status == 3"
v-perms="['company/postsms']"
type="primary"
link
@click="(showPop = true), (contractId = row.id)"
>发送短信</el-button
> -->
</template>
</div>
</template>
</el-table-column>
@ -221,6 +273,128 @@
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<el-dialog
v-model="showInitiateContractPop"
@close="offInitiateContractPop"
>
<h1>重要提醒</h1>
<div>
<div class="content">请确认信息是否有误</div>
<el-card>
<el-row>
<el-col :span="12">
<el-form-item label-width="100px" label="甲方" prop="field130">
<el-input
v-model="contractFormData.party_a_name"
placeholder="请选择甲方"
@click="showCompany = true"
clearable
:style="{ width: '100%' }"
></el-input>
<!-- <el-select
v-model="contractFormData.party_a"
placeholder="请选择甲方"
clearable
:style="{ width: '100%' }"
>
<el-option
v-for="(item, index) in company_list"
:key="index"
:label="item.company_name"
:value="item.id"
></el-option>
</el-select> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="100px" label="乙方" prop="field131">
<el-input
:disabled="true"
v-model="contractFormData.party_b_name"
placeholder="请选择乙方"
clearable
:style="{ width: '100%' }"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="100px"
label="合同类型"
prop="contract_type"
>
<el-select
v-model="contractFormData.contract_type"
placeholder="请选择合同类型"
clearable
:style="{ width: '100%' }"
>
<el-option
v-for="(item, index) in contract_type"
:key="index"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="100px"
label="合同编号"
prop="field133"
>
<el-input
placeholder="系统自动生成"
v-model="contractFormData.contract_no"
clearable
:style="{ width: '100%' }"
:disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-card>
</div>
<p class="btn_menu">
<el-button type="primary" size="large" @click="InitiateContract"
>确认</el-button
>
<el-button type="info" size="large" @click="offInitiateContractPop"
>返回</el-button
>
</p>
<el-dialog v-model="showCompany">
<DialogIndex
:companyTypeList="datas.dictTypeLists"
:type="30"
@customEvent="customEvent"
></DialogIndex>
</el-dialog>
</el-dialog>
<el-dialog v-model="showPop" @close="offPop">
<h1>重要提醒</h1>
<div class="content" v-if="showConctactPop">
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
</div>
<div class="content" v-else>
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
</div>
<p class="btn_menu">
<el-button
type="primary"
size="large"
v-if="showConctactPop"
@click="creContct"
>确认</el-button
>
<el-button type="primary" size="large" v-else @click="sendMsg"
>确认</el-button
>
<el-button type="info" size="large" @click="offPop">返回</el-button>
</p>
</el-dialog>
</div>
</template>
@ -399,7 +573,7 @@ const handleAuthentication = async (id: number | any[]) => {
//
const auditing = () => {
ElMessage.warning("请等待合同审核完成!");
ElMessage.warning("请等待合同签约完成!");
};
getLists();

View File

@ -151,7 +151,7 @@
<el-table-column
label="操作"
align="center"
width="310"
width="510"
fixed="right"
>
<template #default="{ row }">

View File

@ -34,7 +34,7 @@
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
<el-select
v-model="queryParams.status"
clearable
placeholder="请选择状态"
@ -144,7 +144,28 @@
>详情</router-link
>
</el-button>
<el-button v-if="row.check_status == 1" type="warning" link>
<router-link
:to="{ path: '/contract/detail', query: { id: row.id } }"
>待审核</router-link
>
</el-button>
<el-button
v-else-if="row.check_status == 2"
v-perms="['company/Draftingcontracts']"
type="primary"
link
@click="showCreateConctPop(row)"
>发送合同</el-button
>
<el-button
v-else-if="row.check_status == 3"
v-perms="['company/postsms']"
type="primary"
link
@click="(showPop = true), (contractId = row.party_b)"
>发送短信</el-button
>
<!-- <el-button v-perms="['contract.contract/delete']" type="danger" link
@click="handleDelete(row.id)">删除</el-button> -->
</template>
@ -155,6 +176,28 @@
<pagination v-model="pager" @change="getLists" />
</div>
</el-card>
<el-dialog v-model="showPop" @close="offPop">
<h1>重要提醒</h1>
<div class="content" v-if="showConctactPop">
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
</div>
<div class="content" v-else>
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
</div>
<p class="btn_menu">
<el-button
type="primary"
size="large"
v-if="showConctactPop"
@click="creContct"
>确认</el-button
>
<el-button type="primary" size="large" v-else @click="sendMsg"
>确认</el-button
>
<el-button type="info" size="large" @click="offPop">返回</el-button>
</p>
</el-dialog>
<!-- <contractDetil ref="childDetil"></contractDetil> -->
</div>
</template>
@ -171,12 +214,39 @@ import {
import { timeFormat } from "@/utils/util";
import feedback from "@/utils/feedback";
import { dictDataLists } from "@/api/setting/dict";
import { generateGontract, sendMsgApi } from "@/api/company";
const route = useRoute();
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
//
const showEdit = ref(false);
const datalist = ref([]);
//
const showPop = ref(false);
const showConctactPop = ref(false);
// id
const contractId = ref("");
//
const showCreateConctPop = (row) => {
(showPop.value = true),
(showConctactPop.value = true),
(contractId.value = row.party_b);
};
const offPop = () => {
showPop.value = false;
showConctactPop.value = false;
};
const creContct = async () => {
await generateGontract({ id: contractId.value });
getLists();
offPop();
};
const sendMsg = async () => {
await sendMsgApi({ id: contractId.value });
getLists();
offPop();
};
//
const queryParams = reactive({
company_id: "",
@ -188,11 +258,10 @@ const queryParams = reactive({
area_manager: "",
type: "",
});
const statusdata=reactive([
{id:"1",name:'已签约'},
{id:"0",name:"未签约"},
]
)
const statusdata = reactive([
{ id: "1", name: "已签约" },
{ id: "0", name: "未签约" },
]);
if (route.query.type) {
queryParams.type = route.query.type?.toString();
}
@ -239,3 +308,33 @@ const handleDelete = async (id: number | any[]) => {
getLists();
</script>
<style lang="scss" scoped>
.btn {
position: absolute;
}
h1 {
text-align: center;
font-weight: bold;
font-size: 30px;
color: red;
margin-bottom: 10px;
}
.content {
font-size: 20px;
}
.info {
color: red;
font-weight: bold;
font-size: 18px;
display: inline-block;
margin: 0 5px;
}
.btn_menu {
margin-top: 10vh;
display: flex;
justify-content: space-around;
}
</style>