Showing
1 changed file
with
4 additions
and
1 deletions
| ... | @@ -176,12 +176,12 @@ export default { | ... | @@ -176,12 +176,12 @@ export default { |
| 176 | }, | 176 | }, |
| 177 | //导入Excel | 177 | //导入Excel |
| 178 | upload() { | 178 | upload() { |
| 179 | + this.loading = true; | ||
| 179 | if (this.formData.file != null && this.formData.file != '') { | 180 | if (this.formData.file != null && this.formData.file != '') { |
| 180 | this.$refs['addForm'].validate(val => { | 181 | this.$refs['addForm'].validate(val => { |
| 181 | if (val) { | 182 | if (val) { |
| 182 | const file = this.formData.file; | 183 | const file = this.formData.file; |
| 183 | let goodsStation = this.formData.uploadGoodsStation | 184 | let goodsStation = this.formData.uploadGoodsStation |
| 184 | - this.loading = true; | ||
| 185 | uploadGoodsExcel(file, goodsStation).then((res) => { | 185 | uploadGoodsExcel(file, goodsStation).then((res) => { |
| 186 | this.loading = false; | 186 | this.loading = false; |
| 187 | if (res.code != 200) { | 187 | if (res.code != 200) { |
| ... | @@ -206,9 +206,12 @@ export default { | ... | @@ -206,9 +206,12 @@ export default { |
| 206 | this.close() | 206 | this.close() |
| 207 | }, 1000); | 207 | }, 1000); |
| 208 | }); | 208 | }); |
| 209 | + } else { | ||
| 210 | + this.loading = false; | ||
| 209 | } | 211 | } |
| 210 | }) | 212 | }) |
| 211 | } else { | 213 | } else { |
| 214 | + this.loading = false; | ||
| 212 | this.msgWarning('请选择文件后再导入!') | 215 | this.msgWarning('请选择文件后再导入!') |
| 213 | } | 216 | } |
| 214 | }, | 217 | }, | ... | ... |
-
Please register or login to post a comment