优化缴费明细表

This commit is contained in:
java110 2022-03-25 16:05:47 +08:00
parent af909278ac
commit a7601efa3d
7 changed files with 306 additions and 262 deletions

View File

@ -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 = '';

View File

@ -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);
});
});
}
}
});

View File

@ -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 = '';

View File

@ -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('请求失败处理');

View File

@ -5,8 +5,7 @@
<div class="ibox-title">
<h5>查询条件</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
v-on:click="_moreCondition()">{{reportFeeDetailInfo.moreCondition == true?'隐藏':'更多'}}
<button type="button" class="btn btn-link btn-sm" style="margin-right:10px;" v-on:click="_moreCondition()">{{reportFeeDetailInfo.moreCondition == true?'隐藏':'更多'}}
</button>
</div>
</div>
@ -14,11 +13,9 @@
<div class="row">
<div class="col-sm-3">
<div class="form-group input-group">
<input type="text" placeholder="请选择楼栋"
v-model="reportFeeDetailInfo.conditions.floorName" class=" form-control">
<input type="text" placeholder="请选择楼栋" v-model="reportFeeDetailInfo.conditions.floorName" class=" form-control">
<div class="input-group-prepend">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_openChooseFloorMethod()">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openChooseFloorMethod()">
<i class="fa fa-search"></i> 选择
</button>
</div>
@ -26,8 +23,7 @@
</div>
<div class="col-sm-4">
<div class="form-group">
<select class="form-control-md form-control input-s-sm inline"
v-model="reportFeeDetailInfo.conditions.unitId">
<select class="form-control-md form-control input-s-sm inline" v-model="reportFeeDetailInfo.conditions.unitId">
<option selected value="">请选择单元</option>
<option v-for="(unit,index) in reportFeeDetailInfo.roomUnits" :key="index"
v-bind:value="unit.unitId">
@ -38,16 +34,14 @@
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="请填写房屋编号" class="form-control form-control-md"
v-model="reportFeeDetailInfo.conditions.roomNum">
<input type="text" placeholder="请填写房屋编号" class="form-control form-control-md" v-model="reportFeeDetailInfo.conditions.roomNum">
</div>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-primary btn-md" v-on:click="_queryMethod()">
<i class="fa fa-search"></i> 查询
</button>
<button type="button" class="btn btn-info btn-md" v-on:click="_resetMethod()"
style="margin-left: 20px;">
<button type="button" class="btn btn-info btn-md" v-on:click="_resetMethod()" style="margin-left: 20px;">
<i class="fa fa-repeat"></i> 重置
</button>
</div>
@ -55,8 +49,7 @@
<div class="row" v-show="reportFeeDetailInfo.moreCondition == true">
<div class="col-sm-3">
<div class="form-group">
<select class="form-control-md form-control input-s-sm inline"
v-model="reportFeeDetailInfo.conditions.configId">
<select class="form-control-md form-control input-s-sm inline" v-model="reportFeeDetailInfo.conditions.configId">
<option selected value="">请选择收费项</option>
<option v-for="(item,index) in reportFeeDetailInfo.feeConfigDtos" :key="index"
:value="item.configId">
@ -67,16 +60,12 @@
</div>
<div class="col-sm-4">
<div class="form-group input-group">
<input type="text" placeholder="请选择缴费开始时间"
v-model="reportFeeDetailInfo.conditions.startTime"
class="form-control reportFeeDetailStartTime startTime">
<input type="text" placeholder="请选择缴费开始时间" v-model="reportFeeDetailInfo.conditions.startTime" class="form-control reportFeeDetailStartTime startTime">
</div>
</div>
<div class="col-sm-3">
<div class="form-group input-group">
<input type="text" placeholder="请选择缴费结束时间"
v-model="reportFeeDetailInfo.conditions.endTime"
class="form-control reportFeeDetailEndTime endTime">
<input type="text" placeholder="请选择缴费结束时间" v-model="reportFeeDetailInfo.conditions.endTime" class="form-control reportFeeDetailEndTime endTime">
</div>
</div>
</div>
@ -98,61 +87,90 @@
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">费用编号</th>
<th class="text-center">房号</th>
<th class="text-center">业主</th>
<th class="text-center">面积</th>
<th class="text-center">费用项</th>
<th class="text-center">费用开始时间</th>
<th class="text-center">费用结束时间</th>
<th class="text-center">应收金额</th>
<th class="text-center">实收金额</th>
<th class="text-center">更新时间</th>
</tr>
<tr>
<th class="text-center">费用编号</th>
<th class="text-center">房号</th>
<th class="text-center">业主</th>
<th class="text-center">面积</th>
<th class="text-center">费用项</th>
<th class="text-center">费用开始时间</th>
<th class="text-center">费用结束时间</th>
<th class="text-center">历史欠费(单位:元)</th>
<th class="text-center">当月应收(单位:元)</th>
<th class="text-center">应收合计(单位:元)</th>
<th class="text-center">当月实收(单位:元)</th>
<th class="text-center">欠费追回(单位:元)</th>
<th class="text-center">预交费用(单位:元)</th>
<th class="text-center">实收合计(单位:元)</th>
<th class="text-center">欠费金额(单位:元)</th>
<th class="text-center">更新时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(fee,index) in reportFeeDetailInfo.fees">
<td class="text-center">{{index+1}}</td>
<td class="text-center">{{fee.objName}}</td>
<td class="text-center">{{fee.ownerName}}</td>
<td class="text-center">{{fee.builtUpArea}}</td>
<td class="text-center">{{fee.feeName}}</td>
<td class="text-center">{{vc.dateFormat(fee.feeCreateTime)}}</td>
<!--<td class="text-center">{{fee.deadlineTime}}</td>-->
<td class="text-center" v-if="fee.feeCreateTime >= fee.deadlineTime">
{{vc.dateFormat(fee.deadlineTime)}}
</td>
<td class="text-center" v-else>
{{vc.dateSubOneDay(vc.dateFormat(fee.feeCreateTime),vc.dateFormat(fee.deadlineTime),fee.feeFlag)}}
</td>
<td class="text-center">{{fee.receivableAmount}}</td>
<td class="text-center">{{fee.receivedAmount}}</td>
<td class="text-center">{{fee.updateTime}}</td>
</tr>
<tr v-for="(fee,index) in reportFeeDetailInfo.fees">
<td class="text-center">{{index+1}}</td>
<td class="text-center">{{fee.objName}}</td>
<td class="text-center">{{fee.ownerName}}</td>
<td class="text-center">{{fee.builtUpArea}}</td>
<td class="text-center">{{fee.feeName}}</td>
<td class="text-center">{{vc.dateFormat(fee.feeCreateTime)}}</td>
<!--<td class="text-center">{{fee.deadlineTime}}</td>-->
<td class="text-center" v-if="fee.feeCreateTime >= fee.deadlineTime">
{{vc.dateFormat(fee.deadlineTime)}}
</td>
<td class="text-center" v-else>
{{vc.dateSubOneDay(vc.dateFormat(fee.feeCreateTime),vc.dateFormat(fee.deadlineTime),fee.feeFlag)}}
</td>
<td class="text-center">{{fee.hisOweAmount}}</td>
<td class="text-center">{{fee.curReceivableAmount}}</td>
<td class="text-center">{{_computeSum(fee.hisOweAmount,fee.curReceivableAmount)}}</td>
<td class="text-center">{{fee.curReceivedAmount}}</td>
<td class="text-center">{{fee.hisOweReceivedAmount}}</td>
<td class="text-center">{{fee.preReceivedAmount}}</td>
<td class="text-center">{{_computeSum(_computeSum(fee.hisOweReceivedAmount,fee.preReceivedAmount),fee.curReceivedAmount)}}</td>
<td class="text-center">{{_computeOweFee(fee)}}</td>
<td class="text-center">{{fee.updateTime}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<div class="row">
<div class="col-md-4">
<span class="margin-left">小计应收: {{reportFeeDetailInfo.totalReceivableAmount}}元</span>
<span class="margin-left">小计实收: {{reportFeeDetailInfo.totalReceivedAmount}}元</span>
</div>
<div class="col-md-8 text-center">
<vc:create path="frame/pagination"></vc:create>
</div>
<span class="col-md-1 margin-left">
<div class="row"><b>小计</b></div>
<div class="row"><b>大计</b></div>
</span>
<span class="col-md-2">
<div class="row">应收: {{reportFeeDetailInfo.totalReceivableAmount}}元</div>
<div class="row">应收: {{reportFeeDetailInfo.allReceivableAmount}}元</div>
</span>
<span class="col-md-2">
<div class="row">实收: {{reportFeeDetailInfo.totalReceivedAmount}}元</div>
<div class="row">实收: {{reportFeeDetailInfo.allReceivedAmount}}元</div>
</span>
<span class="col-md-2">
<div class="row">欠费: {{_computeTotalOweAmount()}}元</div>
<div class="row">欠费: {{reportFeeDetailInfo.allOweAmount}}元</div>
</span>
<span class="col-md-2">
<div class="row">欠费追回: {{_computeTotalHisOweReceivedAmount()}}元</div>
<div class="row">欠费追回: {{reportFeeDetailInfo.allHisOweReceivedAmount}}元</div>
</span>
</div>
<div class="row">
<div class="col-md-4">
<span class="margin-left">大计应收: {{reportFeeDetailInfo.allReceivableAmount}}元</span>
<span class="margin-left">大计实收: {{reportFeeDetailInfo.allReceivedAmount}}元</span>
<div class="row margin-top-xs">
<div class="col-sm-9">
<div> 欠费金额 = 历史欠费 + 当月应收 - 当月实收 - 欠费追回</div>
<div> 历史欠费:当月之前欠费;当月应收:当前月收费;当月实收:当月收到中属于当前月应收费用部分;</div>
<div> 欠费追回:当月收到中属于历史欠费部分;预交费用:当月收到中属于预交费用部分</div>
</div>
<div class="col-sm-3 float-right">
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>

View File

@ -1,7 +1,7 @@
/**
入驻小区
**/
(function (vc) {
(function(vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
@ -13,12 +13,15 @@
moreCondition: false,
title: '',
totalReceivableAmount: 0.0,
totalReceivedAmount: 0.0,
allReceivableAmount: 0.0,
totalReceivedAmount: 0.0,
allReceivedAmount: 0.0,
totalPreferentialAmount: 0.0,
allHisOweReceivedAmount: 0.0,
primeRates: [],
roomUnits: [],
feeConfigDtos: [],
conditions: {
floorId: '',
floorName: '',
@ -32,7 +35,7 @@
}
}
},
_initMethod: function () {
_initMethod: function() {
vc.component._initDate();
vc.component._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
// vc.initDateMonth('startTime', function (_startTime) {
@ -48,18 +51,18 @@
// }
// });
},
_initEvent: function () {
vc.on('reportFeeDetail', 'chooseFloor', function (_param) {
_initEvent: function() {
vc.on('reportFeeDetail', 'chooseFloor', function(_param) {
vc.component.reportFeeDetailInfo.conditions.floorId = _param.floorId;
vc.component.reportFeeDetailInfo.conditions.floorName = _param.floorName;
vc.component.loadUnits(_param.floorId);
});
vc.on('pagination', 'page_event', function (_currentPage) {
vc.on('pagination', 'page_event', function(_currentPage) {
vc.component._listFees(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_initDate: function () {
_initDate: function() {
$(".startTime").datetimepicker({
minView: "month",
language: 'zh-CN',
@ -81,12 +84,12 @@
todayBtn: true
});
$('.startTime').datetimepicker()
.on('changeDate', function (ev) {
.on('changeDate', function(ev) {
var value = $(".startTime").val();
vc.component.reportFeeDetailInfo.conditions.startTime = value;
});
$('.endTime').datetimepicker()
.on('changeDate', function (ev) {
.on('changeDate', function(ev) {
var value = $(".endTime").val();
vc.component.reportFeeDetailInfo.conditions.endTime = value;
let start = Date.parse(new Date($that.reportFeeDetailInfo.conditions.startTime))
@ -97,11 +100,11 @@
}
});
},
_queryMethod: function () {
_queryMethod: function() {
vc.component._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
},
//查询方法
_listFees: function (_page, _rows) {
_listFees: function(_page, _rows) {
vc.component.reportFeeDetailInfo.conditions.page = _page;
vc.component.reportFeeDetailInfo.conditions.row = _rows;
vc.component.reportFeeDetailInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
@ -111,39 +114,49 @@
//发送get请求
vc.http.apiGet('/reportFeeMonthStatistics/queryFeeDetail',
param,
function (json, res) {
function(json, res) {
var _reportFeeDetailInfo = JSON.parse(json);
vc.component.reportFeeDetailInfo.total = _reportFeeDetailInfo.total;
vc.component.reportFeeDetailInfo.records = _reportFeeDetailInfo.records;
vc.component.reportFeeDetailInfo.fees = _reportFeeDetailInfo.data;
//计算小计
let _totalReceivableAmount = 0.0;
let _totalReceivedAmount = 0.0;
let _totalPreferentialAmount = 0.0;
_reportFeeDetailInfo.data.forEach(item => {
_totalReceivableAmount += parseFloat(item.receivableAmount);
_totalReceivedAmount += parseFloat(item.receivedAmount);
_totalPreferentialAmount += parseFloat(item.oweAmount);
});
$that.reportFeeDetailInfo.totalReceivableAmount = _totalReceivableAmount.toFixed(2);
$that.reportFeeDetailInfo.totalReceivedAmount = _totalReceivedAmount.toFixed(2);
$that.reportFeeDetailInfo.totalPreferentialAmount = _totalPreferentialAmount.toFixed(2);
if (_reportFeeDetailInfo.data.length > 0) {
vc.component.reportFeeDetailInfo.totalReceivableAmount = _reportFeeDetailInfo.data[0].totalReceivableAmount;
vc.component.reportFeeDetailInfo.allReceivableAmount = _reportFeeDetailInfo.data[0].allReceivableAmount;
vc.component.reportFeeDetailInfo.totalReceivedAmount = _reportFeeDetailInfo.data[0].totalReceivedAmount;
vc.component.reportFeeDetailInfo.allReceivedAmount = _reportFeeDetailInfo.data[0].allReceivedAmount;
vc.component.reportFeeDetailInfo.feeConfigDtos = _reportFeeDetailInfo.data[0].feeConfigDtos;
} else {
vc.component.reportFeeDetailInfo.totalReceivableAmount = 0.0;
vc.component.reportFeeDetailInfo.totalReceivedAmount = 0.0;
vc.component.reportFeeDetailInfo.allReceivableAmount = 0.0;
vc.component.reportFeeDetailInfo.allReceivedAmount = 0.0;
$that.reportFeeDetailInfo.allReceivableAmount = _reportFeeDetailInfo.data[0].allReceivableAmount;
$that.reportFeeDetailInfo.allReceivedAmount = _reportFeeDetailInfo.data[0].allReceivedAmount;
$that.reportFeeDetailInfo.allOweAmount = _reportFeeDetailInfo.data[0].allOweAmount;
$that.reportFeeDetailInfo.allHisOweReceivedAmount = _reportFeeDetailInfo.data[0].allHisOweReceivedAmount;
}
vc.emit('pagination', 'init', {
total: vc.component.reportFeeDetailInfo.records,
dataCount: vc.component.reportFeeDetailInfo.total,
currentPage: _page
});
}, function (errInfo, error) {
},
function(errInfo, error) {
console.log('请求失败处理');
}
);
},
//重置
_resetMethod: function () {
_resetMethod: function() {
vc.component._resetListFees(DEFAULT_PAGE, DEFAULT_ROWS);
},
//重置方法
_resetListFees: function (_page, _rows) {
_resetListFees: function(_page, _rows) {
vc.component.reportFeeDetailInfo.conditions.floorName = '';
vc.component.reportFeeDetailInfo.conditions.floorId = '';
vc.component.reportFeeDetailInfo.conditions.unitId = '';
@ -153,7 +166,7 @@
vc.component.reportFeeDetailInfo.conditions.configId = '';
$that._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
},
loadUnits: function (_floorId) {
loadUnits: function(_floorId) {
var param = {
params: {
floorId: _floorId,
@ -164,7 +177,7 @@
'room',
'loadUnits',
param,
function (json, res) {
function(json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
let tmpUnits = JSON.parse(json);
@ -173,24 +186,61 @@
}
vc.toast(json);
},
function (errInfo, error) {
function(errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
});
},
_openChooseFloorMethod: function () {
_openChooseFloorMethod: function() {
vc.emit('searchFloor', 'openSearchFloorModel', {});
},
_moreCondition: function () {
_moreCondition: function() {
if (vc.component.reportFeeDetailInfo.moreCondition) {
vc.component.reportFeeDetailInfo.moreCondition = false;
} else {
vc.component.reportFeeDetailInfo.moreCondition = true;
}
},
_exportFee: function () {
_exportFee: function() {
vc.jumpToPage('/callComponent/exportReportFee/exportData?pagePath=reportFeeDetail&' + vc.objToGetParam($that.reportFeeDetailInfo.conditions));
},
_computeSum: function(a, b) {
return (parseFloat(a) + parseFloat(b)).toFixed(2)
},
_computeOweFee: function(fee) {
let _oweFee = (parseFloat(fee.hisOweAmount) + parseFloat(fee.curReceivableAmount) - parseFloat(fee.curReceivedAmount) - parseFloat(fee.hisOweReceivedAmount)).toFixed(2);
if (_oweFee < 0) {
return 0;
}
return _oweFee;
},
_computeTotalOweAmount: function() {
if (!window.$that) {
return 0;
}
if (!$that.reportFeeDetailInfo) {
return 0;
}
let _amount = 0;
$that.reportFeeDetailInfo.fees.forEach(item => {
_amount += parseFloat($that._computeOweFee(item));
})
console.log(_amount)
return _amount.toFixed(2);
},
_computeTotalHisOweReceivedAmount: function() {
if (!window.$that) {
return 0;
}
if (!$that.reportFeeDetailInfo) {
return 0;
}
let _amount = 0;
$that.reportFeeDetailInfo.fees.forEach(item => {
_amount += parseFloat(item.hisOweReceivedAmount);
})
return _amount.toFixed(2);
}
}
});
})(window.vc);
})(window.vc);

View File

@ -82,8 +82,7 @@
param.params.roomId = '';
}
//发送get请求
vc.http.get('room',
'listRoom',
vc.http.apiGet('/room.queryRooms',
param,
function(json, res) {
var listRoomData = JSON.parse(json);
@ -160,7 +159,7 @@
},
_loadDataByParam: function() {
vc.component.roomInfo.conditions.floorId = vc.getParam("floorId");
vc.component.roomInfo.conditions.floorId = vc.getParam("floorName");
vc.component.roomInfo.conditions.floorName = vc.getParam("floorName");
let param = {
params: {