From ab8be5245188eca4288d8cdbed0bbf13bb751c1c Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期三, 11 十二月 2024 17:40:19 +0800
Subject: [PATCH] feat:司机下载电子磅单 & 邀请司机从其他车队选择

---
 pages/sampling-page/index.vue |   93 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 89 insertions(+), 4 deletions(-)

diff --git a/pages/sampling-page/index.vue b/pages/sampling-page/index.vue
index e373e3b..b31a572 100644
--- a/pages/sampling-page/index.vue
+++ b/pages/sampling-page/index.vue
@@ -12,10 +12,12 @@
 						iconSize="1000"
 						v-if="CoalNameList.length == 0"></u-empty>
 				</view> -->
+				
                 <view class="title"><u-icon  size='26' color="#" name="order"></u-icon><i>寰呮鍖�</i></view>
 				<view class="body">
 					<!-- <selectTarget ref='selectTarget'></selectTarget> -->
                     <view class="collection-form">
+						<u-tabs :list="tabList" :activeStyle="{fontSize:'26rpx'} " @click="tabClick"></u-tabs>
                         <view style="position: relative;">
 					<u-empty mode="data"
 						icon="http://cdn.uviewui.com/uview/empty/data.png"
@@ -73,7 +75,7 @@
 						<view class="third-line">
 							<view class="time-icon">
 								<view
-									style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover">
+									style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mr1.res.jzeg.cn:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover">
 								</view>
 							</view>
 							<view class="send-date">{{ item.sendDate }}</view>
@@ -87,6 +89,7 @@
 							</view>
 						</view>
 					</view>
+					<view class="bottom"></view>
                     
 				</view>
 				</view>
@@ -121,8 +124,20 @@
 		data() {
 			return {
                 orderPlanData:[],
+				tagName:'澶栭攢',
                 activeObj:{},
+				timer:null,
                 showFlag:false,
+				tabList:[{
+					name:'澶栭攢'
+						},
+						{
+							name:'澶栬喘'
+						},
+						{
+							name:'鍐呰喘'
+						}
+					]
 			};
 		},
 		onLoad() {
@@ -131,7 +146,16 @@
 		methods: {
 			init() {
 				this.$nextTick(() => {
-                    this.getListData();
+					if(this.tagName == '澶栬喘'){
+						this.getWaiData();
+					}else if(this.tagName == '鍐呰喘'){
+						this.getNeiData();
+					} else{
+						this.getListData();
+					}
+					
+					
+					
 				})
 			},
             getListData(){
@@ -168,7 +192,65 @@
 
                 })
 
-            }
+            },
+			//瀹氭椂鏌ヨ浠诲姟
+			timerFun(){
+			this.timer = window.setInterval(() => {
+					setTimeout(() => {
+						if(this.tagName == '澶栬喘'){
+							this.getWaiData()
+						}else if(this.tagName == '鍐呰喘'){
+							this.getNeiData();
+						}
+						else{
+							this.getListData() //璋冪敤鎺ュ彛鐨勬柟娉�
+						}
+						console.log(1111111111)
+					}, 0)
+				}, 60000);
+			},
+			clearTime(){
+				window.clearInterval(this.timer)
+			},
+			tabClick(val){
+				console.log(val,'valll')
+					this.tagName = val.name;
+					if(val.name == '澶栬喘'){
+						this.getWaiData();
+					}else if(val.name === '鍐呰喘'){
+						this.getNeiData();
+					}
+					else{
+						this.getListData();
+					}
+				
+
+			},
+			getWaiData(){
+				this.$reqGet('inspectedTaskPage',{inspectionStatus:1,orderType:'澶栬喘'}).then(res=>{
+							if(res.code == 0){
+						if(res.data.records.length){
+							this.orderPlanData  = res.data.records;
+						}else{
+							this.orderPlanData = [];
+						}
+                     
+                    }
+						})
+			},
+			//鍐呰喘
+			getNeiData(){
+				this.$reqGet('inspectedTaskPage',{inspectionStatus:1,orderType:'鍐呰喘'}).then(res=>{
+							if(res.code == 0){
+						if(res.data.records.length){
+							this.orderPlanData  = res.data.records;
+						}else{
+							this.orderPlanData = [];
+						}
+                     
+                    }
+						})
+			}
 		},  
 	}
 </script>
@@ -224,15 +306,18 @@
 	}
     .body{
         position: absolute;
-        height: 500rpx;
         top: 38%;
         width: 97%;
         left: 50%;
         margin-left: -47%;
+	
         // box-shadow: 0 2px 18px 0 rgba(0, 0, 0, .2);
         // background: #fff;
         border-radius: 20rpx;
     }
+	.bottom{
+		height: 200rpx;
+	}
     .title{
         position: absolute;
         top: 34%;

--
Gitblit v1.9.1