zhangjq
2026-01-27 6f51f667ae7b13dca029045c221d0b1722cf98df
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
(function (vc) {
    vc.extends({
        data: {
            reportFeeDetailInfo: {
                _currentTab: 'reportFeeDetailRoom',
                floors: [],
                moreCondition: false,
                communitys: [],
                conditions: {
                    floorId: '',
                    objName: '',
                    startDate: '',
                    endDate: '',
                    configId: '',
                    feeTypeCd: '',
                    ownerName: '',
                    link: '',
                    communityId: ''
                }
            }
        },
        _initMethod: function () {
            vc.component._initDate();
            vc.component._loadStaffCommunitys();
            vc.component.reportFeeDetailInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
            vc.component.reportFeeDetailInfo.conditions.communityName = vc.getCurrentCommunity().name;
            vc.component.changeTab(vc.component.reportFeeDetailInfo._currentTab);
        },
        _initEvent: function () {
            vc.on("indexContext", "_queryIndexContextData", function (_param) {
            });
        },
        methods: {
            _initDate: function () {
                vc.initDate('startDate', function (_value) {
                    vc.component.reportFeeDetailInfo.conditions.startDate = _value;
                });
                vc.initDate('endDate', function (_value) {
                    vc.component.reportFeeDetailInfo.conditions.endDate = _value;
                });
                let _data = new Date();
                let _month = _data.getMonth() + 1;
                let _newDate = "";
                if (_month < 10) {
                    _newDate = _data.getFullYear() + "-0" + _month + "-01";
                } else {
                    _newDate = _data.getFullYear() + "-" + _month + "-01";
                }
                vc.component.reportFeeDetailInfo.conditions.startDate = _newDate;
                _data.setMonth(_data.getMonth() + 1);
                _month = _data.getMonth() + 1;
                if (_month < 10) {
                    _newDate = _data.getFullYear() + "-0" + _month + "-01";
                } else {
                    _newDate = _data.getFullYear() + "-" + _month + "-01";
                }
                vc.component.reportFeeDetailInfo.conditions.endDate = _newDate;
            },
            changeTab: function (_tab) {
                vc.component.reportFeeDetailInfo._currentTab = _tab;
                vc.emit(_tab, 'switch', vc.component.reportFeeDetailInfo.conditions)
            },
            //查询
            _queryMethod: function () {
                vc.component.changeTab(vc.component.reportFeeDetailInfo._currentTab);
            },
            //重置
            _resetMethod: function () {
                vc.component.reportFeeDetailInfo.conditions.startDate = "";
                vc.component.reportFeeDetailInfo.conditions.endDate = "";
                vc.component.reportFeeDetailInfo.conditions.objName = "";
                vc.component.reportFeeDetailInfo.conditions.ownerName = "";
                vc.component.reportFeeDetailInfo.conditions.link = "";
                // vc.component.reportFeeDetailInfo.conditions.communityId = "";
                vc.component._initDate();
                vc.component.changeTab(vc.component.reportFeeDetailInfo._currentTab);
            },
            _loadStaffCommunitys: function () {
                let param = {
                    params: {
                        _uid: '123mlkdinkldldijdhuudjdjkkd',
                        page: 1,
                        row: 100,
                    }
                };
                vc.http.apiGet('/community.listMyEnteredCommunitys',
                    param,
                    function (json, res) {
                        if (res.status == 200) {
                            let _data = JSON.parse(json);
                            vc.component.reportFeeDetailInfo.communitys = _data.communitys;
                        }
                    }, function () {
                        console.log('请求失败处理');
                    }
                );
            },
            _changCommunity: function () {
                vc.component.changeTab(vc.component.reportFeeDetailInfo._currentTab);
            },
            _moreCondition: function () {
                if (vc.component.reportFeeDetailInfo.moreCondition) {
                    vc.component.reportFeeDetailInfo.moreCondition = false;
                } else {
                    vc.component.reportFeeDetailInfo.moreCondition = true;
                }
            }
        }
    })
})(window.vc);