Browse Source

检测异常

twt 7 months ago
parent
commit
bdc2e69cea
2 changed files with 32 additions and 15 deletions
  1. 31 14
      pages/index/car.vue
  2. 1 1
      pages/index/index.vue

+ 31 - 14
pages/index/car.vue

@@ -24,7 +24,7 @@
 								
 							</view>
 						</view>
-						<view v-if="item.carDetailInfo.NextAuditTime||item.carDetailInfo.InsuranceExpireDate">
+						<view v-if="item.carDetailInfo.NextAuditTime||item.carDetailInfo.InsuranceExpireDate||item.remindSheetInfo.length>0">
 							<image class="carUpimg" v-if="item.show" src="../../static/img/icon_arrow_up.png" mode=""></image>
 							<image class="carUpimg" v-if="!item.show" src="../../static/img/icon_arrow_down.png" mode=""></image>
 						</view>
@@ -178,7 +178,7 @@
 				</view>
 				<!-- 提醒商机 -->
 				<!-- 检测异常商机 -->
-				<view class="line" v-if="false">
+				<view class="line" v-if="item.remindSheetInfo.length" @click.stop="carDfn4(item)">
 					<view class="lineTop">
 						<view class="lineTop1">
 							<view class="lineTopNs">
@@ -186,33 +186,35 @@
 								
 							</view>
 							<view class="lineTimeBox">
-								<span style="color: #FF0000;">2条</span>
-								<image class="carUpimg" src="../../static/img/icon_arrow_up.png" mode=""></image>
+								<span style="color: #FF0000;">{{item.remindSheetInfo.length}}条</span>
+								<image class="carUpimg" v-show="item.show4" src="../../static/img/icon_arrow_up.png" mode=""></image>
+								<image class="carUpimg" v-show="!item.show4" src="../../static/img/icon_arrow_down.png" mode=""></image>
 							</view>
 						</view>
 					
 					</view>
-					<view class="lineCont">
-						<view class="lcLine">
+					<view class="lineCont"  v-show="item.show4">
+						<view class="lcLine" v-for="(v,i) in item.remindSheetInfo">
 							<view class="lineTop1">
 								<view class="lineTopNs">
-									<view class="nsTxt">检测异常商机</view>
+									<view class="nsTxt">{{v.CategoryName}}</view>
 								</view>
 							</view>
 							
 							<view class="carData">
-								<view class="carDataLine">下次服务日期:2024-02-12</view>
-								<view class="carDataLine" style="color: #FF0000;">距离天数:10</view>
+								<view class="carDataLine">下次服务日期:{{v.NextServerDate}}</view>
+								<view class="carDataLine" style="color: #FF0000;" v-if="!isDateGreater(v.NextServerDate)">超期天数:{{daysUntilDate(v.NextServerDate)}}</view>
+							    <view class="carDataLine" style="color: #FF0000;" v-if="isDateGreater(v.NextServerDate)">距离天数:{{daysUntilDate(v.NextServerDate)}}</view>
 							</view>
-							<view class="carnotes">检测结果:长了换行1</view>
+							<view class="carnotes">检测结果:{{v.CheckResult}}</view>
 							<view class="carData" style="padding-top: 16rpx;">
-								<view class="carDataLine">检测日期:2024-02-12</view>
-								<view class="carDataLine" >检测里程:9383km</view>
+								<view class="carDataLine">检测日期:{{v.LastInTime}}</view>
+								<view class="carDataLine" >检测里程: <span v-if="v.NextServerKm">{{v.NextServerKm}}km</span> </view>
 							</view>
-							<view class="carnotes">检测门店:这是门店名称长了换行展示1</view>
+							<view class="carnotes">检测门店:{{v.LastShopName}}</view>
 							<view class="lineTop2">
 								<view class="chaoqi"></view>
-								<view class="lineBtn">发送提醒</view>
+								<view class="lineBtn" @click.stop="sendChat(v,4)">发送提醒</view>
 							</view>
 						</view>
 					
@@ -303,6 +305,17 @@
 			   			txt='您的爱车'+item.PlateNumber+'车险已于'+item.carDetailInfo.InsuranceExpireDate.slice(0,10)+'过期,为了不影响车辆使用,请及时续保~'
 			   		}		   
 			   }
+			   if(num==4){ //检测异常
+			   		var state= this.isDateGreater(item.NextServerDate)
+			   		var day= this.daysUntilDate(item.NextServerDate)
+			       if(state){
+					   txt='您好,您的爱车'+item.PlateNumber+'距离下次'+item.CategoryName+'维修保养,还剩下'+day+'天了,请及时到店保养~'
+			   			
+			   		}else{
+						//您好,您的爱车桂AXD021#检测部位#维修保养服务已超过预计下次服务日5天了,请及时到店保养~
+			   			txt='您好,您的爱车'+item.PlateNumber+item.CategoryName+'维修保养服务已超过预计下次服务日'+day+'5天了,请及时到店保养~'
+			   		}		   
+			   }
 			   console.log(txt)
 			 /* uni.showToast({
 			  	title: txt,
@@ -349,6 +362,9 @@
 		   carDfn1(item){
 		   		 item.show2=!item.show2	   
 		   },
+		   carDfn4(item){
+		   		 item.show4=!item.show4	   
+		   },
            getdata(){
 			   this.extCarInfo()
 			  /* var that=this;
@@ -381,6 +397,7 @@
 							item.show=false
 							item.show2=false
 							item.show3=false
+							item.show4=false
 						})
 					    this.carList=res.data
 					})

+ 1 - 1
pages/index/index.vue

@@ -128,7 +128,7 @@
 				 //this.init()
 			}
 			 */
-			 this.authUserInfo()
+			this.authUserInfo()
 			//this.extUserDetail()
 		},
 		methods: {