|
@@ -448,61 +448,14 @@ export default {
|
|
|
};
|
|
|
this.uploadInfo = '导入中...';
|
|
|
api.importExcelDataVerify(formData, header).then(res => {
|
|
|
- if (res.data.code === '00020007') {
|
|
|
+ if (res.data.code === '00020001') {
|
|
|
this.$confirm(`${res.data.msg}`, '提示1', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
- api.importOperationRecord(formData, header).then(res => {
|
|
|
- if (res.data.code === '00000001') {
|
|
|
- this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
- // customClass: 'exportConfirm',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
- this.getDataList(); // 重新获取列表
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- } else if (res.data.data === true && res.status === 200) {
|
|
|
- this.$alert(`导入成功`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
- // customClass: 'exportConfirm',
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
- this.getDataList(); // 重新获取列表
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- } else {
|
|
|
- this.$alert(`${res.data.msg}`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- // // cancelButtonText: '取消',
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
- // customClass: 'exportConfirm',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- }
|
|
|
- });
|
|
|
+ this.importFusionRecord(formData,header)
|
|
|
})
|
|
|
.catch(() => {
|
|
|
setTimeout(() => {
|
|
@@ -510,73 +463,22 @@ export default {
|
|
|
}, 300);
|
|
|
});
|
|
|
} else if (res.data.data === true) {
|
|
|
- api.importOperationRecord(formData, header).then(res => {
|
|
|
- if (res.data.code === '00000001') {
|
|
|
- this.$alert(`数据存在异常,导入失败,请修改后再试`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
- // customClass: 'exportConfirm',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
- this.getDataList(); // 重新获取列表
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- } else if (res.data.data === true && res.status === 200) {
|
|
|
- this.$alert(`导入成功`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
- // customClass: 'exportConfirm',
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
- this.getDataList(); // 重新获取列表
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- } else {
|
|
|
- this.$alert(`${res.data.msg}`, '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- // // cancelButtonText: '取消',
|
|
|
- // cancelButtonClass: 'cancelSure',
|
|
|
- // confirmButtonClass: 'sure',
|
|
|
- // customClass: 'exportConfirm',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- .then(() => {})
|
|
|
- .catch(() => {});
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- api.importExcelDataVerify(formData, header).then(res => {
|
|
|
- if (res.data.code === '00020007') {
|
|
|
- this.$confirm(`${res.data.msg}`, '提示1', {
|
|
|
+ this.importFusionRecord(formData,header)
|
|
|
+ }else {
|
|
|
+ this.$alert(`${res.data.msg}`, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
+ // cancelButtonText: '取消',
|
|
|
+ // cancelButtonClass: 'cancelSure',
|
|
|
+ // confirmButtonClass: 'sure',
|
|
|
+ // customClass: 'exportConfirm',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- this.importFusionRecord(formData,header)
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadInfo = '导入';
|
|
|
- }, 300);
|
|
|
- });
|
|
|
- } else if (res.data.data === true) {
|
|
|
- this.importFusionRecord(formData,header)
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.uploadInfo = '导入';
|
|
|
+ }, 300);
|
|
|
}
|
|
|
});
|
|
|
//解决上传相同文件不触发change
|