feeSummary.js 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. 入驻小区
  3. **/
  4. (function (vc) {
  5. var DEFAULT_PAGE = 1;
  6. var DEFAULT_ROWS = 30;
  7. vc.extends({
  8. data: {
  9. feeSummaryInfo: {
  10. fees: [],
  11. feeSummaryType:'1001',
  12. total: 0,
  13. records: 1,
  14. moreCondition: false,
  15. name: '',
  16. }
  17. },
  18. _initMethod: function () {
  19. vc.component._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
  20. },
  21. _initEvent: function () {
  22. vc.on('pagination', 'page_event', function (_currentPage) {
  23. vc.component._listFeeSummarys(_currentPage, DEFAULT_ROWS);
  24. });
  25. },
  26. methods: {
  27. _listFeeSummarys: function (_page, _rows) {
  28. var param = {
  29. params: {
  30. page: _page,
  31. row:_rows,
  32. feeSummaryType:vc.component.feeSummaryInfo.feeSummaryType,
  33. communityId:vc.getCurrentCommunity().communityId
  34. }
  35. };
  36. //发送get请求
  37. vc.http.get('feeSummary',
  38. 'list',
  39. param,
  40. function (json, res) {
  41. var _feeSummaryInfo = JSON.parse(json);
  42. vc.component.feeSummaryInfo.total = _feeSummaryInfo.total;
  43. vc.component.feeSummaryInfo.records = parseInt(_feeSummaryInfo.total/_rows +1);
  44. vc.component.feeSummaryInfo.fees = _feeSummaryInfo.fees;
  45. vc.emit('pagination', 'init', {
  46. total: vc.component.feeSummaryInfo.records,
  47. currentPage: _page
  48. });
  49. }, function (errInfo, error) {
  50. console.log('请求失败处理');
  51. }
  52. );
  53. },
  54. _exportExcel:function () {
  55. },
  56. _switchFeeSummaryType:function(_feeSummaryType){
  57. vc.component.feeSummaryInfo.feeSummaryType = _feeSummaryType;
  58. vc.component._listFeeSummarys(DEFAULT_PAGE,DEFAULT_ROWS);
  59. }
  60. }
  61. });
  62. })(window.vc);