diff --git a/pages-order/addOrder/addOrder.vue b/pages-order/addOrder/addOrder.vue
index 5abb48d..36bfeaa 100644
--- a/pages-order/addOrder/addOrder.vue
+++ b/pages-order/addOrder/addOrder.vue
@@ -220,7 +220,9 @@ export default {
},
onShow() {
if (this.phone != '') {
- this.listUserInfo()
+ setTimeout(() => {
+ this.listUserInfo()
+ }, 500)
}
},
methods: {
@@ -306,7 +308,7 @@ export default {
})
} else {
uni.showToast({
- title: '请输入手机号',
+ title: '请输入手机号|车牌号|车架号',
icon: 'none'
})
}
@@ -340,7 +342,9 @@ export default {
getCarList() {
const params = {
- userId: this.userInfo.userId
+ userId: this.userInfo.userId,
+ pageNo: 1,
+ pageSize: 100000
}
request({
url: '/admin-api/base/carMain/page',
@@ -348,7 +352,6 @@ export default {
params: params
}).then(res => {
this.carList = res.data.records
- console.log('车列表', this.carList)
for (let i = 0; i < this.carList.length; i++) {
if (this.carList[i].licenseNumber.toLowerCase() == this.phone.toLowerCase()) {
this.activeCarIndex = i
@@ -360,9 +363,21 @@ export default {
}
//将时间戳转换
this.carList.forEach(item => {
- item.inspectionDate = formatTimestampCustom(item.inspectionDate)
- item.insuranceDate = formatTimestampCustom(item.insuranceDate)
- item.carRegisterDate = formatTimestampCustom(item.carRegisterDate)
+ if (item.inspectionDate) {
+ item.inspectionDate = formatTimestampCustom(item.inspectionDate)
+ }else {
+ item.inspectionDate = ''
+ }
+ if (item.insuranceDate) {
+ item.insuranceDate = formatTimestampCustom(item.insuranceDate)
+ }else {
+ item.insuranceDate = ''
+ }
+ if (item.carRegisterDate) {
+ item.carRegisterDate = formatTimestampCustom(item.carRegisterDate)
+ }else {
+ item.carRegisterDate = ''
+ }
})
})
},
@@ -389,6 +404,10 @@ export default {
},
editUserInfo(userInfo) {
+ if (this.phone == '') return uni.showToast({
+ title: '请先输入手机号,再添加客户',
+ icon: 'none'
+ })
bus.$off('updateUserInfo')
bus.$on('updateUserInfo', (userInfo) => {
this.userInfo = userInfo
diff --git a/pages/myCar/carDetail.vue b/pages/myCar/carDetail.vue
index 3c06531..18883d9 100644
--- a/pages/myCar/carDetail.vue
+++ b/pages/myCar/carDetail.vue
@@ -5,7 +5,14 @@
-
+
-
-
-
+
+
+
+ {{ brandList && brandList[arrayIndex] ? brandList[arrayIndex].brandName : '' }}
+
+
+
+ {{ natureList[natureIndex].value}}
+
+
@@ -91,24 +96,6 @@
-
-
-
-
-
-
@@ -131,8 +118,10 @@