优化停车费历史导入

This commit is contained in:
java110 2021-04-16 12:29:10 +08:00
parent f4a10d5b46
commit f14258404d
3 changed files with 33 additions and 15 deletions

Binary file not shown.

View File

@ -6,25 +6,39 @@
<h5>资产信息</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_openDownloadHcExcelTemplate()">
v-on:click="_openDownloadHcExcelTemplate()">
<i class="glyphicon glyphicon-download-alt"></i>
模板
房屋模板
</button>
<button type="button" class="btn btn-primary btn-sm"
v-on:click="_openDownloadHcCarExcelTemplate()">
<i class="glyphicon glyphicon-download-alt"></i>
车辆模板
</button>
</div>
</div>
<div class="ibox-content">
<div>
<div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">费用对象</label>
<div class="col-sm-10">
<select class="custom-select" v-model="historyFeeDetailImportInfo.objType">
<option selected disabled value="">必填,请选择费用对象</option>
<option value="3333">房屋</option>
<option value="6666">车辆</option>
</select>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">选择文件</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">{{historyFeeDetailImportInfo.excelTemplate==''?'必填,请选择数据文件':historyFeeDetailImportInfo.excelTemplate.name}}</label>
<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">{{historyFeeDetailImportInfo.excelTemplate==''?'必填,请选择数据文件':historyFeeDetailImportInfo.excelTemplate.name}}</label>
</div>
</div>
</div>
@ -32,8 +46,8 @@
<label class="col-sm-2 col-form-label">说明</label>
<div class="col-sm-10">
<div class="custom-file">
请注意,这里是为了将物业之前系统缴费历史数据导入,方便物业后期查账使用,只有在物业数据初始化时使用,导入前请仔细检查数据,一旦导入前台无法删除缴费历史,只有工程师
从数据库删除
请注意,这里是为了将物业之前系统缴费历史数据导入,方便物业后期查账使用,只有在物业数据初始化时使用,导入前请仔细检查数据,一旦导入前台无法删除缴费历史,只有工程师
从数据库删除
</div>
</div>
</div>
@ -47,8 +61,7 @@
<div class="row">
<div class="col-md-10"></div>
<div class="col-md-2 " style="margin-bottom:10px; text-align:right">
<button type="button" class="btn btn-primary"
v-on:click="_importData()">导入
<button type="button" class="btn btn-primary" v-on:click="_importData()">导入
</button>
</div>
</div>

View File

@ -8,6 +8,7 @@
historyFeeDetailImportInfo: {
communityId: vc.getCurrentCommunity().communityId,
excelTemplate: '',
objType: ''
}
},
@ -43,6 +44,10 @@
//下载 模板
vc.jumpToPage('/import/importFeeDetail.xlsx')
},
_openDownloadHcCarExcelTemplate: function () {
//下载 模板
vc.jumpToPage('/import/importCarFeeDetail.xlsx')
},
getExcelTemplate: function (e) {
//console.log("getExcelTemplate 开始调用")
vc.component.historyFeeDetailImportInfo.excelTemplate = e.target.files[0];
@ -65,7 +70,7 @@
var param = new FormData();
param.append("uploadFile", vc.component.historyFeeDetailImportInfo.excelTemplate);
param.append('communityId', vc.component.historyFeeDetailImportInfo.communityId);
param.append('objType', vc.component.historyFeeDetailImportInfo.objType);
vc.http.upload(
'importFeeDetail',
@ -86,11 +91,11 @@
//vc.jumpToPage('/admin.html#/pages/property/roomCreateFee')
return;
}
vc.toast(json,10000);
vc.toast(json, 10000);
},
function (errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo,10000);
vc.toast(errInfo, 10000);
});
},
checkFileType: function (fileType) {