增加:法大大合同签署流程-运营中心

This commit is contained in:
wuhui_zzw 2024-07-05 12:00:05 +08:00
parent 704c68ffe0
commit 5f1a7f860c
4 changed files with 185 additions and 36 deletions

View File

@ -72,6 +72,20 @@ export function deliveryAllocationOrder(data) {
}
// 法大大 - 获取个人授权信息
export function contractAuthInfo(data) {
return request.get(`contract/auth_info`, data);
}
// 法大大 - 获取个人合同签署信息
export function contractSignInfo(data) {
return request.get(`contract/get_sign_info`, data);
}

View File

@ -1550,7 +1550,23 @@
}
}
]
},
{
"root": "pages/webview",
"name": "webview",
"pages": [
{
"path": "webview",
"style": {
"navigationBarTitleText": "webview"
}
}
]
}
],
"globalStyle": {
"navigationBarTextStyle": "black",

View File

@ -120,6 +120,7 @@ export default {
let menuList = [];
let agentType = this.agent_info.agent_type || 0;
let merId = this.agent_info.mer_id || 0;
let agentId = this.agent_info.id || 0;
// 广
if(['1','2','3','5','6','9','11'].includes(String(agentType))){
menuList.push({
@ -187,7 +188,7 @@ export default {
menuList.push({
title: '合同签约',
type: 'link',
url: '/pages/agent/contract/index',
url: '/pages/agent/contract/index?role_type='+ agentType +'&role_id=' + agentId,
icon: 'icon-bianji4',
});
@ -505,8 +506,11 @@ export default {
break;
//
case 'link':
let link = menu.url;
link = link.includes("?") ? (link + '&') : (link + '?')
link = link + 'agent_id=' + params.agent_id;
uni.navigateTo({
url: menu.url + '?agent_id=' + params.agent_id
url: link
})
break;
//
@ -519,8 +523,6 @@ export default {
});
_this.storeManagement();
break;
}
},
// 广 -

View File

@ -1,15 +1,24 @@
<template>
<view class="main-content">
合同签约
<!--顶部内容-->
<view class="top">
<image class="top-image" :src="contract_bg" mode="widthFix"></image>
<view class="top-title">线上签约合同</view>
</view>
<!--主要内容-->
<view class="contract-content">
<image class="tips-icon" :src="Number(info.binding_status) === 1 ? contract_yes : contract_no" mode="widthFix"></image>
<view class="tips">温馨提示</view>
<view class="sub-tips">
<text v-if="Number(info.binding_status) === 0">您还未授权请先授权</text>
<text v-else-if="Number(info.sign_status) === 0">您还未签署电子合同,请尽快前往签约</text>
<text v-else-if="Number(info.binding_status) === 1 && Number(info.sign_status) === 1">您已签署电子合同可点击下载合同</text>
<text v-else-if="Number(info.sign_status) === 2">您已拒绝签署合同</text>
</view>
<view class="operation-btn" v-if="Number(info.binding_status) === 0" @click="goToAuth">去授权</view>
<view class="operation-btn" v-else-if="Number(info.sign_status) === 0" @click="getSignInfo">去签约</view>
<view class="operation-btn" v-else-if="Number(info.binding_status) === 1 && Number(info.sign_status) === 1" @click="getSignInfo">查看合同</view>
</view>
<!-- 授权登录 -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authClose"></authorize>
</view>
@ -18,6 +27,8 @@
<script>
import {mapGetters} from "vuex";
import authorize from '@/components/Authorize';
import { HTTP_REQUEST_URL } from '@/config/app';
import { contractAuthInfo,contractSignInfo } from "@/api/agent";
export default {
name: 'business',
@ -32,16 +43,26 @@ export default {
//
isAuto: false, //
isShowAuth: false,//
//
contract_bg: '',
contract_no: '',
contract_yes: '',
//
role_id: '',
role_type: '',
info: {},
}
},
onReady() {
this.contract_bg = `${HTTP_REQUEST_URL}/static/images/icon/contract_bg.png`;
this.contract_no = `${HTTP_REQUEST_URL}/static/images/icon/contract_no.png`;
this.contract_yes = `${HTTP_REQUEST_URL}/static/images/icon/contract_yes.png`;
},
onLoad(options) {
this.role_id = options.role_id || 0;
this.role_type = options.role_type || 0;
console.log("接收的所有参数", options)
//
if (!this.isLogin) {
//
@ -66,14 +87,60 @@ export default {
},
//
init () {
this.getAuthInfo();
},
// -
getAuthInfo(){
let _this = this;
let params = {
role_type: _this.role_type,
role_id: _this.role_id
};
contractAuthInfo(params).then(res => {
if(Number(res.status) === 200){
let data = res.data || {};
_this.info = data || {};
}else{
_this.$util.Tips({title: res.msg});
}
}).catch(err => {
_this.$util.Tips({title: err});
});
},
// -
goToAuth(){
//
let authUrl = this.info.authUrl || '';
if(authUrl){
uni.navigateTo({
url: '/pages/webview/webview?url=' + encodeURIComponent(authUrl)
})
}
},
// -
getSignInfo(){
let _this = this;
uni.showLoading({
title: '加载中...',
mask: true
});
contractSignInfo({ id: _this.info.id }).then(res => {
uni.hideLoading();
if(Number(res.status) === 200){
let data = res.data || {};
if(data.actorSignTaskEmbedUrl){
uni.navigateTo({
url: '/pages/webview/webview?url=' + encodeURIComponent(data.actorSignTaskEmbedUrl)
})
}
}else{
_this.$util.Tips({title: res.msg});
}
}).catch(err => {
uni.hideLoading();
_this.$util.Tips({title: err});
});
}
}
}
@ -83,18 +150,68 @@ export default {
.main-content{
width: 100vw!important;
min-height: 100vh!important;
background: orange;//#F6F6F6
padding: 0 20rpx 100rpx 20rpx;
background: #ffffff;//#F6F6F6
.top{
width: 100vw;
position: relative;
.top-image{
width: 100vw!important;
}
.top-title{
position: absolute;
top: 0;
left: 0;
height: 230rpx;
line-height: 230rpx;
padding-left: 50rpx;
font-size: 41rpx;
font-weight: bold;
color: #eb0000;
}
}
.contract-content{
width: 100vw;
display: inline-flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
position: absolute;
top: 230rpx;
z-index: 10;
background: #ffffff;
padding-top: 50rpx;
border-top-left-radius: 30rpx;
border-top-right-radius: 30rpx;
.tips-icon{
width: 50rpx!important;
}
.tips{
height: 70rpx;
line-height: 70rpx;
font-size: 32rpx;
font-weight: bold;
}
.sub-tips{
height: 50rpx;
line-height: 50rpx;
font-size: 28rpx;
color: #6a6a6a;
}
.operation-btn{
margin-top: 50rpx;
width: 80%;
border-radius: 100rpx;
text-align: center;
height: 90rpx;
line-height: 90rpx;
background-color: #d60000;
color: #ffffff;
}
}
}
</style>