From a71f34e6888abdf106b6d20e125eb4569a63b3f0 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期一, 13 十一月 2023 17:27:58 +0800
Subject: [PATCH] 修改签到页面传参,称重页面样式

---
 pages/customer-page/customer-index/customer-index.vue |  201 ++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 162 insertions(+), 39 deletions(-)

diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index d4837a0..858daed 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -2,15 +2,36 @@
 	<view class="">
 		<view class="customer-index">
 			<view class="customer-index-body">
-				<!-- 寰呴鍙栧拰杞彂鎻愮叅鍗� -->
+				<!-- 寰呴鍙栧拰杞彂閫氱煡鍗� -->
 				<view class="wait-collection"
-					style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/customerbanner.png') no-repeat;background-size:contain">
+					:style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/customerbanner.png)`, backgroundSize: 'contain', backgroundRepeat: 'no-repeat' }">
 				</view>
-				<view style="position: relative;top: -120px;">
+				<view style="height: 382rpx;width: 100%;"></view>
+				<!-- 寮曞椤� -->
+				<view class="noob-tour"
+					v-if="roleType===4&&isFirstLogin">
+					<combined-title title="鎿嶄綔鎸囧紩"></combined-title>
+					<u-cell-group>
+						<u-cell title="鏂版墜鎸囧紩"
+							name='1'
+							:clickable="true"
+							@click="noobTour">
+							<u-badge type="primary"
+								value="01"
+								slot='icon'></u-badge>
+							<u-icon slot="value"
+								name="arrow-right"
+								size="30"
+								color="#b8b8b8"></u-icon>
+						</u-cell>
+					</u-cell-group>
+				</view>
+				<view style="position: relative;">
 					<u-empty mode="data"
 						icon="http://cdn.uviewui.com/uview/empty/data.png"
 						textSize="30"
 						iconSize="1000"
+						text="鏆傛棤鏁版嵁"
 						v-if="orderPlanData.length == 0"></u-empty>
 				</view>
 				<view class="collection-form">
@@ -22,10 +43,11 @@
 							<view class="dispatch-receive">
 								<view class="dispatch">{{ item.filedName||'' }}</view>
 							</view>
-							<!-- <view class="point-number">
+							<view class="point-number"
+								v-if="roleType == 1">
 								<text class="residue">{{ item.cars2||'' }}</text>
 								<text>/{{ item.carNum ||''}}</text>
-							</view> -->
+							</view>
 						</view>
 						<view class="second-line">
 							<view class="coal-name">
@@ -36,29 +58,44 @@
 							</view>
 						</view>
 						<view class="third-line">
+							<!-- <view class="time-icon">
+								<view
+									:style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carNO.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}">
+								</view>
+							</view> -->
+							<view class="car-num">{{ item.code||''}}</view>
+						</view>
+						<view class="third-line">
 							<view class="time-icon">
 								<view
-									style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover">
+									:style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/clock.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}">
 								</view>
 							</view>
 							<view class="send-date">{{ item.sendDate }}</view>
 						</view>
 						<view class="fourth-line">
-							<!-- <view class="receive"
-								@click.stop="receiveClick(item)">
+							<view class="receive"
+								@click.stop="receiveClick(item)"
+								v-if="item.orderType!=='澶栬喘'">
+								<view class="button-image">棰嗗彇</view>
+							</view>
+							<view class="forward"
+								@click.stop="forwardClick(item)"
+								v-if="item.orderType!=='澶栬喘'">
+								<view class="button-image">杞彂</view>
+							</view>
+							<!-- <view class="forward"
+								@click.stop="validateClick(index)"
+								v-if='roleType===4'>
 								<view class="button-image">楠岃川</view>
 							</view> -->
-							<view class="forward"
-								@click.stop="forwardClick(index)">
-								<view class="button-image">楠岃川</view>
-							</view>
 						</view>
 					</view>
 				</view>
 
-				<!-- 鍘嗗彶鎻愮叅鍗� -->
+				<!-- 鍘嗗彶閫氱煡鍗� -->
 				<view class="history-numbers">
-					<combined-title title="鍘嗗彶鎻愮叅鍗�"></combined-title>
+					<combined-title title="鍘嗗彶閫氱煡鍗�"></combined-title>
 					<scroll-view :scroll-top="scrollTop"
 						scroll-y="true"
 						class="scroll-Y"
@@ -67,6 +104,7 @@
 							icon="http://cdn.uviewui.com/uview/empty/data.png"
 							textSize="30"
 							iconSize="1000"
+							text="鏆傛棤鏁版嵁"
 							v-if="historyCoalData.length == 0"></u-empty>
 						<view class="history-information"
 							v-for="(item, index) in historyCoalData"
@@ -95,14 +133,14 @@
 										v-else-if="roleType == 2">{{ item.carNumSurplus }}</view>
 								</view>
 								<view class="third-line">
-									<view class="third-line_text">鎻愮叅鍗曚釜鏁�:</view>
+									<view class="third-line_text">閫氱煡鍗曚釜鏁�:</view>
 									<view class="third-line_num">{{ item.tmCount }}</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:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover">
+										:style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/clock.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}">
 									</view>
 								</view>
 								<view class="senddate">{{ item.sendDate }}</view>
@@ -110,7 +148,7 @@
 							<view class="fourth">
 								<view class="fourth-icon">
 									<view
-										style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover;">
+										:style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carnNUm.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'26rpx',height:'26rpx',lineHeight:'26rpx'}">
 									</view>
 								</view>
 								<view class="senddate">{{ item.orderCode }}</view>
@@ -120,6 +158,14 @@
 							v-if="showMoreData && historyCoalData.length !== 0">娌℃湁鏁版嵁浜�...</view>
 						<view class="white-block"></view>
 					</scroll-view>
+				</view>
+			</view>
+			<!-- 鍥剧墖棰勮寮瑰嚭妗� -->
+			<view class="previewImage-container">
+				<view class="previewImage-container">
+					<previewImage ref="previewImage"
+						:imgs="customerTourImgList"
+						:saveBtn='false'></previewImage>
 				</view>
 			</view>
 			<!-- 棰嗗彇寮瑰嚭妗� -->
@@ -146,9 +192,12 @@
 </template>
 
 <script>
-	import card from '@/components/card/card.vue';
+	import { onlineurl } from '@/api/request.js'
 	import combinedTitle from '@/components/combined-title/combined-title.vue';
 	import { customerId } from '@/utils/status';
+	import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
+	import { BaseUrl } from '@/api/publicInterface.js'
+	import { mapState } from 'vuex'
 	export default {
 		props: {
 			orderPlanDataStore: {
@@ -157,8 +206,8 @@
 			}
 		},
 		components: {
-			card,
-			combinedTitle
+			combinedTitle,
+			previewImage
 		},
 		watch: {
 			orderPlanDataStore: {
@@ -170,14 +219,15 @@
 			}
 		},
 		computed: {
+			...mapState(['customerTourImgList']),
 			roleType() {
 				return uni.getStorageSync('roleType');
-			}
+			},
 		},
 		data() {
 			return {
 				orderPlanData: [],
-				show: false, // 棰嗗彇鎻愮叅鍗曞脊鍑烘
+				show: false, // 棰嗗彇閫氱煡鍗曞脊鍑烘
 				receiveNum: null,
 				getOrderNum: {
 					num: '',
@@ -197,19 +247,29 @@
 				showMoreData: false,
 				cars2: "",
 				carNum: "",
-				// 鍓╀綑鐨勬彁鐓ゅ崟鏁伴噺
+				// 鍓╀綑鐨勯�氱煡鍗曟暟閲�
 				carNumSurplus: '',
-				canClick: false
+				canClick: false,
+				onlineurl,
+				previewImageShow: false,
+				previewImageSrc: '',
+				phone: "",
+				isFirstLogin: true
 			};
 		},
-		onLoad() {},
+		mounted() {
+			this.getLogOn()
+		},
 		onShow() {
 			this.init();
+			
 		},
 		methods: {
 			init() {
 				this.GetOrderPlan();
 				this.getJhOrderPlanDataPage();
+				this.onlineurl = onlineurl;
+				// this.getLogOn()
 			},
 			// 鑾峰彇鍙戣繍璁″垝鍒楄〃
 			GetOrderPlan() {
@@ -221,7 +281,7 @@
 					}
 				});
 			},
-			// 鑾峰彇鍘嗗彶鎻愮叅鍗�
+			// 鑾峰彇鍘嗗彶閫氱煡鍗�
 			getJhOrderPlanDataPage() {
 				uni.showLoading({
 					title: '鍔犺浇涓�'
@@ -246,7 +306,7 @@
 				this.pageCurrent++;
 				this.getJhOrderPlanDataPage();
 			},
-			//fix 鐐瑰嚮鎻愮叅鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁
+			//fix 鐐瑰嚮閫氱煡鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁
 			ArrSet(Arr, id) {
 				var obj = {};
 				const arrays = Arr.reduce((setArr, item) => {
@@ -294,7 +354,7 @@
 			 */
 			receiveClick(item) {
 				this.show = true;
-				this.getOrderNum.id = item.id; // 鑾峰彇棰嗗彇鎻愮叅鍗曠殑id
+				this.getOrderNum.id = item.id; // 鑾峰彇棰嗗彇閫氱煡鍗曠殑id
 				this.cars2 = item.cars2
 				this.carNum = item.carNum
 			},
@@ -307,25 +367,53 @@
 				console.log('杈撳叆妗�', e);
 				this.canClick = e > (this.carNum - this.cars2)
 				if (this.canClick) {
-					this.$u.toast('宸茶秴杩囧綋鍓嶆棩璁″垝鎻愮叅鍗曟暟閲�,璇烽噸鏂拌緭鍏�')
+					this.$u.toast('宸茶秴杩囧綋鍓嶆棩璁″垝閫氱煡鍗曟暟閲�,璇烽噸鏂拌緭鍏�')
 				}
 			},
-			// 鎻愮叅鍗曡鎯�
+			// 閫氱煡鍗曡鎯�
 			cardBodyClick(v) {
 				uni
-					.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2}` });
+					.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2?v.cars2:""}` });
 			},
-			// 鐐瑰嚮鍘嗗彶鎻愮叅鍗曡幏鍙栬鎯�
+			// 鐐瑰嚮鍘嗗彶閫氱煡鍗曡幏鍙栬鎯�
 			faYundetail(v) {
 				uni.navigateTo({
 					url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}&coalName=${v.coalName}&deptName=${v.deptName}`
 				});
 			},
 			// 杞彂
-			forwardClick(index) {
+			forwardClick(obj) {
+				if (obj.cars2 == 0) return this.$u.toast('璇峰厛棰嗗彇鍚庡啀杞彂');
 				uni
-		.navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?index=${index}` });
-			}
+					.navigateTo({ url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}` });
+			},
+			// 楠岃川
+			validateClick(index) {
+				uni
+					.navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan?index=${index}` });
+			},
+			noobTour(v) {
+				this.$refs.previewImage.open('https://mx.jzeg.cn:9095/appimg/image/tour/quality/quality1.jpg')
+			},
+			getLogOn() {
+				this.$reqGet('getUserEntity').then(res => {
+					this.phone = res.data.phone
+				}).then(() => {
+					uni.request({
+						url: `${BaseUrl}/admin/log/getLogOnType?phone=${this.phone}`,
+						success: res => {
+							// res.data.data 涓�1 浠h〃绗竴娆$櫥褰�  涓�0鍙栨秷瀛︿範鎸囧紩  涓�2浠h〃瀛樺湪
+							if (res.data.data === 1) {
+								this.noobTour()
+							} else if (res.data.data === 2) {
+								this.isFirstLogin = true
+							} else {
+								this.isFirstLogin = false
+							}
+						}
+					});
+				})
+			},
 		}
 	};
 </script>
@@ -341,7 +429,7 @@
 	.wait-collection {
 		width: 100%;
 		height: 600rpx;
-		position: relative;
+		position: fixed;
 		top: vww(-10);
 		z-index: 0;
 	}
@@ -365,7 +453,7 @@
 	.history-numbers {
 		width: 100%;
 		position: relative;
-		top: vww(-110);
+		// top: vww(-110);
 
 		.history-information {
 			width: 690rpx;
@@ -458,6 +546,28 @@
 		}
 	}
 
+	.noob-tour {
+		margin-bottom: vww(30);
+		position: relative;
+	}
+
+	.u-popup {
+		.u-transition {
+			.u-popup__content {
+				.editDriverPopup-container-box {}
+
+				//closeIcon
+				.u-popup__content__close--top-right {
+					.u-icon {
+						.u-icon__icon {
+							font-size: vww(20) !important;
+						}
+					}
+				}
+			}
+		}
+	}
+
 	::v-deep.customer-index {
 		width: 100%;
 		margin: 0 auto;
@@ -468,7 +578,7 @@
 				width: vww(345);
 				margin: 0 vww(15);
 				position: relative;
-				top: vww(-144);
+				// top: vww(-144);
 
 				.collection-form-item {
 					width: 690rpx;
@@ -551,7 +661,7 @@
 					}
 
 					.third-line {
-						width: 40%;
+						width: 80%;
 						height: vww(30);
 						margin-left: vww(15);
 						display: flex;
@@ -567,6 +677,19 @@
 							font-weight: 300;
 							color: #515151;
 						}
+
+						.car-num {
+							color: #515151;
+							white-space: nowrap;
+							overflow: hidden;
+							text-overflow: ellipsis;
+						}
+
+						.time-icon {
+							width: 24rpx;
+							height: 24rpx;
+							line-height: 24rpx;
+						}
 					}
 
 					.fourth-line {

--
Gitblit v1.9.1