diff --git a/public/components/property/addCar/addCar.html b/public/components/property/addCar/addCar.html
index e9896e71f..ea44d4fcf 100644
--- a/public/components/property/addCar/addCar.html
+++ b/public/components/property/addCar/addCar.html
@@ -34,6 +34,30 @@
+
+
+
diff --git a/public/components/property/addCar/addCar.js b/public/components/property/addCar/addCar.js
index beebc06b7..4c172c348 100644
--- a/public/components/property/addCar/addCar.js
+++ b/public/components/property/addCar/addCar.js
@@ -15,7 +15,10 @@
carBrand:'',
carType:'',
carColor:'',
- carRemark:""
+ carRemark:"",
+ startTime:'',
+ endTime:'',
+ carNumType:''
},
carTypes:[
{
@@ -59,6 +62,8 @@
console.log('请求失败处理');
}
);
+
+ vc.component._initDateInfo();
},
_initEvent:function(){
vc.on('addCar', 'onIndex', function(_index){
@@ -103,6 +108,20 @@
errInfo:"车类型不能为空"
}
],
+ 'addCarInfo.startTime':[
+ {
+ limit:"required",
+ param:"",
+ errInfo:"起租时间不能为空"
+ }
+ ],
+ 'addCarInfo.endTime':[
+ {
+ limit:"required",
+ param:"",
+ errInfo:"结租时间不能为空"
+ }
+ ],
'addCarInfo.carColor':[
{
limit:"required",
@@ -118,12 +137,57 @@
});
},
saveAddCarInfo:function(){
+ let _carNumType = $that.addCarInfo.carNumType;
+ if(_carNumType == 'S'){
+ $that.addCarInfo.startTime = vc.dateFormat(new Date().getTime());
+ $that.addCarInfo.endTime = '2037-01-01 00:00:00';
+ }
+
if(vc.component.addCarValidate()){
//侦听回传
vc.emit($props.callBackComponent,$props.callBackFunction, vc.component.addCarInfo);
return ;
}
- }
+ },
+ _initDateInfo: function () {
+ vc.component.addCarInfo.startTime = vc.dateFormat(new Date().getTime());
+ $('.startTime').datetimepicker({
+ language: 'zh-CN',
+ fontAwesome: 'fa',
+ format: 'yyyy-mm-dd hh:ii:ss',
+ initTime: true,
+ initialDate: new Date(),
+ autoClose: 1,
+ todayBtn: true
+
+ });
+ $('.startTime').datetimepicker()
+ .on('changeDate', function (ev) {
+ var value = $(".startTime").val();
+ vc.component.addCarInfo.startTime = value;
+ });
+ $('.endTime').datetimepicker({
+ language: 'zh-CN',
+ fontAwesome: 'fa',
+ format: 'yyyy-mm-dd hh:ii:ss',
+ initTime: true,
+ initialDate: new Date(),
+ autoClose: 1,
+ todayBtn: true
+ });
+ $('.endTime').datetimepicker()
+ .on('changeDate', function (ev) {
+ var value = $(".endTime").val();
+ var start=Date.parse(new Date(vc.component.addCarInfo.startTime))
+ var end = Date.parse(new Date(value))
+ if(start-end>=0){
+ vc.toast("结租时间必须大于起租时间")
+ $(".endTime").val('')
+ }else{
+ vc.component.addCarInfo.endTime = value;
+ }
+ });
+ },
}
});
diff --git a/public/pages/property/hireParkingSpace/hireParkingSpace.html b/public/pages/property/hireParkingSpace/hireParkingSpace.html
index d64ea7760..b17bcecc9 100644
--- a/public/pages/property/hireParkingSpace/hireParkingSpace.html
+++ b/public/pages/property/hireParkingSpace/hireParkingSpace.html
@@ -19,34 +19,25 @@
callBackFunction="notify"
>
-
+
-
-
-
-
-
-
-
-
diff --git a/public/pages/property/hireParkingSpace/hireParkingSpace.js b/public/pages/property/hireParkingSpace/hireParkingSpace.js
index 162e53030..20e4ea4c2 100644
--- a/public/pages/property/hireParkingSpace/hireParkingSpace.js
+++ b/public/pages/property/hireParkingSpace/hireParkingSpace.js
@@ -31,7 +31,7 @@
vc.component.hireParkingSpaceInfo.$step.step({
index: 0,
time: 500,
- title: ["选择车位","业主信息","车辆信息","收费信息"]
+ title: ["选择车位","业主信息","车辆信息"]
});
vc.component.hireParkingSpaceInfo.index = vc.component.hireParkingSpaceInfo.$step.getIndex();
},
@@ -81,18 +81,17 @@
data:vc.component.hireParkingSpaceInfo.infos
}
- vc.http.post(
- 'hireParkingSpace',
- 'sell',
+ vc.http.apiPost(
+ 'owner.saveOwnerCars',
JSON.stringify(param),
{
emulateJSON:true
},
function(json,res){
- //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if(res.status == 200){
+ vc.toast("请记得收费哦!");
//关闭model
- vc.jumpToPage("/admin.html#/pages/property/listOwner?" + vc.objToGetParam(JSON.parse(json)));
+ vc.jumpToPage("/admin.html#/pages/property/listOwnerCar");
return ;
}
vc.toast(json);
diff --git a/public/pages/property/listOwnerCar/listOwnerCar.html b/public/pages/property/listOwnerCar/listOwnerCar.html
index 29f209b52..b8fbddfdc 100644
--- a/public/pages/property/listOwnerCar/listOwnerCar.html
+++ b/public/pages/property/listOwnerCar/listOwnerCar.html
@@ -58,7 +58,7 @@