| | |
| | | _initMethod: function() {}, |
| | | _initEvent: function() { |
| | | vc.on('importOwnerRoom', 'openImportOwnerRoomModal', function(_param) { |
| | | $that.clearAddFeeConfigInfo(); |
| | | $('#importOwnerRoomModel').modal('show'); |
| | | }); |
| | | }, |
| | |
| | | param.append('userId', userId); // 添加userId参数 |
| | | param.append('USER-ID', userId); // 添加USER-ID参数(大写形式),与车辆导入保持一致 |
| | | |
| | | // param.append('feeTypeCd', vc.component.importRoomFeeInfo.feeTypeCd); |
| | | // param.append('objType', $that.importRoomFeeInfo.objType); |
| | | // 上传文件并处理响应,与车辆导入保持一致 |
| | | vc.http.upload( |
| | | 'assetImport', // 模块名 |
| | |
| | | vc.toast("处理成功"); |
| | | console.log('导入成功,logId:', _json.data.logId); // 打印logId到console |
| | | $('#importOwnerRoomModel').modal('hide'); // 关闭模态框 |
| | | $that.clearAddFeeConfigInfo(); // 清空表单 |
| | | // 跳转到导入日志详情页面 |
| | | vc.jumpToPage('/#/pages/property/assetImportLogDetail?logId=' + _json.data.logId + '&logType=importRoomOwnerV2'); |
| | | return; |
| | |
| | | vc.toast(errorMsg, 10000); |
| | | // 关闭模态框 |
| | | $('#importOwnerRoomModel').modal('hide'); |
| | | // 清空表单 |
| | | $that.clearAddFeeConfigInfo(); |
| | | }); |
| | | }, |
| | | clearAddFeeConfigInfo: function() { |
| | | // var _feeTypeCds = $that.importRoomFeeInfo.feeTypeCds; |
| | | $that.importOwnerRoomInfo = { |
| | | communityId: vc.getCurrentCommunity().communityId, |
| | | excelTemplate: '' |
| | | // feeTypeCd: '', |
| | | // feeTypeCds: [], |
| | | // objType: '3333' |
| | | }; |
| | | // $that.importRoomFeeInfo.feeTypeCds = _feeTypeCds; |
| | | }, |
| | | _changeFeeTypeCd: function(_feeTypeCd) {}, |
| | | getExcelTemplate: function(e) { |
| | | //console.log("getExcelTemplate 开始调用") |
| | | $that.importOwnerRoomInfo.excelTemplate = e.target.files[0]; |
| | | // 重置input[type=file]的value,确保用户修改文件后再次选择同一文件时能触发change事件 |
| | | e.target.value = ''; |
| | | }, |
| | | checkOwnerFileType: function(fileType) { |
| | | const acceptTypes = ['xlsx', 'xls']; |
| | |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| | | })(window.vc); |