lichao před 3 roky
rodič
revize
b7a7c87d87
1 změnil soubory, kde provedl 17 přidání a 15 odebrání
  1. 17 15
      src/views/Warehousing/inStock/AddOrUpdate.vue

+ 17 - 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