zhangjq
2026-01-27 6f51f667ae7b13dca029045c221d0b1722cf98df
public/components/property/importOwnerRoom/importOwnerRoom.js
@@ -9,7 +9,6 @@
        _initMethod: function() {},
        _initEvent: function() {
            vc.on('importOwnerRoom', 'openImportOwnerRoomModal', function(_param) {
                $that.clearAddFeeConfigInfo();
                $('#importOwnerRoomModel').modal('show');
            });
        },
@@ -56,8 +55,6 @@
                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', // 模块名
@@ -79,7 +76,6 @@
                            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;
@@ -114,27 +110,17 @@
                        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'];
@@ -155,4 +141,4 @@
            }
        }
    });
})(window.vc);
})(window.vc);