shiyj
2019-07-07 348c483d9e8cf81c485289a44c717fe1c23f4065
WebService/src/main/resources/components/add-room/addRoom.js
@@ -11,6 +11,7 @@
                apartment:'',
                builtUpArea:'',
                unitPrice:'',
                state:'',
                remark:'',
                communityId:''
            }
@@ -21,7 +22,7 @@
         _initEvent:function(){
             vc.on('addRoom','addRoomModel',function(_params){
                vc.component.refreshAddRoomInfo();
                vc.component.loadUnits(_params.floorId);
                vc.component.loadUnitsFromAddRoom(_params.floorId);
                $('#addRoomModel').modal('show');
                vc.component.addRoomInfo.floorId = _params.floorId;
                vc.component.addRoomInfo.communityId = vc.getCurrentCommunity().communityId;
@@ -31,7 +32,7 @@
            /**
                根据楼ID加载房屋
            **/
            loadUnits:function(_floorId){
            loadUnitsFromAddRoom:function(_floorId){
                vc.component.addRoomUnits = [];
                var param = {
                    params:{
@@ -118,6 +119,13 @@
                                    errInfo:"户型不能为空"
                                }
                            ],
                            'addRoomInfo.state':[
                                {
                                    limit:"required",
                                    param:"",
                                    errInfo:"房间状态不能为空"
                                }
                            ],
                            'addRoomInfo.builtUpArea':[
                                {
                                    limit:"required",
@@ -128,6 +136,11 @@
                                    limit:"money",
                                    param:"",
                                    errInfo:"建筑面积错误,如 300.00"
                                },
                                {
                                  limit:"maxLength",
                                  param:"12",
                                  errInfo:"建筑面积数字长度不能超过6位"
                                }
                            ],
                            'addRoomInfo.unitPrice':[
@@ -140,7 +153,12 @@
                                    limit:"money",
                                    param:"",
                                    errInfo:"房屋单价错误 如 300.00"
                                }
                                },
                                 {
                                   limit:"maxLength",
                                   param:"12",
                                   errInfo:"房屋单价数字长度不能超过12位"
                                 }
                            ],
                            'addRoomInfo.remark':[
                                {
@@ -170,7 +188,7 @@
                        if(res.status == 200){
                            //关闭model
                            $('#addRoomModel').modal('hide');
                            vc.emit('room','loadRoom',{
                            vc.emit('room','loadData',{
                                floorId:vc.component.addRoomInfo.floorId
                            });
                            return ;
@@ -193,6 +211,7 @@
                  builtUpArea:'',
                  unitPrice:'',
                  remark:'',
                  state:'',
                  communityId:''
                }
            }