|
@@ -22,7 +22,7 @@
|
|
|
|
|
|
<view class="mesView">
|
|
<view class="mesView">
|
|
<view class="leftTitle">购车时间</view>
|
|
<view class="leftTitle">购车时间</view>
|
|
- <picker class="timeBtn" @change="bindChange" mode="date">
|
|
|
|
|
|
+ <picker class="timeBtn" @change="bindChange" mode="date" :end="currentdate">
|
|
<view class="uni-input selectColor" v-if="time">{{time}}</view>
|
|
<view class="uni-input selectColor" v-if="time">{{time}}</view>
|
|
<view class="uni-input noSelectColor" v-else>请选择您的购车时间</view>
|
|
<view class="uni-input noSelectColor" v-else>请选择您的购车时间</view>
|
|
</picker>
|
|
</picker>
|
|
@@ -68,10 +68,12 @@
|
|
mileage: '',
|
|
mileage: '',
|
|
carId: '',
|
|
carId: '',
|
|
isEditCar: false,
|
|
isEditCar: false,
|
|
|
|
+ currentdate:'',
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(opt) {
|
|
onLoad(opt) {
|
|
|
|
+ this.getNowFormatDate();
|
|
var carModelInfo = uni.getStorageSync("carModelInfo");
|
|
var carModelInfo = uni.getStorageSync("carModelInfo");
|
|
if (carModelInfo) {
|
|
if (carModelInfo) {
|
|
this.carModelInfo = carModelInfo;
|
|
this.carModelInfo = carModelInfo;
|
|
@@ -80,6 +82,9 @@
|
|
this.isEditCar = opt.isEditCar
|
|
this.isEditCar = opt.isEditCar
|
|
this.carId = opt.id
|
|
this.carId = opt.id
|
|
if (this.isEditCar == 'true') {
|
|
if (this.isEditCar == 'true') {
|
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
|
+ title:'编辑爱车'
|
|
|
|
+ })
|
|
this.getEditData()
|
|
this.getEditData()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -90,6 +95,23 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+
|
|
|
|
+ getNowFormatDate(){
|
|
|
|
+
|
|
|
|
+ var date = new Date();
|
|
|
|
+ var seperator1 = "-";
|
|
|
|
+ var year = date.getFullYear();
|
|
|
|
+ var month = date.getMonth() + 1;
|
|
|
|
+ var day = date.getDate();
|
|
|
|
+ if (month >= 1 && month <= 9) {
|
|
|
|
+ month = "0" + month;
|
|
|
|
+ }
|
|
|
|
+ if (day >= 0 && day <= 9) {
|
|
|
|
+ day = "0" + day;
|
|
|
|
+ }
|
|
|
|
+ var currentdate = year + seperator1 + month + seperator1 + day;
|
|
|
|
+ this.currentdate = currentdate;
|
|
|
|
+ },
|
|
getEditData() {
|
|
getEditData() {
|
|
uni.showLoading({});
|
|
uni.showLoading({});
|
|
var carModelInfo = {
|
|
var carModelInfo = {
|
|
@@ -115,7 +137,7 @@
|
|
// 展示时
|
|
// 展示时
|
|
this.plateNo = res.data.plateNumber;
|
|
this.plateNo = res.data.plateNumber;
|
|
carModelInfo.title = res.data.carModel;
|
|
carModelInfo.title = res.data.carModel;
|
|
- this.time = res.data.createTime.slice(0,res.data.createTime.length-8);
|
|
|
|
|
|
+ this.time = res.data.acarTime.slice(0,res.data.createTime.length-8);
|
|
this.mileage = res.data.milage;
|
|
this.mileage = res.data.milage;
|
|
|
|
|
|
this.carModelInfo = carModelInfo;
|
|
this.carModelInfo = carModelInfo;
|
|
@@ -196,7 +218,7 @@
|
|
nLevelID: this.carModelInfo.carModelInfo.nLevelID,
|
|
nLevelID: this.carModelInfo.carModelInfo.nLevelID,
|
|
engineType: this.carModelInfo.carModelInfo.engineModel,
|
|
engineType: this.carModelInfo.carModelInfo.engineModel,
|
|
brandLogo: this.carModelInfo.carModelInfo.logo,
|
|
brandLogo: this.carModelInfo.carModelInfo.logo,
|
|
- AcarTime: this.time,
|
|
|
|
|
|
+ acarTime: this.time,
|
|
guidePrice: this.carModelInfo.carModelInfo.guidePrice,
|
|
guidePrice: this.carModelInfo.carModelInfo.guidePrice,
|
|
}, 'POST').then(res => {
|
|
}, 'POST').then(res => {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
@@ -238,7 +260,7 @@
|
|
nLevelID: this.carModelInfo.carModelInfo.nLevelID,
|
|
nLevelID: this.carModelInfo.carModelInfo.nLevelID,
|
|
engineType: this.carModelInfo.carModelInfo.engineModel,
|
|
engineType: this.carModelInfo.carModelInfo.engineModel,
|
|
brandLogo: this.carModelInfo.carModelInfo.logo,
|
|
brandLogo: this.carModelInfo.carModelInfo.logo,
|
|
- AcarTime: this.time,
|
|
|
|
|
|
+ acarTime: this.time,
|
|
guidePrice: this.carModelInfo.carModelInfo.guidePrice,
|
|
guidePrice: this.carModelInfo.carModelInfo.guidePrice,
|
|
|
|
|
|
id: this.carId,
|
|
id: this.carId,
|