加入账单功能

This commit is contained in:
java110 2020-06-01 17:40:37 +08:00
parent c13ed2c285
commit 1b37495549
2 changed files with 199 additions and 0 deletions

View File

@ -0,0 +1,116 @@
<div class=" animated fadeInRight ecommerce">
<div class="row" >
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<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()">{{activitiesManageInfo.moreCondition == true?'隐藏':'更多'}}
</button>
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" placeholder="请输入标题" v-model="activitiesManageInfo.conditions.title"
class=" form-control">
</div>
</div>
<div class="col-sm-4">
<select class="custom-select" v-model="activitiesManageInfo.conditions.typeCd">
<option selected value="">请选择信息类型</option>
<option v-for="(item,index) in activitiesManageInfo.typeCds" :key="index"
v-bind:value="item.statusCd">{{item.name}}
</option>
</select></div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="请输入员工名称"
v-model="activitiesManageInfo.conditions.userName" class=" form-control">
</div>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryActivitiesMethod()">
<i class="fa fa-search"></i> 查询
</button>
</div>
</div>
<div class="row">
<div class="col-sm-4" v-if="activitiesManageInfo.moreCondition == true">
<div class="form-group">
<input type="text" placeholder="请输入信息ID"
v-model="activitiesManageInfo.conditions.activitiesId" class=" form-control">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" v-bind:class="{no_display:activitiesManageInfo.componentShow != 'activitiesList'}">
<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">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<!-- <th class="text-center">信息ID</th> -->
<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>
<th class="text-center">账单日期</th>
<th class="text-center">收费项目</th>
<th class="text-center">账单类型</th>
<th class="text-right">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="activities in activitiesManageInfo.activitiess">
<td class="text-center">{{activities.billId}}</td>
<td class="text-center">{{activities.billName}}</td>
<td class="text-center">{{activities.receivable}}元</td>
<td class="text-center">{{activities.curReceivable}}元</td>
<td class="text-center">{{activities.billTime}}元</td>
<td class="text-center">{{activities.configName}}</td>
<td class="text-center">{{activities.curBill == 'T'?'当前账单':'历史账单'}}</td>
<td class="text-right">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openBillDetail(activities)">欠费清单
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,83 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
billManageInfo: {
bills: [],
total: 0,
records: 1,
moreCondition: false,
title: '',
conditions: {
title: '',
typeCd: '',
userName: '',
billId: '',
}
}
},
_initMethod: function () {
$that._listbills(DEFAULT_PAGE,DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('billManage', 'listbill', function (_param) {
vc.component.billManageInfo.componentShow = 'billList';
vc.component._listbills(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
vc.component._listbills(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listbills: function (_page, _rows) {
vc.component.billManageInfo.conditions.page = _page;
vc.component.billManageInfo.conditions.row = _rows;
vc.component.billManageInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
var param = {
params: vc.component.billManageInfo.conditions
};
//发送get请求
vc.http.apiGet('billManage',
param,
function (json, res) {
var _billManageInfo = JSON.parse(json);
vc.component.billManageInfo.total = _billManageInfo.total;
vc.component.billManageInfo.records = _billManageInfo.records;
vc.component.billManageInfo.bills = _billManageInfo.data;
vc.emit('pagination', 'init', {
total: vc.component.billManageInfo.records,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openBillDetail: function () {
},
_querybillMethod: function () {
vc.component._listbills(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if (vc.component.billManageInfo.moreCondition) {
vc.component.billManageInfo.moreCondition = false;
} else {
vc.component.billManageInfo.moreCondition = true;
}
}
}
});
})(window.vc);