zhangjiaqing
8 天以前 1cef3adee31c6934c0da4b4f0b8a6f5ac03b364f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
(function (vc) {
    var DEFAULT_PAGE = 1;
    var DEFAULT_ROWS = 10;
    vc.extends({
        data: {
            managementFee: {
                _currentTab: 'reportFeeDetailRoom',
                floors: [],
                moreCondition: false,
                communitys: [],
                fees: [],
                feeTypeCds: [],
                total: 0,
                records: 0,
                conditions: {
                    floorId: '',
                    // objName: '',
                    // startDate: '',
                    // endDate: '',
                    // configId: '',
                    feeTypeCd: '',
                    ownerName: '',
                    importFee: '',
                    communityId: ''
                },
                history: [{
                        year: 2020,
                        value1: 200,
                        value2: 200,
                        value3: 200,
                    },
                    {
                        year: 2021,
                        value1: 200,
                        value2: 200,
                        value3: 200,
                    },
                    {
                        year: 2023,
                        value1: 200,
                        value2: 200,
                        value3: 200,
                    },
                    {
                        year: 2024,
                        value1: 200,
                        value2: 200,
                        value3: 200,
                    },
                    {
                        year: 2025,
                        value1: 200,
                        value2: 200,
                        value3: 200,
                    }
                ],
                headerList:[]
            },
       
        },
        _initMethod: function () {
            $that.managementFee.conditions.communityId = vc.getCurrentCommunity().communityId;
            // $that.changeTab($that.managementFee._currentTab);
            vc.getDict('pay_fee_config', "fee_type_cd_show", function (_data) {
                $that.managementFee.feeTypeCds = _data
            });
            $that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS);
        },
        _initEvent: function () {
            vc.on("indexContext", "_queryIndexContextData", function (_param) {});
            vc.on('reportFeeDetailOwner', 'switch', function (_data) {
                $that.managementFee.conditions = _data;
                $that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS);
            });
            vc.on('reportFeeDetailOwner', 'notify', function (_data) {
                $that.managementFee.conditions = _data;
                $that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS);
            });
            vc.on('reportFeeDetailOwner', 'paginationPlus', 'page_event', function (_currentPage) {
                $that._listReportFeeDetailOwners(_currentPage, DEFAULT_ROWS);
            });
        },
        methods: {
            _toDetail: function (_fee) {
                const combinedValue = _fee[2] + '-' + _fee[3] + '-' + _fee[4]
                vc.jumpToPage('/#/pages/property/managementFeesDetail?roomNum=' + combinedValue);
            },
            _computeTableDivWidth: function () {
                let mainWidth = document.getElementsByTagName('body')[0].clientWidth - document.getElementById('menu-nav').offsetWidth;
                //let treeWidth = document.getElementsByClassName('room-floor-unit-tree')[0].offsetWidth;
                mainWidth = mainWidth - 20 - 15 - 20;
                //document.getElementsByClassName('hc-table-div')[0].style.width=mainWidth+'px';
                return mainWidth + 'px';
            },
            changeTab: function (_tab) {
                $that._listReportFeeDetailOwners(DEFAULT_PAGE, DEFAULT_ROWS);
                $that.managementFee._currentTab = _tab;
                vc.emit(_tab, 'switch', $that.managementFee.conditions)
            },
            //查询
            _queryMethod: function () {
                $that.changeTab($that.managementFee._currentTab);
            },
            //重置
            _resetMethod: function () {
                vc.component.managementFee.conditions.floorId = "";
                vc.component.managementFee.conditions.feeTypeCd = "";
                vc.component.managementFee.conditions.ownerName = "";
                vc.component.managementFee.conditions.importFee = "";
                $that.changeTab($that.managementFee._currentTab);
            },
            _changCommunity: function () {
                $that.changeTab($that.managementFee._currentTab);
            },
            _moreCondition: function () {
                if (vc.component.managementFee.moreCondition) {
                    vc.component.managementFee.moreCondition = false;
                } else {
                    vc.component.managementFee.moreCondition = true;
                }
            },
            _listReportFeeDetailOwners: function (_page, _rows) {
                console.log('_listReportFeeDetailOwners11111');
                $that.managementFee.conditions.page = _page;
                $that.managementFee.conditions.row = _rows;
                let param = {
                    params: $that.managementFee.conditions
                };
                //发送get请求
                vc.http.apiGet('/fee.reportPropertyFeeCmd',
                    param,
                    function (json, res) {
                        let _json = JSON.parse(json);
                        console.log('_listReportFeeDetailOwners2222222', _json);
                        $that.managementFee.total = _json.total;
                        $that.managementFee.records = _json.records;
                        $that.managementFee.fees = _json.data.data;
                        $that.managementFee.headerList = _json.data.header || [];
 
                        $that.managementFee.fees.history =$that.managementFee.history
                        vc.emit('reportFeeDetailOwner', 'paginationPlus', 'init', {
                            total: $that.managementFee.records,
                            dataCount: $that.managementFee.total,
                            currentPage: _page,
                        });
                    },
                    function (errInfo, error) {
                        console.log('请求失败处理');
                    }
                );
            },
            _exportReportFeeDetailOwnerExcel: function () {
                $that.managementFee.conditions.communityId = vc.getCurrentCommunity().communityId;
                $that.managementFee.conditions.pagePath = 'reportPropertyFee';
                let param = {
                    params: $that.managementFee.conditions
                };
                //发送get请求
                vc.http.apiGet('/export.exportData', param,
                    function (json, res) {
                        let _json = JSON.parse(json);
                        vc.toast(_json.msg);
                        if (_json.code == 0) {
                            vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心')
                        }
                    },
                    function (errInfo, error) {
                        console.log('请求失败处理');
                    });
            }
        }
    })
})(window.vc);