瀏覽代碼

修改新增仓库无数据

mxx 3 年之前
父節點
當前提交
1e8cd8f8a5
共有 1 個文件被更改,包括 10 次插入2 次删除
  1. 10 2
      src/views/houseSelfCollect/acquisitionManagementAdd.vue

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

@@ -241,6 +241,9 @@
       // 货名
       // 货名
       let _goodsNameList = []
       let _goodsNameList = []
       _goodsNameList = this.$route.query.goodsNameList
       _goodsNameList = this.$route.query.goodsNameList
+      if(_goodsNameList==undefined){
+        _goodsNameList=[]
+      }
       packList({
       packList({
           constId: 'CON2'
           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) {
       switch (this.$route.query.type) {
         case "新增":
         case "新增":