From 25497ff79b56e0e4c659646e5fb827b05104d92a Mon Sep 17 00:00:00 2001
From: wk
Date: 星期四, 06 六月 2024 15:08:44 +0800
Subject: [PATCH] feta:我来送货

---
 pages/driver-page/delivery-my/delivery-my/delivery-my.vue |  290 ++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 223 insertions(+), 67 deletions(-)

diff --git a/pages/driver-page/delivery-my/delivery-my/delivery-my.vue b/pages/driver-page/delivery-my/delivery-my/delivery-my.vue
index a0898d4..f13a3a1 100644
--- a/pages/driver-page/delivery-my/delivery-my/delivery-my.vue
+++ b/pages/driver-page/delivery-my/delivery-my/delivery-my.vue
@@ -40,42 +40,79 @@
 						placeholder="璇疯緭鍏ュ唴瀹�"
 						clearable></u--input>
 				</u-form-item>
-				<u-form-item prop="carNo"
-					label="鏄惁鍏ュ満"
-					labelWidth="20%"
-					borderBottom
-					required>
-					<uni-data-checkbox v-model="value" :localdata="range" @change="change"></uni-data-checkbox>
-				</u-form-item>
-				
 			</u--form>
 		</view>
-		<view class="details">
-			<view class="title"><text>閰嶉�侀�夋嫨</text></view>
-			<view class="">
-		<uni-table border
-			stripe
-			emptyText="鏆傛棤鏇村鏁版嵁">
-			<uni-tr>
-				<uni-th align="center">渚涘簲鍟�</uni-th>
-				<uni-th align="center">浜у搧</uni-th>
-				<uni-th align="center">杞︽暟</uni-th>
-				<uni-th align="center">鎿嶄綔</uni-th>
-			</uni-tr>
-			<uni-tr v-for="(item, index) in TableData"
-				:key="item.id">
-				<uni-td align="center">{{ item.customerName || '' }}</uni-td>
-				<uni-td align="center">{{ item.productName||''  }}</uni-td>
-				<uni-td align="center">{{ item.carNum || '' }}</uni-td>
-				<uni-td><u-button text="閫夋嫨"
-						type="primary"
-						:disabled="item.carNum == item.carNum1"
-						@click="yuYueBtnClick(item)"></u-button></uni-td>
-			</uni-tr>
-		</uni-table>
+		<view class="history-numbers">
+			<scroll-view :scroll-top="scrollTop"
+				scroll-y="true"
+				class="scroll-Y"
+				>
+				<view class="history-information"
+					>
+					<view class="first">
+						<view class="">{{ daydata.customerName || '' }}</view>
+						<view class=""><u-icon name="arrow-right"
+								color="#999999"
+								size="40"></u-icon></view>
+					</view>
+					<view class="second">
+						<view class="coal-name">{{ daydata.productName || '' }}</view>
+						<view class="order-type">{{ daydata.orderType || '' }}</view>
+					</view>
+					<view class="third">
+						<view class="third-line">
+							<view class="third-line_text">棰嗗彇鏁�:</view>
+							<view class="third-line_num">{{ daydata.cars2 }}</view>
+						</view>
+						<view class="third-line">
+							<view class="third-line_text">鍓╀綑鏁�:</view>
+							<view class="third-line_num"
+								>{{ daydata.carNumSurplus1 }}</view>
+						</view>
+					</view>
+					<view class="fourth">
+						<view class="fourth-icon">
+							<view
+								style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mx.jzeg.cn:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover">
+							</view>
+						</view>
+						<view class="senddate">{{ daydata.sendDate }}</view>
+					</view>
+					<view class="fourth">
+						<view class="fourth-icon">
+							<view
+								style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://mx.jzeg.cn:9096/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover;">
+							</view>
+						</view>
+						<view class="senddate">{{ daydata.orderCode }}</view>
+					</view>
+				</view>
+					</scroll-view>
+				</view>
+		<combined-title
+			:title="yuYueData.length != 0 ? yuYueData[0].filedName + '鈥斺��' + yuYueData[0].sendDate : '鏆傛棤棰勭害鍒楄〃'"></combined-title>
+		<view class="appointment-table">
+			<uni-table border
+				stripe
+				emptyText="鏆傛棤鏇村鏁版嵁">
+				<uni-tr>
+					<uni-th align="center">鏃堕棿娈�</uni-th>
+					<uni-th align="center">鍙绾�</uni-th>
+					<uni-th align="center">宸查绾�</uni-th>
+					<uni-th align="center">鎿嶄綔</uni-th>
+				</uni-tr>
+				<uni-tr v-for="(item, index) in yuYueData"
+					:key="item.id">
+					<uni-td align="center">{{ (item.startTime || '') + '-' + (item.endTime || '') }}</uni-td>
+					<uni-td align="center">{{ item.carNum || '' }}</uni-td>
+					<uni-td align="center">{{ item.carNum1 || '' }}</uni-td>
+					<uni-td><u-button text="閫夋嫨"
+							type="primary"
+							:disabled="item.carNum == item.carNum1&&!isRCSQ"
+							@click="yuYueBtnClick(item)"></u-button></uni-td>
+				</uni-tr>
+			</uni-table>
 		</view>
-		</view>
-		
 	</view>
 </template>
 
@@ -89,6 +126,9 @@
 		},
 		onLoad(params) {
 			let that=this
+			if (this.$Route.query.id) {
+			  this.id = this.$Route.query.id;
+			}
 			this.GetMyDelivery()
 			uni.getStorage({
 			    key: 'myDelivery',
@@ -96,12 +136,17 @@
 			        Object.assign(that.registerFormModel, res.data)
 			    }
 			});
+			
 		},
 		data() {
 			return {
+				scrollTop: 0,
+				id:"",
 				value: 0,
-				range: [{"value": 0,"text": "鍚�"	},{"value": 1,"text": "鏄�"}],
+				daydata:{},
+				range: [{"value": 0,"label": "鍚�"	},{"value": 1,"label": "鏄�"}],
 				carNumShow: false,
+				yuYueData: [],
 				registerFormModel: {
 					phone: '',
 					driver: '',
@@ -172,13 +217,15 @@
 			yuYueBtnClick(item){
 				this.$refs.regesterFormRef.validate().then(res => {
 				this.$reqPost('saveMyDelivery',{
-					coalName:item.productName,
-					customerId:item.customerId,
-					deptId:item.deptId,
-					filedId:item.filedId,
-					orderPlanId:item.id,
-					orderTye:item.orderType,
-					sendDate:item.sendDate,
+					productName:this.daydata.productName,
+					customerId:this.daydata.customerId,
+					deptId:this.daydata.deptId,
+					filedId:this.daydata.filedId,
+					orderPlanId:this.daydata.id,
+					orderTye:this.daydata.orderType,
+					sendDate:this.daydata.sendDate,
+					carNumSurplus:this.daydata.carNumSurplus,
+					yyId:item.id,
 					...this.registerFormModel
 				}, 'json').then(res => {
 					uni.setStorage({
@@ -197,9 +244,20 @@
 				})
 			},
 			GetMyDelivery() {
-				this.$reqGet('myDelivery').then(res => {
+				uni.showLoading({
+					title: '鍔犺浇涓�...'
+				});
+				this.$reqGet('driverYuYueList', {orderPlanId:this.id}).then(res => {
+					uni.hideLoading();
+					if (res.code == 0) {
+						this.yuYueData = res.data;
+					} else {
+						this.$u.toast('鍔犺浇澶辫触');
+					}
+				});
+				this.$reqGetId('myDelivery',this.id).then(res => {
 					if (res.data) {
-						this.TableData=res.data
+						this.daydata=res.data
 					}
 				});
 			}
@@ -209,50 +267,148 @@
 
 <style lang="scss"
 	scoped>
-	::v-deep.register {
-		width: 94%;
-		padding: 0 0 vww(20) 0;
-		margin: 0 auto;
-		.details {
-			margin-top: vww(24);
-			.title {
-				color: #111111;
-				font-weight: 400;
-				border: 1px solid #eeeeee;
-				padding: 0 vww(12) 0 vww(12);
-				border-bottom: none;
-				height: vww(40);
-				line-height: vww(40);
-				background-color: #f5f5f5;
+	@mixin flex {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+	}
+	.history-numbers {
+		width: 100%;
+		position: relative;
+		top: vww(10);
+	
+		.history-information {
+			width: 690rpx;
+			height: 398rpx;
+			margin: vww(10) 0;
+			background: #ffffff;
+			box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
+			border-radius: 20rpx;
+			@include flex flex-direction: column;
+			align-items: flex-start;
+			justify-content: space-evenly;
+			overflow: hidden;
+	
+			.first {
+				width: 96%;
+				height: 34rpx;
+				font-size: 32rpx;
+				font-weight: 300;
+				color: #303030;
+				@include flex;
+				margin: vww(10) vww(10) 0;
 			}
-			.uni-table-scroll {
+	
+			.second {
 				width: 100%;
-				overflow-x: hidden;
-				.uni-table {
-					min-width: 0 !important;
-					.uni-table-tr {
-						padding: 0;
-						font-size: vww(13);
+				height: 31rpx;
+				font-size: 30rpx;
+				font-weight: 300;
+				color: #515151;
+				margin: vww(10) vww(10) 0;
+				@include flex;
+				justify-content: flex-start;
+	
+				.coal-name {
+					min-width: vww(30);
+					height: vww(20);
+					margin-right: vww(21);
+				}
+	
+				.order-type {
+					color: #035cfb;
+					border: 2px solid #035cfb;
+					border-radius: 4rpx;
+					padding: vww(2) vww(4);
+					text-align: center;
+				}
+			}
+	
+			.third {
+				width: 96%;
+				height: 31rpx;
+				font-size: 30rpx;
+				font-weight: 300;
+				color: #515151;
+				margin: vww(10) vww(10) 0;
+				@include flex;
+	
+				.third-line {
+					@include flex;
+	
+					&_text {
+						color: #919090;
+					}
+	
+					&_num {
+						color: #035cfb;
+					}
+				}
+			}
+	
+			.fourth {
+				width: 100%;
+				height: 31rpx;
+				font-size: 30rpx;
+				font-weight: 300;
+				color: #515151;
+				margin: vww(10) vww(10) 0;
+				@include flex;
+	
+				.fourth-icon {
+					width: vww(13);
+					height: vww(13);
+					margin-right: vww(14);
+				}
+	
+				.senddate {
+					flex: 1;
+				}
+			}
+		}
+	}
+	::v-deep.appointment-table{
+		width: 94%;
+		margin: 0 auto;
+		// 琛ㄦ牸
+		.uni-table-scroll {
+			width: 100%;
+			overflow-x: hidden;
+			
+			.uni-table {
+				min-width: 0 !important;
+			
+				.uni-table-tr {
+					padding: 0;
+					font-size: vww(13);
+			
 					.uni-table-th {
 						height: vww(32);
 						line-height: vww(20);
-						padding: vww(5) 0;
+						padding: vww(5) vww(10);
 						color: #111111;
 						font-weight: 550;
 						background: #f5f5f5;
 					}
+			
 					.uni-table-td {
 						height: vww(32);
 						line-height: vww(20);
 						padding: vww(5) vww(10);
 						color: #111111;
+			
 						.u-button {
 							height: vww(23);
 						}
 					}
-					}
 				}
 			}
 		}
 	}
+
+	::v-deep.register {
+		width: 94%;
+		padding: 0 0 vww(20) 0;
+		margin: 0 auto;
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.1