[FIX]【自助入司优化】

This commit is contained in:
yuweiqi
2020-06-19 20:21:47 +08:00
parent 44353606a0
commit 3f6218a51c
3 changed files with 162 additions and 88 deletions

View File

@@ -35,7 +35,7 @@
</template> </template>
<script> <script>
import { Field, Icon, Button, Radio, CheckboxGroup, NoticeBar, Dialog, RadioGroup } from 'vant' import { Field, Icon, Button, Radio, NoticeBar, Dialog, RadioGroup } from 'vant'
import { agreementQuery, signAgreement } from '@/api/ebiz/agentEenter/agentEenter.js' import { agreementQuery, signAgreement } from '@/api/ebiz/agentEenter/agentEenter.js'
import config from '@/config' import config from '@/config'
import { filtSignList, getAgreementNextPagePath } from './js/methods' import { filtSignList, getAgreementNextPagePath } from './js/methods'
@@ -319,44 +319,70 @@ export default {
window.location.href = this.$mainUrl + '/sign/index.html' window.location.href = this.$mainUrl + '/sign/index.html'
}, },
goNext() { goNext() {
let that = this if (this.code == '0' && this.agentSign.signState == '1' && !this.base64) {
// if (this.isSign && this.isReSign == '0') { console.log(111111) //TEST
let data = { this.$jump({
// userModel: { flag: 'goback',
// mobile: '13000000000' extra: {
// }, refresh: '1',
baseEncryp: that.code == '0' ? that.base64 : that.base64D, index: '-1'
// otherBaseEncryp: that.base64D, },
// baseEncryp: '123456', routerInfo: {
ebizAgreementDto: that.appntSign path: `/agentEenter/signContract`
} }
console.log('baseEncryp', data.baseEncryp) })
that.$toast.loading({ } else if (this.code == '1' && this.guaranteeSign.signState == '1' && !this.base64D) {
duration: 0, // 持续展示 toast console.log(2222222) //TEST
forbidClick: true, // 禁用背景点击 this.$jump({
loadingType: 'spinner', flag: 'goback',
message: '加载中……' extra: {
}) refresh: '1',
signAgreement(data).then(res => { index: '-1'
that.$toast.clear() },
if (res.result == '0') { routerInfo: {
let path = !this.isWeixin path: `/agentEenter/signContract`
? `/agentEenter/${that.nextPagePath}?code=${that.code}` }
: `/agentEenter/signContract?token=${localStorage.token}&dialogFlag=1` })
this.$jump({ } else {
flag: 'h5', console.log(333333) //TEST
extra: { let data = {
url: location.origin + '/#' + path, // userModel: {
pullRefresh: that.nextPagePath == 'signContract' ? '1' : '0' // mobile: '13000000000'
}, // },
routerInfo: { baseEncryp: this.code == '0' ? this.base64 : this.base64D,
path: path // otherBaseEncryp: this.base64D,
} // baseEncryp: '123456',
}) ebizAgreementDto: this.appntSign
} else {
this.$toast(res.resultMessage)
} }
}) console.log('baseEncryp', data.baseEncryp)
this.$toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true, // 禁用背景点击
loadingType: 'spinner',
message: '加载中……'
})
signAgreement(data).then(res => {
this.$toast.clear()
if (res.result == '0') {
let path = !this.isWeixin
? `/agentEenter/${this.nextPagePath}?code=${this.code}`
: `/agentEenter/signContract?token=${localStorage.token}&dialogFlag=1`
this.$jump({
flag: 'h5',
extra: {
url: location.origin + '/#' + path,
pullRefresh: this.nextPagePath == 'signContract' ? '1' : '0'
},
routerInfo: {
path: path
}
})
} else {
this.$toast(res.resultMessage)
}
})
}
// } // }
// else { // else {
// if (this.isReSign == '1') { // if (this.isReSign == '1') {
@@ -385,13 +411,15 @@ export default {
watch: { watch: {
listenChange(val) { listenChange(val) {
let that = this let that = this
if (val.isOver == true && val.radio != '' && val.appntSign.signState !== '1') { // if (val.isOver == true && val.radio != '' && val.appntSign.signState !== '1') {
if (val.isOver == true && val.radio != '') {
that.isDisable = false that.isDisable = false
} else { } else {
that.isDisable = true that.isDisable = true
} }
if (val.isOver == true && val.radio != '' && val.appntSign.signStateD !== '1') { // if (val.isOver == true && val.radio != '' && val.appntSign.signStateD !== '1') {
if (val.isOver == true && val.radio != '') {
that.isDisableD = false that.isDisableD = false
} else { } else {
that.isDisableD = true that.isDisableD = true
@@ -424,10 +452,12 @@ export default {
// } else { // } else {
// that.isDisabledComplite = true // that.isDisabledComplite = true
// } // }
/*
if (val.appntSign.signState == '1' && val.appntSign.signStateD == '1') { if (val.appntSign.signState == '1' && val.appntSign.signStateD == '1') {
that.isDisable = true that.isDisable = true
that.isDisableD = true that.isDisableD = true
} }
*/
} }
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {

View File

@@ -101,7 +101,6 @@ export default {
this.$toast.clear() this.$toast.clear()
that.signList = res.content.ebizAgreementDtoList that.signList = res.content.ebizAgreementDtoList
res.content.ebizAgreementDtoList.map(item => { res.content.ebizAgreementDtoList.map(item => {
console.log(item)
if (item.type == '11') { if (item.type == '11') {
that.appntSign = item that.appntSign = item
} }
@@ -170,39 +169,63 @@ export default {
}) })
}, },
goNext() { goNext() {
let that = this if (this.$route.query.isChange && !this.base64) {
let data = { console.log(1111111) //TEST
// userModel: { this.goBack()
// mobile: '13000000000' } else {
// }, console.log(222222222) //TEST
baseEncryp: that.base64, let data = {
// baseEncryp: '123456', // userModel: {
ebizAgreementDto: that.appntSign // mobile: '13000000000'
} // },
that.$toast.loading({ baseEncryp: this.base64,
duration: 0, // 持续展示 toast // baseEncryp: '123456',
forbidClick: true, // 禁用背景点击 ebizAgreementDto: this.appntSign
loadingType: 'spinner', }
message: '加载中……' this.$toast.loading({
}) duration: 0, // 持续展示 toast
signAgreement(data).then(res => { forbidClick: true, // 禁用背景点击
console.log(res) loadingType: 'spinner',
if (res.result == '0') { message: '加载中……'
this.$toast.clear() })
this.$jump({ signAgreement(data).then(res => {
flag: 'h5', console.log(res)
extra: { if (res.result == '0') {
// url: location.origin + `/#/agentEenter/paction` this.$toast.clear()
url: location.origin + `/#/agentEenter/${that.nextPagePath}?code=${that.code}`, if (this.$route.query.isChange) {
pullRefresh: that.nextPagePath == 'signContract' ? '1' : '0' this.goBack()
}, } else {
routerInfo: { this.$jump({
// path: `/agentEenter/paction` flag: 'h5',
path: `/agentEenter/${that.nextPagePath}?code=${that.code}` extra: {
// url: location.origin + `/#/agentEenter/paction`
url: location.origin + `/#/agentEenter/${this.nextPagePath}?code=${this.code}`,
pullRefresh: this.nextPagePath == 'signContract' ? '1' : '0'
},
routerInfo: {
// path: `/agentEenter/paction`
path: `/agentEenter/${this.nextPagePath}?code=${this.code}`
}
})
} }
}) } else {
} else { this.$toast(res.resultMessage)
this.$toast(res.resultMessage) }
})
}
},
goBack() {
this.$jump({
flag: 'goBack',
extra: {
refresh: '1',
index: '-1',
forbidSwipeBack: '1'
},
routerInfo: {
type: 2,
index: -1,
path: `/agentEenter/signContract`
} }
}) })
} }
@@ -216,7 +239,8 @@ export default {
watch: { watch: {
listenChange(val) { listenChange(val) {
let that = this let that = this
if (val.isOver == true && val.radio != '' && val.appntSign.signState !== '1') { // if (val.isOver == true && val.radio != '' && val.appntSign.signState !== '1') {
if (val.isOver == true && val.radio != '') {
that.isDisable = false that.isDisable = false
} else { } else {
that.isDisable = true that.isDisable = true
@@ -227,9 +251,9 @@ export default {
that.isDisabledComplite = true that.isDisabledComplite = true
} }
if (val.appntSign.signState == '1') { // if (val.appntSign.signState == '1') {
that.isDisable = true // that.isDisable = true
} // }
} }
}, },
beforeRouteLeave(to, from, next) { beforeRouteLeave(to, from, next) {

View File

@@ -14,11 +14,16 @@
需签署 需签署
<ul> <ul>
<li class="flex" v-for="(sign, index) in agentSignList" :key="index"> <li class="flex" v-for="(sign, index) in agentSignList" :key="index">
<div class="w260 blue">{{ sign.name }}</div> <div class="w240 blue">{{ sign.name }}</div>
<van-icon v-if="sign.signState === '1'" color="green" name="checked" /> <div class="pt5 pb5">
<van-icon v-if="sign.signState === '1'" color="green" name="checked" />
<van-button v-if="sign.signState === '1'" @click="changeSign(sign, '0')" v-no-more-click="1000" plain type="danger" round size="small" class="ml5"
>重新签名</van-button
>
</div>
</li> </li>
</ul> </ul>
点击开始按钮进行相关操作 点击开始按钮进行相关操作<br /><span class="red">温馨提示请尽量使用正楷文字进行签名</span>
</div> </div>
<div class="text-center mt20"> <div class="text-center mt20">
<van-button @click="faceAuth('0')" v-no-more-click="1000" :disabled="isAgentSubmit" type="danger" size="normal" style="width:30%">开始</van-button> <van-button @click="faceAuth('0')" v-no-more-click="1000" :disabled="isAgentSubmit" type="danger" size="normal" style="width:30%">开始</van-button>
@@ -33,16 +38,20 @@
需签署 需签署
<ul> <ul>
<li class="flex" v-for="(sign, index) in guaranteeSignList" :key="index"> <li class="flex" v-for="(sign, index) in guaranteeSignList" :key="index">
<div class="w260 blue">{{ sign.name }}</div> <div class="w240 blue">{{ sign.name }}</div>
<van-icon v-if="sign.signState === '1'" color="green" name="checked" /> <van-icon v-if="sign.signState === '1'" color="green" name="checked" />
<van-button v-if="sign.signState === '1'" @click="changeSign(sign, '1')" v-no-more-click="1000" plain type="danger" round size="small" class="ml5"
>重新签名</van-button
>
</li> </li>
</ul> </ul>
点击开始分享进行相关操作 点击开始分享进行相关操作<br /><span class="red">温馨提示请尽量使用正楷文字进行签名</span>
</div> </div>
<div v-if="!isInvalid" class="flex justify-content-a mb60 mt20"> <div v-if="!isInvalid" class="flex justify-content-a mb60 mt20">
<van-button v-if="!isWeixin" @click="share" v-no-more-click="1000" :disabled="isguranteeSubmit" type="danger" size="normal" style="width:30%" <van-button v-if="!isWeixin" @click="share" v-no-more-click="1000" type="danger" size="normal" style="width:30%">分享</van-button>
<!-- <van-button v-if="!isWeixin" @click="share" v-no-more-click="1000" :disabled="isguranteeSubmit" type="danger" size="normal" style="width:30%"
>分享</van-button >分享</van-button
> > -->
<van-button @click="faceAuth('1')" v-no-more-click="1000" :disabled="isguranteeSubmit" type="danger" size="normal" style="width:30%">开始</van-button> <van-button @click="faceAuth('1')" v-no-more-click="1000" :disabled="isguranteeSubmit" type="danger" size="normal" style="width:30%">开始</van-button>
</div> </div>
<div v-else class="ml15">操作时间已失效请联系销售人员</div> <div v-else class="ml15">操作时间已失效请联系销售人员</div>
@@ -199,7 +208,20 @@ export default {
} }
}) })
}, },
//修改签名
changeSign(v, code) {
localStorage.idNo = this.agentInfo.idNo
localStorage.idName = this.agentInfo.name
this.$jump({
flag: 'h5',
extra: {
url: `${location.origin}/#/agentEenter/${v.path}?code=${code}&isChange=0`
},
routerInfo: {
path: `/agentEenter/${v.path}?code=${code}&isChange=0`
}
})
},
//判断微信分享链接是否失效 //判断微信分享链接是否失效
async checkSignInvalid(signInvalid) { async checkSignInvalid(signInvalid) {
let that = this let that = this
@@ -256,7 +278,7 @@ export default {
that.goUrl(code) that.goUrl(code)
} }
*/ */
this.goUrl(code) //调试专用 this.goUrl(code) //TEST调试专用
}, },
goUrl(code) { goUrl(code) {
let path = '' let path = ''
@@ -272,11 +294,9 @@ export default {
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
// url: location.origin + `/#/agentEenter/` + path
url: `${location.origin}/#/agentEenter/${path}?code=${code}` url: `${location.origin}/#/agentEenter/${path}?code=${code}`
}, },
routerInfo: { routerInfo: {
// path: `/agentEenter/` + path
path: `/agentEenter/${path}?code=${code}` path: `/agentEenter/${path}?code=${code}`
} }
}) })