微信端上传补充资料

This commit is contained in:
mengxiaolong
2020-08-27 11:43:56 +08:00
parent 4327679fe8
commit 294e9225a5

View File

@@ -176,10 +176,9 @@ export default {
methods: { methods: {
// 补充资料问题件被保人上传身份证照片 // 补充资料问题件被保人上传身份证照片
async uploadSupplementImg(file) { async uploadSupplementImg(file) {
console.dir(file)
if (this.isWeixin) { if (this.isWeixin) {
localStorage.setItem('supplementImages', JSON.stringify(this.imageList)) localStorage.setItem('supplementImages', JSON.stringify(this.imageList))
} } else {
let res = await this.afterRead(file) let res = await this.afterRead(file)
let result = { let result = {
rgssUrl: res.path, rgssUrl: res.path,
@@ -187,6 +186,7 @@ export default {
subBusinessType: 1 subBusinessType: 1
} }
this.imageResultList.push(result) this.imageResultList.push(result)
}
}, },
checkSupplementData() { checkSupplementData() {
return this.imageResultList.length !== 0 return this.imageResultList.length !== 0
@@ -364,7 +364,7 @@ export default {
return await uploadImg(data) return await uploadImg(data)
}, },
// 下一步 // 下一步
submit() { async submit() {
// 校验回复内容 // 校验回复内容
if (this.issueType === 'TB89' && this.newContract.feedback.trim() === '') return this.$toast('请填写具体回复信息') if (this.issueType === 'TB89' && this.newContract.feedback.trim() === '') return this.$toast('请填写具体回复信息')
if (this.issueType === 'TB89' && (this.newContract.feedback.trim().length < 4 || this.newContract.feedback.trim().length > 400)) if (this.issueType === 'TB89' && (this.newContract.feedback.trim().length < 4 || this.newContract.feedback.trim().length > 400))
@@ -372,6 +372,19 @@ export default {
// 校验补充资料 // 校验补充资料
if (this.issueType === '828601') { if (this.issueType === '828601') {
if (!this.checkSupplementData()) return this.$toast('请上传补充资料') if (!this.checkSupplementData()) return this.$toast('请上传补充资料')
if (this.isWeixin) {
this.$toast.loading()
for (let image of this.imageList) {
let res = await this.afterRead(image)
let result = {
rgssUrl: res.path,
imageInfoType: 1,
subBusinessType: 1
}
this.imageResultList.push(result)
}
this.$toast.clear()
}
} }
// 转账不成功 // 转账不成功
if (this.issueType === '818901') { if (this.issueType === '818901') {
@@ -456,8 +469,9 @@ export default {
problemData.list.push(this.transfer.cardUploadResult) problemData.list.push(this.transfer.cardUploadResult)
} }
} }
this.$toast.loading()
// 更新问题件数据 // 更新问题件数据
try {
this.$toast.loading()
let res = await updateQuestionDetail(problemData) let res = await updateQuestionDetail(problemData)
this.$toast.clear() this.$toast.clear()
if (res.result === '1') { if (res.result === '1') {
@@ -473,6 +487,9 @@ export default {
path: `/questions/result/${res.result}` path: `/questions/result/${res.result}`
} }
}) })
} catch (reason) {
console.log('网络异常')
}
} }
}, },
async getQuestionDetail() { async getQuestionDetail() {
@@ -640,7 +657,13 @@ export default {
} }
} }
// 补充资料问题件回显资料照片 {
// 微信签名后回显补充资料照片
if (localStorage.getItem('supplementImages')) {
let images = JSON.parse(localStorage.getItem('supplementImages'))
this.imageList.push(...images)
}
}
} }
this.getBankList() this.getBankList()
this.getQuestionDetail() this.getQuestionDetail()