1
This commit is contained in:
parent
66a12e1d26
commit
afe1959390
@ -18,7 +18,7 @@ module.exports = {
|
||||
// 应用名称
|
||||
name: "智修小助手",
|
||||
// 应用版本
|
||||
version: "2.3",
|
||||
version: "2.4",
|
||||
// 应用logo
|
||||
logo: "/static/logo.png'",
|
||||
// 官方网站
|
||||
|
@ -77,7 +77,7 @@
|
||||
<view class="value">{{ carList[activeCarIndex].nextInspectionDate || '未知' }}</view>
|
||||
</view>
|
||||
<view class="infoItem" style="flex: 1">
|
||||
<view class="label">保险时间</view>
|
||||
<view class="label">保险到期时间</view>
|
||||
<view class="value">{{ carList[activeCarIndex].insuranceExpiryDate || '未知' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -459,6 +459,11 @@ export default {
|
||||
if(!this.formData.handleMobile){
|
||||
this.formData.handleMobile = newVal.phoneNumber
|
||||
}
|
||||
//带过来车辆的年检到期时间和保险到期时间
|
||||
console.log(newVal,"newValnewVal")
|
||||
if(!this.formData.handleMobile){
|
||||
this.formData.handleMobile = newVal.phoneNumber
|
||||
}
|
||||
if(!this.formData.cusFrom){
|
||||
for (let i = 0; i < this.cusFromList.length; i++) {
|
||||
if(newVal.dataFrom==this.cusFromList[i].value){
|
||||
@ -471,6 +476,21 @@ export default {
|
||||
console.log('obj changed:', newVal, oldVal)
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'activeCarIndex':{
|
||||
handler: function (newVal, oldVal) {
|
||||
if(this.carList[newVal].nextInspectionDate){
|
||||
this.formData.nextInspectionDate = formatTimestampCustom(this.carList[newVal].nextInspectionDate)
|
||||
}else{
|
||||
this.formData.nextInspectionDate = formatDate(Date.now())
|
||||
}
|
||||
if(this.carList[newVal].insuranceExpiryDate) {
|
||||
this.formData.insuranceExpiryDate = formatTimestampCustom(this.carList[newVal].insuranceExpiryDate)
|
||||
}else{
|
||||
this.formData.insuranceExpiryDate = formatDate(Date.now())
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
onLoad(data) {
|
||||
@ -494,7 +514,6 @@ export default {
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 日期选择 事件
|
||||
bindDateChange1(e) {
|
||||
this.formData.inTime = e.target.value; // 更新选择的日期到data中的date变量
|
||||
@ -820,6 +839,16 @@ export default {
|
||||
for (let i = 0; i < this.carList.length; i++) {
|
||||
if (this.pageData.carId == this.carList[i].id) {
|
||||
this.activeCarIndex = i
|
||||
if(this.carList[i].nextInspectionDate){
|
||||
this.formData.nextInspectionDate = formatTimestampCustom(this.carList[i].nextInspectionDate)
|
||||
}else{
|
||||
this.formData.nextInspectionDate = formatDate(Date.now())
|
||||
}
|
||||
if(this.carList[i].insuranceExpiryDate) {
|
||||
this.formData.insuranceExpiryDate = formatTimestampCustom(this.carList[i].insuranceExpiryDate)
|
||||
}else{
|
||||
this.formData.insuranceExpiryDate = formatDate(Date.now())
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -827,6 +856,16 @@ export default {
|
||||
for (let i = 0; i < this.carList.length; i++) {
|
||||
if (carId == this.carList[i].id) {
|
||||
this.activeCarIndex = i
|
||||
if(this.carList[i].nextInspectionDate){
|
||||
this.formData.nextInspectionDate = formatTimestampCustom(this.carList[i].nextInspectionDate)
|
||||
}else{
|
||||
this.formData.nextInspectionDate = formatDate(Date.now())
|
||||
}
|
||||
if(this.carList[i].insuranceExpiryDate) {
|
||||
this.formData.insuranceExpiryDate = formatTimestampCustom(this.carList[i].insuranceExpiryDate)
|
||||
}else{
|
||||
this.formData.insuranceExpiryDate = formatDate(Date.now())
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ import VNavigationBar from '@/components/VNavigationBar.vue';
|
||||
import request from "@/utils/request";
|
||||
import config from '@/config'
|
||||
import upload from "@/utils/upload";
|
||||
import {getDictByCode} from "@/utils/utils";
|
||||
import {getDictByCode,formatDate} from "@/utils/utils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -466,6 +466,12 @@ export default {
|
||||
this.car.licenseNumber = res.data.plateNo
|
||||
this.car.carRegisterDate = res.data.issueDate
|
||||
this.car.engineNumber = res.data.engineNo
|
||||
if(this.car.insuranceExpiryDate){
|
||||
this.car.insuranceExpiryDate= formatDate(this.car.insuranceExpiryDate)
|
||||
}
|
||||
if(this.car.nextInspectionDate){
|
||||
this.car.nextInspectionDate= formatDate(this.car.nextInspectionDate)
|
||||
}
|
||||
//车辆品牌自动定位
|
||||
this.brandList.forEach((item, index) => {
|
||||
if (item.brandName == res.data.brand) {
|
||||
|
Loading…
Reference in New Issue
Block a user