This commit is contained in:
weipengfei 2023-09-06 09:58:02 +08:00
parent a5f6554ec4
commit cdeb7f8d19
4 changed files with 42 additions and 34 deletions

View File

@ -6,7 +6,7 @@ const config = {
import.meta.env.VITE_APP_BASE_URL
}/`, //请求接口域名
urlPrefix: "adminapi", //请求默认前缀
timeout: 10 * 1000, //请求超时时长
timeout: 20 * 1000, //请求超时时长
};
export default config;

View File

@ -77,7 +77,10 @@ const axiosHooks: AxiosHooks = {
responseInterceptorsCatchHook(error) {
NProgress.done()
if (error.code !== AxiosError.ERR_CANCELED) {
error.message && feedback.msgError(error.message)
if (error.message.indexOf('timeout') !== -1) {
feedback.msgError('请求超时!!!')
}
else error.message && feedback.msgError(error.message)
}
return Promise.reject(error)
}

View File

@ -235,21 +235,22 @@
>生成合同</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"
@click="auditing(1)"
>审核中</el-button
>
<el-button
v-else-if="row.contract?.status == 0"
v-perms="['company/initiate_contract']"
type="success"
link
@click="auditing(2)"
>签约中</el-button
>
<!--
<el-button
v-else-if="row.contract?.check_status == 2"
v-perms="['company/Draftingcontracts']"
@ -662,8 +663,10 @@ const handleAuthentication = async (id: number | string | any[]) => {
};
//
const auditing = () => {
ElMessage.warning("请等待合同签约完成!");
const auditing = (type: number) => {
type == 1
? ElMessage.warning("请等待合同审核完成!")
: ElMessage.success("合同双方正在签约!");
};
getLists();

View File

@ -144,28 +144,30 @@
>详情</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
<template v-if="row.status == 0">
<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>
<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-else-if="row.check_status == 3"
v-perms="['company/postsms']"
type="primary"
link
@click="(showPop = true), (contractId = row.party_b)"
>发送短信</el-button
>
</template>
<!-- <el-button v-perms="['contract.contract/delete']" type="danger" link
@click="handleDelete(row.id)">删除</el-button> -->
</template>