Browse Source

Merge branch 'develop_szhj' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_szhj

lilei 3 years ago
parent
commit
88fa566551
1 changed files with 19 additions and 5 deletions
  1. 19 5
      src/views/numsGoodsShelves/shelfMonitoring/addModal.vue

+ 19 - 5
src/views/numsGoodsShelves/shelfMonitoring/addModal.vue

@@ -60,6 +60,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
+import { shelfControlList } from '@/api/shelf'
 import { shelfRecallSave } from '@/api/shelfRecall'
 export default {
   name: 'ShelfMonitoringAddModal',
@@ -139,6 +140,21 @@ export default {
       this.listData.map((item, index) => {
         item.no = index + 1
       })
+    },
+    getList () {
+      const params = []
+      this.nowData.list.map((item, index) => {
+        params.push(item.shelfProductSn)
+      })
+      shelfControlList({ shelfProductSnList: params }).then(res => {
+        if (res.status == 200 && res.data) {
+          res.data.map((item, index) => {
+            item.no = index + 1
+            item.confirmQty = item.qty
+          })
+          this.listData = res.data
+        }
+      })
     }
   },
   watch: {
@@ -153,12 +169,10 @@ export default {
         this.listData = []
       } else {
         if (this.nowData && this.nowData.list) {
-          this.nowData.list.map((item, index) => {
-            item.no = index + 1
-            item.confirmQty = item.qty
-          })
+          this.getList()
+        } else {
+          this.listData = []
         }
-        this.listData = JSON.parse(JSON.stringify(this.nowData && this.nowData.list || []))
       }
     }
   }