[FIX]【自助入司流程优化】《担保书》空签调整

This commit is contained in:
yuweiqi
2020-05-18 16:20:33 +08:00
parent 55d2589f51
commit e8c619a77d

View File

@@ -18,11 +18,15 @@
</div> </div>
<div class="pl30 pb15"> <div class="pl30 pb15">
本人签字 本人签字
<van-button type="danger" size="small" @click="sign" :disabled="isDisable" v-no-more-click="1000">{{ <van-button v-if="!isWeixin" type="danger" size="small" @click="sign" :disabled="isDisable" v-no-more-click="1000">{{
appntSign.signState == '0' ? '签名' : '已签名' appntSign.signState == '0' ? '签名' : '已签名'
}}</van-button> }}</van-button>
<van-button v-else type="danger" size="small" @click="sign" disabled="disabled" v-no-more-click="1000">{{
appntSign.signState == '0' ? '未签名' : '已签名'
}}</van-button>
</div> </div>
<van-button type="danger" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000" size="large">下一步</van-button> <van-button v-if="!isWeixin" type="danger" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000" size="large">下一步</van-button>
<van-button v-if="isWeixin" type="danger" :disabled="isDisabledComplite" @click="goNext" v-no-more-click="1000" size="large">提交</van-button>
</div> </div>
</div> </div>
</template> </template>
@@ -35,7 +39,10 @@ import { filtSignList, getAgreementNextPagePath } from './js/methods'
export default { export default {
data() { data() {
let isWeixin = this.$utils.device().isWeixin //判断环境
return { return {
// 是否在微信
isWeixin,
src: location.origin + '/pdfjs/web/viewer.html?file=', src: location.origin + '/pdfjs/web/viewer.html?file=',
pdfUrl: '', pdfUrl: '',
radio: '', radio: '',
@@ -54,9 +61,15 @@ export default {
// 是否签名 true 签名 false 未签名 // 是否签名 true 签名 false 未签名
isSign: false, isSign: false,
isSignD: false, isSignD: false,
//协议list
signList: [],
//当前页面协议签署后下一页路由
nextPagePath: '',
//签署人 0-申请人 1-担保人
code: '',
//推荐人信息 //推荐人信息
agentInfo: {}, agentInfo: {},
// 推荐人签名信息 // 签名信息
appntSign: { appntSign: {
signState: '0', signState: '0',
signStateD: '0' signStateD: '0'
@@ -64,9 +77,9 @@ export default {
//原生返回的加密包 //原生返回的加密包
base64: '', base64: '',
//担保人原生返回的加密包 //担保人原生返回的加密包
base64D: '', base64D: ''
// 是否重复签名 // 是否重复签名
isReSign: '0' // isReSign: '0'
} }
}, },
components: { components: {
@@ -84,6 +97,7 @@ export default {
this.timeOut() this.timeOut()
} }
this.agreementQuery() this.agreementQuery()
this.code = this.$route.query.code
}, },
methods: { methods: {
//获取签署协议人信息 //获取签署协议人信息
@@ -105,20 +119,40 @@ export default {
if (res.result == '0') { if (res.result == '0') {
res.content.ebizAgreementDtoList.map(item => { res.content.ebizAgreementDtoList.map(item => {
console.log(item) console.log(item)
if (item.type == '12') { if (item.type == '12' && item.documentType == this.code) {
that.appntSign = item that.appntSign = item
// if (item.signState == '0') {
// this.isDisable = false
// this.isDisableD = false
// that.appntSign.signStateD = '0'
// that.appntSign.signState = '0'
// this.isReSign = '0'
// } else {
// this.isDisable = true
// this.isDisableD = true
// that.appntSign.signStateD = '1'
// that.appntSign.signState = '1'
// this.isReSign = '1'
// }
}
if (item.type == '12' && item.documentType == '0') {
//申请人签名信息
if (item.signState == '0') { if (item.signState == '0') {
this.isDisable = false this.isDisable = false
this.isDisableD = false
that.appntSign.signStateD = '0'
that.appntSign.signState = '0' that.appntSign.signState = '0'
this.isReSign = '0'
} else { } else {
this.isDisable = true this.isDisable = true
that.appntSign.signState = '1'
}
}
if (item.type == '12' && item.documentType == '1') {
//担保人签名信息
if (item.signState == '0') {
this.isDisableD = false
that.appntSign.signStateD = '0'
} else {
this.isDisableD = true this.isDisableD = true
that.appntSign.signStateD = '1' that.appntSign.signStateD = '1'
that.appntSign.signState = '1'
this.isReSign = '1'
} }
} }
}) })
@@ -198,6 +232,9 @@ export default {
loadingType: 'spinner', loadingType: 'spinner',
message: '加载中……' message: '加载中……'
}) })
if (this.isWeixin) {
this.toAirSign('0', '担保人签名', '3', '1')
} else {
EWebBridge.webCallAppInJs('ca_sign', { EWebBridge.webCallAppInJs('ca_sign', {
//身份证号码 //身份证号码
number: localStorage.idNoD, number: localStorage.idNoD,
@@ -224,10 +261,29 @@ export default {
} }
} }
}) })
}
},
//微信空签
toAirSign(status, keyword, offset, originStatus) {
console.log('offset == ', offset)
localStorage.setItem(
'signInfo',
JSON.stringify({
originStatus: originStatus,
idNo: localStorage.idNoD,
name: localStorage.idNameD,
type: '1',
keyword: keyword,
status: status,
offset: offset,
originUrl: location.href
})
)
window.location.href = this.$mainUrl + '/sign/index.html'
}, },
goNext() { goNext() {
let that = this let that = this
if (this.isSign && this.isReSign == '0') { // if (this.isSign && this.isReSign == '0') {
let data = { let data = {
// userModel: { // userModel: {
// mobile: '13000000000' // mobile: '13000000000'
@@ -246,25 +302,27 @@ export default {
signAgreement(data).then(res => { signAgreement(data).then(res => {
that.$toast.clear() that.$toast.clear()
if (res.result == '0') { if (res.result == '0') {
let path = !this.isWeixin ? `/agentEenter/${that.nextPagePath}?code=${that.code}` : '/agentEenter/signContract'
this.$jump({ this.$jump({
flag: 'h5', flag: 'h5',
extra: { extra: {
url: location.origin + `/#/agentEenter/LetterOfKnow` url: location.origin + '/#' + path
}, },
routerInfo: { routerInfo: {
path: `/agentEenter/LetterOfKnow` path: path
} }
}) })
} else { } else {
this.$toast(res.resultMessage) this.$toast(res.resultMessage)
} }
}) })
} else { // }
if (this.isReSign == '1') { // else {
// 您已签名 // if (this.isReSign == '1') {
this.$toast('您已签名') // // 您已签名
} // this.$toast('您已签名')
} // }
// }
// this.$jump({ // this.$jump({
// flag: 'h5', // flag: 'h5',