diff --git a/src/views/ebiz/sale/AttachmentManagement.vue b/src/views/ebiz/sale/AttachmentManagement.vue index 3e46ed3b3..fbc0c32bc 100644 --- a/src/views/ebiz/sale/AttachmentManagement.vue +++ b/src/views/ebiz/sale/AttachmentManagement.vue @@ -878,7 +878,8 @@ export default { }) let formdata = new FormData() formdata.append('imgPath', that.dataURLtoFile(that.file, that.imgName)) - uploadImg(formdata).then((res) => { + uploadImg(formdata).then( + (res) => { if (res.result == '0') { this.$toast.clear() if(res.result == 0 && res.path){ @@ -1184,6 +1185,86 @@ export default { this.$toast.clear() this.$toast(res.resultMessage) } + }, + (error) => { + switch (that.type) { + case 'fileListIdFront': + that.fileListIdFront = [] + break + case 'fileListIdBack': + that.fileListIdBack = [] + break + case 'fileLIstImg': + that.fileLIstImg = [] + break + case 'fileListBank': + that.fileListBank = [] + break + case 'fileListOther': + that.fileListOther = [] + break + case 'fileListIdFrontInsured': + that.fileListIdFrontInsured = [] + break + case 'fileListIdBackInsured': + that.fileListIdBackInsured = [] + break + case 'fileListBankInsured': + that.fileListBankInsured = [] + break + case 'fileLIstImgInsured': + that.fileLIstImgInsured = [] + break + case 'saleInsuredInfoOther': + that.saleInsuredInfoOther = [] + break + case 'saleInsuredPersonInfoOther': + that.saleInsuredPersonInfoOther = [] + break + } + if(that.type == 'fileListIdFrontBeneficiary'){ + that.saleBtnfPersonInfo.forEach((item,index)=>{ + if(item.bnfId == that.bnfId){ + that.bnfInfo[index].fileListIdFrontBeneficiary = [] + } + }) + } + if(that.type == 'fileListIdBackBeneficiary'){ + that.saleBtnfPersonInfo.forEach((item,index)=>{ + if(item.bnfId == that.bnfId){ + that.bnfInfo[index].fileListIdBackBeneficiary = [] + } + }) + } + if(that.type == 'fileLIstImgBeneficiary'){ + that.saleBtnfPersonInfo.forEach((item,index)=>{ + if(item.bnfId == that.bnfId){ + that.bnfInfo[index].fileLIstImgBeneficiary = [] + } + }) + } + if(that.type == 'fileListIdFrontBeneficiary'){ + that.saleBtnfPersonInfo.forEach((item,index)=>{ + if(item.bnfId == that.bnfId){ + that.bnfInfo[index].fileListIdFrontBeneficiary = [] + } + }) + } + if(that.type == 'fileListIdBackBeneficiary'){ + that.saleBtnfPersonInfo.forEach((item,index)=>{ + if(item.bnfId == that.bnfId){ + that.bnfInfo[index].fileListIdBackBeneficiary = [] + } + }) + } + if(that.type == 'fileLIstImgBeneficiary'){ + that.saleBtnfPersonInfo.forEach((item,index)=>{ + if(item.bnfId == that.bnfId){ + that.bnfInfo[index].fileLIstImgBeneficiary = [] + } + }) + } + this.$toast('网络环境不佳,图片上传失败,请切换移动网络或稍后重试') } ) },