mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化车位车辆 取消时分秒
This commit is contained in:
parent
9400b0f01c
commit
9d5a58aa02
@ -140,7 +140,7 @@
|
|||||||
let _carNumType = $that.addCarInfo.carNumType;
|
let _carNumType = $that.addCarInfo.carNumType;
|
||||||
if(_carNumType == 'S'){
|
if(_carNumType == 'S'){
|
||||||
$that.addCarInfo.startTime = vc.dateTimeFormat(new Date().getTime());
|
$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()){
|
if(vc.component.addCarValidate()){
|
||||||
@ -150,11 +150,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
_initDateInfo: function () {
|
_initDateInfo: function () {
|
||||||
vc.component.addCarInfo.startTime = vc.dateTimeFormat(new Date().getTime());
|
vc.component.addCarInfo.startTime = vc.dateFormat(new Date().getTime());
|
||||||
$('.startTime').datetimepicker({
|
$('.startTime').datetimepicker({
|
||||||
|
minView: "month",
|
||||||
language: 'zh-CN',
|
language: 'zh-CN',
|
||||||
fontAwesome: 'fa',
|
fontAwesome: 'fa',
|
||||||
format: 'yyyy-mm-dd hh:ii:ss',
|
format: 'yyyy-mm-dd',
|
||||||
initTime: true,
|
initTime: true,
|
||||||
initialDate: new Date(),
|
initialDate: new Date(),
|
||||||
autoClose: 1,
|
autoClose: 1,
|
||||||
@ -167,9 +168,10 @@
|
|||||||
vc.component.addCarInfo.startTime = value;
|
vc.component.addCarInfo.startTime = value;
|
||||||
});
|
});
|
||||||
$('.endTime').datetimepicker({
|
$('.endTime').datetimepicker({
|
||||||
|
minView: "month",
|
||||||
language: 'zh-CN',
|
language: 'zh-CN',
|
||||||
fontAwesome: 'fa',
|
fontAwesome: 'fa',
|
||||||
format: 'yyyy-mm-dd hh:ii:ss',
|
format: 'yyyy-mm-dd',
|
||||||
initTime: true,
|
initTime: true,
|
||||||
initialDate: new Date(),
|
initialDate: new Date(),
|
||||||
autoClose: 1,
|
autoClose: 1,
|
||||||
|
|||||||
@ -56,6 +56,12 @@
|
|||||||
_initEvent: function () {
|
_initEvent: function () {
|
||||||
vc.on('editCar', 'openEditCar', function (_carInfo) {
|
vc.on('editCar', 'openEditCar', function (_carInfo) {
|
||||||
vc.copyObject(_carInfo, $that.editCarInfo);
|
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');
|
$('#editCarModal').modal('show');
|
||||||
vc.component._initEditCarDateInfo();
|
vc.component._initEditCarDateInfo();
|
||||||
});
|
});
|
||||||
@ -161,11 +167,12 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
_initEditCarDateInfo: function () {
|
_initEditCarDateInfo: function () {
|
||||||
vc.component.editCarInfo.startTime = vc.dateTimeFormat(new Date().getTime());
|
//vc.component.editCarInfo.startTime = vc.dateTimeFormat(new Date().getTime());
|
||||||
$('.editCarStartTime').datetimepicker({
|
$('.editCarStartTime').datetimepicker({
|
||||||
|
minView: "month",
|
||||||
language: 'zh-CN',
|
language: 'zh-CN',
|
||||||
fontAwesome: 'fa',
|
fontAwesome: 'fa',
|
||||||
format: 'yyyy-mm-dd hh:ii:ss',
|
format: 'yyyy-mm-dd',
|
||||||
initTime: true,
|
initTime: true,
|
||||||
initialDate: new Date(),
|
initialDate: new Date(),
|
||||||
autoClose: 1,
|
autoClose: 1,
|
||||||
@ -178,9 +185,10 @@
|
|||||||
vc.component.editCarInfo.startTime = value;
|
vc.component.editCarInfo.startTime = value;
|
||||||
});
|
});
|
||||||
$('.editCarEndTime').datetimepicker({
|
$('.editCarEndTime').datetimepicker({
|
||||||
|
minView: "month",
|
||||||
language: 'zh-CN',
|
language: 'zh-CN',
|
||||||
fontAwesome: 'fa',
|
fontAwesome: 'fa',
|
||||||
format: 'yyyy-mm-dd hh:ii:ss',
|
format: 'yyyy-mm-dd',
|
||||||
initTime: true,
|
initTime: true,
|
||||||
initialDate: new Date(),
|
initialDate: new Date(),
|
||||||
autoClose: 1,
|
autoClose: 1,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user