Explorar el Código

Merge branch 'dev' of http://git.echepei.com/zhujiawei/Warehouse_management_ui into dev

QuKatie hace 3 años
padre
commit
007326d269

+ 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);
+                })
+              }
+            });
+          })
         }
       });
     },

+ 39 - 15
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -1203,8 +1203,8 @@
         >
           <transition-group>
             <div
-              v-for="item in setRowList"
-              :key="item.surface"
+              v-for="(item, index) in setRowList"
+              :key="index"
               class="listStyle"
             >
               <div style="width: 500px" class="indraggable">
@@ -6858,7 +6858,7 @@ export default {
       showDataElabel: null,
     }
   },
-  created() {
+  async created() {
     this.setRowList = this.tableDate
     this.getRowList = this.tableDate.filter((e) => e.checked == 0)
     this.getDicts('st_in_type').then((response) => {
@@ -6901,15 +6901,6 @@ export default {
     })
     this.getConfigKey('show.data_elabel').then((response) => {
       this.showDataElabel = response.msg
-      if (this.showDataElabel === '0') {
-        this.getRowList.forEach(item => {
-          this.$set(item, 'show', true)
-        })
-      } else {
-        this.getRowList.forEach(item => {
-          this.$set(item, 'show', item.label == 'fElabel' ? false : true)
-        })
-      }
     })
     this.getConfigKey('bigData.token').then((response) => {
       this.bigDataToken = response.msg
@@ -7010,7 +7001,18 @@ export default {
     })
     this.company = Cookies.get('companyName')
     this.queryUser()
-    this.getRow()
+    await this.getRow()
+    this.$nextTick(() => {
+      if (this.showDataElabel === '0') {
+        this.getRowList.forEach(item => {
+          this.$set(item, 'show', true)
+        })
+      } else {
+        this.getRowList.forEach(item => {
+          this.$set(item, 'show', item.label == 'fElabel' ? false : true)
+        })
+      }
+    })
   },
   mounted() {
     this.$refs.printTable.style.setProperty('--url', 'url(' + this.signature + ') bottom right no-repeat')
@@ -7240,13 +7242,13 @@ export default {
       return this.$message.error('正在开发中')
     },
     //查询列数据
-    getRow() {
+    async getRow() {
       let that = this
       this.data = {
         tableName: '入库明细',
         userId: Cookies.get('userName')
       }
-      select(this.data).then((res) => {
+      await select(this.data).then((res) => {
         if (res.data.length != 0) {
           this.getRowList = res.data.filter((e) => e.checked == 0)
           this.setRowList = res.data
@@ -7277,6 +7279,17 @@ export default {
           this.getRowList = this.$options
             .data()
             .tableDate.filter((e) => e.checked == 0)
+          this.$nextTick(() => {
+            if (this.showDataElabel === '0') {
+              this.getRowList.forEach(item => {
+                this.$set(item, 'show', true)
+              })
+            } else {
+              this.getRowList.forEach(item => {
+                this.$set(item, 'show', item.label == 'fElabel' ? false : true)
+              })
+            }
+          })
         }
       })
     },
@@ -7292,6 +7305,17 @@ export default {
         if (res.code == 200) {
           this.showSetting = false
           this.getRowList = this.setRowList.filter((e) => e.checked == 0)
+          this.$nextTick(() => {
+            if (this.showDataElabel === '0') {
+              this.getRowList.forEach(item => {
+                this.$set(item, 'show', true)
+              })
+            } else {
+              this.getRowList.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);
+                })
+              }
+            });
+          })
         }
       });
     },