Browse Source

no message

linwenxin 1 year ago
parent
commit
4636cd49cf

+ 14 - 14
src/components/Common/import-button.vue

@@ -60,20 +60,20 @@ export default {
           }
         }
       }
-
-      let result = await handleImport(this.imUrl, formData)
-      this.importLoading = false
-      this.importFileList = []
-      if (result.code == 200) {
-        this.$alert(result.message, '导入成功', {
-          confirmButtonText: '确定'
-        })
-        this.$emit('importSuccess', result.data)
-      } else {
-        this.$alert(result.message, '导入失败', {
-          confirmButtonText: '确定'
-        })
-      }
+      handleImport(this.imUrl, formData).then(result=>{
+        this.importLoading = false
+        this.importFileList = []
+        if (result.code == 200) {
+          this.$alert(result.message, '导入成功', {
+            confirmButtonText: '确定'
+          })
+          this.$emit('importSuccess', result.data)
+        } else {
+          this.$alert(result.message, '导入失败', {
+            confirmButtonText: '确定'
+          })
+        }
+      })
     }
   }
 }

+ 14 - 12
src/views/mallManagement/order/order_list/index.vue

@@ -828,18 +828,20 @@ export default {
       const file = this.fileList[0].raw;
       const formData = new FormData();
       formData.append("file", file);
-      let result = await handleImport('order/goods/batch/deliver', formData);
-      this.importFileList = [];
-      if (result.code == 200) {
-        loading.close();
-        this.$successMsg('批量发货成功');
-        this.getList();
-      } else {
-        loading.close();
-        this.$alert(result.message, '批量发货失败', {
-          confirmButtonText: '确定'
-        });
-      }
+
+      handleImport('order/goods/batch/deliver', formData).then(result=>{
+        this.importFileList = [];
+        if (result.code == 200) {
+          loading.close();
+          this.$successMsg('批量发货成功');
+          this.getList();
+        } else {
+          loading.close();
+          this.$alert(result.message, '批量发货失败', {
+            confirmButtonText: '确定'
+          });
+        }
+      })      
     },
 
     // 获取省市区街道