From 05273ace3da665cb10c36ca0dac4413a8284302a Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期三, 17 五月 2023 18:10:36 +0800
Subject: [PATCH] 增加部分限制,增加新功能

---
 pages/driver-page/driver-index/driver-index.vue |  178 +++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 112 insertions(+), 66 deletions(-)

diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue
index 060535d..e20bc70 100644
--- a/pages/driver-page/driver-index/driver-index.vue
+++ b/pages/driver-page/driver-index/driver-index.vue
@@ -6,18 +6,15 @@
 				<view class="wait-collection" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/diverbanner.png') no-repeat;background-size:contain"></view>
 				<view class="collection-form">
 					<view class="collection-form-item" v-for="(item, index) in driverBillOfLoadingData.list1" :key="index">
+						<view class="main-divider"></view>
 						<view class="first-line">
 							<view class="main-information">
 								<view class="sign">瑁�</view>
-								<view class="filedname">
-									<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName.slice(0, 16) }}</text>
-									<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">
-										{{ item.customerNameCopy.slice(0, 16) }}
-									</text>
-									<text v-show="item.deptName.length >= 15 || item.customerNameCopy.length >= 15">...</text>
+								<view class="filedname exceedHide">
+									<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text>
+									<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerNameCopy }}</text>
 								</view>
 							</view>
-							<view class="main-divider"></view>
 							<view class="point-number">
 								<text class="residue">{{ item.carNum - item.taskNum }}</text>
 								<text>/{{ item.carNum }}</text>
@@ -26,19 +23,23 @@
 						<view class="first-extra">
 							<view class="main-information">
 								<view class="sign">鍗�</view>
-								<view class="filedname">
-									<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerNameCopy.slice(0, 16) }}</text>
-									<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName.slice(0, 16) }}</text>
-									<text v-show="item.customerNameCopy.length >= 15 || item.deptName.length >= 15">...</text>
+								<view class="filedname exceedHide">
+									<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">
+										{{ item.customerNameCopy ? item.customerNameCopy : item.customerName }}
+									</text>
+									<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text>
 								</view>
 							</view>
 						</view>
-						<view class="second-line">
+						<!-- <view class="second-line">
 							<view class="coal-name">{{ item.coalName }}</view>
-						</view>
+						</view> -->
 						<view class="third-line">
 							<view class="time-icon"><u-icon name="clock" color="#515151" size="40"></u-icon></view>
 							<view class="send-date">{{ item.sendDate }}</view>
+							<view class="type">
+								<view class="coal-name">{{ item.coalName }}</view>
+							</view>
 						</view>
 						<view class="fourth-line" @click="qiangDanBtn(item)" v-if="item.carNum - item.taskNum !== 0"><view class="button-img">绔嬪嵆鎶㈠崟</view></view>
 					</view>
@@ -59,31 +60,27 @@
 						v-if="driverBillOfLoadingData.list3 ? (driverBillOfLoadingData.list3.length == 0 ? true : false) : true"
 					></u-empty>
 
-					<view class="appointment-form" v-if="driverBillOfLoadingData.list3 && driverBillOfLoadingData.list3.length !== 0">
+					<view class="appointment-form">
 						<view class="appointment-form-item" v-for="(item, index) in driverBillOfLoadingData.list3" :key="index">
+							<view class="main-divider"></view>
 							<view class="first-line">
 								<view class="main-information">
 									<view class="sign">瑁�</view>
-									<view class="filedname">
-										<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName.slice(0, 16) }}</text>
-										<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">
-											{{ item.customerName.slice(0, 16) }}
-										</text>
-										<text v-show="item.deptName.length >= 15 || item.customerName.length >= 15">...</text>
+									<view class="filedname exceedHide">
+										<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text>
+										<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerName }}</text>
 									</view>
 								</view>
-								<view class="main-divider"></view>
 								<view class="map-icon" @click.stop="skipMap(item)">
 									<view><u-icon name="map" color="#4978F0" size="40"></u-icon></view>
 								</view>
 							</view>
-							<view class="second-line">
+							<view class="first-extra">
 								<view class="main-information">
 									<view class="sign">鍗�</view>
-									<view class="filedname">
-										<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerName.slice(0, 16) }}</text>
-										<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName.slice(0, 16) }}</text>
-										<text v-show="item.deptName.length >= 15 || item.customerName.length >= 15">...</text>
+									<view class="filedname exceedHide">
+										<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerName }}</text>
+										<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text>
 									</view>
 								</view>
 								<view class="map-icon" @click.stop="skipMap(item)">
@@ -115,20 +112,17 @@
 						iconSize="1000"
 						v-if="driverBillOfLoadingData.list2 ? (driverBillOfLoadingData.list2.length == 0 ? true : false) : true"
 					></u-empty>
-					<view class="appointment-form" v-if="driverBillOfLoadingData.list2 && driverBillOfLoadingData.list2.length !== 0">
+					<view class="appointment-form">
 						<view class="appointment-form-item" v-for="(item, index) in driverBillOfLoadingData.list2" :key="index" @click="list3CardIconClick(item)">
+							<view class="main-divider"></view>
 							<view class="first-line">
 								<view class="main-information">
 									<view class="sign">瑁�</view>
-									<view class="filedname">
-										<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName.slice(0, 16) }}</text>
-										<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">
-											{{ item.customerName.slice(0, 16) }}
-										</text>
-										<text v-show="item.deptName.length >= 15 || item.customerName.length >= 15">...</text>
+									<view class="filedname exceedHide">
+										<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text>
+										<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerName }}</text>
 									</view>
 								</view>
-								<view class="main-divider"></view>
 								<view class="map-icon" @click.stop="skipMap(item)">
 									<view><u-icon name="map" color="#4978F0" size="40"></u-icon></view>
 								</view>
@@ -136,10 +130,9 @@
 							<view class="second-line">
 								<view class="main-information">
 									<view class="sign">鍗�</view>
-									<view class="filedname">
-										<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerName.slice(0, 16) }}</text>
-										<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName.slice(0, 16) }}</text>
-										<text v-show="item.deptName.length >= 15 || item.customerName.length >= 15">...</text>
+									<view class="filedname exceedHide">
+										<text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerName }}</text>
+										<text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text>
 									</view>
 								</view>
 								<view class="map-icon" @click.stop="skipMap(item)">
@@ -158,7 +151,7 @@
 							</view>
 						</view>
 					</view>
-					<view class="white-block" v-if="driverBillOfLoadingData.list2.length !== 0">娌℃湁鏁版嵁浜�...</view>
+					<view class="white-block"></view>
 				</view>
 			</view>
 		</view>
@@ -213,7 +206,7 @@
 		skipMap(val) {
 			uni.navigateTo({
 				url: `/pages/public-page/mapRoute/mapRoute?customerId=${val.customerId}&filedId=${val.filedId}&orderType=${val.orderType}${
-					val.toFiledId ? `&toFiledId=${val.toFiledId}` : ''
+					val.toFiledId ? `&toFiledId=${val.toFiledId}&filedId=${val.filedId}` : ''
 				}`
 			});
 		},
@@ -358,6 +351,11 @@
 		line-height: vww(40);
 	}
 }
+.exceedHide {
+	white-space: nowrap;
+	overflow: hidden;
+	text-overflow: ellipsis;
+}
 ::v-deep.driver-index {
 	width: 100%;
 	margin: 0 auto;
@@ -385,6 +383,14 @@
 				display: flex;
 				flex-direction: column;
 				justify-content: space-around;
+				.main-divider {
+					width: 560rpx;
+					height: 2rpx;
+					background: #e3e3e3;
+					position: absolute;
+					top: 122rpx;
+					left: 128rpx;
+				}
 				.first-line {
 					width: 94%;
 					height: vww(68);
@@ -409,14 +415,6 @@
 							color: #ffffff;
 							margin-right: vww(20);
 						}
-					}
-					.main-divider {
-						width: 548rpx;
-						height: 1rpx;
-						background: #e3e3e3;
-						position: absolute;
-						top: 115rpx;
-						left: vww(50);
 					}
 					.point-number {
 						position: absolute;
@@ -459,20 +457,19 @@
 				.second-line {
 					width: 100%;
 					height: vww(68);
-					margin-left: vww(12);
+					margin-left: vww(21);
 					display: flex;
 					justify-content: flex-start;
 					align-items: center;
 					.coal-name {
 						min-width: vww(50);
-						height: 30rpx;
+						height: 35rpx;
 						font-size: 30rpx;
-
 						font-weight: 300;
 						color: #515151;
 						position: relative;
 						display: flex;
-						justify-content: center;
+						justify-content: flex-start;
 					}
 					.black-block {
 						min-width: vww(50);
@@ -503,7 +500,7 @@
 				.third-line {
 					width: 100%;
 					height: vww(68);
-					margin-left: vww(15);
+					margin-left: vww(21);
 					display: flex;
 					justify-content: flex-start;
 					align-items: center;
@@ -511,10 +508,33 @@
 						width: 148rpx;
 						height: 24rpx;
 						margin-left: vww(14);
+						margin-right: vww(56);
 						line-height: 24rpx;
 						font-size: 28rpx;
 						font-weight: 300;
 						color: #515151;
+					}
+					.type {
+						flex: 1;
+						margin-right: vww(10);
+						display: flex;
+						justify-content: center;
+						align-items: center;
+						.coal-name {
+							width: 120rpx;
+							height: 42rpx;
+							line-height: 42rpx;
+							border: 2px solid #035cfb;
+							border-radius: 4rpx;
+							font-size: 28rpx;
+							font-weight: 300;
+							color: #035cfb;
+							text-align: center;
+							padding: vww(3) vww(11);
+							white-space: nowrap;
+							overflow: hidden;
+							text-overflow: ellipsis;
+						}
 					}
 				}
 				.fourth-line {
@@ -524,8 +544,8 @@
 					display: flex;
 					justify-content: flex-end;
 					position: relative;
-					left: vww(190);
-					bottom: vww(10);
+					left: vww(203);
+					bottom: vww(3);
 					.button-img {
 						width: 100%;
 						height: 100%;
@@ -552,6 +572,15 @@
 				@include formItem;
 				height: vww(191);
 				justify-content: space-between;
+				overflow: hidden;
+				.main-divider {
+					width: 560rpx;
+					height: 1rpx;
+					background: #e3e3e3;
+					position: absolute;
+					top: 122rpx;
+					left: 128rpx;
+				}
 				.first-line {
 					position: relative;
 					@include firstLine;
@@ -561,7 +590,6 @@
 						display: flex;
 						justify-content: flex-start;
 						align-items: center;
-
 						.sign {
 							width: vww(28);
 							height: vww(28);
@@ -575,13 +603,27 @@
 							margin-right: vww(20);
 						}
 					}
-					.main-divider {
-						width: 548rpx;
-						height: 1rpx;
-						background: #e3e3e3;
-						position: absolute;
-						top: vww(40);
-						left: vww(50);
+				}
+				.first-extra {
+					@include firstLine;
+					.main-information {
+						width: 100%;
+						height: vww(28);
+						display: flex;
+						justify-content: flex-start;
+						align-items: center;
+						.sign {
+							width: vww(28);
+							height: vww(28);
+							line-height: vww(28);
+							text-align: center;
+							background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat;
+							background-size: contain;
+							font-size: 30rpx;
+							font-weight: 400;
+							color: #ffffff;
+							margin-right: vww(20);
+						}
 					}
 				}
 				.second-line {
@@ -612,10 +654,11 @@
 					@include thirdLine;
 					width: 94%;
 					justify-content: flex-start;
+					margin-left: vww(18);
 					.clock {
-						width: 33%;
+						width: 40%;
 						height: vww(21);
-						margin-right: vww(70);
+						margin-right: vww(50);
 						line-height: vww(21);
 						@include flex;
 						justify-content: flex-start;
@@ -631,7 +674,7 @@
 						align-items: center;
 						.order-type,
 						.coal-name {
-							// min-width: 120rpx;
+							width: 120rpx;
 							height: 42rpx;
 							line-height: 42rpx;
 							border: 2px solid #035cfb;
@@ -641,6 +684,9 @@
 							color: #035cfb;
 							text-align: center;
 							padding: vww(3) vww(11);
+							white-space: nowrap;
+							overflow: hidden;
+							text-overflow: ellipsis;
 						}
 					}
 				}

--
Gitblit v1.9.1