提交退费申请页面

This commit is contained in:
曾成 2020-05-11 16:45:42 +08:00
parent 6fba2fc47b
commit e921a0adae
6 changed files with 405 additions and 2 deletions

View File

@ -0,0 +1,80 @@
<div id="returnPayFeeModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<h3 class="m-t-none m-b ">填写退费原因</h3>
<div class="ibox-content">
<div>
<div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">缴费ID</label>
<div class="col-sm-10">
<input v-model="returnFeeDetailInfo.detailId" type="text" readonly
placeholder="" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">周期(单位月)</label>
<div class="col-sm-10">
<input v-model="returnFeeDetailInfo.cycles" type="text" readonly
placeholder="" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">应收金额</label>
<div class="col-sm-10">
<input v-model="returnFeeDetailInfo.receivableAmount" type="text" readonly
placeholder="" class="form-control" />
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">实收金额</label>
<div class="col-sm-10">
<input v-model="returnFeeDetailInfo.receivedAmount" type="text" readonly
placeholder="" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">打折率</label>
<div class="col-sm-10">
<input v-model="returnFeeDetailInfo.primeRate" type="text" readonly
placeholder="" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">备注</label>
<div class="col-sm-10">
<input v-model="returnFeeDetailInfo.remark" type="text" readonly
placeholder="" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">缴费时间</label>
<div class="col-sm-10">
<input v-model="returnFeeDetailInfo.payTime" type="text" readonly
placeholder="" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label"><span style="color: red">*</span>退费原因</label>
<div class="col-sm-10">
<textarea placeholder="" class="form-control"
v-model="returnFeeDetailInfo.reason"></textarea></div>
</div>
<div class="ibox-content">
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
data-dismiss="modal">取消
</button>
<button v-on:click="submitReturnPayFee()" type="button" class="btn btn-primary float-right" style="margin-right:20px;">提交退费申请</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,109 @@
(function (vc, vm) {
vc.extends({
data: {
returnFeeDetailInfo:{
detailId:'',
cycles:'',
receivableAmount:'',
receivedAmount:'',
primeRate:'',
remark:'',
payTime:'',
reason:'',
communityId:'',
feeId:'',
feeTypeCd:''
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('returnPayFee', 'openReturnPayFeeModel', function (_params) {
vc.component.refreshFeeDetailInfo();
vc.component.pushReturnFeeDetailInfo(_params);
$('#returnPayFeeModel').modal('show');
});
},
methods: {
refreshFeeDetailInfo: function () {
vc.component.returnFeeDetailInfo = {
detailId:'',
cycles:'',
receivableAmount:'',
receivedAmount:'',
primeRate:'',
remark:'',
payTime:'',
reason:'',
communityId:'',
feeId:'',
feeTypeCd:'',
configId:''
}
},
pushReturnFeeDetailInfo:function (_params) {
console.log(_params);
vc.component.returnFeeDetailInfo.communityId = _params.communityId;
vc.component.returnFeeDetailInfo.payTime = _params.createTime;
vc.component.returnFeeDetailInfo.detailId = _params.detailId;
vc.component.returnFeeDetailInfo.cycles = _params.cycles;
vc.component.returnFeeDetailInfo.receivableAmount = _params.receivableAmount;
vc.component.returnFeeDetailInfo.receivedAmount = _params.receivedAmount;
vc.component.returnFeeDetailInfo.primeRate = _params.primeRate;
vc.component.returnFeeDetailInfo.feeId = _params.mainFeeInfo.feeId;
vc.component.returnFeeDetailInfo.feeTypeCd = _params.mainFeeInfo.feeTypeCd;
vc.component.returnFeeDetailInfo.remark = _params.remark;
vc.component.returnFeeDetailInfo.configId = _params.mainFeeInfo.configId;
},
returnPayFeeValidate: function () {
return vc.validate.validate({
returnFeeDetailInfo: vc.component.returnFeeDetailInfo
}, {
'returnFeeDetailInfo.reason': [
{
limit: "required",
param: "",
errInfo: "退费原因不能为空"
},
{
limit: "maxin",
param: "1,200",
errInfo: "退费原因不能超过200位"
},
]
});
},
submitReturnPayFee:function () {
if (!vc.component.returnPayFeeValidate()) {
vc.toast(vc.validate.errInfo);
return;
}
vc.http.apiPost(
'returnPayFee.saveReturnPayFee',
JSON.stringify(vc.component.returnFeeDetailInfo),
{
emulateJSON: true
},
function (json, res) {
if (res.status == 200) {
$('#returnPayFeeModel').modal('hide');
vc.component.refreshFeeDetailInfo();
vc.jumpToPage("/admin.html#/pages/property/returnPayFeeManage");
return;
}
vc.toast(json);
},
function (errInfo, error) {
vc.toast(errInfo);
});
}
}
});
})(window.vc, window.vc.component);

View File

@ -44,6 +44,7 @@
<th data-hide="phone">打折率</th>
<th data-hide="phone" >备注</th>
<th data-hide="phone">缴费时间</th>
<th data-hide="phone">操作</th>
</tr>
</thead>
<tbody>
@ -69,6 +70,14 @@
<td>
{{feeDetail.createTime}}
</td>
<td>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openRefundModel(feeDetail)">申请退费
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
@ -86,4 +95,5 @@
</div>
</div>
</div>
</div>
<vc:create path="property/returnPayFee"></vc:create>
</div>

View File

@ -81,7 +81,11 @@
},
queryFeeDetailMethod:function(){
vc.component.listFeeDetail(DEFAULT_PAGE,DEFAULT_ROW);
},
_openRefundModel:function (_feeDetail) {
_feeDetail.mainFeeInfo = vc.component.mainFeeInfo;
vc.emit('returnPayFee', 'openReturnPayFeeModel', _feeDetail);
}
}
});
})(window.vc);
})(window.vc);

View File

@ -0,0 +1,101 @@
<div class="animated fadeInRight ecommerce">
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>查询条件</h5>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-3">
<div class="form-group">
<input type="text" placeholder="缴费ID"
v-model="returnPayFeeManageInfo.conditions.detailId" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<select class="custom-select" v-model="returnPayFeeManageInfo.conditions.feeTypeCd">
<option value="" selected>选择费用类型</option>
<option v-for="(item,index) in returnPayFeeManageInfo.feeTypes" :key="index" v-bind:value="item.statusCd">{{item.name}}</option>
</select>
</div>
<div class="col-sm-4">
<select class="custom-select" v-model="returnPayFeeManageInfo.conditions.state">
<option value="" selected>选择审核状态</option>
<option v-for="(item,index) in returnPayFeeManageInfo.returnPayFeeStates" :key="index" v-bind:value="item.statusCd">{{item.name}}</option>
</select>
</div>
<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_queryReturnPayFeeMethod()">
<i class="fa fa-search"></i> 查询
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>退费申请单</h5>
</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">缴费ID</th>
<th class="text-center">费用类型</th>
<th class="text-center">付费周期</th>
<th class="text-center">应付金额</th>
<td class="text-center">实付金额</td>
<td class="text-center">退费原因</td>
<td class="text-center">状态</td>
<td class="text-center">操作</td>
</tr>
</thead>
<tbody>
<tr v-for="payFee in returnPayFeeManageInfo.returnPayFees">
<td class="text-center">{{payFee.returnFeeId}}</td>
<td class="text-center">{{payFee.detailId}}</td>
<td class="text-center">{{payFee.feeTypeCdName}}</td>
<td class="text-center">{{payFee.cycles}}个月</td>
<td class="text-center">{{payFee.receivableAmount}}</td>
<td class="text-center">{{payFee.receivedAmount}}</td>
<td class="text-center">{{payFee.reason}}</td>
<td class="text-center">{{payFee.stateName}}</td>
<td>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openReturnPayFeeAuditModel(payFee)">审核
</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>
<vc:create path="common/audit"
callBackListener="returnPayFeeManage"
callBackFunction="notifyAuditInfo"
></vc:create>
</div>

View File

@ -0,0 +1,99 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 30;
vc.extends({
data: {
returnPayFeeManageInfo: {
returnPayFees: [],
total: 0,
records: 1,
moreCondition: false,
returnPayFeeStates:'',
name: '',
auditReturnFeeId:'',
feeTypes:[],
conditions: {
communityId: vc.getCurrentCommunity().communityId,
feeId: '',
detailId: '',
userCode:'',
state:'',
feeTypeCd:''
}
}
},
_initMethod: function () {
vc.component._listReturnPayFees(DEFAULT_PAGE, DEFAULT_ROWS);
vc.getDict('return_pay_fee',"state",function(_data){
vc.component.returnPayFeeManageInfo.returnPayFeeStates = _data;
});
vc.getDict('pay_fee_config',"fee_type_cd",function(_data){
vc.component.returnPayFeeManageInfo.feeTypes = _data;
});
},
_initEvent: function () {
vc.on('pagination', 'page_event', function (_currentPage) {
vc.component._listpayFees(_currentPage, DEFAULT_ROWS);
});
vc.on('returnPayFeeManage','notifyAuditInfo',function(_auditInfo){
vc.component._auditReturnPayFeeState(_auditInfo);
});
},
methods: {
_listReturnPayFees: function (_page, _rows) {
vc.component.returnPayFeeManageInfo.conditions.page = _page;
vc.component.returnPayFeeManageInfo.conditions.row = _rows;
var param = {
params: vc.component.returnPayFeeManageInfo.conditions
};
vc.http.apiGet('returnPayFee.listReturnPayFees',
param,
function (json) {
var _returnPayFeeManageInfo = JSON.parse(json);
vc.component.returnPayFeeManageInfo.total = _returnPayFeeManageInfo.total;
vc.component.returnPayFeeManageInfo.records = parseInt(_returnPayFeeManageInfo.total/_rows +1);
vc.component.returnPayFeeManageInfo.returnPayFees = _returnPayFeeManageInfo.returnPayFees;
vc.emit('pagination', 'init', {
total: vc.component.returnPayFeeManageInfo.records,
currentPage: _page
});
}, function () {
console.log('请求失败处理');
}
);
},
_queryReturnPayFeeMethod: function () {
vc.component._listReturnPayFees(DEFAULT_PAGE, DEFAULT_ROWS);
},
_auditReturnPayFeeState:function(_auditInfo){
_auditInfo.returnFeeId = vc.component.returnPayFeeManageInfo.auditReturnFeeId;
vc.http.apiPost(
'returnPayFee.updateReturnPayFee',
JSON.stringify(_auditInfo),
{
emulateJSON:true
},
function(json,res){
if(res.status == 200){
vc.component._listReturnPayFees(DEFAULT_PAGE, DEFAULT_ROWS);
return ;
}
vc.toast(json);
},
function(errInfo,error){
vc.toast(errInfo);
});
},
_openReturnPayFeeAuditModel(_payFee){
vc.component.returnPayFeeManageInfo.auditReturnFeeId = _payFee.returnFeeId;
vc.emit('audit','openAuditModal',{});
}
}
});
})(window.vc);