Pārlūkot izejas kodu

修改保存缺少zoneIdbug

oyq28 3 gadi atpakaļ
vecāks
revīzija
e8345d3a8f

+ 5 - 1
imcs-ui/src/views/zuihou/prepareProductMgr/frockMgr/components/Edit.vue

@@ -175,7 +175,7 @@ export default {
     	loading: false,
       type: 'add',
       tableData: [],
-      zoneList: [],
+      zoneList: [],     
       tenant: this.initTenant(),
       screenWidth: 0,
       width: this.initWidth(),
@@ -254,6 +254,10 @@ export default {
         res = res.data;
         if (res.isSuccess) {
           this.zoneList = res.data;
+          if(this.zoneList.length == 1){
+              //默认选中第一个
+              this.tenant.zoneId = this.zoneList[0].id
+          }
         }
       });
     },