mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化代码
This commit is contained in:
parent
e04d440630
commit
0331e712bc
@ -52,7 +52,7 @@
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写房屋编号','reportFeeSummary')"
|
||||
class="form-control form-control-md"
|
||||
v-model.trim="reportFeeSummaryInfo.conditions.roomNum">
|
||||
v-model.trim="reportFeeSummaryInfo.conditions.objName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
moreCondition: false,
|
||||
conditions: {
|
||||
floorId: '',
|
||||
roomNum: '',
|
||||
objName: '',
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
configId: '',
|
||||
@ -64,13 +64,13 @@
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".startDate").val();
|
||||
var start = Date.parse(new Date(value));
|
||||
var end = Date.parse(new Date(vc.component.reportFeeSummaryInfo.conditions.endDate));
|
||||
var end = Date.parse(new Date($that.reportFeeSummaryInfo.conditions.endDate));
|
||||
if (start - end >= 0) {
|
||||
vc.toast("计费起始时间必须小于计费终止时间");
|
||||
$(".startDate").val('');
|
||||
vc.component.reportFeeSummaryInfo.conditions.startDate = "";
|
||||
$that.reportFeeSummaryInfo.conditions.startDate = "";
|
||||
} else {
|
||||
vc.component.reportFeeSummaryInfo.conditions.startDate = value;
|
||||
$that.reportFeeSummaryInfo.conditions.startDate = value;
|
||||
}
|
||||
});
|
||||
$('.endDate').datetimepicker({
|
||||
@ -86,14 +86,14 @@
|
||||
$('.endDate').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".endDate").val();
|
||||
var start = Date.parse(new Date(vc.component.reportFeeSummaryInfo.conditions.startDate));
|
||||
var start = Date.parse(new Date($that.reportFeeSummaryInfo.conditions.startDate));
|
||||
var end = Date.parse(new Date(value));
|
||||
if (start - end >= 0) {
|
||||
vc.toast("计费终止时间必须大于计费起始时间");
|
||||
$(".endDate").val('');
|
||||
vc.component.reportFeeSummaryInfo.conditions.endDate = "";
|
||||
$that.reportFeeSummaryInfo.conditions.endDate = "";
|
||||
} else {
|
||||
vc.component.reportFeeSummaryInfo.conditions.endDate = value;
|
||||
$that.reportFeeSummaryInfo.conditions.endDate = value;
|
||||
}
|
||||
});
|
||||
//防止多次点击时间插件失去焦点
|
||||
@ -144,13 +144,13 @@
|
||||
let param = {
|
||||
params: $that.reportFeeSummaryInfo.conditions
|
||||
};
|
||||
param.params.roomNum = param.params.roomNum.trim();
|
||||
param.params.objName = param.params.objName.trim();
|
||||
param.params.ownerName = param.params.ownerName.trim();
|
||||
param.params.link = param.params.link.trim();
|
||||
if ($that.reportFeeSummaryInfo.configIds.length > 0) {
|
||||
param.params.configIds = $that.reportFeeSummaryInfo.configIds.join(',');
|
||||
} else {
|
||||
param.params.configIds = vc.component.reportFeeSummaryInfo.configIds;
|
||||
param.params.configIds = $that.reportFeeSummaryInfo.configIds;
|
||||
}
|
||||
//发送get请求
|
||||
vc.http.apiGet('/reportFeeMonthStatistics.queryReportFeeSummary',
|
||||
@ -174,17 +174,17 @@
|
||||
},
|
||||
//重置
|
||||
_resetMethod: function (_page, _rows) {
|
||||
/*vc.component.reportFeeSummaryInfo.conditions.startDate = "";
|
||||
vc.component.reportFeeSummaryInfo.conditions.endDate = "";*/
|
||||
vc.component.reportFeeSummaryInfo.conditions.roomNum = "";
|
||||
vc.component.reportFeeSummaryInfo.conditions.ownerName = "";
|
||||
vc.component.reportFeeSummaryInfo.conditions.link = "";
|
||||
vc.component.reportFeeSummaryInfo.conditions.feeTypeCd = "";
|
||||
vc.component.reportFeeSummaryInfo.conditions.floorName = "";
|
||||
vc.component.reportFeeSummaryInfo.conditions.floorId = "";
|
||||
vc.component.reportFeeSummaryInfo.conditions.unitId = "";
|
||||
vc.component.reportFeeSummaryInfo.configIds = [];
|
||||
vc.component.reportFeeSummaryInfo.conditions.configId = "";
|
||||
/*$that.reportFeeSummaryInfo.conditions.startDate = "";
|
||||
$that.reportFeeSummaryInfo.conditions.endDate = "";*/
|
||||
$that.reportFeeSummaryInfo.conditions.roomNum = "";
|
||||
$that.reportFeeSummaryInfo.conditions.ownerName = "";
|
||||
$that.reportFeeSummaryInfo.conditions.link = "";
|
||||
$that.reportFeeSummaryInfo.conditions.feeTypeCd = "";
|
||||
$that.reportFeeSummaryInfo.conditions.floorName = "";
|
||||
$that.reportFeeSummaryInfo.conditions.floorId = "";
|
||||
$that.reportFeeSummaryInfo.conditions.unitId = "";
|
||||
$that.reportFeeSummaryInfo.configIds = [];
|
||||
$that.reportFeeSummaryInfo.conditions.configId = "";
|
||||
$that._listFees(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_listFeeConfigs: function () {
|
||||
@ -210,10 +210,10 @@
|
||||
vc.emit('searchFloor', 'openSearchFloorModel', {});
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.reportFeeSummaryInfo.moreCondition) {
|
||||
vc.component.reportFeeSummaryInfo.moreCondition = false;
|
||||
if ($that.reportFeeSummaryInfo.moreCondition) {
|
||||
$that.reportFeeSummaryInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.reportFeeSummaryInfo.moreCondition = true;
|
||||
$that.reportFeeSummaryInfo.moreCondition = true;
|
||||
}
|
||||
},
|
||||
_listFloors: function () {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user