报表加入大计小计问题

This commit is contained in:
java110 2021-08-13 12:52:25 +08:00
parent cedbef2a8e
commit e07fd1f652
8 changed files with 210 additions and 35 deletions

View File

@ -141,7 +141,29 @@
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
<div class="row">
<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">应收: {{reportFeeBreakdownInfo.totalReceivableAmount}}元</div>
<div class="row">应收: {{reportFeeBreakdownInfo.allReceivableAmount}}元</div>
</span>
<span class="col-md-2">
<div class="row">实收: {{reportFeeBreakdownInfo.totalReceivedAmount}}元</div>
<div class="row">实收: {{reportFeeBreakdownInfo.allReceivedAmount}}元</div>
</span>
<span class="col-md-2">
<div class="row">欠费: {{reportFeeBreakdownInfo.totalPreferentialAmount}}元</div>
<div class="row">欠费: {{reportFeeBreakdownInfo.allOweAmount}}元</div>
</span>
</div>
<div class="row">
<div class="col-md-12 text-center">
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
</div>

View File

@ -15,6 +15,12 @@
roomUnits: [],
feeTypeCds: [],
feeConfigDtos: [],
totalReceivableAmount:0.0,
allReceivableAmount:0.0,
totalReceivedAmount:0.0,
allReceivedAmount:0.0,
totalPreferentialAmount:0.0,
allOweAmount:0.0,
conditions: {
floorId: '',
floorName: '',
@ -121,6 +127,28 @@
if (_reportFeeBreakdownInfo.data.length > 0) {
vc.component.reportFeeBreakdownInfo.feeConfigDtos = _reportFeeBreakdownInfo.data[0].feeConfigDtos;
}
//计算小计
let _totalReceivableAmount=0.0;
let _totalReceivedAmount=0.0;
let _totalPreferentialAmount=0.0;
_reportFeeBreakdownInfo.data.forEach(item => {
_totalReceivableAmount += parseFloat(item.receivableAmount);
_totalReceivedAmount += parseFloat(item.receivedAmount);
_totalPreferentialAmount += parseFloat(item.oweAmount);
});
$that.reportFeeBreakdownInfo.totalReceivableAmount = _totalReceivableAmount.toFixed(2);
$that.reportFeeBreakdownInfo.totalReceivedAmount = _totalReceivedAmount.toFixed(2);
$that.reportFeeBreakdownInfo.totalPreferentialAmount = _totalPreferentialAmount.toFixed(2);
if(_reportFeeBreakdownInfo.data.length>0){
$that.reportFeeBreakdownInfo.allReceivableAmount = _reportFeeBreakdownInfo.data[0].allReceivableAmount;
$that.reportFeeBreakdownInfo.allReceivedAmount = _reportFeeBreakdownInfo.data[0].allReceivedAmount;
$that.reportFeeBreakdownInfo.allOweAmount = _reportFeeBreakdownInfo.data[0].allOweAmount;
}
vc.emit('pagination', 'init', {
total: vc.component.reportFeeBreakdownInfo.records,
dataCount: vc.component.reportFeeBreakdownInfo.total,

View File

@ -6,7 +6,7 @@
<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()">{{reportFeeSummaryInfo.moreCondition == true?'隐藏':'更多'}}
v-on:click="_moreCondition()">{{reportFeeSummaryInfo.moreCondition == true?'隐藏':'更多'}}
</button>
</div>
</div>
@ -14,11 +14,11 @@
<div class="row">
<div class="col-sm-4">
<div class="form-group input-group">
<input type="text" placeholder="请选择楼栋"
v-model="reportFeeSummaryInfo.conditions.floorId" class=" form-control">
<input type="text" placeholder="请选择楼栋" v-model="reportFeeSummaryInfo.conditions.floorId"
class=" form-control">
<div class="input-group-prepend">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_openChooseFloorMethod()">
v-on:click="_openChooseFloorMethod()">
<i class="fa fa-search"></i> 选择
</button>
</div>
@ -27,10 +27,10 @@
<div class="col-sm-3">
<div class="form-group">
<select class="form-control-md form-control input-s-sm inline"
v-model="reportFeeSummaryInfo.conditions.unitId">
v-model="reportFeeSummaryInfo.conditions.unitId">
<option selected value="">请选择单元</option>
<option v-for="(unit,index) in reportFeeSummaryInfo.roomUnits" :key="index"
v-bind:value="unit.unitId">
v-bind:value="unit.unitId">
{{unit.unitNum}}单元
</option>
</select>
@ -39,7 +39,7 @@
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="请填写房屋编号" class="form-control form-control-md"
v-model="reportFeeSummaryInfo.conditions.roomNum">
v-model="reportFeeSummaryInfo.conditions.roomNum">
</div>
</div>
<div class="col-sm-2">
@ -47,7 +47,7 @@
<i class="fa fa-search"></i>查询
</button>
<button type="button" class="btn btn-info btn-md" v-on:click="_resetMethod()"
style="margin-left: 20px;">
style="margin-left: 20px;">
<i class="fa fa-repeat"></i>重置
</button>
</div>
@ -56,14 +56,13 @@
<div class="col-sm-4">
<div class="form-group input-group">
<input type="text" placeholder="请选择缴费开始时间"
v-model="reportFeeSummaryInfo.conditions.startTime"
class=" form-control startTime">
v-model="reportFeeSummaryInfo.conditions.startTime" class=" form-control startTime">
</div>
</div>
<div class="col-sm-3">
<div class="form-group input-group">
<input type="text" placeholder="请选择缴费结束时间"
v-model="reportFeeSummaryInfo.conditions.endTime" class=" form-control endTime">
v-model="reportFeeSummaryInfo.conditions.endTime" class=" form-control endTime">
</div>
</div>
</div>
@ -85,33 +84,56 @@
<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>
</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>
</tr>
</thead>
<tbody>
<tr v-for="fee in reportFeeSummaryInfo.fees">
<td class="text-center">{{fee.feeYear+'年'+fee.feeMonth+'月'}}</td>
<td class="text-center">{{fee.receivableAmount}}</td>
<td class="text-center">{{fee.receivedAmount}}</td>
<td class="text-center">{{fee.oweAmount}}</td>
<td class="text-center">{{fee.chargeRate}}</td>
</tr>
<tr v-for="fee in reportFeeSummaryInfo.fees">
<td class="text-center">{{fee.feeYear+'年'+fee.feeMonth+'月'}}</td>
<td class="text-center">{{fee.receivableAmount}}</td>
<td class="text-center">{{fee.receivedAmount}}</td>
<td class="text-center">{{fee.oweAmount}}</td>
<td class="text-center">{{fee.chargeRate}}</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>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
<!-- 分页 -->
<div class="row">
<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">应收: {{reportFeeSummaryInfo.totalReceivableAmount}}元</div>
<div class="row">应收: {{reportFeeSummaryInfo.allReceivableAmount}}元</div>
</span>
<span class="col-md-2">
<div class="row">实收: {{reportFeeSummaryInfo.totalReceivedAmount}}元</div>
<div class="row">实收: {{reportFeeSummaryInfo.allReceivedAmount}}元</div>
</span>
<span class="col-md-2">
<div class="row">欠费: {{reportFeeSummaryInfo.totalPreferentialAmount}}元</div>
<div class="row">欠费: {{reportFeeSummaryInfo.allOweAmount}}元</div>
</span>
</div>
<div class="row">
<div class="col-md-12 text-center">
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
</div>

View File

@ -13,6 +13,12 @@
moreCondition: false,
title: '',
roomUnits: [],
totalReceivableAmount:0.0,
allReceivableAmount:0.0,
totalReceivedAmount:0.0,
allReceivedAmount:0.0,
totalPreferentialAmount:0.0,
allOweAmount:0.0,
conditions: {
floorId: '',
floorName: '',
@ -110,6 +116,27 @@
vc.component.reportFeeSummaryInfo.total = _reportFeeSummaryInfo.total;
vc.component.reportFeeSummaryInfo.records = _reportFeeSummaryInfo.records;
vc.component.reportFeeSummaryInfo.fees = _reportFeeSummaryInfo.data;
//计算小计
let _totalReceivableAmount=0.0;
let _totalReceivedAmount=0.0;
let _totalPreferentialAmount=0.0;
_reportFeeSummaryInfo.data.forEach(item => {
_totalReceivableAmount += parseFloat(item.receivableAmount);
_totalReceivedAmount += parseFloat(item.receivedAmount);
_totalPreferentialAmount += parseFloat(item.oweAmount);
});
$that.reportFeeSummaryInfo.totalReceivableAmount = _totalReceivableAmount.toFixed(2);
$that.reportFeeSummaryInfo.totalReceivedAmount = _totalReceivedAmount.toFixed(2);
$that.reportFeeSummaryInfo.totalPreferentialAmount = _totalPreferentialAmount.toFixed(2);
if(_reportFeeSummaryInfo.data.length>0){
$that.reportFeeSummaryInfo.allReceivableAmount = _reportFeeSummaryInfo.data[0].allReceivableAmount;
$that.reportFeeSummaryInfo.allReceivedAmount = _reportFeeSummaryInfo.data[0].allReceivedAmount;
$that.reportFeeSummaryInfo.allOweAmount = _reportFeeSummaryInfo.data[0].allOweAmount;
}
vc.emit('pagination', 'init', {
total: vc.component.reportFeeSummaryInfo.records,
dataCount: vc.component.reportFeeSummaryInfo.total,

View File

@ -118,7 +118,29 @@
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
<div class="row">
<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">应收: {{reportFloorUnitFeeSummaryInfo.totalReceivableAmount}}元</div>
<div class="row">应收: {{reportFloorUnitFeeSummaryInfo.allReceivableAmount}}元</div>
</span>
<span class="col-md-2">
<div class="row">实收: {{reportFloorUnitFeeSummaryInfo.totalReceivedAmount}}元</div>
<div class="row">实收: {{reportFloorUnitFeeSummaryInfo.allReceivedAmount}}元</div>
</span>
<span class="col-md-2">
<div class="row">欠费: {{reportFloorUnitFeeSummaryInfo.totalPreferentialAmount}}元</div>
<div class="row">欠费: {{reportFloorUnitFeeSummaryInfo.allOweAmount}}元</div>
</span>
</div>
<div class="row">
<div class="col-md-12 text-center">
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
</div>

View File

@ -13,6 +13,12 @@
moreCondition: false,
title: '',
roomUnits: [],
totalReceivableAmount:0.0,
allReceivableAmount:0.0,
totalReceivedAmount:0.0,
allReceivedAmount:0.0,
totalPreferentialAmount:0.0,
allOweAmount:0.0,
conditions: {
floorId: '',
floorName: '',
@ -125,6 +131,26 @@
vc.component.reportFloorUnitFeeSummaryInfo.total = _reportFloorUnitFeeSummaryInfo.total;
vc.component.reportFloorUnitFeeSummaryInfo.records = _reportFloorUnitFeeSummaryInfo.records;
vc.component.reportFloorUnitFeeSummaryInfo.fees = _reportFloorUnitFeeSummaryInfo.data;
//计算小计
let _totalReceivableAmount=0.0;
let _totalReceivedAmount=0.0;
let _totalPreferentialAmount=0.0;
_reportFloorUnitFeeSummaryInfo.data.forEach(item => {
_totalReceivableAmount += parseFloat(item.receivableAmount);
_totalReceivedAmount += parseFloat(item.receivedAmount);
_totalPreferentialAmount += parseFloat(item.oweAmount);
});
$that.reportFloorUnitFeeSummaryInfo.totalReceivableAmount = _totalReceivableAmount.toFixed(2);
$that.reportFloorUnitFeeSummaryInfo.totalReceivedAmount = _totalReceivedAmount.toFixed(2);
$that.reportFloorUnitFeeSummaryInfo.totalPreferentialAmount = _totalPreferentialAmount.toFixed(2);
if(_reportFloorUnitFeeSummaryInfo.data.length>0){
$that.reportFloorUnitFeeSummaryInfo.allReceivableAmount = _reportFloorUnitFeeSummaryInfo.data[0].allReceivableAmount;
$that.reportFloorUnitFeeSummaryInfo.allReceivedAmount = _reportFloorUnitFeeSummaryInfo.data[0].allReceivedAmount;
$that.reportFloorUnitFeeSummaryInfo.allOweAmount = _reportFloorUnitFeeSummaryInfo.data[0].allOweAmount;
}
vc.emit('pagination', 'init', {
total: vc.component.reportFloorUnitFeeSummaryInfo.records,
dataCount: vc.component.reportFloorUnitFeeSummaryInfo.total,

View File

@ -115,8 +115,22 @@
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
<!-- 分页 -->
<div class="row">
<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">欠费: {{reportOweFeeDetailInfo.totalPreferentialAmount}}元</div>
<div class="row">欠费: {{reportOweFeeDetailInfo.allOweAmount}}元</div>
</span>
</div>
<div class="row">
<div class="col-md-12 text-center">
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
</div>

View File

@ -13,6 +13,8 @@
moreCondition: false,
title: '',
roomUnits: [],
totalPreferentialAmount:0.0,
allOweAmount:0.0,
conditions: {
floorId: '',
floorName: '',
@ -130,6 +132,18 @@
vc.component.reportOweFeeDetailInfo.total = _reportOweFeeDetailInfo.total;
vc.component.reportOweFeeDetailInfo.records = _reportOweFeeDetailInfo.records;
vc.component.reportOweFeeDetailInfo.fees = _reportOweFeeDetailInfo.data;
//计算小计
let _totalPreferentialAmount=0.0;
_reportOweFeeDetailInfo.data.forEach(item => {
_totalPreferentialAmount += parseFloat(item.oweAmount);
});
$that.reportOweFeeDetailInfo.totalPreferentialAmount = _totalPreferentialAmount.toFixed(2);
if(_reportOweFeeDetailInfo.data.length>0){
$that.reportOweFeeDetailInfo.allOweAmount = _reportOweFeeDetailInfo.data[0].allOweAmount;
}
vc.emit('pagination', 'init', {
total: vc.component.reportOweFeeDetailInfo.records,
dataCount: vc.component.reportOweFeeDetailInfo.total,