/** 业主详情页面 **/ (function (vc) { vc.extends({ data: { adminFeeDetailInfo: { feeId: '', configId: '', feeFlag:'', feeFlagName: '', feeTypeCdName: '', payerObjName: '', payerObjId: '', payerObjType:'', feeName: '', stateName: '', state: '', startTime: '', batchId: '', endTime: '', deadlineTime: '', amountOwed: '', attrs: [], _currentTab: 'aRoomDetailHisFee', needBack: false, } }, _initMethod: function () { $that.adminFeeDetailInfo.feeId = vc.getParam('feeId'); if (!vc.notNull($that.adminFeeDetailInfo.feeId)) { return; } $that._loadAdminFeeDetailInfo(); }, _initEvent: function () { vc.on('adminFeeDetail', 'listCarData', function (_info) { //$that._loadAdminFeeDetailInfo(); $that.changeTab($that.adminFeeDetailInfo._currentTab); }); }, methods: { _loadAdminFeeDetailInfo: function () { let param = { params: { page: 1, row: 1, feeId: $that.adminFeeDetailInfo.feeId, } }; //发送get请求 vc.http.apiGet('/fee.listAdminFee', param, function (json) { let _feeInfo = JSON.parse(json); // 员工列表 和 岗位列表匹配 vc.copyObject(_feeInfo.fees[0], $that.adminFeeDetailInfo); $that.adminFeeDetailInfo.attrs = _feeInfo.fees[0].feeAttrs; $that.changeTab($that.adminFeeDetailInfo._currentTab); }, function () { console.log('请求失败处理'); } ); }, changeTab: function (_tab) { $that.adminFeeDetailInfo._currentTab = _tab; let _ownerId = ""; $that.adminFeeDetailInfo.attrs.forEach(item => { if(item.specCd=='390007'){ _ownerId = item.value; } }); vc.emit(_tab, 'switch', { feeId: $that.adminFeeDetailInfo.feeId, payerObjId: $that.adminFeeDetailInfo.payerObjId, roomId: $that.adminFeeDetailInfo.payerObjId, carId: $that.adminFeeDetailInfo.payerObjId, configId:$that.adminFeeDetailInfo.configId, state:$that.adminFeeDetailInfo.state, ownerId:_ownerId }); }, _getDeadlineTime: function (_fee) { if (_fee.amountOwed == 0 && _fee.endTime == _fee.deadlineTime) { return "-"; } if (_fee.state == '2009001') { return "-"; } return _fee.deadlineTime; }, _getEndTime: function (_fee) { if (_fee.state == '2009001') { return "-"; } return _fee.endTime; }, } }); })(window.vc);