测试更新问题件详情

This commit is contained in:
mengxiaolong
2020-08-04 13:32:23 +08:00
parent 832ce7dd8c
commit b337b3e90c
4 changed files with 68 additions and 32 deletions

View File

@@ -26,7 +26,7 @@
{{ supplement.descriptionPolicyholder }}
</p>
</div>
<van-uploader :after-read="policyHolderUpload" name="copy" @delete="deleteImg" v-model="supplement.copyImgList" />
<van-uploader :after-read="policyHolderUpload" name="copy" v-model="supplement.copyImgList" />
</div>
</div>
</div>
@@ -81,7 +81,7 @@
<span>投保人/监护人亲笔签名</span>
<van-button type="danger" size="small" @click="autograph(0)">{{ policyholderSigned ? '已签名' : '签名' }}</van-button>
</div>
<div class="list">
<div class="list" v-if="problemDetail.receiveType === '1'">
<span>被投保人亲笔签名</span>
<van-button type="danger" size="small" @click="autograph(1)">{{ insurantSigned ? '已签名' : '签名' }}</van-button>
</div>
@@ -176,8 +176,10 @@ export default {
issueType: 0,
// 投保人是否已签名
policyholderSigned: false,
policyholderBase64: '',
// 被保人是否已签名
insurantSigned: false,
insurantBase64: '',
// 接收验证码手机号码
phoneNum: '',
showConfirm: false,
@@ -194,9 +196,6 @@ export default {
rgssUrl: res.path
})
},
deleteImg(file, detail) {
console.log(file, detail)
},
async insurantUpload(file) {
let res = await this.afterRead(file)
this.supplement.insurantUploadResult.push({
@@ -231,10 +230,12 @@ export default {
let signRes = JSON.parse(res)
// 投保人签名
if (personType === 0 && signRes.state === '1') {
this.policyholderBase64 = decodeURI(signRes.sign)
this.policyholderSigned = true
}
// 被保人签名
else if (personType === 1 && signRes.state === '1') {
this.insurantBase64 = decodeURI(signRes.sign)
this.insurantSigned = true
}
console.log('签名结果: ', res)
@@ -329,22 +330,17 @@ export default {
// 转账失败问题件不用签名
if (this.issueType !== '818901') {
// 校验签名
if (this.policyholderSigned && this.insurantSigned) {
this.dialog = {
type: 'confirm',
show: true,
text: '为确定用户身份我们将向186xxxx8972此手机号发送验证码'
}
if (this.problemDetail.receiveType === '0') {
if (!this.policyholderSigned) return this.$toast('请完成签名后继续操作')
} else {
this.$toast('请完成全部签名后继续操作')
}
} else {
this.dialog = {
type: 'confirm',
show: true,
text: '为确定用户身份我们将向186xxxx8972此手机号发送验证码'
if (!this.policyholderSigned || !this.insurantSigned) return this.$toast('请完成签名后继续操作')
}
}
this.dialog = {
type: 'confirm',
show: true,
text: '为确定用户身份我们将向186xxxx8972此手机号发送验证码'
}
},
async getMessage({ type, data }) {
// 获取dialog信息type为confirm时为短信框alert时是确定框
@@ -394,6 +390,17 @@ export default {
}
// 更新
let res = await updateQuestionDetail(problemData)
console.dir(res)
if (res.result === '0') {
this.$jump({
flag: 'h5',
extra: {
forbidSwipeBack: '1',
url: location.origin + `/#/questions/result/${res.result}`
},
routerInfo: { path: `/questions/result/${res.result}` }
})
}
this.dialog.show = false
}
},
@@ -402,9 +409,9 @@ export default {
id: this.$route.params.id
})
this.problemDetail = rs.content.list[0]
let problemDetail = rs.content.list[0]
this.supplement.descriptionInsurant = problemDetail.content
this.supplement.descriptionPolicyholder = problemDetail.issueContent
this.problemDetail.receiveType = JSON.parse(localStorage.getItem('currentProblemItem')).receiveType
this.supplement.descriptionInsurant = this.problemDetail.content
this.supplement.descriptionPolicyholder = this.problemDetail.issueContent
},
//微信空签
toAirSign(status, keyword, offset, originStatus, personType) {
@@ -591,7 +598,7 @@ export default {
}
}
.autograph {
padding: 10px;
padding: 10px 10px 20px 10px;
font-size: 12px;
.list {
&:first-child {