| | |
| | | unitId:'', |
| | | roomNum:'', |
| | | layer:'', |
| | | section:'', |
| | | section:'0', |
| | | apartment:'', |
| | | apartment1:'', |
| | | apartment2:'', |
| | | builtUpArea:'', |
| | | unitPrice:'', |
| | | state:'', |
| | |
| | | if(res.status == 200){ |
| | | var tmpUnits = JSON.parse(json); |
| | | vc.component.editRoomUnits = tmpUnits; |
| | | |
| | | if('0.00' == vc.component.editRoomInfo.unitPrice){ |
| | | vc.component.editRoomInfo.unitPrice=''; |
| | | } |
| | | vc.component.editRoomInfo.apartment1=vc.component.editRoomInfo.apartment.substr(0,2); |
| | | vc.component.editRoomInfo.apartment2=vc.component.editRoomInfo.apartment.substr(2,5); |
| | | /*if(tmpUnits == null || tmpUnits.length == 0){ |
| | | return ; |
| | | } |
| | |
| | | errInfo:"房屋楼层高度必须为数字" |
| | | } |
| | | ], |
| | | 'editRoomInfo.section':[ |
| | | /*'editRoomInfo.section':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | |
| | | param:"", |
| | | errInfo:"房间数必须为数字" |
| | | } |
| | | ], |
| | | ],*/ |
| | | 'editRoomInfo.state':[ |
| | | { |
| | | limit:"required", |
| | |
| | | errInfo:"建筑面积数字长度不能超过6位" |
| | | } |
| | | ], |
| | | 'editRoomInfo.unitPrice':[ |
| | | /*'editRoomInfo.unitPrice':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | |
| | | param:"12", |
| | | errInfo:"房屋单价数字长度不能超过12位" |
| | | } |
| | | ], |
| | | ],*/ |
| | | 'editRoomInfo.remark':[ |
| | | { |
| | | limit:"maxLength", |
| | |
| | | }, |
| | | editRoom:function(){ |
| | | if(!vc.component.editRoomValidate()){ |
| | | vc.message(vc.validate.errInfo); |
| | | vc.toast(vc.validate.errInfo); |
| | | return ; |
| | | } |
| | | |
| | | vc.component.editRoomInfo.apartment=vc.component.editRoomInfo.apartment1+vc.component.editRoomInfo.apartment2; |
| | | if ('' == vc.component.editRoomInfo.unitPrice || null == vc.component.editRoomInfo.unitPrice){ |
| | | vc.component.editRoomInfo.unitPrice='0'; |
| | | } |
| | | vc.http.post( |
| | | 'editRoom', |
| | | 'update', |
| | |
| | | unitId:'', |
| | | roomNum:'', |
| | | layer:'', |
| | | section:'', |
| | | section:'0', |
| | | apartment:'', |
| | | builtUpArea:'', |
| | | unitPrice:'', |