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