From cbe03db7d072d324a6a12b67492e92d140e1e6ca Mon Sep 17 00:00:00 2001 From: "liu.xiaofeng@ebiz-digits.com" Date: Thu, 10 Aug 2023 10:52:07 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=9020230803-1=E3=80=91=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=BF=AE=E6=94=B9=E5=85=A5=E5=8F=82=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ebiz/sale/sale.js | 10 +++ src/store/index.js | 39 ++++++++++- src/views/ebiz/sale/AttachmentManagement.vue | 73 ++++++-------------- 3 files changed, 69 insertions(+), 53 deletions(-) diff --git a/src/api/ebiz/sale/sale.js b/src/api/ebiz/sale/sale.js index b7435ced8..eece5631a 100644 --- a/src/api/ebiz/sale/sale.js +++ b/src/api/ebiz/sale/sale.js @@ -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) { diff --git a/src/store/index.js b/src/store/index.js index 21c532daf..a4d1fc7d4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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 + }, } }) diff --git a/src/views/ebiz/sale/AttachmentManagement.vue b/src/views/ebiz/sale/AttachmentManagement.vue index 18bdb900a..c311d0f33 100644 --- a/src/views/ebiz/sale/AttachmentManagement.vue +++ b/src/views/ebiz/sale/AttachmentManagement.vue @@ -9,7 +9,7 @@ -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
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)