优化导出功能

This commit is contained in:
wuxw 2023-06-04 22:43:23 +08:00
parent 9c9a4d5aca
commit d69fb1dd5b
4 changed files with 67 additions and 19 deletions

View File

@ -16,8 +16,14 @@
</div>
<div class="col-lg-4 text-right">
<div class="text-right">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_exportReportEarnedDetailExcel()">
<i class="fa fa-plus"></i>
<span>
<vc:i18n name="导出" namespace="dataReportEarnedDetailStatistics"></vc:i18n>
</span>
</button>
</div>
</div>
</div>
<div class="margin-top">

View File

@ -82,6 +82,31 @@
_qureyDataReportEarnedDetailStatistics: function() {
$that._loadDataReportEarnedDetailStatisticsData(DEFAULT_PAGE, DEFAULT_ROWS);
},
_exportReportEarnedDetailExcel: function() {
let param = {
params: {
communityId: vc.getCurrentCommunity().communityId,
startDate: $that.dataReportEarnedDetailStatisticsInfo.startDate,
endDate: $that.dataReportEarnedDetailStatisticsInfo.endDate,
objName: $that.dataReportEarnedDetailStatisticsInfo.objName,
ownerName: $that.dataReportEarnedDetailStatisticsInfo.ownerName,
link: $that.dataReportEarnedDetailStatisticsInfo.link,
pagePath:'dataReportEarnedDetailStatistics'
}
};
//发送get请求
vc.http.apiGet('/export.exportData', param,
function(json, res) {
let _json = JSON.parse(json);
vc.toast(_json.msg);
if (_json.code == 0) {
vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心')
}
},
function(errInfo, error) {
console.log('请求失败处理');
});
},
}
});
})(window.vc);

View File

@ -1,18 +1,11 @@
<div class="margin-top">
<div class="row margin-top-lg">
<!-- <div class="col-lg-2 padding-right-xs padding-left-xl">
<input v-model="dataReportEarnedStatisticsInfo.roomNum" type="text" :placeholder="vc.i18n('请填写房屋编号','dataReportEarnedStatistics')" class="form-control">
</div>
<div class="col-lg-2 padding-right-xs padding-right-xl">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-on:click="_qureyDataReportEarnedStatistics()">
<i class="fa fa-search"></i>查询
</button>
</div>
<div class="col-lg-8 text-right">
</div> -->
<div class="text-right">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_exportReportEarnedExcel()">
<i class="fa fa-plus"></i>
<span>
<vc:i18n name="导出" namespace="dataReportEarnedStatistics"></vc:i18n>
</span>
</button>
</div>
<div class="margin-top">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
@ -50,8 +43,8 @@
{{fee.receivedFee}}
</td>
<template v-for="(item,index) in dataReportEarnedStatisticsInfo.feeTypeCds">
<td class="text-center" >
{{fee['oweFee'+item.statusCd] || 0}}
<td class="text-center">
{{fee['receivedFee'+item.statusCd] || 0}}
</td>
</template>
</tr>
@ -60,7 +53,9 @@
<!-- 分页 -->
<div class="row">
<div class="col-sm-4">
<span><vc:i18n name="总实收:" namespace="dataReportEarnedStatistics"></vc:i18n> </span><span>{{dataReportEarnedStatisticsInfo.feeAmount}}</span>
<span>
<vc:i18n name="总实收:" namespace="dataReportEarnedStatistics"></vc:i18n>
</span><span>{{dataReportEarnedStatisticsInfo.feeAmount}}</span>
</div>
<div class="col-sm-8">
<vc:create namespace="dataReportEarnedStatistics" path="frame/paginationPlus"></vc:create>

View File

@ -76,6 +76,28 @@
_qureyDataReportEarnedStatistics: function() {
$that._loadDataReportEarnedStatisticsData(DEFAULT_PAGE, DEFAULT_ROWS);
},
_exportReportEarnedExcel: function() {
let param = {
params: {
communityId: vc.getCurrentCommunity().communityId,
startDate: $that.dataReportEarnedStatisticsInfo.startDate,
endDate: $that.dataReportEarnedStatisticsInfo.endDate,
pagePath:'dataReportEarnedStatistics'
}
};
//发送get请求
vc.http.apiGet('/export.exportData', param,
function(json, res) {
let _json = JSON.parse(json);
vc.toast(_json.msg);
if (_json.code == 0) {
vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心')
}
},
function(errInfo, error) {
console.log('请求失败处理');
});
},
}
});
})(window.vc);