mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
561720f510
commit
63467ae5e6
@ -0,0 +1,35 @@
|
||||
<div>
|
||||
<div class="margin-top">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 margin-lr-0 padding-lr-0">
|
||||
<table class="footable table table-stripped " style="margin-top:10px" data-page-size="10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center " style="border-bottom: none;">楼栋号</th>
|
||||
<th class="text-center" style="border-bottom: none;">总未收金额(截止{{reportHuaningOweFeeInfo.dateStr}})</th>
|
||||
<th class="text-center " style="border-bottom: none;">{{_getCurYear()}}未收金额</th>
|
||||
<th class="text-center " style="border-bottom: none;">{{_getPreCurYear()}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="fee in reportHuaningOweFeeInfo.fees">
|
||||
<td class="text-center ">{{fee.floorNum}}</td>
|
||||
<td class="text-center ">{{fee.oweAmount}}</td>
|
||||
<td class="text-center ">{{fee.curOweAmount}}</td>
|
||||
<td class="text-center">{{_getPreAmount(fee)}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-5">
|
||||
<span> </span>
|
||||
</div>
|
||||
<div class="col-sm-7 float-right">
|
||||
<vc:create namespace="reportHuaningOweFee" path="frame/paginationPlus"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<vc:create path="property/viewFeeDetail"></vc:create>
|
||||
</div>
|
||||
@ -0,0 +1,122 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
reportHuaningOweFeeInfo: {
|
||||
fees: [],
|
||||
listColumns: [],
|
||||
roomId: '',
|
||||
roomName: '',
|
||||
conditions: {},
|
||||
dateStr: vc.dateFormat(new Date().getTime())
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
},
|
||||
_initEvent: function () {
|
||||
//切换 至费用页面
|
||||
vc.on('reportHuaningOweFee', 'switch', function (_param) {
|
||||
$that.clearReportProficientRoomFeeInfo();
|
||||
$that.reportHuaningOweFeeInfo.conditions = _param;
|
||||
console.log($that.reportHuaningOweFeeInfo.conditions)
|
||||
$that._listReportProficientRoomFee(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('reportHuaningOweFee', 'notify', function () {
|
||||
$that._listReportProficientRoomFee(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('reportHuaningOweFee', 'paginationPlus', 'page_event',
|
||||
function (_currentPage) {
|
||||
vc.component._listReportProficientRoomFee(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listReportProficientRoomFee: function (_page, _row) {
|
||||
$that.reportHuaningOweFeeInfo.conditions.page = _page;
|
||||
$that.reportHuaningOweFeeInfo.conditions.row = _row;
|
||||
$that.reportHuaningOweFeeInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
|
||||
$that.reportHuaningOweFeeInfo.conditions.objType = '3333'
|
||||
let param = {
|
||||
params: $that.reportHuaningOweFeeInfo.conditions
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/reportFeeMonthStatistics/queryHuaningOweFee',
|
||||
param,
|
||||
function (json) {
|
||||
let _feeConfigInfo = JSON.parse(json);
|
||||
vc.component.reportHuaningOweFeeInfo.total = _feeConfigInfo.total;
|
||||
vc.component.reportHuaningOweFeeInfo.records = _feeConfigInfo.records;
|
||||
vc.component.reportHuaningOweFeeInfo.fees = _feeConfigInfo.data;
|
||||
vc.emit('reportHuaningOweFee', 'paginationPlus', 'init', {
|
||||
total: _feeConfigInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
//取 属性列
|
||||
if (_feeConfigInfo.total < 1) {
|
||||
return;
|
||||
}
|
||||
$that.reportHuaningOweFeeInfo.listColumns = [];
|
||||
if (_feeConfigInfo.data.length > 0) {
|
||||
let _reportFeeYearCollectionDetailDtos = _feeConfigInfo.data[0].reportFeeYearCollectionDetailDtos;
|
||||
_reportFeeYearCollectionDetailDtos.forEach(item => {
|
||||
$that.reportHuaningOweFeeInfo.listColumns.push(item.collectionYear + "年")
|
||||
})
|
||||
}
|
||||
}, function () {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_getAttrValue: function (_attrs, _specCd) {
|
||||
let _value = "";
|
||||
_attrs.forEach(item => {
|
||||
if (item.specCd == _specCd) {
|
||||
_value = item.value;
|
||||
return;
|
||||
}
|
||||
});
|
||||
return _value;
|
||||
},
|
||||
clearReportProficientRoomFeeInfo: function () {
|
||||
$that.reportHuaningOweFeeInfo = {
|
||||
fees: [],
|
||||
roomId: '',
|
||||
roomName: '',
|
||||
name: '',
|
||||
dateStr: vc.dateFormat(new Date().getTime())
|
||||
}
|
||||
},
|
||||
dealReportProficientRoomFeeAttr: function (owners) {
|
||||
},
|
||||
_showFeeDetail: function (fee, item) {
|
||||
console.log(fee, item)
|
||||
vc.emit('viewFeeDetail', 'listFeeDetail', {
|
||||
roomName: fee.objName,
|
||||
feeId: fee.feeId,
|
||||
configId: fee.configId,
|
||||
payerObjId: fee.objId,
|
||||
curYear: item.collectionYear
|
||||
})
|
||||
},
|
||||
_getCurYear: function () {
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
|
||||
return year + "年1-" + month + "月";
|
||||
},
|
||||
_getPreCurYear: function () {
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
|
||||
return year + "年前未收金额";
|
||||
},
|
||||
_getPreAmount:function(_fee){
|
||||
return parseFloat(_fee.oweAmount) - parseFloat(_fee.curOweAmount);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
78
public/pages/property/reportHuaning/reportHuaning.html
Normal file
78
public/pages/property/reportHuaning/reportHuaning.html
Normal file
@ -0,0 +1,78 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>查询条件</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<!--费用类型-->
|
||||
<div class="col-sm-3">
|
||||
<select class="custom-select" v-model="reportHuaningInfo.conditions.feeTypeCd"
|
||||
@click="_changeReporficientFeeTypeCd()">
|
||||
<option selected value="">请选择收费类型</option>
|
||||
<option v-for="(item,index) in reportHuaningInfo.feeTypeCds" :key="index"
|
||||
v-bind:value="item.statusCd">{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<!-- @click="_changeReporficientConfigId()"-->
|
||||
<select class="form-control-md form-control input-s-sm inline"
|
||||
v-model="reportHuaningInfo.conditions.configId">
|
||||
<option selected value="">请选择收费项</option>
|
||||
<option v-for="(item,index) in reportHuaningInfo.feeConfigDtos" :key="index"
|
||||
:value="item.configId">
|
||||
{{item.feeName}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control form-control-md"
|
||||
:placeholder="_getReportProficientRoomName()"
|
||||
v-model="reportHuaningInfo.conditions.objName">
|
||||
</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;">
|
||||
<i class="fa fa-repeat"></i>重置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="white-bg margin-top padding-lg">
|
||||
<div class="">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:reportHuaningInfo._currentTab == 'reportHuaningOweFee'}"
|
||||
v-on:click="changeTab('reportHuaningOweFee')">未收情况表</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" v-bind:class="{active:reportHuaningInfo._currentTab == 'reportHuaningCarFee'}"
|
||||
v-on:click="changeTab('reportHuaningCarFee')">当月收费情况表</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-if="reportHuaningInfo._currentTab == 'reportHuaningOweFee'">
|
||||
<vc:create path="property/reportHuaningOweFee"></vc:create>
|
||||
</div>
|
||||
<!--
|
||||
<div v-if="reportHuaningInfo._currentTab == 'reportHuaningCarFee'">
|
||||
<vc:create path="property/reportHuaningCarFee"></vc:create>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
101
public/pages/property/reportHuaning/reportHuaning.js
Normal file
101
public/pages/property/reportHuaning/reportHuaning.js
Normal file
@ -0,0 +1,101 @@
|
||||
(function (vc) {
|
||||
vc.extends({
|
||||
data: {
|
||||
reportHuaningInfo: {
|
||||
receivableAmount: '0',
|
||||
noEnterRoomCount: '0',
|
||||
roomCount: '0',
|
||||
freeRoomCount: '0',
|
||||
parkingSpaceCount: '0',
|
||||
freeParkingSpaceCount: '0',
|
||||
shopCount: '0',
|
||||
freeShopCount: '0',
|
||||
_currentTab: 'reportHuaningOweFee',
|
||||
feeTypeCds: [],
|
||||
feeConfigDtos: [],
|
||||
conditions: {
|
||||
configId: '',
|
||||
feeTypeCd: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
objName: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component.changeTab($that.reportHuaningInfo._currentTab);
|
||||
//关联字典表费用类型
|
||||
vc.getDict('pay_fee_config', "fee_type_cd", function (_data) {
|
||||
vc.component.reportHuaningInfo.feeTypeCds = _data;
|
||||
});
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on("indexContext", "_queryIndexContextData", function (_param) {
|
||||
vc.component._queryIndexContextData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
changeTab: function (_tab) {
|
||||
$that.reportHuaningInfo._currentTab = _tab;
|
||||
vc.emit(_tab, 'switch', $that.reportHuaningInfo.conditions)
|
||||
},
|
||||
_changeReporficientFeeTypeCd: function () {
|
||||
let param = {
|
||||
params: {
|
||||
page: 1,
|
||||
row: 50,
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
feeTypeCd: $that.reportHuaningInfo.conditions.feeTypeCd,
|
||||
isDefault: '',
|
||||
feeFlag: '',
|
||||
valid: '1'
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.get('roomCreateFeeAdd', 'list', param,
|
||||
function (json, res) {
|
||||
var _feeConfigManageInfo = JSON.parse(json);
|
||||
let _feeConfigs = _feeConfigManageInfo.feeConfigs
|
||||
vc.component.reportHuaningInfo.feeConfigDtos = _feeConfigs;
|
||||
/*if (_feeConfigs.length > 0) {
|
||||
$that.reportHuaningInfo.conditions.configId = _feeConfigs[0].configId;
|
||||
//$that.changeTab($that.reportHuaningInfo._currentTab)
|
||||
}*/
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
});
|
||||
},
|
||||
_changeReporficientConfigId: function () {
|
||||
$that.changeTab($that.reportHuaningInfo._currentTab)
|
||||
},
|
||||
_queryMethod: function () {
|
||||
$that.changeTab($that.reportHuaningInfo._currentTab)
|
||||
},
|
||||
_resetMethod: function () {
|
||||
vc.component.reportHuaningInfo.conditions.feeTypeCd = "";
|
||||
vc.component.reportHuaningInfo.conditions.configId = "";
|
||||
vc.component.reportHuaningInfo.conditions.objName = "";
|
||||
$that.changeTab($that.reportHuaningInfo._currentTab)
|
||||
},
|
||||
_getReportProficientRoomName: function () {
|
||||
if (vc.component.reportHuaningInfo == undefined) {
|
||||
return '请填写房屋编号';
|
||||
}
|
||||
if (vc.component.reportHuaningInfo._currentTab == 'reportHuaningRoomFee') {
|
||||
return '请填写房屋编号'
|
||||
}
|
||||
return '请填写车牌号';
|
||||
},
|
||||
_exportFee: function () {
|
||||
let _objType = vc.component.reportHuaningInfo._currentTab == 'reportHuaningRoomFee' ? "3333" : "6666"
|
||||
vc.jumpToPage('/callComponent/exportReportFee/exportData?communityId='
|
||||
+ vc.getCurrentCommunity().communityId
|
||||
+ "&configId=" + $that.reportHuaningInfo.conditions.configId
|
||||
+ "&feeTypeCd=" + $that.reportHuaningInfo.conditions.feeTypeCd
|
||||
+ "&objType=" + _objType
|
||||
+ "&pagePath=reportYearCollection");
|
||||
}
|
||||
}
|
||||
})
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user