Quellcode durchsuchen

1.调整排序数据逻辑~

nzf vor 3 Jahren
Ursprung
Commit
8dae2de536

+ 58 - 18
src/views/Warehousing/goodsTransfer/AddOrUpdate.vue

@@ -2651,7 +2651,7 @@ export default {
       },
     };
   },
-  created() {
+  async created() {
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
     this.setRowList2 = this.tableDate2;
@@ -2682,23 +2682,6 @@ export default {
       this.fStorageTypeOptions = response.data;
       localStorage.setItem("fStorageTypeList", JSON.stringify(response.data));
     });
-    this.getConfigKey("show.data_elabel").then((response) => {
-      if (response.msg === '0') {
-        this.getRowList.forEach(item => {
-          this.$set(item, 'show', true);
-        })
-        this.getRowList2.forEach(item => {
-          this.$set(item, 'show', true);
-        })
-      } else {
-        this.getRowList.forEach(item => {
-          this.$set(item, 'show', item.label == 'fElabel'? false: true);
-        })
-        this.getRowList2.forEach(item => {
-          this.$set(item, 'show', item.label == 'fElabel'? false: true);
-        })
-      }
-    });
     this.getConfigKey("warehouse.show.invoice").then((response) => {
       this.isShowInvoice = response.msg;
     });
@@ -2746,6 +2729,25 @@ export default {
     this.queryUser();
     this.getRow();
     this.getRow2();
+    this.$nextTick(() => {
+      this.getConfigKey("show.data_elabel").then((response) => {
+        if (response.msg === '0') {
+          this.getRowList.forEach(item => {
+            this.$set(item, 'show', true);
+          })
+          this.getRowList2.forEach(item => {
+            this.$set(item, 'show', true);
+          })
+        } else {
+          this.getRowList.forEach(item => {
+            this.$set(item, 'show', item.label == 'fElabel'? false: true);
+          })
+          this.getRowList2.forEach(item => {
+            this.$set(item, 'show', item.label == 'fElabel'? false: true);
+          })
+        }
+      });
+    })
   },
   activated() {
     this.getDicts("st_goodstf_type").then((response) => {
@@ -2907,6 +2909,25 @@ export default {
           this.showSetting = false;
           this.setRowList = this.$options.data().tableDate;
           this.getRowList = this.$options.data().tableDate;
+          this.$nextTick(() => {
+            this.getConfigKey("show.data_elabel").then((response) => {
+              if (response.msg === '0') {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+              } else {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+              }
+            });
+          })
         }
       });
     },
@@ -2922,6 +2943,25 @@ export default {
         if (res.code == 200) {
           this.showSetting = false;
           this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+          this.$nextTick(() => {
+            this.getConfigKey("show.data_elabel").then((response) => {
+              if (response.msg === '0') {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+              } else {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+              }
+            });
+          })
         }
       });
     },

+ 58 - 18
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -6239,7 +6239,7 @@ export default {
       return this.isFlag || this.noMore
     }
   },
-  created() {
+  async created() {
     this.setRowList = this.tableDate
     this.getRowList = this.tableDate
     this.setRowList2 = this.tableDate2
@@ -6256,23 +6256,6 @@ export default {
         this.detailsHidden2 = true
       }
     })
-    this.getConfigKey("show.data_elabel").then((response) => {
-      if (response.msg === '0') {
-        this.getRowList.forEach(item => {
-          this.$set(item, 'show', true);
-        })
-        this.getRowList2.forEach(item => {
-          this.$set(item, 'show', true);
-        })
-      } else {
-        this.getRowList.forEach(item => {
-          this.$set(item, 'show', item.label == 'fElabel'? false: true);
-        })
-        this.getRowList2.forEach(item => {
-          this.$set(item, 'show', item.label == 'fElabel'? false: true);
-        })
-      }
-    });
     selectUserByRole().then(res => {
       this.fSalesmanId = res.rows
     })
@@ -6372,6 +6355,25 @@ export default {
     this.getRow2()
     this.getRow3()
     this.getRow4()
+    this.$nextTick(() => {
+      this.getConfigKey("show.data_elabel").then((response) => {
+        if (response.msg === '0') {
+          this.getRowList.forEach(item => {
+            this.$set(item, 'show', true);
+          })
+          this.getRowList2.forEach(item => {
+            this.$set(item, 'show', true);
+          })
+        } else {
+          this.getRowList.forEach(item => {
+            this.$set(item, 'show', item.label == 'fElabel'? false: true);
+          })
+          this.getRowList2.forEach(item => {
+            this.$set(item, 'show', item.label == 'fElabel'? false: true);
+          })
+        }
+      });
+    })
   },
   activated() {
     this.getDicts('st_out_type').then((response) => {
@@ -6580,6 +6582,25 @@ export default {
           this.showSetting = false
           this.setRowList = this.$options.data().tableDate
           this.getRowList = this.$options.data().tableDate
+          this.$nextTick(() => {
+            this.getConfigKey("show.data_elabel").then((response) => {
+              if (response.msg === '0') {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+              } else {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+              }
+            });
+          })
         }
       })
     },
@@ -6595,6 +6616,25 @@ export default {
         if (res.code == 200) {
           this.showSetting = false
           this.getRowList = this.setRowList.filter((e) => e.checked == 0)
+          this.$nextTick(() => {
+            this.getConfigKey("show.data_elabel").then((response) => {
+              if (response.msg === '0') {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+              } else {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+              }
+            });
+          })
         }
       })
     },

+ 96 - 18
src/views/Warehousing/stockTransfer/AddOrUpdate.vue

@@ -4271,7 +4271,7 @@ export default {
       deliveryConfirmation: false, //
     };
   },
-  created() {
+  async created() {
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
     this.setRowList2 = this.tableDate2;
@@ -4305,23 +4305,6 @@ export default {
       this.fStorageTypeOptions = response.data;
       localStorage.setItem("fStorageTypeList", JSON.stringify(response.data));
     });
-    this.getConfigKey("show.data_elabel").then((response) => {
-      if (response.msg === '0') {
-        this.getRowList.forEach(item => {
-          this.$set(item, 'show', true);
-        })
-        this.getRowList2.forEach(item => {
-          this.$set(item, 'show', true);
-        })
-      } else {
-        this.getRowList.forEach(item => {
-          this.$set(item, 'show', item.label == 'fElabel'? false: true);
-        })
-        this.getRowList2.forEach(item => {
-          this.$set(item, 'show', item.label == 'fElabel'? false: true);
-        })
-      }
-    });
     this.getConfigKey('entry.printing').then((response) => {
       this.entryPrinting = response.msg
     })
@@ -4379,6 +4362,25 @@ export default {
     this.queryUser();
     this.getRow();
     this.getRow2();
+    this.$nextTick(() => {
+      this.getConfigKey("show.data_elabel").then((response) => {
+        if (response.msg === '0') {
+          this.getRowList.forEach(item => {
+            this.$set(item, 'show', true);
+          })
+          this.getRowList2.forEach(item => {
+            this.$set(item, 'show', true);
+          })
+        } else {
+          this.getRowList.forEach(item => {
+            this.$set(item, 'show', item.label == 'fElabel'? false: true);
+          })
+          this.getRowList2.forEach(item => {
+            this.$set(item, 'show', item.label == 'fElabel'? false: true);
+          })
+        }
+      });
+    })
   },
   activated() {
     this.getDicts("st_trans_type").then((response) => {
@@ -4551,6 +4553,25 @@ export default {
           this.showSetting = false;
           this.setRowList = this.$options.data().tableDate;
           this.getRowList = this.$options.data().tableDate;
+          this.$nextTick(() => {
+            this.getConfigKey("show.data_elabel").then((response) => {
+              if (response.msg === '0') {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+              } else {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+              }
+            });
+          })
         }
       });
     },
@@ -4566,6 +4587,25 @@ export default {
         if (res.code == 200) {
           this.showSetting = false;
           this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+          this.$nextTick(() => {
+            this.getConfigKey("show.data_elabel").then((response) => {
+              if (response.msg === '0') {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+              } else {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+              }
+            });
+          })
         }
       });
     },
@@ -4617,6 +4657,25 @@ export default {
           this.showSetting2 = false;
           this.setRowList2 = this.$options.data().tableDate2;
           this.getRowList2 = this.$options.data().tableDate2;
+          this.$nextTick(() => {
+            this.getConfigKey("show.data_elabel").then((response) => {
+              if (response.msg === '0') {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+              } else {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+              }
+            });
+          })
         }
       });
     },
@@ -4632,6 +4691,25 @@ export default {
         if (res.code == 200) {
           this.showSetting2 = false;
           this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
+          this.$nextTick(() => {
+            this.getConfigKey("show.data_elabel").then((response) => {
+              if (response.msg === '0') {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', true);
+                })
+              } else {
+                this.getRowList.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+                this.getRowList2.forEach(item => {
+                  this.$set(item, 'show', item.label == 'fElabel'? false: true);
+                })
+              }
+            });
+          })
         }
       });
     },