优化费用导入bug

This commit is contained in:
wuxw 2025-03-25 18:19:34 +08:00
parent aab2e8de82
commit ff83c88dfb
3 changed files with 202 additions and 175 deletions

View File

@ -2,80 +2,86 @@
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<h3 class="m-t-none m-b "><vc:i18n name="费用导入" namespace="importRoomFee"></vc:i18n></h3>
<h3 class="m-t-none m-b ">
<vc:i18n name="费用导入" namespace="importRoomFee"></vc:i18n>
</h3>
<div class="ibox-content">
<div>
<div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">
<span><vc:i18n name="费用类型" namespace="importRoomFee"></vc:i18n></span>
</label>
<div class="col-sm-10">
<select class="custom-select" v-model="importRoomFeeInfo.feeTypeCd"
@change="_changeFeeTypeCd(importRoomFeeInfo.feeTypeCd)">
<option selected disabled value="">{{vc.i18n('必填,请选择费用类型','importRoomFee')}}</option>
<option v-for="(item,index) in importRoomFeeInfo.feeTypeCds" :key="index"
v-bind:value="item.statusCd">
{{item.name}}
</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">
<span><vc:i18n name="费用对象" namespace="importRoomFee"></vc:i18n></span>
<div class="form-group row">
<label class="col-sm-2 col-form-label">
<span>
<vc:i18n name="费用类型" namespace="importRoomFee"></vc:i18n>
</span>
</label>
<div class="col-sm-10">
<select class="custom-select" v-model="importRoomFeeInfo.feeTypeCd"
@change="_changeFeeTypeCd(importRoomFeeInfo.feeTypeCd)">
<option selected disabled value="">{{vc.i18n('必填,请选择费用类型','importRoomFee')}}</option>
<option v-for="(item,index) in importRoomFeeInfo.feeTypeCds" :key="index"
v-bind:value="item.statusCd">
{{item.name}}
</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">
<span>
<vc:i18n name="费用对象" namespace="importRoomFee"></vc:i18n>
</span>
</label>
<div class="col-sm-10">
<select class="custom-select" v-model="importRoomFeeInfo.objType">
<option selected disabled value="">{{vc.i18n('必填,请选择费用对象','importRoomFee')}}</option>
<option value="3333">{{vc.i18n('房屋','importRoomFee')}}</option>
<option value="6666">{{vc.i18n('车位车辆','importRoomFee')}}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">
<span>
<vc:i18n name="选择文件" namespace="importRoomFee"></vc:i18n>
</span>
</label>
<div class="col-sm-10">
<div class="custom-file">
<input id="excelTemplate" ref="excelTemplate" type="file"
class="custom-file-input form-control" name="excelTemplate"
v-on:change="getExcelTemplate($event)" accept=".xls,.xlsx">
<label for="excelTemplate" class="custom-file-label">
{{importRoomFeeInfo.excelTemplate==''?'必填,请选择数据文件':importRoomFeeInfo.excelTemplate.name}}
</label>
<div class="col-sm-10">
<select class="custom-select" v-model="importRoomFeeInfo.objType"
>
<option selected disabled value="">{{vc.i18n('必填,请选择费用对象','importRoomFee')}}</option>
<option value="3333">{{vc.i18n('房屋','importRoomFee')}}</option>
<option value="6666">{{vc.i18n('车位车辆','importRoomFee')}}</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">
<span><vc:i18n name="选择文件" namespace="importRoomFee"></vc:i18n></span>
</label>
<div class="col-sm-10">
<div class="custom-file">
<input id="excelTemplate" ref="excelTemplate" type="file"
class="custom-file-input form-control" name="excelTemplate"
v-on:change="getExcelTemplate($event)" accept=".xls,.xlsx">
<label for="excelTemplate" class="custom-file-label">
{{importRoomFeeInfo.excelTemplate==''?'必填,请选择数据文件':importRoomFeeInfo.excelTemplate.name}}
</label>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">
<span><vc:i18n name="下载模板" namespace="importRoomFee"></vc:i18n></span>
</label>
<div class="col-sm-10">
请先下载
<a :href="'/callComponent/importRoomFee/exportData?communityId='+importRoomFeeInfo.communityId+'&objType='+importRoomFeeInfo.objType"
target="_blank">
<span><vc:i18n name="导入模板" namespace="importRoomFee"></vc:i18n></span>
</a>
准备数据后,上传导入
</div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button" v-on:click="_importData()">
<i class="fa fa-check"></i>&nbsp;导入
</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
data-dismiss="modal">
<i class="fa fa-close"></i>&nbsp;取消
</button>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">
<span>
<vc:i18n name="下载模板" namespace="importRoomFee"></vc:i18n>
</span>
</label>
<div class="col-sm-10">
请先下载
<a href="javascript:void(0)" @click="_downloadImportFeeTemplate()"
>
<vc:i18n name="导入模板" namespace="importRoomFee"></vc:i18n>
</a>
准备数据后,上传导入
</div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button" v-on:click="_importData()">
<i class="fa fa-check"></i>&nbsp;导入
</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
data-dismiss="modal">
<i class="fa fa-close"></i>&nbsp;取消
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -91,8 +91,29 @@
vc.toast(errInfo, 10000);
});
},
_exportRoomFeeTemplate: function () {
vc.jumpToPage('/callComponent/importRoomFee/exportData?communityId=' + vc.getCurrentCommunity().communityId + "&objType=" + $that.importRoomFeeInfo.objType);
_downloadImportFeeTemplate: function () {
//vc.jumpToPage('/callComponent/importRoomFee/exportData?communityId=' + vc.getCurrentCommunity().communityId + "&objType=" + $that.importRoomFeeInfo.objType);
$('#importRoomFeeModel').modal('hide');
let param = {
params: {
communityId:vc.getCurrentCommunity().communityId,
objType:$that.importRoomFeeInfo.objType,
pagePath:'exportFeeImportTemplate'
}
};
//发送get请求
vc.http.apiGet('/export.exportData', param,
function (json, res) {
let _json = JSON.parse(json);
vc.toast(_json.msg);
if (_json.code == 0) {
vc.jumpToPage('/#/pages/property/downloadTempFile?tab=下载中心')
}
},
function (errInfo, error) {
console.log('请求失败处理');
});
},
clearAddFeeConfigInfo: function() {
var _feeTypeCds = $that.importRoomFeeInfo.feeTypeCds;

View File

@ -1,118 +1,118 @@
<div class=" animated fadeInRight ecommerce">
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>
<span><vc:i18n name="查询条件" namespace="roomFeeImport"></vc:i18n></span>
</h5>
<div class="ibox-tools" style="top:10px;"></div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入导入ID','roomFeeImport')"
v-model="roomFeeImport.conditions.importFeeId" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<select class="custom-select" v-model="roomFeeImport.conditions.feeTypeCd">
<option selected value="">{{vc.i18n('必填,请选择费用类型','roomFeeImport')}}</option>
<option v-for="(item,index) in roomFeeImport.feeTypeCds" :key="index"
v-bind:value="item.statusCd" v-if="item.statusCd !='888800010008'">
{{item.name}}
</option>
</select>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryImportFeeMethod()">
<i class="fa fa-search"></i>
<span><vc:i18n name="查询" namespace="roomFeeImport"></vc:i18n></span>
</button>
<button type="button" class="btn btn-primary btn-sm" v-on:click="_resetImportFeeMethod()">
<i class="fa fa-repeat"></i>
<span><vc:i18n name="重置" namespace="roomFeeImport"></vc:i18n></span>
</button>
</div>
<div class="ibox ">
<div class="ibox-title">
<h5>
<span>
<vc:i18n name="查询条件" namespace="roomFeeImport"></vc:i18n>
</span>
</h5>
<div class="ibox-tools" style="top:10px;"></div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入导入ID','roomFeeImport')"
v-model="roomFeeImport.conditions.importFeeId" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<select class="custom-select" v-model="roomFeeImport.conditions.feeTypeCd">
<option selected value="">{{vc.i18n('必填,请选择费用类型','roomFeeImport')}}</option>
<option v-for="(item,index) in roomFeeImport.feeTypeCds" :key="index"
v-bind:value="item.statusCd" v-if="item.statusCd !='888800010008'">
{{item.name}}
</option>
</select>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryImportFeeMethod()">
<i class="fa fa-search"></i>
<span>
<vc:i18n name="查询" namespace="roomFeeImport"></vc:i18n>
</span>
</button>
<button type="button" class="btn btn-primary btn-sm" v-on:click="_resetImportFeeMethod()">
<i class="fa fa-repeat"></i>
<span>
<vc:i18n name="重置" namespace="roomFeeImport"></vc:i18n>
</span>
</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>
<span><vc:i18n name="费用导入" namespace="roomFeeImport"></vc:i18n></span>
</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openFeeSharing(null,true)">
<i class="fa fa-plus"></i>
<span><vc:i18n name="费用公摊" namespace="roomFeeImport"></vc:i18n></span>
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openRoomFeeImport(null,true)">
<i class="fa fa-plus"></i>
<span><vc:i18n name="费用导入" namespace="roomFeeImport"></vc:i18n></span>
</button>
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<!-- <th class="text-center">
<div class="ibox">
<div class="ibox-title">
<h5>
<span>
<vc:i18n name="费用导入" namespace="roomFeeImport"></vc:i18n>
</span>
</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openFeeSharing(null,true)">
<i class="fa fa-plus"></i>
<span>
<vc:i18n name="费用公摊" namespace="roomFeeImport"></vc:i18n>
</span>
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openRoomFeeImport(null,true)">
<i class="fa fa-plus"></i>
<span>
<vc:i18n name="费用导入" namespace="roomFeeImport"></vc:i18n>
</span>
</button>
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<!-- <th class="text-center">
<span><vc:i18n name="信息" namespace="roomFeeImport"></vc:i18n></span>ID
</th> -->
<th class="text-center">
<span><vc:i18n name="导入" namespace="roomFeeImport"></vc:i18n></span>ID
</th>
<th class="text-center">
<span><vc:i18n name="费用类型" namespace="roomFeeImport"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="创建时间" namespace="roomFeeImport"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="备注" namespace="roomFeeImport"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="操作" namespace="roomFeeImport"></vc:i18n></span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="fee in roomFeeImport.improtFees">
<td class="text-center">{{fee.importFeeId}}</td>
<td class="text-center">{{fee.feeTypeCdName}}</td>
<td class="text-center">{{fee.createTime}}</td>
<td class="text-center">{{fee.remark}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openImportFeeDetail(fee)">
<span><vc:i18n name="详情" namespace="roomFeeImport"></vc:i18n></span>
</button>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
<th class="text-center">
<vc:i18n name="导入ID" namespace="roomFeeImport"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="费用类型" namespace="roomFeeImport"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="创建时间" namespace="roomFeeImport"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="备注" namespace="roomFeeImport"></vc:i18n>
</th>
<th class="text-center">
<vc:i18n name="操作" namespace="roomFeeImport"></vc:i18n>
</th>
</tr>
</thead>
<tbody>
<tr v-for="fee in roomFeeImport.improtFees">
<td class="text-center">{{fee.importFeeId}}</td>
<td class="text-center">{{fee.feeTypeCdName}}</td>
<td class="text-center">{{fee.createTime}}</td>
<td class="text-center">{{fee.remark}}</td>
<td class="text-center">
<div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openImportFeeDetail(fee)">
<vc:i18n name="详情" namespace="roomFeeImport"></vc:i18n>
</button>
</div>
</td>
</tr>
</tbody>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
<vc:create path="property/importRoomFee"></vc:create>
<vc:create path="property/feeSharing"></vc:create>
</div>
</div>