|
@@ -10,7 +10,7 @@
|
|
<u-select v-model="isShowCarLicense" :list="carLicenseList" @confirm="carLicenseListConfirm"></u-select>
|
|
<u-select v-model="isShowCarLicense" :list="carLicenseList" @confirm="carLicenseListConfirm"></u-select>
|
|
<view class="handle-monthly-item">
|
|
<view class="handle-monthly-item">
|
|
<view>车辆信息</view>
|
|
<view>车辆信息</view>
|
|
- <view>{{form.energyType| verifyStatusFilter}}</view>
|
|
|
|
|
|
+ <view>{{form.carLicense.energyType| verifyStatusFilter}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="handle-monthly-item">
|
|
<view class="handle-monthly-item">
|
|
<view>包月金额</view>
|
|
<view>包月金额</view>
|
|
@@ -142,39 +142,42 @@
|
|
this.form.dateRange = this.getMonthRange(new Date, this.form.month)
|
|
this.form.dateRange = this.getMonthRange(new Date, this.form.month)
|
|
},
|
|
},
|
|
carLicenseListConfirm (item) {
|
|
carLicenseListConfirm (item) {
|
|
|
|
+ console.log('item',item);
|
|
this.form.carLicense = item[0]
|
|
this.form.carLicense = item[0]
|
|
},
|
|
},
|
|
getMonthInfo(roadNo){
|
|
getMonthInfo(roadNo){
|
|
this.$u.api.monthInfo({roadNo: this.roadNo})
|
|
this.$u.api.monthInfo({roadNo: this.roadNo})
|
|
.then(res => {
|
|
.then(res => {
|
|
if (res.code === 200){
|
|
if (res.code === 200){
|
|
- this.vehicleNo = res.data.vehicleList[0].vehicleNo
|
|
|
|
this.lastActiveDate = res.data.lastActiveDate;
|
|
this.lastActiveDate = res.data.lastActiveDate;
|
|
- this.form.energyType=res.data.vehicleList[0].energyType;
|
|
|
|
this.form.monthAmount=res.data.monthAmount;
|
|
this.form.monthAmount=res.data.monthAmount;
|
|
this.carLicenseList = [];
|
|
this.carLicenseList = [];
|
|
res.data.vehicleList.forEach(item => {
|
|
res.data.vehicleList.forEach(item => {
|
|
const obj = {
|
|
const obj = {
|
|
value: item.id,
|
|
value: item.id,
|
|
- label: item.vehicleNo
|
|
|
|
|
|
+ label: item.vehicleNo,
|
|
|
|
+ energyType:item.energyType
|
|
}
|
|
}
|
|
this.carLicenseList.push(obj)
|
|
this.carLicenseList.push(obj)
|
|
- })
|
|
|
|
|
|
+ });
|
|
|
|
+ console.log('this.carLicenseList',this.carLicenseList[0])
|
|
this.form.carLicense = this.carLicenseList[0]
|
|
this.form.carLicense = this.carLicenseList[0]
|
|
}
|
|
}
|
|
|
|
+
|
|
})
|
|
})
|
|
},
|
|
},
|
|
submit(roadNo){
|
|
submit(roadNo){
|
|
// console.log(this.monthStartTime)
|
|
// console.log(this.monthStartTime)
|
|
|
|
+ // console.log('this.form.carLicense',this.form.carLicense);
|
|
this.$u.api.createMonth({
|
|
this.$u.api.createMonth({
|
|
roadNo:this.roadNo,
|
|
roadNo:this.roadNo,
|
|
vehicleNo:this.form.carLicense.label,
|
|
vehicleNo:this.form.carLicense.label,
|
|
- energyType:this.form.energyType,
|
|
|
|
|
|
+ energyType:this.form.carLicense.energyType,
|
|
monthStartTime:this.monthStartTime,
|
|
monthStartTime:this.monthStartTime,
|
|
monthEndTime:this.monthEndTime,
|
|
monthEndTime:this.monthEndTime,
|
|
monthCount:this.form.monthAmount})
|
|
monthCount:this.form.monthAmount})
|
|
.then(res => {
|
|
.then(res => {
|
|
- console.log("1111",res)
|
|
|
|
|
|
+ console.log("createMonth",res)
|
|
if(res.code === 200){
|
|
if(res.code === 200){
|
|
this.monthId = res.data.monthId
|
|
this.monthId = res.data.monthId
|
|
console.log(this.monthId)
|
|
console.log(this.monthId)
|
|
@@ -192,8 +195,15 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ }else{
|
|
|
|
+ this.$refs.uToast.show({
|
|
|
|
+ title: res.msg,
|
|
|
|
+ type: 'warning',
|
|
|
|
+ });
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ }).catch(err=>{
|
|
|
|
+
|
|
|
|
+ });
|
|
// this.getMonthInfo(roadNo)
|
|
// this.getMonthInfo(roadNo)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -204,6 +214,7 @@
|
|
},
|
|
},
|
|
filters:{
|
|
filters:{
|
|
verifyStatusFilter(value) {
|
|
verifyStatusFilter(value) {
|
|
|
|
+ console.log('value',value)
|
|
if (value === 0) {
|
|
if (value === 0) {
|
|
return '';
|
|
return '';
|
|
} else if(value === 1){
|
|
} else if(value === 1){
|