优化加入 折扣

This commit is contained in:
java110 2020-11-25 12:21:03 +08:00
parent f3dd4fb405
commit 4febedea6d
15 changed files with 765 additions and 6 deletions

View File

@ -0,0 +1,43 @@
<div id="addPayFeeConfigDiscountModel" 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">折扣类型</label>
<div class="col-sm-10">
<select class="custom-select" v-model="addPayFeeConfigDiscountInfo.discountType"
@change="_changeAddPayFeeConfigDiscountType()">
<option selected disabled value="">必填,请选择折扣类型</option>
<option value="1001">优惠</option>
<option value="2002">违约</option>
</select> </div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">折扣名称</label>
<div class="col-sm-10">
<select class="custom-select" v-model="addPayFeeConfigDiscountInfo.discountId">
<option selected disabled value="">必填,请选择折扣名称</option>
<option v-for="(item,index) in addPayFeeConfigDiscountInfo.discounts"
:value="item.discountId">{{item.discountName}}</option>
</select> </div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button"
v-on:click="savePayFeeConfigDiscountInfo()"><i
class="fa fa-check"></i>&nbsp;保存</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,137 @@
(function (vc) {
vc.extends({
propTypes: {
callBackListener: vc.propTypes.string, //父组件名称
callBackFunction: vc.propTypes.string //父组件监听方法
},
data: {
addPayFeeConfigDiscountInfo: {
configDiscountId: '',
discountId: '',
configId: '',
discountType: '',
discounts: [],
}
},
_initMethod: function () {
},
_initEvent: function () {
vc.on('addPayFeeConfigDiscount', 'openAddPayFeeConfigDiscountModal', function (_param) {
vc.copyObject(_param, $that.addPayFeeConfigDiscountInfo);
$('#addPayFeeConfigDiscountModel').modal('show');
});
},
methods: {
addPayFeeConfigDiscountValidate() {
return vc.validate.validate({
addPayFeeConfigDiscountInfo: vc.component.addPayFeeConfigDiscountInfo
}, {
'addPayFeeConfigDiscountInfo.configId': [
{
limit: "required",
param: "",
errInfo: "费用项不能为空"
},
{
limit: "num",
param: "",
errInfo: "费用项格式错误"
},
],
'addPayFeeConfigDiscountInfo.discountId': [
{
limit: "required",
param: "",
errInfo: "折扣名称不能为空"
},
{
limit: "num",
param: "",
errInfo: "折扣格式错误"
},
]
});
},
savePayFeeConfigDiscountInfo: function () {
if (!vc.component.addPayFeeConfigDiscountValidate()) {
vc.toast(vc.validate.errInfo);
return;
}
vc.component.addPayFeeConfigDiscountInfo.communityId = vc.getCurrentCommunity().communityId;
//不提交数据将数据 回调给侦听处理
if (vc.notNull($props.callBackListener)) {
vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addPayFeeConfigDiscountInfo);
$('#addPayFeeConfigDiscountModel').modal('hide');
return;
}
vc.http.apiPost(
'/payFeeConfigDiscount/savePayFeeConfigDiscount',
JSON.stringify(vc.component.addPayFeeConfigDiscountInfo),
{
emulateJSON: true
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
let _json = JSON.parse(json);
if (_json.code == 0) {
//关闭model
$('#addPayFeeConfigDiscountModel').modal('hide');
vc.component.clearAddPayFeeConfigDiscountInfo();
vc.emit('payFeeConfigDiscountManage', 'listPayFeeConfigDiscount', {});
return;
}
vc.message(_json.msg);
},
function (errInfo, error) {
console.log('请求失败处理');
vc.message(errInfo);
});
},
clearAddPayFeeConfigDiscountInfo: function () {
vc.component.addPayFeeConfigDiscountInfo = {
configDiscountId: '',
discountId: '',
configId: '',
discountType: '',
discounts: []
};
},
_changeAddPayFeeConfigDiscountType: function () {
if ($that.addPayFeeConfigDiscountInfo.discountType == '') {
return;
}
$that.addPayFeeConfigDiscountInfo.discounts = [];
var param = {
params: {
page: 1,
row: 100,
communityId: vc.getCurrentCommunity().communityId,
discountType: $that.addPayFeeConfigDiscountInfo.discountType
}
};
//发送get请求
vc.http.apiGet('/feeDiscount/queryFeeDiscount',
param,
function (json, res) {
let _feeDiscountManageInfo = JSON.parse(json);
$that.addPayFeeConfigDiscountInfo.discounts = _feeDiscountManageInfo.data;
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
}
}
});
})(window.vc);

View File

@ -0,0 +1,58 @@
<div id = "choosePayFeeConfigDiscountModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="choosePayFeeConfigDiscountModelLabel" aria-hidden="true" >
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h3 class="modal-title" id="choosePayFeeConfigDiscountModelLabel">选择费用折扣</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class=" row">
<div class="col-lg-12">
<div class="ibox ">
<div class="row">
<div class="col-sm-7 m-b-xs">
</div>
<div class="col-sm-5">
<div class="input-group">
<input placeholder="输入费用折扣名称" type="text" v-model="choosePayFeeConfigDiscountInfo._currentPayFeeConfigDiscountName" class="form-control form-control-sm">
<span class="input-group-append">
<button type="button" class="btn btn-sm btn-primary" v-on:click="queryPayFeeConfigDiscounts()">查询</button>
</span>
</div>
</div>
</div>
<div class="table-responsive" style="margin-top:15px">
<table class="table table-striped">
<thead>
<tr>
<th class="text-center">费用折扣ID</th>
<th class="text-center">折扣名称</th>
<th class="text-center">折扣名称</th>
<th class="text-center">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="payFeeConfigDiscount in choosePayFeeConfigDiscountInfo.payFeeConfigDiscounts">
<td class="text-center">{{payFeeConfigDiscount.configDiscountId}}</td>
<td class="text-center">{{payFeeConfigDiscount.discountId}}</td>
<td class="text-center">{{payFeeConfigDiscount.discountId}}</td>
<td>
<button class="btn btn-primary btn-xs" v-on:click="choosePayFeeConfigDiscount(payFeeConfigDiscount)">选择</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,63 @@
(function(vc){
vc.extends({
propTypes: {
emitChoosePayFeeConfigDiscount:vc.propTypes.string,
emitLoadData:vc.propTypes.string
},
data:{
choosePayFeeConfigDiscountInfo:{
payFeeConfigDiscounts:[],
_currentPayFeeConfigDiscountName:'',
}
},
_initMethod:function(){
},
_initEvent:function(){
vc.on('choosePayFeeConfigDiscount','openChoosePayFeeConfigDiscountModel',function(_param){
$('#choosePayFeeConfigDiscountModel').modal('show');
vc.component._refreshChoosePayFeeConfigDiscountInfo();
vc.component._loadAllPayFeeConfigDiscountInfo(1,10,'');
});
},
methods:{
_loadAllPayFeeConfigDiscountInfo:function(_page,_row,_name){
var param = {
params:{
page:_page,
row:_row,
communityId:vc.getCurrentCommunity().communityId,
name:_name
}
};
//发送get请求
vc.http.apiGet('payFeeConfigDiscount.listPayFeeConfigDiscounts',
param,
function(json){
var _payFeeConfigDiscountInfo = JSON.parse(json);
vc.component.choosePayFeeConfigDiscountInfo.payFeeConfigDiscounts = _payFeeConfigDiscountInfo.payFeeConfigDiscounts;
},function(){
console.log('请求失败处理');
}
);
},
choosePayFeeConfigDiscount:function(_payFeeConfigDiscount){
if(_payFeeConfigDiscount.hasOwnProperty('name')){
_payFeeConfigDiscount.payFeeConfigDiscountName = _payFeeConfigDiscount.name;
}
vc.emit($props.emitChoosePayFeeConfigDiscount,'choosePayFeeConfigDiscount',_payFeeConfigDiscount);
vc.emit($props.emitLoadData,'listPayFeeConfigDiscountData',{
payFeeConfigDiscountId:_payFeeConfigDiscount.payFeeConfigDiscountId
});
$('#choosePayFeeConfigDiscountModel').modal('hide');
},
queryPayFeeConfigDiscounts:function(){
vc.component._loadAllPayFeeConfigDiscountInfo(1,10,vc.component.choosePayFeeConfigDiscountInfo._currentPayFeeConfigDiscountName);
},
_refreshChoosePayFeeConfigDiscountInfo:function(){
vc.component.choosePayFeeConfigDiscountInfo._currentPayFeeConfigDiscountName = "";
}
}
});
})(window.vc);

View File

@ -0,0 +1,19 @@
<div class="modal fade" id="deletePayFeeConfigDiscountModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">请确认您的操作!</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<tr align="center"><th>确定删除费用折扣</th></tr>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeletePayFeeConfigDiscountModel()">点错了</button>
<button type="button" class="btn btn-primary" v-on:click="deletePayFeeConfigDiscount()">确认删除</button>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,52 @@
(function(vc,vm){
vc.extends({
data:{
deletePayFeeConfigDiscountInfo:{
}
},
_initMethod:function(){
},
_initEvent:function(){
vc.on('deletePayFeeConfigDiscount','openDeletePayFeeConfigDiscountModal',function(_params){
vc.component.deletePayFeeConfigDiscountInfo = _params;
$('#deletePayFeeConfigDiscountModel').modal('show');
});
},
methods:{
deletePayFeeConfigDiscount:function(){
vc.component.deletePayFeeConfigDiscountInfo.communityId=vc.getCurrentCommunity().communityId;
vc.http.apiPost(
'payFeeConfigDiscount.deletePayFeeConfigDiscount',
JSON.stringify(vc.component.deletePayFeeConfigDiscountInfo),
{
emulateJSON:true
},
function(json,res){
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
let _json = JSON.parse(json);
if (_json.code == 0) {
//关闭model
$('#deletePayFeeConfigDiscountModel').modal('hide');
vc.emit('payFeeConfigDiscountManage','listPayFeeConfigDiscount',{});
return ;
}
vc.message(_json.msg);
},
function(errInfo,error){
console.log('请求失败处理');
vc.message(json);
});
},
closeDeletePayFeeConfigDiscountModel:function(){
$('#deletePayFeeConfigDiscountModel').modal('hide');
}
}
});
})(window.vc,window.vc.component);

View File

@ -0,0 +1,38 @@
<div id = "editPayFeeConfigDiscountModel" 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">折扣名称</label>
<div class="col-sm-10">
<select class="custom-select" v-model="editPayFeeConfigDiscountInfo.discountId">
<option selected disabled value="">必填,请选择折扣名称</option>
<option value="1001">优惠</option>
<option value="2002">违约</option>
</select> </div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">折扣名称</label>
<div class="col-sm-10">
<select class="custom-select" v-model="editPayFeeConfigDiscountInfo.discountId">
<option selected disabled value="">必填,请选择折扣名称</option>
<option value="1001">优惠</option>
<option value="2002">违约</option>
</select> </div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button" v-on:click="editPayFeeConfigDiscount()" ><i class="fa fa-check"></i>&nbsp;保存</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,101 @@
(function(vc,vm){
vc.extends({
data:{
editPayFeeConfigDiscountInfo:{
configDiscountId:'',
discountId:'',
discountId:'',
}
},
_initMethod:function(){
},
_initEvent:function(){
vc.on('editPayFeeConfigDiscount','openEditPayFeeConfigDiscountModal',function(_params){
vc.component.refreshEditPayFeeConfigDiscountInfo();
$('#editPayFeeConfigDiscountModel').modal('show');
vc.copyObject(_params, vc.component.editPayFeeConfigDiscountInfo );
vc.component.editPayFeeConfigDiscountInfo.communityId = vc.getCurrentCommunity().communityId;
});
},
methods:{
editPayFeeConfigDiscountValidate:function(){
return vc.validate.validate({
editPayFeeConfigDiscountInfo:vc.component.editPayFeeConfigDiscountInfo
},{
'editPayFeeConfigDiscountInfo.discountId':[
{
limit:"required",
param:"",
errInfo:"折扣名称不能为空"
},
{
limit:"num",
param:"",
errInfo:"折扣格式错误"
},
],
'editPayFeeConfigDiscountInfo.discountId':[
{
limit:"required",
param:"",
errInfo:"折扣名称不能为空"
},
{
limit:"num",
param:"",
errInfo:"折扣格式错误"
},
],
'editPayFeeConfigDiscountInfo.configDiscountId':[
{
limit:"required",
param:"",
errInfo:"费用折扣ID不能为空"
}]
});
},
editPayFeeConfigDiscount:function(){
if(!vc.component.editPayFeeConfigDiscountValidate()){
vc.toast(vc.validate.errInfo);
return ;
}
vc.http.apiPost(
'payFeeConfigDiscount.updatePayFeeConfigDiscount',
JSON.stringify(vc.component.editPayFeeConfigDiscountInfo),
{
emulateJSON:true
},
function(json,res){
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
let _json = JSON.parse(json);
if (_json.code == 0) {
//关闭model
$('#editPayFeeConfigDiscountModel').modal('hide');
vc.emit('payFeeConfigDiscountManage','listPayFeeConfigDiscount',{});
return ;
}
vc.message(_json.msg);
},
function(errInfo,error){
console.log('请求失败处理');
vc.message(errInfo);
});
},
refreshEditPayFeeConfigDiscountInfo:function(){
vc.component.editPayFeeConfigDiscountInfo= {
configDiscountId:'',
discountId:'',
discountId:'',
}
}
}
});
})(window.vc,window.vc.component);

View File

@ -0,0 +1,44 @@
<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" v-if="viewPayFeeConfigDiscountInfo.index != 2" class="btn btn-primary btn-sm" style="margin-right:10px;" v-on:click="_openSelectPayFeeConfigDiscountInfoModel()">
<i class="glyphicon glyphicon-search"></i> 选择费用折扣</button>
<button type="button" v-if="viewPayFeeConfigDiscountInfo.index != 2" class="btn btn-primary btn-sm" v-on:click="_openAddPayFeeConfigDiscountInfoModel()">
<i class="glyphicon glyphicon-plus"></i> 添加费用折扣</button>
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label class="col-form-label" >折扣名称:</label>
<label class="">{{viewPayFeeConfigDiscountInfo.discountId}}</label>
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label class="col-form-label" >折扣名称:</label>
<label class="">{{viewPayFeeConfigDiscountInfo.discountId}}</label>
</div>
</div>
</div>
</div>
</div>
</div>
<vc:create path="property/addPayFeeConfigDiscount"
callBackListener="viewPayFeeConfigDiscountInfo"
callBackFunction="choosePayFeeConfigDiscount"
></vc:create>
<vc:create path="property/choosePayFeeConfigDiscount"
emitChoosePayFeeConfigDiscount="viewPayFeeConfigDiscountInfo"
emitLoadData="viewPayFeeConfigDiscountInfo"
></vc:create>
</div>

View File

@ -0,0 +1,49 @@
/**
费用折扣 组件
**/
(function(vc){
vc.extends({
propTypes: {
callBackListener:vc.propTypes.string, //父组件名称
callBackFunction:vc.propTypes.string //父组件监听方法
},
data:{
viewPayFeeConfigDiscountInfo:{
index:0,
flowComponent:'viewPayFeeConfigDiscountInfo',
discountId:'',
discountId:'',
}
},
_initMethod:function(){
//根据请求参数查询 查询 业主信息
vc.component._loadPayFeeConfigDiscountInfoData();
},
_initEvent:function(){
vc.on('viewPayFeeConfigDiscountInfo','choosePayFeeConfigDiscount',function(_app){
vc.copyObject(_app, vc.component.viewPayFeeConfigDiscountInfo);
vc.emit($props.callBackListener,$props.callBackFunction,vc.component.viewPayFeeConfigDiscountInfo);
});
vc.on('viewPayFeeConfigDiscountInfo', 'onIndex', function(_index){
vc.component.viewPayFeeConfigDiscountInfo.index = _index;
});
},
methods:{
_openSelectPayFeeConfigDiscountInfoModel(){
vc.emit('choosePayFeeConfigDiscount','openChoosePayFeeConfigDiscountModel',{});
},
_openAddPayFeeConfigDiscountInfoModel(){
vc.emit('addPayFeeConfigDiscount','openAddPayFeeConfigDiscountModal',{});
},
_loadPayFeeConfigDiscountInfoData:function(){
}
}
});
})(window.vc);

View File

@ -88,14 +88,11 @@
<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>
@ -113,12 +110,17 @@
'-':feeConfig.squarePrice+'元'}}
</td>
<td class="text-center">{{feeConfig.additionalAmount}}元</td>
<td class="text-center">
<td class="text-right">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openEditFeeConfigModel(feeConfig)">修改
</button>
</div>
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_settingConfigDiscount(feeConfig)">折扣
</button>
</div>
<div class="btn-group" v-if="feeConfig.isDefault=='F'">
<button class="btn-white btn btn-xs"
v-on:click="_openDeleteFeeConfigModel(feeConfig)">删除

View File

@ -87,6 +87,9 @@
} else {
vc.component.feeConfigManageInfo.moreCondition = true;
}
},
_settingConfigDiscount:function(_feeConfig){
vc.jumpToPage('/admin.html#/pages/property/payFeeConfigDiscountManage?configId='+_feeConfig.configId+"&feeName="+_feeConfig.feeName);
}
}
});

View File

@ -60,6 +60,7 @@
<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>
@ -70,8 +71,10 @@
<td class="text-center">{{feeDiscount.discountId}}</td>
<td class="text-center">{{feeDiscount.discountName}}</td>
<td class="text-center">{{feeDiscount.discountType == '1001'?'优惠':'违约'}}</td>
<td class="text-center">{{feeDiscount.ruleName}}</td>
<td class="text-center">
<div v-for="(item,index) in feeDiscount.feeDiscountSpecs">{{item.specName}}{{item.specValue}}</div>
<div v-for="(item,index) in feeDiscount.feeDiscountSpecs">
{{item.specName}}{{item.specValue}}</div>
</td>
<td class="text-center">{{feeDiscount.createTime}}</td>
<td class="text-center">

View File

@ -0,0 +1,61 @@
<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;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_goBack()">
返回
</button>
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_openAddPayFeeConfigDiscountModal()">
<i class="glyphicon glyphicon-plus"></i>
添加
</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">费用折扣ID</th>
<th class="text-center">费用项名称</th>
<th class="text-center">折扣名称</th>
<th class="text-center">折扣类型</th>
<th class="text-center">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="payFeeConfigDiscount in payFeeConfigDiscountManageInfo.payFeeConfigDiscounts">
<td class="text-center">{{payFeeConfigDiscount.configDiscountId}}</td>
<td class="text-center">{{payFeeConfigDiscountManageInfo.feeName}}</td>
<td class="text-center">{{payFeeConfigDiscount.discountId}}</td>
<td class="text-center">{{payFeeConfigDiscount.discountType}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs"
v-on:click="_openDeletePayFeeConfigDiscountModel(payFeeConfigDiscount)">删除</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="property/addPayFeeConfigDiscount" callBackListener="" callBackFunction=""></vc:create>
<vc:create path="property/deletePayFeeConfigDiscount"></vc:create>
</div>

View File

@ -0,0 +1,86 @@
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
payFeeConfigDiscountManageInfo: {
payFeeConfigDiscounts: [],
total: 0,
records: 1,
moreCondition: false,
configDiscountId: '',
configId: '',
feeName: ''
}
},
_initMethod: function () {
let _configId = vc.getParam('configId');
let _feeName = vc.getParam('feeName');
$that.payFeeConfigDiscountManageInfo.configId = _configId;
$that.payFeeConfigDiscountManageInfo.feeName = _feeName;
vc.component._listPayFeeConfigDiscounts(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('payFeeConfigDiscountManage', 'listPayFeeConfigDiscount', function (_param) {
vc.component._listPayFeeConfigDiscounts(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event', function (_currentPage) {
vc.component._listPayFeeConfigDiscounts(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listPayFeeConfigDiscounts: function (_page, _rows) {
vc.component.payFeeConfigDiscountManageInfo.conditions.page = _page;
vc.component.payFeeConfigDiscountManageInfo.conditions.row = _rows;
var param = {
params: vc.component.payFeeConfigDiscountManageInfo.conditions
};
//发送get请求
vc.http.apiGet('payFeeConfigDiscount.listPayFeeConfigDiscounts',
param,
function (json, res) {
var _payFeeConfigDiscountManageInfo = JSON.parse(json);
vc.component.payFeeConfigDiscountManageInfo.total = _payFeeConfigDiscountManageInfo.total;
vc.component.payFeeConfigDiscountManageInfo.records = _payFeeConfigDiscountManageInfo.records;
vc.component.payFeeConfigDiscountManageInfo.payFeeConfigDiscounts = _payFeeConfigDiscountManageInfo.data;
vc.emit('pagination', 'init', {
total: vc.component.payFeeConfigDiscountManageInfo.records,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openAddPayFeeConfigDiscountModal: function () {
vc.emit('addPayFeeConfigDiscount', 'openAddPayFeeConfigDiscountModal', {});
},
_openDeletePayFeeConfigDiscountModel: function (_payFeeConfigDiscount) {
vc.emit('deletePayFeeConfigDiscount', 'openDeletePayFeeConfigDiscountModal', _payFeeConfigDiscount);
},
_queryPayFeeConfigDiscountMethod: function () {
vc.component._listPayFeeConfigDiscounts(DEFAULT_PAGE, DEFAULT_ROWS);
},
_goBack: function () {
vc.goBack();
},
_moreCondition: function () {
if (vc.component.payFeeConfigDiscountManageInfo.moreCondition) {
vc.component.payFeeConfigDiscountManageInfo.moreCondition = false;
} else {
vc.component.payFeeConfigDiscountManageInfo.moreCondition = true;
}
}
}
});
})(window.vc);