优化车位车辆 取消时分秒

This commit is contained in:
java110 2021-01-11 09:23:22 +08:00
parent 9400b0f01c
commit 9d5a58aa02
2 changed files with 17 additions and 7 deletions

View File

@ -140,7 +140,7 @@
let _carNumType = $that.addCarInfo.carNumType;
if(_carNumType == 'S'){
$that.addCarInfo.startTime = vc.dateTimeFormat(new Date().getTime());
$that.addCarInfo.endTime = '2037-01-01 00:00:00';
$that.addCarInfo.endTime = '2037-01-01';
}
if(vc.component.addCarValidate()){
@ -150,11 +150,12 @@
}
},
_initDateInfo: function () {
vc.component.addCarInfo.startTime = vc.dateTimeFormat(new Date().getTime());
vc.component.addCarInfo.startTime = vc.dateFormat(new Date().getTime());
$('.startTime').datetimepicker({
minView: "month",
language: 'zh-CN',
fontAwesome: 'fa',
format: 'yyyy-mm-dd hh:ii:ss',
format: 'yyyy-mm-dd',
initTime: true,
initialDate: new Date(),
autoClose: 1,
@ -167,9 +168,10 @@
vc.component.addCarInfo.startTime = value;
});
$('.endTime').datetimepicker({
minView: "month",
language: 'zh-CN',
fontAwesome: 'fa',
format: 'yyyy-mm-dd hh:ii:ss',
format: 'yyyy-mm-dd',
initTime: true,
initialDate: new Date(),
autoClose: 1,

View File

@ -56,6 +56,12 @@
_initEvent: function () {
vc.on('editCar', 'openEditCar', function (_carInfo) {
vc.copyObject(_carInfo, $that.editCarInfo);
if (_carInfo.startTime.indexOf(":") > -1) {
$that.editCarInfo.startTime = $that.editCarInfo.startTime.substring(0,10);
}
if (_carInfo.endTime.indexOf(":") > -1) {
$that.editCarInfo.endTime = $that.editCarInfo.endTime.substring(0,10);
}
$('#editCarModal').modal('show');
vc.component._initEditCarDateInfo();
});
@ -161,11 +167,12 @@
});
},
_initEditCarDateInfo: function () {
vc.component.editCarInfo.startTime = vc.dateTimeFormat(new Date().getTime());
//vc.component.editCarInfo.startTime = vc.dateTimeFormat(new Date().getTime());
$('.editCarStartTime').datetimepicker({
minView: "month",
language: 'zh-CN',
fontAwesome: 'fa',
format: 'yyyy-mm-dd hh:ii:ss',
format: 'yyyy-mm-dd',
initTime: true,
initialDate: new Date(),
autoClose: 1,
@ -178,9 +185,10 @@
vc.component.editCarInfo.startTime = value;
});
$('.editCarEndTime').datetimepicker({
minView: "month",
language: 'zh-CN',
fontAwesome: 'fa',
format: 'yyyy-mm-dd hh:ii:ss',
format: 'yyyy-mm-dd',
initTime: true,
initialDate: new Date(),
autoClose: 1,