Sfoglia il codice sorgente

Merge tag 'Hotfix-82' into develop

Finish Hotfix-82
chen 3 anni fa
parent
commit
401e6147a5
1 ha cambiato i file con 9 aggiunte e 11 eliminazioni
  1. 9 11
      src/views/finance/rebate_form.vue

+ 9 - 11
src/views/finance/rebate_form.vue

@@ -262,11 +262,9 @@ export default {
     },
     //删除
     delSeletFn() {
-      console.log(this.dataList);
       this.selectList.sort(function (a, b) {
         return b - a;
       });
-      console.log(this.selectList);
 
       for (let index = 0; index < this.selectList.length; index++) {
         // console.log(index);
@@ -275,12 +273,12 @@ export default {
     },
     //选择项改变
     selectionChange(v) {
-      console.log(v);
       this.selectList = v.map((v) => v.index);
-      console.log(this.selectList);
     },
+
     // 导入
     async handleImport(param) {
+      this.listLoading = true;
       const file = param.file;
 
       const formData = new FormData();
@@ -288,11 +286,10 @@ export default {
 
       let result = await handleImport("/rebate/order/import/data", formData);
 
-      console.log(result);
       this.importFileList = [];
       if (result.code == 200) {
-        this.$message.success("导入成功");
         let Arr = result.data.items;
+        let list = [];
 
         for (let v = 0; v < Arr.length; v++) {
           let arr = await getWalletCustomerList({
@@ -300,8 +297,7 @@ export default {
             type: "REBATE",
           });
 
-          console.log(arr, 1212);
-          this.dataList.push({
+          list.push({
             customerId: Arr[v].customerId,
             customerNumber: Arr[v].customerNumber,
             customerName: Arr[v].customerName,
@@ -322,6 +318,11 @@ export default {
             walletList: arr.data,
           });
         }
+        let aa = [...this.dataList, ...list];
+
+        this.dataList = aa;
+        this.$message.success("导入成功");
+        this.listLoading = false;
       } else {
         this.$message.error(result.message);
         // this.$message.error(1231);
@@ -368,10 +369,8 @@ export default {
         arr = v.walletList.filter(
           (i) => i.customerWalletId == v.customerWalletId
         );
-        console.log(arr);
         v.walletName = arr[0].name;
       });
-      console.log({ ...this.searchForm, items: this.dataList });
       await getRebateOrderAdd({ ...this.searchForm, items: this.dataList });
       this.$message.success("保存成功");
       this.$router.push("/finance/rebate/rebate_list");
@@ -385,7 +384,6 @@ export default {
         type: "REBATE",
       });
       const res2 = this.customerData.filter((i) => i.id == v);
-      console.log(res2, 8888);
 
       this.$set(this.dataList[index], "customerNumber", res2[0].number);
       this.$set(this.dataList[index], "customerName", res2[0].name);