|
@@ -507,7 +507,7 @@
|
|
|
action=""
|
|
|
ref="contractUpload"
|
|
|
list-type="picture-card"
|
|
|
- accept=".jpg,.jpeg,.png,.tif"
|
|
|
+ accept=".jpg,.jpeg,.png"
|
|
|
:before-upload="beforeUpload"
|
|
|
:on-preview="invoicePictureCardPreview"
|
|
|
:before-remove="beforeRemove"
|
|
@@ -536,7 +536,7 @@
|
|
|
action=""
|
|
|
ref="logisticsUpload"
|
|
|
list-type="picture-card"
|
|
|
- accept=".jpg,.jpeg,.png,.tif"
|
|
|
+ accept=".jpg,.jpeg,.png"
|
|
|
:before-upload="beforeUpload"
|
|
|
:on-preview="invoicePictureCardPreview"
|
|
|
:before-remove="beforeRemove"
|
|
@@ -565,7 +565,7 @@
|
|
|
action=""
|
|
|
ref="otherUpload"
|
|
|
list-type="picture-card"
|
|
|
- accept=".jpg,.jpeg,.png,.tif"
|
|
|
+ accept=".jpg,.jpeg,.png"
|
|
|
:before-upload="beforeUpload"
|
|
|
:on-preview="invoicePictureCardPreview"
|
|
|
:before-remove="beforeRemove"
|
|
@@ -916,6 +916,9 @@ export default {
|
|
|
loading.close();
|
|
|
})
|
|
|
.catch(() => {
|
|
|
+ let uid = fileObj.uid // 关键作用代码,去除文件列表失败文件
|
|
|
+ let idx = this.$refs.upload.uploadFiles.findIndex(item => item.uid === uid) // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
+ this.$refs.upload.uploadFiles.splice(idx, 1) // 关键作用代码,去除文件列表失败文件
|
|
|
loading.close();
|
|
|
});
|
|
|
},
|
|
@@ -924,11 +927,10 @@ export default {
|
|
|
const extension = testmsg === 'jpg';
|
|
|
const extension2 = testmsg === 'jpeg';
|
|
|
const extension3 = testmsg === 'png';
|
|
|
- const extension4 = testmsg === 'tif';
|
|
|
- if(!extension && !extension2 && !extension3 && !extension4){
|
|
|
+ if(!extension && !extension2 && !extension3){
|
|
|
this.$message.warning(`请选择图片格式文件`);
|
|
|
}
|
|
|
- return extension || extension2 || extension3 || extension4;
|
|
|
+ return extension || extension2 || extension3;
|
|
|
},
|
|
|
//上传前校验
|
|
|
beforeAvatarUpload(file) {
|
|
@@ -975,6 +977,9 @@ export default {
|
|
|
loading.close();
|
|
|
})
|
|
|
.catch(() => {
|
|
|
+ let uid = fileObj.uid // 关键作用代码,去除文件列表失败文件
|
|
|
+ let idx = this.$refs.contractUpload.uploadFiles.findIndex(item => item.uid === uid) // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
+ this.$refs.contractUpload.uploadFiles.splice(idx, 1) // 关键作用代码,去除文件列表失败文件
|
|
|
loading.close();
|
|
|
});
|
|
|
},
|
|
@@ -998,6 +1003,9 @@ export default {
|
|
|
loading.close();
|
|
|
})
|
|
|
.catch(() => {
|
|
|
+ let uid = fileObj.uid // 关键作用代码,去除文件列表失败文件
|
|
|
+ let idx = this.$refs.logisticsUpload.uploadFiles.findIndex(item => item.uid === uid) // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
+ this.$refs.logisticsUpload.uploadFiles.splice(idx, 1) // 关键作用代码,去除文件列表失败文件
|
|
|
loading.close();
|
|
|
});
|
|
|
},
|
|
@@ -1021,6 +1029,9 @@ export default {
|
|
|
loading.close();
|
|
|
})
|
|
|
.catch(() => {
|
|
|
+ let uid = fileObj.uid // 关键作用代码,去除文件列表失败文件
|
|
|
+ let idx = this.$refs.otherUpload.uploadFiles.findIndex(item => item.uid === uid) // 关键作用代码,去除文件列表失败文件(uploadFiles为el-upload中的ref值)
|
|
|
+ this.$refs.otherUpload.uploadFiles.splice(idx, 1) // 关键作用代码,去除文件列表失败文件
|
|
|
loading.close();
|
|
|
});
|
|
|
},
|