diff --git a/public/components/property/addRoomView/addRoomView.js b/public/components/property/addRoomView/addRoomView.js index ef6f0b088..9693cf9f9 100755 --- a/public/components/property/addRoomView/addRoomView.js +++ b/public/components/property/addRoomView/addRoomView.js @@ -1,4 +1,4 @@ -(function (vc) { +(function(vc) { vc.extends({ propTypes: { callBackListener: vc.propTypes.string, @@ -29,44 +29,43 @@ watch: { addRoomViewInfo: { deep: true, - handler: function () { + handler: function() { vc.component.saveAddRoomInfo(); } } }, - _initMethod: function () { + _initMethod: function() { $that._loadRoomAttrSpec(); - //与字典表关联 - vc.getDict('building_room', "room_sub_type", function (_data) { + //与字典表关联 + vc.getDict('building_room', "room_sub_type", function(_data) { vc.component.addRoomViewInfo.roomSubTypes = _data; }); }, - _initEvent: function () { + _initEvent: function() { vc.on('addRoomViewInfo', 'onIndex', - function (_index) { + function(_index) { vc.component.addRoomViewInfo.index = _index; }); - + }, methods: { addRoomValidate() { vc.component.addRoomViewInfo.apartment = vc.component.addRoomViewInfo.apartment1 + vc.component.addRoomViewInfo.apartment2; return vc.validate.validate({ addRoomViewInfo: vc.component.addRoomViewInfo - }, - { - 'addRoomViewInfo.roomNum': [{ + }, { + 'addRoomViewInfo.roomNum': [{ limit: "required", param: "", errInfo: "房屋编号不能为空" }, { limit: "maxLength", - param: "12", - errInfo: "房屋编号长度不能超过12位" + param: "64", + errInfo: "房屋编号长度不能超过64位" }, - ], - 'addRoomViewInfo.layer': [{ + ], + 'addRoomViewInfo.layer': [{ limit: "required", param: "", errInfo: "房屋楼层不能为空" @@ -76,8 +75,8 @@ param: "", errInfo: "房屋楼层高度必须为数字" }, - ], - 'addRoomViewInfo.apartment': [{ + ], + 'addRoomViewInfo.apartment': [{ limit: "required", param: "", errInfo: "房屋户型不能为空" @@ -87,8 +86,8 @@ param: "50", errInfo: "房屋户型不能大于50" }, - ], - 'addRoomViewInfo.builtUpArea': [{ + ], + 'addRoomViewInfo.builtUpArea': [{ limit: "required", param: "", errInfo: "建筑面积不能为空" @@ -98,8 +97,8 @@ param: "", errInfo: "建筑面积错误,如 300.00" }, - ], - 'addRoomViewInfo.roomArea': [{ + ], + 'addRoomViewInfo.roomArea': [{ limit: "required", param: "", errInfo: "室内面积不能为空" @@ -109,20 +108,19 @@ param: "", errInfo: "室内面积错误,如 300.00" }, - ], - 'addRoomViewInfo.feeCoefficient': [ - { - limit: "required", - param: "", - errInfo: "算费系数不能为空" - }, - { - limit: "money", - param: "", - errInfo: "算费系数错误,如 300.00" - } - ], - 'addRoomViewInfo.state': [{ + ], + 'addRoomViewInfo.feeCoefficient': [{ + limit: "required", + param: "", + errInfo: "算费系数不能为空" + }, + { + limit: "money", + param: "", + errInfo: "算费系数错误,如 300.00" + } + ], + 'addRoomViewInfo.state': [{ limit: "required", param: "", errInfo: "房屋状态不能为空" @@ -132,23 +130,22 @@ param: "12", errInfo: "房屋状态 不能超过12位" }, - ], - 'addRoomViewInfo.roomSubType': [{ - limit: "required", - param: "", - errInfo: "房屋类型不能为空" - } - ], - 'addRoomViewInfo.remark': [{ - limit: "maxLength", - param: "200", - errInfo: "备注内容不能超过200" - }], - }); + ], + 'addRoomViewInfo.roomSubType': [{ + limit: "required", + param: "", + errInfo: "房屋类型不能为空" + }], + 'addRoomViewInfo.remark': [{ + limit: "maxLength", + param: "200", + errInfo: "备注内容不能超过200" + }], + }); }, - _loadRoomAttrSpec: function () { + _loadRoomAttrSpec: function() { $that.addRoomViewInfo.attrs = []; - vc.getAttrSpec('building_room_attr', function (data) { + vc.getAttrSpec('building_room_attr', function(data) { data.forEach(item => { item.value = ''; if (item.specShow == 'Y') { @@ -160,8 +157,8 @@ }); }); }, - _loadAttrValue: function (_specCd, _values) { - vc.getAttrValue(_specCd, function (data) { + _loadAttrValue: function(_specCd, _values) { + vc.getAttrValue(_specCd, function(data) { data.forEach(item => { if (item.valueShow == 'Y') { _values.push(item); @@ -169,7 +166,7 @@ }); }); }, - saveAddRoomInfo: function () { + saveAddRoomInfo: function() { if (vc.component.addRoomValidate()) { // 验证attr必填项 let msg = ''; diff --git a/public/components/property/deleteRoom/deleteRoom.js b/public/components/property/deleteRoom/deleteRoom.js index ea5725301..35451ced8 100755 --- a/public/components/property/deleteRoom/deleteRoom.js +++ b/public/components/property/deleteRoom/deleteRoom.js @@ -1,48 +1,46 @@ -(function(vc){ +(function(vc) { vc.extends({ - data:{ - deleteRoomInfo:{} + data: { + deleteRoomInfo: {} }, - _initEvent:function(){ - vc.on('deleteRoom','openRoomModel',function(_roomInfo){ - vc.component.deleteRoomInfo = _roomInfo; - $('#deleteRoomModel').modal('show'); - }); + _initEvent: function() { + vc.on('deleteRoom', 'openRoomModel', function(_roomInfo) { + vc.component.deleteRoomInfo = _roomInfo; + $('#deleteRoomModel').modal('show'); + }); }, - methods:{ - closeDeleteRoomModel:function(){ + methods: { + closeDeleteRoomModel: function() { $('#deleteRoomModel').modal('hide'); }, - deleteRoom:function(){ + deleteRoom: function() { vc.component.deleteRoomInfo.communityId = vc.getCurrentCommunity().communityId; - vc.http.post( - 'deleteRoom', - 'delete', - JSON.stringify(vc.component.deleteRoomInfo), - { - emulateJSON:true - }, - function(json,res){ - //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); - if(res.status == 200){ + vc.http.apiPost( + '/room.deleteRoom', + JSON.stringify(vc.component.deleteRoomInfo), { + emulateJSON: true + }, + function(json, res) { + let _tmpResJson = JSON.parse(json); + if (_tmpResJson.code == 0) { //关闭model $('#deleteRoomModel').modal('hide'); - vc.emit('room','loadData',{ - floorId:vc.component.deleteRoomInfo.floorId + vc.emit('room', 'loadData', { + floorId: vc.component.deleteRoomInfo.floorId }); - vc.emit('shops','loadData',{ - floorId:vc.component.deleteRoomInfo.floorId + vc.emit('shops', 'loadData', { + floorId: vc.component.deleteRoomInfo.floorId }); - return ; + return; } - vc.toast(json); - }, - function(errInfo,error){ + vc.toast(_tmpResJson.msg); + }, + function(errInfo, error) { console.log('请求失败处理'); vc.toast(errInfo); - }); + }); } } }); diff --git a/public/components/property/editRoom/editRoom.js b/public/components/property/editRoom/editRoom.js index f22562ba8..bd541e84c 100755 --- a/public/components/property/editRoom/editRoom.js +++ b/public/components/property/editRoom/editRoom.js @@ -1,4 +1,4 @@ -(function (vc, vm) { +(function(vc, vm) { vc.extends({ data: { @@ -24,15 +24,15 @@ roomSubTypes: [] } }, - _initMethod: function () { + _initMethod: function() { $that._loadRoomAttrSpec(); }, - _initEvent: function () { - vc.on('editRoom', 'openEditRoomModal', function (_room) { + _initEvent: function() { + vc.on('editRoom', 'openEditRoomModal', function(_room) { $that.refreshEditRoomInfo(); //与字典表关联 - vc.getDict('building_room', "room_sub_type", function (_data) { + vc.getDict('building_room', "room_sub_type", function(_data) { vc.component.editRoomInfo.roomSubTypes = _data; }); vc.copyObject(_room, vc.component.editRoomInfo); @@ -60,7 +60,7 @@ /** 根据楼ID加载房屋 **/ - loadUnitsFromEditRoom: function (_floorId) { + loadUnitsFromEditRoom: function(_floorId) { vc.component.editRoomUnits = []; var param = { params: { @@ -72,7 +72,7 @@ 'editRoom', 'loadUnits', param, - function (json, res) { + function(json, res) { //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); if (res.status == 200) { var tmpUnits = JSON.parse(json); @@ -93,16 +93,16 @@ } vc.toast(json); }, - function (errInfo, error) { + function(errInfo, error) { console.log('请求失败处理'); vc.toast(errInfo); }); }, - _loadRoomAttrSpec: function () { + _loadRoomAttrSpec: function() { $that.editRoomInfo.attrs = []; - vc.getAttrSpec('building_room_attr', function (data) { + vc.getAttrSpec('building_room_attr', function(data) { data.forEach(item => { item.value = ''; item.values = []; @@ -114,8 +114,8 @@ }); }, - _loadAttrValue: function (_specCd, _values) { - vc.getAttrValue(_specCd, function (data) { + _loadAttrValue: function(_specCd, _values) { + vc.getAttrValue(_specCd, function(data) { data.forEach(item => { if (item.valueShow == 'Y') { _values.push(item); @@ -124,19 +124,16 @@ }); }, - editRoomValidate: function () { + editRoomValidate: function() { return vc.validate.validate({ editRoomInfo: vc.component.editRoomInfo }, { - 'editRoomInfo.unitId': [ - { - limit: "required", - param: "", - errInfo: "小区楼房屋不能为空" - } - ], - 'editRoomInfo.roomNum': [ - { + 'editRoomInfo.unitId': [{ + limit: "required", + param: "", + errInfo: "小区楼房屋不能为空" + }], + 'editRoomInfo.roomNum': [{ limit: "required", param: "", errInfo: "房屋编号不能为空" @@ -147,8 +144,7 @@ errInfo: "房屋编号长度不能超过12位" }, ], - 'editRoomInfo.layer': [ - { + 'editRoomInfo.layer': [{ limit: "required", param: "", errInfo: "房屋楼层高度不能为空" @@ -159,22 +155,17 @@ errInfo: "房屋楼层高度必须为数字" } ], - 'editRoomInfo.state': [ - { - limit: "required", - param: "", - errInfo: "房间状态不能为空" - } - ], - 'editRoomInfo.apartment': [ - { - limit: "required", - param: "", - errInfo: "户型不能为空" - } - ], - 'editRoomInfo.builtUpArea': [ - { + 'editRoomInfo.state': [{ + limit: "required", + param: "", + errInfo: "房间状态不能为空" + }], + 'editRoomInfo.apartment': [{ + limit: "required", + param: "", + errInfo: "户型不能为空" + }], + 'editRoomInfo.builtUpArea': [{ limit: "required", param: "", errInfo: "建筑面积不能为空" @@ -191,18 +182,17 @@ } ], 'editRoomInfo.roomArea': [{ - limit: "required", - param: "", - errInfo: "室内面积不能为空" - }, - { - limit: "money", - param: "", - errInfo: "室内面积错误,如 300.00" - }, - ], - 'editRoomInfo.feeCoefficient': [ + limit: "required", + param: "", + errInfo: "室内面积不能为空" + }, { + limit: "money", + param: "", + errInfo: "室内面积错误,如 300.00" + }, + ], + 'editRoomInfo.feeCoefficient': [{ limit: "required", param: "", errInfo: "算费系数不能为空" @@ -217,19 +207,16 @@ limit: "required", param: "", errInfo: "房屋类型不能为空" - } - ], - 'editRoomInfo.remark': [ - { - limit: "maxLength", - param: "200", - errInfo: "备注长度不能超过200位" - }, - ] + }], + 'editRoomInfo.remark': [{ + limit: "maxLength", + param: "200", + errInfo: "备注长度不能超过200位" + }, ] }); }, - editRoom: function () { + editRoom: function() { if (!vc.component.editRoomValidate()) { vc.toast(vc.validate.errInfo); return; @@ -238,14 +225,12 @@ if ('' == vc.component.editRoomInfo.unitPrice || null == vc.component.editRoomInfo.unitPrice) { vc.component.editRoomInfo.unitPrice = '0'; } - vc.http.post( - 'editRoom', - 'update', - JSON.stringify(vc.component.editRoomInfo), - { + vc.http.apiPost( + '/room.updateRoom', + JSON.stringify(vc.component.editRoomInfo), { emulateJSON: true }, - function (json, res) { + function(json, res) { //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); let _json = JSON.parse(json); if (_json.code == 0) { @@ -258,13 +243,13 @@ } vc.toast(_json.msg); }, - function (errInfo, error) { + function(errInfo, error) { console.log('请求失败处理'); vc.toast(errInfo); }); }, - refreshEditRoomInfo: function () { + refreshEditRoomInfo: function() { let _attrs = $that.editRoomInfo.attrs; _attrs.forEach(_item => { _item.attrId = ''; diff --git a/public/pages/property/addRoomBinding/addRoomBinding.js b/public/pages/property/addRoomBinding/addRoomBinding.js index 94a64b374..2fddbac94 100755 --- a/public/pages/property/addRoomBinding/addRoomBinding.js +++ b/public/pages/property/addRoomBinding/addRoomBinding.js @@ -71,24 +71,21 @@ data: vc.component.addRoomBindingInfo.infos } - vc.http.post( - 'addRoomBindingBinding', - 'binding', + vc.http.apiPost( + '/room.addRoomBinding', JSON.stringify(param), { emulateJSON: true }, function(json, res) { - if (res.status == 200) { - + let _tmpResJson = JSON.parse(json); + if (_tmpResJson.code == 0) { vc.toast('处理成功'); //关闭model - var _tmpResJson = JSON.parse(json); - /* _tmpResJson[floorName] = vc.component._getFloorName();*/ - // vc.jumpToPage("/#/pages/property/room"); + console.log(_tmpResJson); vc.goBack(); return; } - vc.toast(json); + vc.toast(_tmpResJson.msg); }, function(errInfo, error) { console.log('请求失败处理'); diff --git a/public/pages/property/reportFeeDetail/reportFeeDetail.html b/public/pages/property/reportFeeDetail/reportFeeDetail.html index c82779329..c6c396004 100755 --- a/public/pages/property/reportFeeDetail/reportFeeDetail.html +++ b/public/pages/property/reportFeeDetail/reportFeeDetail.html @@ -5,8 +5,7 @@
| 费用编号 | -房号 | -业主 | -面积 | -费用项 | -费用开始时间 | -费用结束时间 | -应收金额 | -实收金额 | -更新时间 | -|||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 费用编号 | +房号 | +业主 | +面积 | +费用项 | +费用开始时间 | +费用结束时间 | +历史欠费(单位:元) | +当月应收(单位:元) | +应收合计(单位:元) | +当月实收(单位:元) | +欠费追回(单位:元) | +预交费用(单位:元) | +实收合计(单位:元) | +欠费金额(单位:元) | +更新时间 | +|
| {{index+1}} | -{{fee.objName}} | -{{fee.ownerName}} | -{{fee.builtUpArea}} | -{{fee.feeName}} | -{{vc.dateFormat(fee.feeCreateTime)}} | - -- {{vc.dateFormat(fee.deadlineTime)}} - | -- {{vc.dateSubOneDay(vc.dateFormat(fee.feeCreateTime),vc.dateFormat(fee.deadlineTime),fee.feeFlag)}} - | -{{fee.receivableAmount}} | -{{fee.receivedAmount}} | -{{fee.updateTime}} | -||||||
| {{index+1}} | +{{fee.objName}} | +{{fee.ownerName}} | +{{fee.builtUpArea}} | +{{fee.feeName}} | +{{vc.dateFormat(fee.feeCreateTime)}} | + ++ {{vc.dateFormat(fee.deadlineTime)}} + | ++ {{vc.dateSubOneDay(vc.dateFormat(fee.feeCreateTime),vc.dateFormat(fee.deadlineTime),fee.feeFlag)}} + | +{{fee.hisOweAmount}} | +{{fee.curReceivableAmount}} | +{{_computeSum(fee.hisOweAmount,fee.curReceivableAmount)}} | +{{fee.curReceivedAmount}} | +{{fee.hisOweReceivedAmount}} | +{{fee.preReceivedAmount}} | +{{_computeSum(_computeSum(fee.hisOweReceivedAmount,fee.preReceivedAmount),fee.curReceivedAmount)}} | +{{_computeOweFee(fee)}} | +{{fee.updateTime}} | +
|
- |
- ||||||||||||||||
|
+ |
+ ||||||||||||||||