Commit 10074c6e by 王志慧

fixed

1 parent 99726aac
...@@ -686,9 +686,16 @@ export default { ...@@ -686,9 +686,16 @@ export default {
}, },
comfirmImport() { comfirmImport() {
let { let {
importForm: { isSuccess }, importForm: { isSuccess,fileName ,isLoading},
isImport isImport
} = this } = this
if(fileName==''&&isLoading == 0){
this.$message({
message: '请先选择文件',
type: 'error'
})
return
}
if (isImport && isSuccess != 0) { if (isImport && isSuccess != 0) {
this.isImport = false this.isImport = false
this.clearFile() this.clearFile()
...@@ -696,8 +703,8 @@ export default { ...@@ -696,8 +703,8 @@ export default {
} }
this.importForm.isLoading = 1 this.importForm.isLoading = 1
this.$apis.withdraw.uploadXlsx({ file: this.importForm.fileUrl }).then(res => { this.$apis.withdraw.uploadXlsx({ file: this.importForm.fileUrl }).then(res => {
this.importForm.isLoading = 2
if (res.code == 0) { if (res.code == 0) {
this.importForm.isLoading = 2
if (res.data.importStatue == 0) { if (res.data.importStatue == 0) {
this.importForm.successCount = res.data.successCount this.importForm.successCount = res.data.successCount
this.importForm.isSuccess = 1 //处理成功 this.importForm.isSuccess = 1 //处理成功
...@@ -707,6 +714,7 @@ export default { ...@@ -707,6 +714,7 @@ export default {
this.importForm.isSuccess = 2 //处理失败 this.importForm.isSuccess = 2 //处理失败
} }
} else { } else {
this.importForm.isLoading = 0
this.$message({ this.$message({
message: res.message, message: res.message,
type: 'error' type: 'error'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!