修改问题件签名控制逻辑

This commit is contained in:
mengxiaolong
2020-08-05 10:03:05 +08:00
parent 7c04588a3d
commit 97b27763f0

View File

@@ -33,7 +33,7 @@
<!-- 新契约基本问题件 --> <!-- 新契约基本问题件 -->
<div class="feedback" v-if="issueType === 'TB89'"> <div class="feedback" v-if="issueType === 'TB89'">
<div class="title">问题件回复</div> <div class="title">问题件回复</div>
<textarea placeholder="请输入" v-model="newContract.feedback"></textarea> <textarea placeholder="请输入" v-model="newContract.feedback" :disabled="newContract.feedbackAvailable"></textarea>
</div> </div>
<div class="checkedBox" v-if="issueType !== '818901'"> <div class="checkedBox" v-if="issueType !== '818901'">
<van-checkbox v-model="checked" class="checked" icon-size="16px" shape="square" <van-checkbox v-model="checked" class="checked" icon-size="16px" shape="square"
@@ -137,6 +137,7 @@ export default {
let isWeixin = this.$utils.device().isWeixin let isWeixin = this.$utils.device().isWeixin
return { return {
isWeixin, isWeixin,
problemInfo: null,
problemDetail: null, problemDetail: null,
supplement: { supplement: {
// 被保人问题描述 // 被保人问题描述
@@ -152,7 +153,8 @@ export default {
}, },
newContract: { newContract: {
// 新契约 // 新契约
feedback: '' feedback: '',
feedbackAvailable: false
}, },
transfer: { transfer: {
// 转账失败 // 转账失败
@@ -212,12 +214,28 @@ export default {
}, },
//签名 //签名
async autograph(personType) { async autograph(personType) {
let problemInfo = JSON.parse(localStorage.getItem('currentProblemItem')) // 新契约问题件签名前必须输入回复内容
if (this.$route.params.type === 'TB89') {
if (!this.newContract.feedback.trim()) {
return this.$toast('请先填写回复内容')
}
// 根据回复内容重新生成PDF&回复内容不能在更改
this.newContract.feedbackAvailable = true
}
// 转账不成功签名前必须选择处理方式
if (this.$route.params.type === '818901') {
if (this.transfer.mode === '') {
return this.$toast('请先选择处理方式')
}
// 根据选择的处理方式重新生成PDF
}
let name = personType === 0 ? this.problemInfo.appntName : this.problemInfo.insuredName
let number = personType === 0 ? this.problemInfo.appntIdCardNo : this.problemInfo.insuredIdCardNo
if (!this.isWeixin) { if (!this.isWeixin) {
let signParam = { let signParam = {
name: personType === 0 ? problemInfo.prtName : problemInfo.insuredName, name,
type: '1', type: '1',
number: '142727199301063550', number,
keyword: '签字', keyword: '签字',
pageNo: '1', pageNo: '1',
index: 1, index: 1,
@@ -226,7 +244,6 @@ export default {
signatureWidth: this.$utils.signParams().signatureWidth, signatureWidth: this.$utils.signParams().signatureWidth,
signatureHeight: this.$utils.signParams().signatureHeight signatureHeight: this.$utils.signParams().signatureHeight
} }
console.log(signParam)
// eslint-disable-next-line // eslint-disable-next-line
const res = await EWebBridge.webCallAppInJs('ca_sign', signParam) const res = await EWebBridge.webCallAppInJs('ca_sign', signParam)
let signRes = JSON.parse(res) let signRes = JSON.parse(res)
@@ -341,7 +358,7 @@ export default {
this.dialog = { this.dialog = {
type: 'confirm', type: 'confirm',
show: true, show: true,
text: '为确定用户身份,我们将向186xxxx8972此手机号发送验证码' text: `为确定用户身份,我们将向${this.problemInfo.phoneNo}此手机号发送验证码`
} }
}, },
async getMessage({ data }) { async getMessage({ data }) {
@@ -427,8 +444,9 @@ export default {
prtNo: this.$route.query.prtNo, prtNo: this.$route.query.prtNo,
userType: Number(this.$route.query.receiveType) userType: Number(this.$route.query.receiveType)
}) })
this.problemDetail = rs.content.list[0] this.problemInfo = rs.content
this.problemDetail.receiveType = JSON.parse(localStorage.getItem('currentProblemItem')).receiveType this.problemDetail = this.problemInfo.list[0]
this.problemDetail.receiveType = this.$route.receiveType
this.supplement.descriptionInsurant = this.problemDetail.content this.supplement.descriptionInsurant = this.problemDetail.content
this.supplement.descriptionPolicyholder = this.problemDetail.issueContent this.supplement.descriptionPolicyholder = this.problemDetail.issueContent
}, },