Compare commits

...

2 Commits

Author SHA1 Message Date
liu.xiaofeng@ebiz-digits.com
1f3314f46f release 20230904-3 修改自动计算证件日期代码逻辑 2023-09-05 17:15:44 +08:00
liu.xiaofeng@ebiz-digits.com
cbe03db7d0 【20230803-1】上传附件修改入参方式 2023-09-04 21:10:44 +08:00
5 changed files with 71 additions and 56 deletions

View File

@@ -1,6 +1,7 @@
import request from '@/assets/js/utils/request'
import request1 from '@/assets/js/utils/request1'
import getUrl from '@/assets/js/utils/get-url'
import store from '@/store'
// 保费计算
export function saveOrUpdateOrderInfo(data) {
return request({
@@ -99,6 +100,15 @@ export function uploadImg(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) {

View File

@@ -28,6 +28,11 @@ export default new Vuex.Store({
secondManageCode: '', //内勤所需参数
orderDetail: {},//无优卡分享微信端订单信息
answerType: false,//风险测评tab是否显示
YBidNo: '', //银保代理人电子化合同签署证件号码
YBname: '', //银保代理人电子化合同签署姓名
YBuuid: '', //银保代理人电子化合同签署代理人uuid
uploadImgType: '',
uploadImgOrderNo: '',
},
mutations: {
setOrderDetail (state, data) {
@@ -75,8 +80,23 @@ export default new Vuex.Store({
state.pcList = val
},
//更新 风险测评是否显示状态
updateAnswerType (state, val) {
state.answerType = val
updateUploadImgType (state, 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: {
@@ -104,6 +124,21 @@ export default new Vuex.Store({
getAnswerType (state) {
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
},
}
})

View File

@@ -1255,7 +1255,7 @@ export default {
let month = date.getMonth() + 1
month = month.toString().padStart(2, '0')
let day = date.getDate()
day = day.toString().padStart(2, '0')
day = Number(day.toString().padStart(2, '0')) + 1
return `${year}-${month}-${day}`
},
getRelatedData(val, from) {

View File

@@ -9,7 +9,7 @@
<van-cell-group>
<van-field required label="银行卡账户" disabled />
</van-cell-group>
<div @click="test('fileListBank', '3', saleInsuredInfo.idType)">
<div @click="test('fileListBank', '3', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
<van-uploader
name="fileListBank"
v-model="fileListBank"
@@ -36,7 +36,7 @@
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}正面`" disabled />
</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
name="fileListIdFront"
v-model="fileListIdFront"
@@ -50,7 +50,7 @@
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}反面`" disabled />
</van-cell-group>
<div @click="test('fileListIdBack', '2', saleInsuredInfo.idType)">
<div @click="test('fileListIdBack', '2', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
<van-uploader
name="fileListIdBack"
v-model="fileListIdBack"
@@ -66,7 +66,7 @@
<van-cell-group>
<van-field required :label="`${item.text}头像面`" disabled />
</van-cell-group>
<div @click="test('fileLIstImg', '8', saleInsuredInfo.idType)">
<div @click="test('fileLIstImg', '8', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
<van-uploader
name="fileLIstImg"
v-model="fileLIstImg"
@@ -83,7 +83,7 @@
<van-cell-group>
<van-field required label="银行卡正面" disabled />
</van-cell-group>
<div @click="test('fileListBank', '3', saleInsuredInfo.idType)">
<div @click="test('fileListBank', '3', saleInsuredInfo.appntId, saleInsuredInfo.idType)">
<van-uploader
name="fileListBank"
v-model="fileListBank"
@@ -97,7 +97,7 @@
<van-cell-group v-if="isNotify">
<van-field label="健康告知异常类资料" disabled />
</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
name="fileListNotify"
v-model="fileListNotify"
@@ -125,7 +125,7 @@
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item.text}户主页` : `${item.text}正面`" disabled />
</van-cell-group>
<div @click="test('fileListIdFrontInsured', '1', saleInsuredPersonInfo.idType)">
<div @click="test('fileListIdFrontInsured', '1', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
<van-uploader
name="fileListIdFrontInsured"
v-model="fileListIdFrontInsured"
@@ -139,7 +139,7 @@
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item.text}本人页` : `${item.text}反面`" disabled />
</van-cell-group>
<div @click="test('fileListIdBackInsured', '2', saleInsuredPersonInfo.idType)">
<div @click="test('fileListIdBackInsured', '2', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
<van-uploader
name="fileListIdBackInsured"
v-model="fileListIdBackInsured"
@@ -155,7 +155,7 @@
<van-cell-group>
<van-field required :label="`${item.text}头像页`" disabled />
</van-cell-group>
<div @click="test('fileLIstImgInsured', '8', saleInsuredPersonInfo.idType)">
<div @click="test('fileLIstImgInsured', '8', saleInsuredPersonInfo.insuredId, saleInsuredPersonInfo.idType)">
<van-uploader
name="fileLIstImgInsured"
v-model="fileLIstImgInsured"
@@ -172,7 +172,7 @@
<van-cell-group v-if="isNotifyInsured">
<van-field label="健康告知异常类资料" disabled />
</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
name="fileListNotifyInsured"
v-model="fileListNotifyInsured"
@@ -200,7 +200,7 @@
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item01.name}+${item.text}户主页` : `${item01.name}+${item.text}正面`" disabled />
</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
:name="'fileListIdFrontBeneficiary'+index01"
v-model="bnfInfo[index01].fileListIdFrontBeneficiary"
@@ -214,7 +214,7 @@
<van-cell-group>
<van-field required :label="item.id == '2' ? `${item01.name}+${item.text}本人页` : `${item01.name}+${item.text}反面`" disabled />
</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
:name="'fileListIdBackBeneficiary'+index01"
v-model="bnfInfo[index01].fileListIdBackBeneficiary"
@@ -230,7 +230,7 @@
<van-cell-group>
<van-field required :label="`${item01.name}+${item.text}头像页`" disabled />
</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
:name="'fileLIstImgBeneficiary'+index01"
v-model="bnfInfo[index01].fileLIstImgBeneficiary"
@@ -271,7 +271,7 @@
<script>
import DataDictionary from '@/assets/js/utils/data-dictionary'
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 IndexBar from '@/components/ebiz/sale/IndexBar'
import utils from '../../../assets/js/business-common'
@@ -351,7 +351,8 @@ export default {
relationToAppnt: '',
changeCard: localStorage.changeCard,
salePageFlag: '9',
imageType: ''
imageType: '',
subBusinessNo: ''
}
},
async created() {
@@ -749,11 +750,14 @@ export default {
}
})
},
test(name, type, id, bnfId) {
test(name, type, subBusinessNo, id, bnfId) {
this.imageType = type
this.bnfId = bnfId
this.id = id
this.type = name
this.subBusinessNo = subBusinessNo
this.$store.commit('updateUploadImgType', name)
this.$store.commit('updateUploadImgOrderNo', this.$route.query.orderNo)
},
// 删除图片
deleteImg(file, nameList) {
@@ -817,41 +821,8 @@ export default {
})
let formdata = new FormData()
formdata.append('imgPath', that.dataURLtoFile(that.file, that.imgName))
formdata.append('imgType', that.type)
formdata.append('orderNo', this.$route.query.orderNo)
uploadImg(formdata).then(res=>{
uploadImg2(formdata).then(res=>{
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 = {
name: name,
businessNo: that.orderNo,
@@ -859,7 +830,7 @@ export default {
imageInfoType: that.imageType,
rgssUrl: encodeURI(res.path).replace(/\+/g, '%2B'),
subBusinessType: '0',
subBusinessNo: subBusinessNo,
subBusinessNo: that.subBusinessNo,
fileName: that.imgName,
}
that.list.push(obj)

View File

@@ -1837,7 +1837,7 @@ export default {
let month = date.getMonth() + 1
month = month.toString().padStart(2, '0')
let day = date.getDate()
day = day.toString().padStart(2, '0')
day = Number(day.toString().padStart(2, '0')) + 1
return `${year}-${month}-${day}`
},
//地区选择
@@ -1885,7 +1885,6 @@ export default {
}
},
getRelatedData(val, from) {
// debugger
if (this.userInfo.idType != '1' && this.userInfo.idType != '2') {
return
}