Browse Source

修改新增仓库无数据

mxx 3 years ago
parent
commit
1e8cd8f8a5
1 changed files with 10 additions and 2 deletions
  1. 10 2
      src/views/houseSelfCollect/acquisitionManagementAdd.vue

+ 10 - 2
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -241,6 +241,9 @@
       // 货名
       let _goodsNameList = []
       _goodsNameList = this.$route.query.goodsNameList
+      if(_goodsNameList==undefined){
+        _goodsNameList=[]
+      }
       packList({
           constId: 'CON2'
         })
@@ -259,8 +262,13 @@
               }
             }
           }
-          this.goodnameList = _list
-          this.selectVal = _list[0].constValue
+          if(_goodsNameList.length==0){
+            this.goodnameList = response
+            this.selectVal = response[0].constValue
+          }else{
+            this.goodnameList = _list
+            this.selectVal = _list[0].constValue
+          }
         })
       switch (this.$route.query.type) {
         case "新增":