优化代码

This commit is contained in:
wuxw 2025-02-07 00:36:40 +08:00
parent 985995eb74
commit ce76d52a74

View File

@ -152,18 +152,12 @@
$('.feeStartTime').datetimepicker()
.on('changeDate', function (ev) {
var value = $(".feeStartTime").val();
$that.reportPayFeeDetailInfo.conditions.startTime = value;
$that.reportPayFeeDetailInfo.conditions.feeStartTime = value;
});
$('.feeEndTime').datetimepicker()
.on('changeDate', function (ev) {
var value = $(".feeEndTime").val();
$that.reportPayFeeDetailInfo.conditions.endTime = value;
let start = Date.parse(new Date($that.reportPayFeeDetailInfo.conditions.startTime))
let end = Date.parse(new Date($that.reportPayFeeDetailInfo.conditions.endTime))
if (start - end >= 0) {
vc.toast("收费结束时间必须大于收费开始时间")
$that.reportPayFeeDetailInfo.conditions.endTime = '';
}
$that.reportPayFeeDetailInfo.conditions.feeEndTime = value;
});
//防止多次点击时间插件失去焦点
document.getElementsByClassName(' form-control startTime')[0].addEventListener('click', myfunc)