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

View File

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

View File

@@ -14,11 +14,16 @@
需签署
<ul>
<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>
<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>
</ul>
点击开始按钮进行相关操作
点击开始按钮进行相关操作<br /><span class="red">温馨提示请尽量使用正楷文字进行签名</span>
</div>
<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>
@@ -33,16 +38,20 @@
需签署
<ul>
<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-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>
</ul>
点击开始分享进行相关操作
点击开始分享进行相关操作<br /><span class="red">温馨提示请尽量使用正楷文字进行签名</span>
</div>
<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 @click="faceAuth('1')" v-no-more-click="1000" :disabled="isguranteeSubmit" type="danger" size="normal" style="width:30%">开始</van-button>
</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) {
let that = this
@@ -256,7 +278,7 @@ export default {
that.goUrl(code)
}
*/
this.goUrl(code) //调试专用
this.goUrl(code) //TEST调试专用
},
goUrl(code) {
let path = ''
@@ -272,11 +294,9 @@ export default {
this.$jump({
flag: 'h5',
extra: {
// url: location.origin + `/#/agentEenter/` + path
url: `${location.origin}/#/agentEenter/${path}?code=${code}`
},
routerInfo: {
// path: `/agentEenter/` + path
path: `/agentEenter/${path}?code=${code}`
}
})