Skip to content

Commit 9b050d7

Browse files
928255095gitee-org
authored andcommitted
优化押金导出跳转到登陆页面的bug
Signed-off-by: java110 <[email protected]>
1 parent 22ea6cb commit 9b050d7

File tree

1 file changed

+58
-43
lines changed

1 file changed

+58
-43
lines changed

public/pages/property/reportPayFeeDeposit/reportPayFeeDeposit.js

Lines changed: 58 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@
3636
}
3737
},
3838
_initMethod: function () {
39-
// vc.component.initFeeConfig();
40-
vc.component._initDate();
39+
// $that.initFeeConfig();
40+
$that._initDate();
4141
//与字典表收费状态关联
4242
vc.getDict('pay_fee', "state", function (_data) {
43-
vc.component.reportPayFeeDepositInfo.states = _data;
43+
$that.reportPayFeeDepositInfo.states = _data;
4444
});
4545
//与字典表付费对象类型关联
4646
vc.getDict('pay_fee', "payer_obj_type", function (_data) {
47-
vc.component.reportPayFeeDepositInfo.payerObjTypes = _data;
47+
$that.reportPayFeeDepositInfo.payerObjTypes = _data;
4848
});
4949
//与字典表退费状态关联
5050
vc.getDict('pay_fee_detail', "state", function (_data) {
51-
vc.component.reportPayFeeDepositInfo.detailStates = _data;
51+
$that.reportPayFeeDepositInfo.detailStates = _data;
5252
});
53-
vc.component._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
53+
$that._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
5454
$(".popover-show").mouseover(() => {
5555
$('.popover-show').popover('show');
5656
})
@@ -60,12 +60,12 @@
6060
},
6161
_initEvent: function () {
6262
vc.on('reportPayFeeDeposit', 'chooseFloor', function (_param) {
63-
vc.component.reportPayFeeDepositInfo.conditions.floorId = _param.floorId;
64-
vc.component.reportPayFeeDepositInfo.conditions.floorName = _param.floorName;
65-
vc.component.loadUnits(_param.floorId);
63+
$that.reportPayFeeDepositInfo.conditions.floorId = _param.floorId;
64+
$that.reportPayFeeDepositInfo.conditions.floorName = _param.floorName;
65+
$that.loadUnits(_param.floorId);
6666
});
6767
vc.on('pagination', 'page_event', function (_currentPage) {
68-
vc.component._listFees(_currentPage, DEFAULT_ROWS);
68+
$that._listFees(_currentPage, DEFAULT_ROWS);
6969
});
7070
},
7171
methods: {
@@ -93,12 +93,12 @@
9393
$('.startTime').datetimepicker()
9494
.on('changeDate', function (ev) {
9595
var value = $(".startTime").val();
96-
vc.component.reportPayFeeDepositInfo.conditions.startTime = value;
96+
$that.reportPayFeeDepositInfo.conditions.startTime = value;
9797
});
9898
$('.endTime').datetimepicker()
9999
.on('changeDate', function (ev) {
100100
var value = $(".endTime").val();
101-
vc.component.reportPayFeeDepositInfo.conditions.endTime = value;
101+
$that.reportPayFeeDepositInfo.conditions.endTime = value;
102102
let start = Date.parse(new Date($that.reportPayFeeDepositInfo.conditions.startTime))
103103
let end = Date.parse(new Date($that.reportPayFeeDepositInfo.conditions.endTime))
104104
if (start - end >= 0) {
@@ -121,32 +121,32 @@
121121
},
122122
//查询
123123
_queryMethod: function () {
124-
vc.component._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
124+
$that._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
125125
},
126126
//查询方法
127127
_listFees: function (_page, _rows) {
128-
vc.component.reportPayFeeDepositInfo.conditions.page = _page;
129-
vc.component.reportPayFeeDepositInfo.conditions.row = _rows;
130-
var param = {
131-
params: vc.component.reportPayFeeDepositInfo.conditions
128+
$that.reportPayFeeDepositInfo.conditions.page = _page;
129+
$that.reportPayFeeDepositInfo.conditions.row = _rows;
130+
let param = {
131+
params: $that.reportPayFeeDepositInfo.conditions
132132
};
133133
param.params.feeId = param.params.feeId.trim();
134134
//发送get请求
135135
vc.http.apiGet('/reportFeeMonthStatistics/queryPayFeeDeposit',
136136
param,
137137
function (json, res) {
138-
var _reportPayFeeDepositInfo = JSON.parse(json);
139-
vc.component.reportPayFeeDepositInfo.total = _reportPayFeeDepositInfo.total;
140-
vc.component.reportPayFeeDepositInfo.records = _reportPayFeeDepositInfo.records;
141-
vc.component.reportPayFeeDepositInfo.depositFees = _reportPayFeeDepositInfo.data;
142-
vc.component.reportPayFeeDepositInfo.sumTotal = _reportPayFeeDepositInfo.sumTotal;
143-
if (_reportPayFeeDepositInfo.data.length > 0) {
144-
vc.component.reportPayFeeDepositInfo.feeConfigs = _reportPayFeeDepositInfo.data[0].feeConfigDtos
138+
let _json = JSON.parse(json);
139+
$that.reportPayFeeDepositInfo.total = _json.total;
140+
$that.reportPayFeeDepositInfo.records = _json.records;
141+
$that.reportPayFeeDepositInfo.depositFees = _json.data;
142+
$that.reportPayFeeDepositInfo.sumTotal = _json.sumTotal;
143+
if (_json.data.length > 0) {
144+
$that.reportPayFeeDepositInfo.feeConfigs = _json.data[0].feeConfigDtos
145145
}
146146
vc.emit('pagination', 'init', {
147-
total: vc.component.reportPayFeeDepositInfo.records,
147+
total: $that.reportPayFeeDepositInfo.records,
148148
currentPage: _page,
149-
dataCount: vc.component.reportPayFeeDepositInfo.total
149+
dataCount: $that.reportPayFeeDepositInfo.total
150150
});
151151
},
152152
function (errInfo, error) {
@@ -156,24 +156,24 @@
156156
},
157157
//重置
158158
_resetMethod: function (_page, _rows) {
159-
vc.component.reportPayFeeDepositInfo.conditions.configId = '';
160-
vc.component.reportPayFeeDepositInfo.conditions.feeId = '';
161-
vc.component.reportPayFeeDepositInfo.conditions.payerObjType = '';
162-
vc.component.reportPayFeeDepositInfo.conditions.state = '';
163-
vc.component.reportPayFeeDepositInfo.conditions.startTime = '';
164-
vc.component.reportPayFeeDepositInfo.conditions.endTime = '';
165-
vc.component.reportPayFeeDepositInfo.conditions.detailState = '';
166-
vc.component.reportPayFeeDepositInfo.conditions.floorId = '';
167-
vc.component.reportPayFeeDepositInfo.conditions.floorName = '';
168-
vc.component.reportPayFeeDepositInfo.conditions.roomNum = '';
169-
vc.component.reportPayFeeDepositInfo.conditions.unitId = '';
170-
vc.component._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
159+
$that.reportPayFeeDepositInfo.conditions.configId = '';
160+
$that.reportPayFeeDepositInfo.conditions.feeId = '';
161+
$that.reportPayFeeDepositInfo.conditions.payerObjType = '';
162+
$that.reportPayFeeDepositInfo.conditions.state = '';
163+
$that.reportPayFeeDepositInfo.conditions.startTime = '';
164+
$that.reportPayFeeDepositInfo.conditions.endTime = '';
165+
$that.reportPayFeeDepositInfo.conditions.detailState = '';
166+
$that.reportPayFeeDepositInfo.conditions.floorId = '';
167+
$that.reportPayFeeDepositInfo.conditions.floorName = '';
168+
$that.reportPayFeeDepositInfo.conditions.roomNum = '';
169+
$that.reportPayFeeDepositInfo.conditions.unitId = '';
170+
$that._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
171171
},
172172
_moreCondition: function () {
173-
if (vc.component.reportPayFeeDepositInfo.moreCondition) {
174-
vc.component.reportPayFeeDepositInfo.moreCondition = false;
173+
if ($that.reportPayFeeDepositInfo.moreCondition) {
174+
$that.reportPayFeeDepositInfo.moreCondition = false;
175175
} else {
176-
vc.component.reportPayFeeDepositInfo.moreCondition = true;
176+
$that.reportPayFeeDepositInfo.moreCondition = true;
177177
}
178178
},
179179
_openChooseFloorMethod: function () {
@@ -193,7 +193,7 @@
193193
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
194194
if (res.status == 200) {
195195
let tmpUnits = JSON.parse(json);
196-
vc.component.reportPayFeeDepositInfo.roomUnits = tmpUnits;
196+
$that.reportPayFeeDepositInfo.roomUnits = tmpUnits;
197197
return;
198198
}
199199
vc.toast(json);
@@ -204,7 +204,22 @@
204204
});
205205
},
206206
_exportFee: function () {
207-
vc.jumpToPage('/callComponent/exportReportFee/exportData?pagePath=reportPayFeeDeposit&' + vc.objToGetParam($that.reportPayFeeDepositInfo.conditions));
207+
$that.reportPayFeeDepositInfo.conditions.pagePath = 'reportPayFeeDeposit';
208+
let param = {
209+
params: $that.reportPayFeeDepositInfo.conditions
210+
};
211+
//发送get请求
212+
vc.http.apiGet('/export.exportData', param,
213+
function (json, res) {
214+
let _json = JSON.parse(json);
215+
vc.toast(_json.msg);
216+
if (_json.code == 0) {
217+
vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心')
218+
}
219+
},
220+
function (errInfo, error) {
221+
console.log('请求失败处理');
222+
});
208223
},
209224
_openPayFeeDetail: function (_param) {
210225
vc.jumpToPage('/#/pages/property/propertyFee?feeId=' + _param.feeId);

0 commit comments

Comments
 (0)