更新生成合同发送合同的流程
This commit is contained in:
parent
720dbbc17b
commit
9aaab87c2b
@ -151,7 +151,7 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
width="360"
|
width="430"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@ -212,6 +212,58 @@
|
|||||||
@click="handleDelete(row.id)"
|
@click="handleDelete(row.id)"
|
||||||
>删除</el-button
|
>删除</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -221,6 +273,128 @@
|
|||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -399,7 +573,7 @@ const handleAuthentication = async (id: number | any[]) => {
|
|||||||
|
|
||||||
// 审核中
|
// 审核中
|
||||||
const auditing = () => {
|
const auditing = () => {
|
||||||
ElMessage.warning("请等待合同审核完成!");
|
ElMessage.warning("请等待合同签约完成!");
|
||||||
};
|
};
|
||||||
|
|
||||||
getLists();
|
getLists();
|
||||||
|
@ -151,7 +151,7 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
label="操作"
|
label="操作"
|
||||||
align="center"
|
align="center"
|
||||||
width="310"
|
width="510"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
>
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
@ -144,7 +144,28 @@
|
|||||||
>详情</router-link
|
>详情</router-link
|
||||||
>
|
>
|
||||||
</el-button>
|
</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
|
<!-- <el-button v-perms="['contract.contract/delete']" type="danger" link
|
||||||
@click="handleDelete(row.id)">删除</el-button> -->
|
@click="handleDelete(row.id)">删除</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
@ -155,6 +176,28 @@
|
|||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</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> -->
|
<!-- <contractDetil ref="childDetil"></contractDetil> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -171,12 +214,39 @@ import {
|
|||||||
import { timeFormat } from "@/utils/util";
|
import { timeFormat } from "@/utils/util";
|
||||||
import feedback from "@/utils/feedback";
|
import feedback from "@/utils/feedback";
|
||||||
import { dictDataLists } from "@/api/setting/dict";
|
import { dictDataLists } from "@/api/setting/dict";
|
||||||
|
import { generateGontract, sendMsgApi } from "@/api/company";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>();
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
const datalist = ref([]);
|
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({
|
const queryParams = reactive({
|
||||||
company_id: "",
|
company_id: "",
|
||||||
@ -189,10 +259,9 @@ const queryParams = reactive({
|
|||||||
type: "",
|
type: "",
|
||||||
});
|
});
|
||||||
const statusdata = reactive([
|
const statusdata = reactive([
|
||||||
{id:"1",name:'已签约'},
|
{ id: "1", name: "已签约" },
|
||||||
{ id: "0", name: "未签约" },
|
{ id: "0", name: "未签约" },
|
||||||
]
|
]);
|
||||||
)
|
|
||||||
if (route.query.type) {
|
if (route.query.type) {
|
||||||
queryParams.type = route.query.type?.toString();
|
queryParams.type = route.query.type?.toString();
|
||||||
}
|
}
|
||||||
@ -239,3 +308,33 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
|
|
||||||
getLists();
|
getLists();
|
||||||
</script>
|
</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>
|
Loading…
x
Reference in New Issue
Block a user