优化缴费缴费

This commit is contained in:
java110 2020-08-03 18:58:17 +08:00
parent b75a85fe13
commit c63db476f5
5 changed files with 202 additions and 20 deletions

View File

@ -5,18 +5,15 @@
<h5>物品信息</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" v-if="viewResourceStoreInfo2.index != 2" class="btn btn-primary btn-sm"
style="margin-right:10px;" v-on:click="_openSelectResourceStoreInfoModel()">
style="margin-right:10px;" v-on:click="_openSelectResourceStoreInfoModel()">
<i class="fa fa-search"></i> 选择物品
</button>
</div>
</div>
<div class="ibox-content">
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny"
data-page-size="15"
>
<thead>
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">物品名称</th>
<th class="text-center">物品编码</th>
@ -27,37 +24,35 @@
</tr>
</thead>
<tbody>
</thead>
<tbody>
<tr v-for="resourceStore in viewResourceStoreInfo2.resourceStores">
<td class="text-center">{{resourceStore.resName}}</td>
<td class="text-center">{{resourceStore.resCode}}</td>
<td class="text-center">{{resourceStore.price}}</td>
<td class="text-center">{{resourceStore.stock}}</td>
<td class="text-center">
<input v-model="resourceStore.quantity" type="number"
placeholder="必填,请填写申请数量" class="form-control">
<input v-model="resourceStore.quantity" type="number" placeholder="必填,请填写申请数量"
class="form-control">
</td>
<td class="text-center">
<input v-model="resourceStore.remark" type="text" class="form-control">
</td>
</tr>
</tbody>
<tfoot>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
</tfoot>
</table>
</div>
</div>
<vc:create path="common/chooseResourceStore2" emitChooseResourceStore="viewResourceStoreInfo"
emitLoadData="viewResourceStoreInfo"></vc:create>
</div>
<vc:create path="common/chooseResourceStore2"
emitChooseResourceStore="viewResourceStoreInfo"
emitLoadData="viewResourceStoreInfo"
></vc:create>
</div>
</div>
</div>

View File

@ -5,6 +5,10 @@
<div class="ibox-title">
<h5>{{listRoomCreateFeeInfo.roomName}}费用</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_toOwnerPayFee()">
欠费缴费
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_goBack()">
返回

View File

@ -81,6 +81,9 @@
},
_goBack:function(){
vc.goBack();
},
_toOwnerPayFee:function(){
vc.jumpToPage('/admin.html#/pages/property/owePayFeeOrder?payObjId='+$that.listRoomCreateFeeInfo.roomId+"&payObjType=3333");
}
}

View 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">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">费用类型</th>
<th class="text-center">费用项目</th>
<th class="text-center">费用ID</th>
<th class="text-center">到期时间</th>
<th class="text-center">欠费金额</th>
</tr>
</thead>
<tbody>
<tr v-for="oweFee in owePayFeeOrderInfo.oweFees">
<td class="text-center">{{oweFee.feeTypeCdName}}</td>
<td class="text-center">{{oweFee.feeName}}</td>
<td class="text-center">{{oweFee.feeId}}</td>
<td class="text-center">{{oweFee.endTime}}</td>
<td class="text-center">{{oweFee.feePrice}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-9"></div>
<div class="col-md-2">
缴费金额:<span style="font-size: 30px; color: red; padding-left: 0px;">{{owePayFeeOrderInfo.feePrices}}元</span>
</div>
<div class="col-md-1 " style="margin-bottom:10px; text-align:right">
<button type="button" class="btn btn-warning btn-lg btn-block"
style="margin-left:10px;" v-on:click="_payFee()">缴费
</button>
</div>
</div>
<div id="payFeeResult" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">缴费提示</h5>
<button type="button " class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>缴费成功</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" @click="_back()">返回</button>
<button type="button" class="btn btn-primary" @click="_printAndBack()">打印收据</button>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,102 @@
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
owePayFeeOrderInfo: {
oweFees: [],
feePrices: 0.00,
communityId: vc.getCurrentCommunity().communityId,
payObjId:'',
payObjType:''
}
},
_initMethod: function () {
let _payObjId = vc.getParam('payObjId');
let _payObjType = vc.getParam('payObjType');
if(!vc.notNull(_payObjId)){
vc.toast('非法操作');
vc.getBack();
return ;
}
$that.owePayFeeOrderInfo.payObjId = _payObjId;
$that.owePayFeeOrderInfo.payObjType = _payObjType;
$that._loadOweFees();
},
_initEvent: function () {
},
methods: {
_loadOweFees:function(){
var param = {
params:{
page:1,
row:50,
communityId:vc.getCurrentCommunity().communityId,
payObjId:$that.owePayFeeOrderInfo.payObjId,
payObjType:$that.owePayFeeOrderInfo.payObjType,
}
};
//发送get请求
vc.http.apiGet('/feeApi/listOweFees',
param,
function(json){
var _json = JSON.parse(json);
let _fees = _json.data;
if(_fees.length < 1){
vc.toast('当前没有欠费数据');
return ;
}
$that.owePayFeeOrderInfo.oweFees = _fees;
let totalFee = 0.00;
$that.owePayFeeOrderInfo.oweFees.forEach(item => {
totalFee += item.feePrice;
});
$that.owePayFeeOrderInfo.feePrices = Math.round(totalFee*100,2)/100;
},function(){
console.log('请求失败处理');
}
);
},
_payFee: function (_page, _row) {
vc.toast('缴费暂不开放');
return ;
vc.http.post(
'propertyPay',
'payFee',
JSON.stringify(vc.component.payFeeOrderInfo),
{
emulateJSON: true
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
//关闭model
$("#payFeeResult").modal({
backdrop: "static",//点击空白处不关闭对话框
show: true
});
return;
}
vc.toast(json);
},
function (errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
});
},
_back: function () {
$('#payFeeResult').modal("hide");
vc.getBack();
},
_printAndBack: function () {
$('#payFeeResult').modal("hide");
vc.getBack();
}
}
});
})(window.vc);