mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
完成欠费功能
This commit is contained in:
parent
a300af952b
commit
68f9d6b4a5
@ -0,0 +1,6 @@
|
||||
<!-- 弹出层 modal -->
|
||||
<div class="bg-white margin-top-xs padding border-radius tree-div">
|
||||
<div id="jstree_communityFloorTreeDiv">
|
||||
</div>
|
||||
<!-- end 弹出层 moda -->
|
||||
</div>
|
||||
@ -0,0 +1,84 @@
|
||||
(function (vc) {
|
||||
let DEFAULT_PAGE = 1;
|
||||
let DEFAULT_ROW = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
communityFloorTreeInfo: {
|
||||
units: [],
|
||||
callName: ''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('communityFloorTree', 'initCommunityFloorTree', function (_param) {
|
||||
$that.communityFloorTreeInfo.callName = _param.callName;
|
||||
$that._loadCommunityFloorTree();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_loadCommunityFloorTree: function () {
|
||||
let param = {
|
||||
params: {
|
||||
hc:1.8
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/community.queryCommunityFloorTree',
|
||||
param,
|
||||
function (json) {
|
||||
let _json = JSON.parse(json);
|
||||
$that.communityFloorTreeInfo.units = _json.data;
|
||||
$that._initJsTreeCommunityFloorTree();
|
||||
},
|
||||
function () {
|
||||
console.log('请求失败处理');
|
||||
});
|
||||
},
|
||||
_initJsTreeCommunityFloorTree: function () {
|
||||
let _data = $that.communityFloorTreeInfo.units;
|
||||
$.jstree.destroy()
|
||||
$("#jstree_communityFloorTreeDiv").jstree({
|
||||
"checkbox": {
|
||||
"keep_selected_style": false
|
||||
},
|
||||
'state': { //一些初始化状态
|
||||
"opened": true,
|
||||
},
|
||||
'core': {
|
||||
"check_callback": true,
|
||||
'data': _data
|
||||
}
|
||||
});
|
||||
$("#jstree_communityFloorTreeDiv").on("ready.jstree", function (e, data) {
|
||||
$('#jstree_communityFloorTreeDiv').jstree('select_node', _data[0].children[0].id /* , true */);
|
||||
});
|
||||
$('#jstree_communityFloorTreeDiv').on("changed.jstree", function (e, data) {
|
||||
if (data.action == 'model' || data.action == 'ready') {
|
||||
return;
|
||||
}
|
||||
let _selected = data.selected[0];
|
||||
if (_selected.startsWith('c_')) {
|
||||
vc.emit($that.communityFloorTreeInfo.callName, 'selectCommunity', {
|
||||
communityName: data.node.original.communityName,
|
||||
communityId: data.node.original.communityId
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (_selected.startsWith('f_')) {
|
||||
vc.emit($that.communityFloorTreeInfo.callName, 'selectFloor', {
|
||||
floorNum: data.node.original.floorNum,
|
||||
floorId: data.node.original.floorId
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
});
|
||||
$('#jstree_communityFloorTreeDiv')
|
||||
.on('click', '.jstree-anchor', function (e) {
|
||||
$(this).jstree(true).toggle_node(e.target);
|
||||
})
|
||||
},
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
186
public/pages/fee/adminOweFeeDetail/adminOweFeeDetail.html
Normal file
186
public/pages/fee/adminOweFeeDetail/adminOweFeeDetail.html
Normal file
@ -0,0 +1,186 @@
|
||||
<div class=" animated fadeInRight ecommerce">
|
||||
|
||||
<div class="flex justify-start">
|
||||
<div style="padding-right:0px;width: 200px;" class="room-floor-unit-tree">
|
||||
<vc:create path="community/communityFloorTree"></vc:create>
|
||||
</div>
|
||||
<div class="margin-top-xs margin-left-sm" style="flex-grow: 1;">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<vc:i18n name="查询条件" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-2">
|
||||
<select class="form-control-md form-control input-s-sm inline"
|
||||
v-model="adminOweFeeDetailInfo.conditions.feeTypeCd">
|
||||
<option selected value="">{{vc.i18n('请选择费用大类','reportFeeSummary')}}</option>
|
||||
<option v-for="(item,index) in adminOweFeeDetailInfo.feeTypeCds" :key="index"
|
||||
v-bind:value="item.statusCd">
|
||||
{{item.name}}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写房屋编号','adminOweFeeDetail')"
|
||||
class="form-control form-control-md"
|
||||
v-model="adminOweFeeDetailInfo.conditions.objNameLike">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group input-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择开始时间','adminOweFeeDetail')"
|
||||
v-model="adminOweFeeDetailInfo.conditions.startTime"
|
||||
class=" form-control startTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group input-group">
|
||||
<input type="text" :placeholder="vc.i18n('请选择结束时间','adminOweFeeDetail')"
|
||||
v-model="adminOweFeeDetailInfo.conditions.endTime" class=" form-control endTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写业主名称','adminOweFeeDetail')"
|
||||
class="form-control form-control-md"
|
||||
v-model="adminOweFeeDetailInfo.conditions.ownerNameLike">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button type="button" class="btn btn-primary btn-md" v-on:click="_queryMethod()">
|
||||
<vc:i18n name="查询" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</button>
|
||||
<button type="button" class="btn btn-info btn-md" v-on:click="_resetMethod()"
|
||||
style="margin-left: 20px;">
|
||||
<vc:i18n name="重置" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<vc:i18n name="欠费明细表" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<!-- <button type="button" class="btn btn-primary btn-sm" v-on:click="_exportExcel()">
|
||||
<i class="fa fa-plus"></i>
|
||||
<span>
|
||||
<vc:i18n name="导出" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</span>
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="费用编号" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="房号" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="业主" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="业主电话" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="面积" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="费用项" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="开始时间" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="结束时间" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="欠费时长(天)" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<vc:i18n name="欠费金额" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(fee,index) in adminOweFeeDetailInfo.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.ownerTel}}</td>
|
||||
<td class="text-center">{{fee.builtUpArea}}</td>
|
||||
<td class="text-center">{{fee.feeName}}</td>
|
||||
<td class="text-center">{{fee.startTime}}</td>
|
||||
<td class="text-center">{{fee.endTime}}</td>
|
||||
<td class="text-center">{{fee.oweDay}}</td>
|
||||
<td class="text-center">{{fee.oweAmount}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<div class="row">
|
||||
<span class="col-md-1 margin-left">
|
||||
<div class="row">
|
||||
<b>
|
||||
<vc:i18n name="小计" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</b>
|
||||
</div>
|
||||
<div class="row">
|
||||
<b>
|
||||
<vc:i18n name="大计" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</b>
|
||||
</div>
|
||||
</span>
|
||||
<span class="col-md-2">
|
||||
<div class="row">
|
||||
<span>
|
||||
<vc:i18n name="欠费" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</span>: {{adminOweFeeDetailInfo.totalPreferentialAmount}}
|
||||
<span>
|
||||
<vc:i18n name="元" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<span>
|
||||
<vc:i18n name="欠费" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</span>: {{adminOweFeeDetailInfo.allOweAmount}}
|
||||
<span>
|
||||
<vc:i18n name="元" namespace="adminOweFeeDetail"></vc:i18n>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div>
|
||||
费用开始时间:所创建费用的计费起始时间
|
||||
</div>
|
||||
<div>欠费时长(天):押金费用项欠费时长是费用开始时间到当天的天数</div>
|
||||
<div>除押金外的费用项欠费时长是费用的开始时间到费用的结束时间的天数</div>
|
||||
<div>欠费金额:欠费周期内应缴费用</div>
|
||||
</div>
|
||||
<div class="col-md-6 text-center">
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
132
public/pages/fee/adminOweFeeDetail/adminOweFeeDetail.js
Normal file
132
public/pages/fee/adminOweFeeDetail/adminOweFeeDetail.js
Normal file
@ -0,0 +1,132 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
adminOweFeeDetailInfo: {
|
||||
fees: [],
|
||||
floors: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
title: '',
|
||||
feeTypeCds: [],
|
||||
communitys:[],
|
||||
totalPreferentialAmount: 0.0,
|
||||
allOweAmount: 0.0,
|
||||
conditions: {
|
||||
floorId: '',
|
||||
floorName: '',
|
||||
roomNum: '',
|
||||
objNameLike: '',
|
||||
feeTypeCd: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
communityId: '',
|
||||
ownerNameLike:'',
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.emit('communityFloorTree', 'initCommunityFloorTree',{
|
||||
callName:'adminOweFeeDetail'
|
||||
})
|
||||
vc.initDate('startTime',function(_value){
|
||||
$that.adminOweFeeDetailInfo.conditions.startTime = _value;
|
||||
});
|
||||
vc.initDate('endTime',function(_value){
|
||||
$that.adminOweFeeDetailInfo.conditions.endTime = _value;
|
||||
});
|
||||
vc.getDict('pay_fee_config', "fee_type_cd", function (_data) {
|
||||
$that.adminOweFeeDetailInfo.feeTypeCds = _data
|
||||
});
|
||||
$that._listOweFees(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('adminOweFeeDetail', 'selectCommunity', function (_param) {
|
||||
$that.adminOweFeeDetailInfo.conditions.communityId = _param.communityId;
|
||||
$that.adminOweFeeDetailInfo.conditions.floorId = '';
|
||||
$that._listOweFees(DEFAULT_PAGE,DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('adminOweFeeDetail', 'selectFloor', function (_param) {
|
||||
$that.adminOweFeeDetailInfo.conditions.communityId = '';
|
||||
$that.adminOweFeeDetailInfo.conditions.floorId = _param.floorId;
|
||||
$that._listOweFees(DEFAULT_PAGE,DEFAULT_ROWS);
|
||||
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
$that._listOweFees(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//查询
|
||||
_queryMethod: function () {
|
||||
$that._listOweFees(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
//重置
|
||||
_resetMethod: function () {
|
||||
$that._resetFees(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
//查询方法
|
||||
_listOweFees: function (_page, _rows) {
|
||||
$that.adminOweFeeDetailInfo.conditions.page = _page;
|
||||
$that.adminOweFeeDetailInfo.conditions.row = _rows;
|
||||
let param = {
|
||||
params: $that.adminOweFeeDetailInfo.conditions
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/fee.queryAdminOweFeeDetail',
|
||||
param,
|
||||
function (json, res) {
|
||||
let _json = JSON.parse(json);
|
||||
$that.adminOweFeeDetailInfo.total = _json.total;
|
||||
$that.adminOweFeeDetailInfo.records = _json.records;
|
||||
$that.adminOweFeeDetailInfo.fees = _json.data;
|
||||
//计算小计
|
||||
let _totalPreferentialAmount = 0.0;
|
||||
_json.data.forEach(item => {
|
||||
_totalPreferentialAmount += parseFloat(item.oweAmount);
|
||||
});
|
||||
$that.adminOweFeeDetailInfo.totalPreferentialAmount = _totalPreferentialAmount.toFixed(2);
|
||||
if (_json.data.length > 0) {
|
||||
$that.adminOweFeeDetailInfo.allOweAmount = _json.data[0].allOweAmount;
|
||||
} else {
|
||||
$that.adminOweFeeDetailInfo.allOweAmount = 0.0.toFixed(2);
|
||||
}
|
||||
vc.emit('pagination', 'init', {
|
||||
total: $that.adminOweFeeDetailInfo.records,
|
||||
dataCount: $that.adminOweFeeDetailInfo.total,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
//重置方法
|
||||
_resetFees: function (_page, _rows) {
|
||||
$that.adminOweFeeDetailInfo.conditions.floorName = "";
|
||||
$that.adminOweFeeDetailInfo.conditions.floorId = "";
|
||||
$that.adminOweFeeDetailInfo.conditions.objName = "";
|
||||
$that.adminOweFeeDetailInfo.conditions.startTime = "";
|
||||
$that.adminOweFeeDetailInfo.conditions.endTime = "";
|
||||
$that.adminOweFeeDetailInfo.roomUnits = [];
|
||||
$that._listOweFees(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if ($that.adminOweFeeDetailInfo.moreCondition) {
|
||||
$that.adminOweFeeDetailInfo.moreCondition = false;
|
||||
} else {
|
||||
$that.adminOweFeeDetailInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
// _exportExcel: function () {
|
||||
// vc.jumpToPage('/callComponent/exportReportFee/exportData?pagePath=adminOweFeeDetail&' + vc.objToGetParam($that.adminOweFeeDetailInfo.conditions));
|
||||
// },
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user