加入 收费统计

This commit is contained in:
java110 2022-08-31 02:18:32 +08:00
parent 51adc3b40c
commit 6361612dad
3 changed files with 141 additions and 0 deletions

View File

@ -0,0 +1,18 @@
<div class="margin-top">
<div class="row margin-top-lg">
<div class="col-lg-2 padding-right-xs padding-left-xl">
<input v-model="parkingAreaControlPaymentSummaryInfo.startTime" type="text" :placeholder="vc.i18n('请填写开始时间','parkingAreaControlPaymentSummary')" class="form-control paymentSummaryStartTime">
</div>
<div class="col-lg-2 padding-right-xs padding-left-xl">
<input v-model="parkingAreaControlPaymentSummaryInfo.endTime" type="text" :placeholder="vc.i18n('请填写开始时间','parkingAreaControlPaymentSummary')" class="form-control paymentSummaryEndTime">
</div>
<div class="col-lg-2 padding-right-xs padding-right-xl text-right">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-on:click="_qureyParkingAreaControlPayment()">
查询
</button>
</div>
</div>
<div class="margin-top">
<div id="paymentSummary" style="width: 100%; height:300px"></div>
</div>
</div>

View File

@ -0,0 +1,114 @@
/**
入驻小区
**/
(function(vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
parkingAreaControlPaymentSummaryInfo: {
payments: [],
boxId: '',
startTime: '',
endTime: '',
}
},
_initMethod: function() {
vc.initDate('paymentSummaryStartTime', function(_value) {
$that.parkingAreaControlPaymentSummaryInfo.startTime = _value;
});
vc.initDate('paymentSummaryEndTime', function(_value) {
$that.parkingAreaControlPaymentSummaryInfo.endTime = _value;
})
},
_initEvent: function() {
vc.on('parkingAreaControlPaymentSummary', 'switch', function(_data) {
$that.parkingAreaControlPaymentSummaryInfo.boxId = _data.boxId;
$that._loadParkingAreaControlPaymentSummary(DEFAULT_PAGE, DEFAULT_ROWS);
});
},
methods: {
_loadParkingAreaControlPaymentSummary: function(_page, _row) {
let param = {
params: {
page: _page,
row: _row,
communityId: vc.getCurrentCommunity().communityId,
boxId: $that.parkingAreaControlPaymentSummaryInfo.boxId,
startTime: $that.parkingAreaControlPaymentSummaryInfo.startTime,
endTime: $that.parkingAreaControlPaymentSummaryInfo.endTime
}
};
//发送get请求
vc.http.apiGet('/carInoutPayment.listCarInoutPaymentSummary',
param,
function(json) {
let _feeConfigInfo = JSON.parse(json);
$that._initPaymentSummaryChart(_feeConfigInfo.data)
},
function() {
console.log('请求失败处理');
}
);
},
_qureyParkingAreaControlPayment: function() {
$that._loadParkingAreaControlPaymentSummary(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initPaymentSummaryChart: function(_data) {
let dom = document.getElementById("paymentSummary");
let myChart = echarts.init(dom);
let _createTime = [];
let _realChargeTotals = [];
_data.forEach(item => {
_createTime.push(item.createTime);
_realChargeTotals.push(item.realChargeTotal);
});
var app = {};
option = null;
option = {
title: {
text: '每日收费统计'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: _createTime
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: _createTime
},
yAxis: {
type: 'value'
},
series: [{
name: '收入金额',
type: 'line',
stack: 'Total',
data: _realChargeTotals
}]
};
if (option && typeof option === "object") {
myChart.setOption(option, true);
}
}
}
});
})(window.vc);

View File

@ -49,6 +49,11 @@
<span><vc:i18n name="剩余车位" namespace="parkingAreaControl"></vc:i18n></span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" v-bind:class="{active:parkingAreaControlInfo._currentTab == 'parkingAreaControlPaymentSummary'}" v-on:click="changeTab('parkingAreaControlPaymentSummary')">
<span><vc:i18n name="收费统计" namespace="parkingAreaControl"></vc:i18n></span>
</a>
</li>
</ul>
</div>
<div v-if="parkingAreaControlInfo._currentTab == 'parkingAreaControlCarInout'">
@ -78,6 +83,10 @@
<div v-if="parkingAreaControlInfo._currentTab == 'parkingAreaControlRemaining'">
<vc:create path="property/parkingAreaControlRemaining"></vc:create>
</div>
<div v-show="parkingAreaControlInfo._currentTab == 'parkingAreaControlPaymentSummary'">
<vc:create path="property/parkingAreaControlPaymentSummary"></vc:create>
</div>
</div>
<div class="col-md-3">
<vc:create path="property/parkingAreaControlFee"></vc:create>