mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 19:16:43 +08:00
【20230803-1】上传附件修改入参方式
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import request from '@/assets/js/utils/request'
|
import request from '@/assets/js/utils/request'
|
||||||
import request1 from '@/assets/js/utils/request1'
|
import request1 from '@/assets/js/utils/request1'
|
||||||
import getUrl from '@/assets/js/utils/get-url'
|
import getUrl from '@/assets/js/utils/get-url'
|
||||||
|
import store from '@/store'
|
||||||
// 保费计算
|
// 保费计算
|
||||||
export function saveOrUpdateOrderInfo(data) {
|
export function saveOrUpdateOrderInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -99,6 +100,15 @@ export function uploadImg(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 上传图片
|
||||||
|
export function uploadImg2(data) {
|
||||||
|
return request1({
|
||||||
|
url: getUrl('/uploadImage?imgType='+store.getters.getUploadImgType+'&orderNo='+store.getters.getUploadImgOrderNo, 1, 2),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
// 人脸识别
|
// 人脸识别
|
||||||
export function recognition(data) {
|
export function recognition(data) {
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ export default new Vuex.Store({
|
|||||||
secondManageCode: '', //内勤所需参数
|
secondManageCode: '', //内勤所需参数
|
||||||
orderDetail: {},//无优卡分享微信端订单信息
|
orderDetail: {},//无优卡分享微信端订单信息
|
||||||
answerType: false,//风险测评tab是否显示
|
answerType: false,//风险测评tab是否显示
|
||||||
|
YBidNo: '', //银保代理人电子化合同签署证件号码
|
||||||
|
YBname: '', //银保代理人电子化合同签署姓名
|
||||||
|
YBuuid: '', //银保代理人电子化合同签署代理人uuid
|
||||||
|
uploadImgType: '',
|
||||||
|
uploadImgOrderNo: '',
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
setOrderDetail (state, data) {
|
setOrderDetail (state, data) {
|
||||||
@@ -75,8 +80,23 @@ export default new Vuex.Store({
|
|||||||
state.pcList = val
|
state.pcList = val
|
||||||
},
|
},
|
||||||
//更新 风险测评是否显示状态
|
//更新 风险测评是否显示状态
|
||||||
updateAnswerType (state, val) {
|
updateUploadImgType (state, val) {
|
||||||
state.answerType = val
|
state.uploadImgType = val
|
||||||
|
},
|
||||||
|
updateUploadImgOrderNo (state, val) {
|
||||||
|
state.uploadImgOrderNo = val
|
||||||
|
},
|
||||||
|
//更新 银保代理人电子化合同签署证件号码
|
||||||
|
updateYBidNo (state, val) {
|
||||||
|
state.YBidNo = val
|
||||||
|
},
|
||||||
|
//更新 银保代理人电子化合同签署姓名
|
||||||
|
updateYBname (state, val) {
|
||||||
|
state.YBname = val
|
||||||
|
},
|
||||||
|
//更新 银保代理人电子化合同签署代理人uuid
|
||||||
|
updateYBuuid (state, val) {
|
||||||
|
state.YBuuid = val
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
@@ -104,6 +124,21 @@ export default new Vuex.Store({
|
|||||||
getAnswerType (state) {
|
getAnswerType (state) {
|
||||||
return state.answerType
|
return state.answerType
|
||||||
},
|
},
|
||||||
|
getUploadImgType (state) {
|
||||||
|
return state.uploadImgType
|
||||||
|
},
|
||||||
|
getUploadImgOrderNo (state) {
|
||||||
|
return state.uploadImgOrderNo
|
||||||
|
},
|
||||||
|
getYBidNo (state) {
|
||||||
|
return state.YBidNo
|
||||||
|
},
|
||||||
|
getYBname (state) {
|
||||||
|
return state.YBname
|
||||||
|
},
|
||||||
|
getYBuuid (state) {
|
||||||
|
return state.YBuuid
|
||||||
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required label="银行卡账户" disabled />
|
<van-field required label="银行卡账户" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileListBank', '3', saleInsuredInfo.idType)">
|
<div @click="test('fileListBank', '3', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
name="fileListBank"
|
name="fileListBank"
|
||||||
v-model="fileListBank"
|
v-model="fileListBank"
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}正面`" disabled />
|
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}正面`" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileListIdFront', '1', saleInsuredInfo.idType)" class="flex align-items-e">
|
<div @click="test('fileListIdFront', '1', saleInsuredInfo.appntId, saleInsuredInfo.idType)" class="flex align-items-e">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
name="fileListIdFront"
|
name="fileListIdFront"
|
||||||
v-model="fileListIdFront"
|
v-model="fileListIdFront"
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}反面`" disabled />
|
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}反面`" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileListIdBack', '2', saleInsuredInfo.idType)">
|
<div @click="test('fileListIdBack', '2', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
name="fileListIdBack"
|
name="fileListIdBack"
|
||||||
v-model="fileListIdBack"
|
v-model="fileListIdBack"
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required :label="`${item.text}头像面`" disabled />
|
<van-field required :label="`${item.text}头像面`" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileLIstImg', '8', saleInsuredInfo.idType)">
|
<div @click="test('fileLIstImg', '8', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
name="fileLIstImg"
|
name="fileLIstImg"
|
||||||
v-model="fileLIstImg"
|
v-model="fileLIstImg"
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required label="银行卡正面" disabled />
|
<van-field required label="银行卡正面" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileListBank', '3', saleInsuredInfo.idType)">
|
<div @click="test('fileListBank', '3', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
name="fileListBank"
|
name="fileListBank"
|
||||||
v-model="fileListBank"
|
v-model="fileListBank"
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
<van-cell-group v-if="isNotify">
|
<van-cell-group v-if="isNotify">
|
||||||
<van-field label="健康告知异常类资料" disabled />
|
<van-field label="健康告知异常类资料" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div v-if="isNotify" @click="test('fileListNotify', '24', saleInsuredInfo.idType)">
|
<div v-if="isNotify" @click="test('fileListNotify', '24', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
name="fileListNotify"
|
name="fileListNotify"
|
||||||
v-model="fileListNotify"
|
v-model="fileListNotify"
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}正面`" disabled />
|
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}正面`" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileListIdFrontInsured', '1', saleInsuredPersonInfo.idType)">
|
<div @click="test('fileListIdFrontInsured', '1', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
name="fileListIdFrontInsured"
|
name="fileListIdFrontInsured"
|
||||||
v-model="fileListIdFrontInsured"
|
v-model="fileListIdFrontInsured"
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}反面`" disabled />
|
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}反面`" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileListIdBackInsured', '2', saleInsuredPersonInfo.idType)">
|
<div @click="test('fileListIdBackInsured', '2', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
name="fileListIdBackInsured"
|
name="fileListIdBackInsured"
|
||||||
v-model="fileListIdBackInsured"
|
v-model="fileListIdBackInsured"
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required :label="`${item.text}头像页`" disabled />
|
<van-field required :label="`${item.text}头像页`" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileLIstImgInsured', '8', saleInsuredPersonInfo.idType)">
|
<div @click="test('fileLIstImgInsured', '8', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
name="fileLIstImgInsured"
|
name="fileLIstImgInsured"
|
||||||
v-model="fileLIstImgInsured"
|
v-model="fileLIstImgInsured"
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
<van-cell-group v-if="isNotifyInsured">
|
<van-cell-group v-if="isNotifyInsured">
|
||||||
<van-field label="健康告知异常类资料" disabled />
|
<van-field label="健康告知异常类资料" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div v-if="isNotifyInsured" @click="test('fileListNotifyInsured', '24', saleInsuredInfo.idType)">
|
<div v-if="isNotifyInsured" @click="test('fileListNotifyInsured', '24', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
name="fileListNotifyInsured"
|
name="fileListNotifyInsured"
|
||||||
v-model="fileListNotifyInsured"
|
v-model="fileListNotifyInsured"
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required :label="item.id == '2' ? `${item01.name}+${item.text}户主页` : `${item01.name}+${item.text}正面`" disabled />
|
<van-field required :label="item.id == '2' ? `${item01.name}+${item.text}户主页` : `${item01.name}+${item.text}正面`" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileListIdFrontBeneficiary', '1', item01.idType, item01.bnfId)">
|
<div @click="test('fileListIdFrontBeneficiary', '1', item01.bnfId, item01.idType, item01.bnfId)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
:name="'fileListIdFrontBeneficiary'+index01"
|
:name="'fileListIdFrontBeneficiary'+index01"
|
||||||
v-model="bnfInfo[index01].fileListIdFrontBeneficiary"
|
v-model="bnfInfo[index01].fileListIdFrontBeneficiary"
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required :label="item.id == '2' ? `${item01.name}+${item.text}本人页` : `${item01.name}+${item.text}反面`" disabled />
|
<van-field required :label="item.id == '2' ? `${item01.name}+${item.text}本人页` : `${item01.name}+${item.text}反面`" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileListIdBackBeneficiary', '2', item01.idType, item01.bnfId)">
|
<div @click="test('fileListIdBackBeneficiary', '2', item01.bnfId, item01.idType, item01.bnfId)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
:name="'fileListIdBackBeneficiary'+index01"
|
:name="'fileListIdBackBeneficiary'+index01"
|
||||||
v-model="bnfInfo[index01].fileListIdBackBeneficiary"
|
v-model="bnfInfo[index01].fileListIdBackBeneficiary"
|
||||||
@@ -230,7 +230,7 @@
|
|||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field required :label="`${item01.name}+${item.text}头像页`" disabled />
|
<van-field required :label="`${item01.name}+${item.text}头像页`" disabled />
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
<div @click="test('fileLIstImgBeneficiary', '8', item01.idType, item01.bnfId)">
|
<div @click="test('fileLIstImgBeneficiary', '8', item01.bnfId, item01.idType, item01.bnfId)">
|
||||||
<van-uploader
|
<van-uploader
|
||||||
:name="'fileLIstImgBeneficiary'+index01"
|
:name="'fileLIstImgBeneficiary'+index01"
|
||||||
v-model="bnfInfo[index01].fileLIstImgBeneficiary"
|
v-model="bnfInfo[index01].fileLIstImgBeneficiary"
|
||||||
@@ -271,7 +271,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
import DataDictionary from '@/assets/js/utils/data-dictionary'
|
||||||
import { Cell, CellGroup, Field, Uploader, RadioGroup, Radio, Dialog, Picker, Popup } from 'vant'
|
import { Cell, CellGroup, Field, Uploader, RadioGroup, Radio, Dialog, Picker, Popup } from 'vant'
|
||||||
import { uploadImg, saveInformation, getOrderDetail, IDCardOCR } from '@/api/ebiz/sale/sale'
|
import { uploadImg2, saveInformation, getOrderDetail, IDCardOCR } from '@/api/ebiz/sale/sale'
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
import IndexBar from '@/components/ebiz/sale/IndexBar'
|
||||||
import utils from '../../../assets/js/business-common'
|
import utils from '../../../assets/js/business-common'
|
||||||
@@ -351,7 +351,8 @@ export default {
|
|||||||
relationToAppnt: '',
|
relationToAppnt: '',
|
||||||
changeCard: localStorage.changeCard,
|
changeCard: localStorage.changeCard,
|
||||||
salePageFlag: '9',
|
salePageFlag: '9',
|
||||||
imageType: ''
|
imageType: '',
|
||||||
|
subBusinessNo: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
@@ -749,11 +750,14 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
test(name, type, id, bnfId) {
|
test(name, type, subBusinessNo, id, bnfId) {
|
||||||
this.imageType = type
|
this.imageType = type
|
||||||
this.bnfId = bnfId
|
this.bnfId = bnfId
|
||||||
this.id = id
|
this.id = id
|
||||||
this.type = name
|
this.type = name
|
||||||
|
this.subBusinessNo = subBusinessNo
|
||||||
|
this.$store.commit('updateUploadImgType', name)
|
||||||
|
this.$store.commit('updateUploadImgOrderNo', this.$route.query.orderNo)
|
||||||
},
|
},
|
||||||
// 删除图片
|
// 删除图片
|
||||||
deleteImg(file, nameList) {
|
deleteImg(file, nameList) {
|
||||||
@@ -817,41 +821,8 @@ export default {
|
|||||||
})
|
})
|
||||||
let formdata = new FormData()
|
let formdata = new FormData()
|
||||||
formdata.append('imgPath', that.dataURLtoFile(that.file, that.imgName))
|
formdata.append('imgPath', that.dataURLtoFile(that.file, that.imgName))
|
||||||
|
uploadImg2(formdata).then(res=>{
|
||||||
formdata.append('imgType', that.type)
|
|
||||||
formdata.append('orderNo', this.$route.query.orderNo)
|
|
||||||
uploadImg(formdata).then(res=>{
|
|
||||||
if(res.result == 0 && res.path){
|
if(res.result == 0 && res.path){
|
||||||
let subBusinessNo = ''
|
|
||||||
if (
|
|
||||||
that.type == 'fileListIdFront' ||
|
|
||||||
that.type == 'fileListIdBack' ||
|
|
||||||
that.type == 'fileLIstImg' ||
|
|
||||||
that.type == 'fileListBank' ||
|
|
||||||
that.type == 'fileListNotify' ||
|
|
||||||
that.type == 'saleInsuredInfoOther'
|
|
||||||
){
|
|
||||||
subBusinessNo = that.saleInsuredInfo.appntId
|
|
||||||
}
|
|
||||||
else if (
|
|
||||||
that.type == 'fileListIdFrontInsured' ||
|
|
||||||
that.type == 'fileListIdBackInsured' ||
|
|
||||||
that.type == 'fileListBankInsured' ||
|
|
||||||
that.type == 'fileLIstImgInsured' ||
|
|
||||||
that.type == 'fileListNotifyInsured' ||
|
|
||||||
that.type == 'saleInsuredPersonInfoOther'
|
|
||||||
){
|
|
||||||
subBusinessNo = that.saleInsuredPersonInfo.insuredId
|
|
||||||
} else if (
|
|
||||||
that.type == 'fileListIdFrontBeneficiary' ||
|
|
||||||
that.type == 'fileListIdBackBeneficiary' ||
|
|
||||||
that.type == 'fileLIstImgBeneficiary'
|
|
||||||
){
|
|
||||||
subBusinessNo = that.bnfId
|
|
||||||
} else if (that.type == 'fileListOther'){
|
|
||||||
subBusinessNo = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
let obj = {
|
let obj = {
|
||||||
name: name,
|
name: name,
|
||||||
businessNo: that.orderNo,
|
businessNo: that.orderNo,
|
||||||
@@ -859,7 +830,7 @@ export default {
|
|||||||
imageInfoType: that.imageType,
|
imageInfoType: that.imageType,
|
||||||
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
|
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
|
||||||
subBusinessType: '0',
|
subBusinessType: '0',
|
||||||
subBusinessNo: subBusinessNo,
|
subBusinessNo: that.subBusinessNo,
|
||||||
fileName: that.imgName,
|
fileName: that.imgName,
|
||||||
}
|
}
|
||||||
that.list.push(obj)
|
that.list.push(obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user