Explorar o código

修改新增仓库无数据

mxx %!s(int64=3) %!d(string=hai) anos
pai
achega
1e8cd8f8a5
Modificáronse 1 ficheiros con 10 adicións e 2 borrados
  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 "新增":