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
/**
 入驻小区
 **/
(function (vc) {
    var DEFAULT_PAGE = 1;
    var DEFAULT_ROWS = 10;
    vc.extends({
        data: {
            auditAuthOwnerInfo: {
                appUsers: [],
                total: 0,
                records: 1,
                moreCondition: false,
                currentAppUserId: '',
                name: '',
                states: [{
                        name: '全部',
                        statusCd: ''
                    },
                    {
                        name: '待审核',
                        statusCd: '10000'
                    }, {
                        name: '待认证',
                        statusCd: '11000'
                    }, {
                        name: '审核成功',
                        statusCd: '12000'
                    }, {
                        name: '审核失败',
                        statusCd: '13000'
                    }
                ],
                conditions: {
                    appUserName: '',
                    idCard: '',
                    link: '',
                    state: '',
                    appType: '',
                    appTypeName: '',
                    memberId: ''
                }
            }
        },
        _initMethod: function () {
            $that._listAuditAuthOwners(DEFAULT_PAGE, DEFAULT_ROWS);
        },
        _initEvent: function () {
            vc.on('auditAuthOwner', 'listAuditAuthOwner', function (_param) {
                $that._listAuditAuthOwners(DEFAULT_PAGE, DEFAULT_ROWS);
            });
            vc.on('auditAuthOwner', 'auditMessage', function (_auditInfo) {
                $that._auditAppUserBindingOwner(_auditInfo);
            });
            vc.on('pagination', 'page_event', function (_currentPage) {
                $that._listAuditAuthOwners(_currentPage, DEFAULT_ROWS);
            });
        },
        methods: {
            _listAuditAuthOwners: function (_page, _rows) {
                $that.auditAuthOwnerInfo.conditions.page = _page;
                $that.auditAuthOwnerInfo.conditions.row = _rows;
                $that.auditAuthOwnerInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
                let param = {
                    params: $that.auditAuthOwnerInfo.conditions
                };
                param.params.appUserName = param.params.appUserName.trim();
                param.params.link = param.params.link.trim();
                param.params.idCard = param.params.idCard.trim();
                param.params.memberId = param.params.memberId.trim();
                //发送get请求
                vc.http.apiGet('/owner.listAuditAppUserBindingOwners',
                    param,
                    function (json, res) {
                        let _json = JSON.parse(json);
                        $that.auditAuthOwnerInfo.total = _json.total;
                        $that.auditAuthOwnerInfo.records = _json.records;
                        $that.auditAuthOwnerInfo.appUsers = _json.data;
                        vc.emit('pagination', 'init', {
                            total: $that.auditAuthOwnerInfo.records,
                            dataCount: $that.auditAuthOwnerInfo.total,
                            currentPage: _page
                        });
                    },
                    function (errInfo, error) {
                        console.log('请求失败处理');
                    }
                );
            },
            _openAuditAuthOwnerModel: function (_appUser) {
                //$that.auditAuthOwnerInfo.currentAppUserId = _auditAppUserBindingOwner.appUserId;
                //vc.emit('audit', 'openAuditModal', {});
 
                vc.jumpToPage('/#/pages/property/auditAuthOwnerUndo?appUserId=' + _appUser.appUserId +
                    "&roomId=" + _appUser.roomId +
                    "&appUserName=" + _appUser.appUserName +
                    "&link=" + _appUser.link);
            },
            _moreCondition: function () {
                if ($that.auditAuthOwnerInfo.moreCondition) {
                    $that.auditAuthOwnerInfo.moreCondition = false;
                } else {
                    $that.auditAuthOwnerInfo.moreCondition = true;
                }
            },
            //查询
            _queryAuditAuthOwnerMethod: function () {
                $that._listAuditAuthOwners(DEFAULT_PAGE, DEFAULT_ROWS);
            },
            //重置
            _resetAuditAuthOwnerMethod: function () {
                $that.auditAuthOwnerInfo.conditions.appUserName = "";
                $that.auditAuthOwnerInfo.conditions.idCard = "";
                $that.auditAuthOwnerInfo.conditions.state = "";
                $that.auditAuthOwnerInfo.conditions.link = "";
                $that.auditAuthOwnerInfo.conditions.memberId = "";
                $that._listAuditAuthOwners(DEFAULT_PAGE, DEFAULT_ROWS);
            },
            _deleteAppUserBindingOwnerModel: function (_auditAppUserBindingOwner) {
                vc.emit('deleteAppUserBindingOwner', 'openDeleteAppUserBindingOwnerModal', _auditAppUserBindingOwner);
            },
            _resetUserPwdModel: function (_staff) {
                vc.emit('resetStaffPwd', 'openResetStaffPwd', _staff);
            },
            _swatchState: function (_item) {
                $that.auditAuthOwnerInfo.conditions.state = _item.statusCd;
                $that._listAuditAuthOwners(DEFAULT_PAGE, DEFAULT_ROWS);
            }
        }
    });
})(window.vc);