From 69a1b3bf45738f048361ee4ccb6bdc64fce35720 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 12 三月 2025 11:31:46 +0800
Subject: [PATCH] 更新

---
 h5/pages/wdata/list.vue |  362 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 362 insertions(+), 0 deletions(-)

diff --git a/h5/pages/wdata/list.vue b/h5/pages/wdata/list.vue
new file mode 100644
index 0000000..63a3577
--- /dev/null
+++ b/h5/pages/wdata/list.vue
@@ -0,0 +1,362 @@
+<template>
+	<view class="main_app">
+		<view class="title_wrap">
+			<view class="name" v-if="driverInfo.realname || driverInfo.username">{{ driverInfo.realname || driverInfo.username }}锛屾杩庣櫥褰曪綖</view>
+			<view class="name" v-else>璇峰厛鐧诲綍</view>
+			<view class="btn" @click="loginOut">{{
+				driverInfo.realname || driverInfo.username ? "璐﹀彿瑙g粦" : "鍘荤櫥褰�"
+			}}</view>
+		</view>
+		<view class="head_wrap">
+			<view class="search_box">
+				<image src="@/static/ic_search@2x.png" class="search" mode=""></image>
+				<input type="text" placeholder-class="placeholder9" v-model="param.transportCode" placeholder="鎼滅储杩愯緭鍗曞彿" @confirm="handleQuery" />
+			</view>
+		</view>
+		<!--  -->
+		<scroll-view scroll-y="true" class="scroll_Y" @scrolltolower="scrolltolower">
+			<view class="main_list">
+				<view class="item" v-for="item,index in list" :key="index">
+					<view class="head">
+						<view class="code">杩愯緭鍗曞彿锛歿{item.transportCode}}</view>
+						<view class="status" v-if="item.logisticsStatus == 0">寰呮墽琛�</view>
+						<view class="status" v-if="item.logisticsStatus == 1">鎵ц涓�(鍦ㄩ��)</view>
+						<view class="status" v-if="item.logisticsStatus == 2">瀹屾垚(鍒拌揣)</view>
+					</view>
+					<view class="content">
+						<view class="line">
+							<view class="la">鐗╄祫绫诲瀷锛�</view>
+							<view class="val">{{item.materialType == 1 ? '鎴愬搧' : '鎵樼洏'}}</view>
+						</view>
+						<view class="line">
+							<view class="la">鍙戣揣鍦帮細</view>
+							<view class="val">{{item.startCityName || '-'}}</view>
+						</view>
+						<view class="line">
+							<view class="la">鍒拌揣鍦帮細</view>
+							<view class="val">{{item.endCityName || '-'}}</view>
+						</view>
+					</view>
+					<view class="footer">
+						<view class="time">{{item.receiveDate}}</view>
+						<view class="detail" @click="handleDetail(item)">鏌ョ湅璇︽儏</view>
+					</view>
+				</view>
+				<view v-if="list.length === 0" style="text-align: center">
+					<image src="@/static/empty.png" style="width: 320rpx; margin: 120px auto 0" mode="widthFix" />
+					<view class="placeholder9 fs24">鏆傛棤鏁版嵁</view>
+				</view>
+			</view>
+		</scroll-view>
+
+	</view>
+</template>
+
+<script>
+	import {
+		putTaskList,
+		logoutPost,
+		getUserInfo
+	} from '@/api'
+	import dayjs from 'dayjs';
+	export default {
+		data() {
+			return {
+				param: {
+					
+				},
+				list: [],
+				page: 1,
+				total: 0,
+
+				driverInfo: {}
+
+			};
+		},
+		onLoad(options) {
+			this.driverInfo = uni.getStorageSync('driverInfo') || {}
+			this.getList()
+		},
+		methods: {
+			handleQuery() {
+				this.page = 1
+				this.list = []
+				this.getList()
+			},
+			handleDetail(item) {
+				uni.navigateTo({
+					url: '/pages/wdata/detail?id=' + item.id
+				})
+			},
+			scrolltolower() {
+				const {
+					total,
+					list
+				} = this
+				if (list.length < total) {
+					this.page = this.page + 1
+					this.getList()
+				} else {
+					this.showToast('鏆傛棤鏇村鏁版嵁')
+				}
+			},
+			getList() {
+				const {
+					param,
+					page
+				} = this
+				putTaskList({
+					parameters: {
+						...param,
+						driverTel: this.driverInfo.username
+					},
+					pager: {
+						rows: 30,
+						page
+					}
+				}).then(res => {
+					if (res.data && res.data.rows) {
+						this.list = [...this.list, ...res.data.rows]
+						this.total = res.data.totalCount
+					}
+				})
+			},
+			loginOut() {
+				logoutPost({
+					isH5: 1
+				}).then(res => {
+					this.$store.commit('empty')
+					setTimeout(() => {
+						let str = 'https://atwl.ahzyssl.com/zhyq_h5/#/pages/wdata/home'
+						window.location.href = str
+					}, 300)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: #F7F7F7;
+	}
+	.main_app{
+		display: flex;
+		flex-direction: column;
+		overflow: hidden;
+		padding: 10rpx 30rpx 0;
+	}
+	.title_wrap {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		background-color: #fff;
+		margin: -10rpx -30rpx 0;
+		padding: 20rpx 30rpx 6rpx;
+		height: 90rpx;
+		.name {
+			font-weight: 600;
+			font-size: 34rpx;
+			color: #222222;
+		}
+	
+		.btn {
+			width: 144rpx;
+			height: 56rpx;
+			border-radius: 36rpx;
+			border: 1rpx solid #B2B2B2;
+			font-size: 26rpx;
+			color: #666666;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+	}
+	.head_title{
+		color: $uni-color-primary;
+		text-decoration-line: underline;
+		margin-top: 20rpx;
+	}
+	.head_wrap {
+		display: flex;
+		align-items: center;
+		width: 750rpx;
+		background-color: #fff;
+		margin: 0 -30rpx;
+		padding: 12rpx 30rpx;
+
+		.search_box {
+			flex: 1;
+			width: 572rpx;
+			height: 76rpx;
+			background: #F7F7F7;
+			border-radius: 38rpx;
+			padding-left: 30rpx;
+			display: flex;
+			align-items: center;
+
+			input {
+				flex: 1;
+				height: 60rpx;
+			}
+
+			.search {
+				width: 28rpx;
+				height: 28rpx;
+				margin-right: 16rpx;
+			}
+		}
+
+		.right {
+			display: flex;
+			align-items: center;
+			margin-left: 30rpx;
+
+			image {
+				width: 28rpx;
+				height: 28rpx;
+			}
+		}
+	}
+
+	.scroll_Y {
+		background-color: #f7f7f7;
+		height: calc(100vh - 220rpx);
+		margin-top: 20rpx;
+		.main_list {
+			width: 750rpx;
+			margin: 0 -30rpx;
+			padding: 0rpx 30rpx 20rpx;
+
+			.item {
+				border-radius: 8rpx;
+				margin-bottom: 20rpx;
+				padding: 0 30rpx;
+				background-color: #fff;
+
+				.head {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					padding: 0 30rpx;
+					width: 690rpx;
+					height: 84rpx;
+					margin: 0 -30rpx;
+					background: linear-gradient(270deg, #FEFEFF 0%, #E1F7FE 100%);
+
+					.code {
+						font-weight: 500;
+						font-size: 32rpx;
+						color: #222222;
+					}
+
+					.status {
+						color: $uni-color-primary;
+					}
+				}
+
+				.content {
+					padding: 20rpx 0rpx;
+					border-bottom: 1rpx solid #E5E5E5;
+					margin-bottom: 20rpx;
+
+					.line {
+						display: flex;
+						margin-bottom: 16rpx;
+						font-size: 26rpx;
+
+						.la {
+							color: #666666;
+						}
+
+						.val {}
+
+						&:nth-last-child(1) {
+							margin-bottom: 0;
+						}
+					}
+				}
+
+				.footer {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					font-size: 26rpx;
+					color: #999999;
+					padding-bottom: 20rpx;
+
+					.detail {
+						width: 168rpx;
+						height: 60rpx;
+						background: #FFFFFF;
+						border-radius: 30rpx;
+						border: 1rpx solid $uni-color-primary;
+						color: $uni-color-primary;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						font-size: 26rpx;
+
+					}
+				}
+			}
+		}
+	}
+
+
+	.modal {
+		.modal_title {
+			height: 112rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			font-weight: 500;
+			font-size: 32rpx;
+			color: #222222;
+		}
+
+		.line {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			font-size: 30rpx;
+			height: 98rpx;
+			padding: 0 28rpx;
+			border-bottom: 1rpx solid #E5E5E5;
+
+			.val {
+				display: flex;
+				justify-content: flex-end;
+				flex: 1;
+
+				input {
+					text-align: right;
+					width: 100%;
+				}
+			}
+		}
+
+		.btns {
+			display: flex;
+			justify-content: space-between;
+			padding: 30rpx;
+
+			.btn {
+				width: 336rpx;
+				height: 88rpx;
+				border-radius: 44rpx;
+				border: 1rpx solid $uni-color-primary;
+				color: $uni-color-primary;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				font-size: 32rpx;
+			}
+
+			.sub {
+				background-color: $uni-color-primary;
+				color: #fff;
+			}
+		}
+	}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3