From 76543a9506a9b43476e750c79c5ff595aa4bae36 Mon Sep 17 00:00:00 2001
From: wk
Date: 星期一, 05 八月 2024 08:28:38 +0800
Subject: [PATCH] feat:门卫

---
 pages/customer-page/customer-index/customer-index.vue |  105 +++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 82 insertions(+), 23 deletions(-)

diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index ed5c598..6b4038f 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -2,9 +2,22 @@
 	<view class="">
 		<view class="customer-index">
 			<view class="customer-index-body">
-				<!-- 寰呴鍙栧拰杞彂鎻愮叅鍗� -->
+				
+				<!-- 寰呴鍙栧拰杞彂鏀跺彂鍗� -->
 				<view class="wait-collection"
 					style="background: url('https://mx.jzeg.cn:9096/appimg/image/banner/customerbanner.png') no-repeat;background-size:contain">
+				</view>
+					<!-- 鑷富閰嶉�佺晫闈� -->
+				<view class="self-deliver" v-if="personnelType === 1">
+					<view class="self-deliver_text">
+						鍒涘缓鏃ヨ鍒掕鍗� 
+					</view>
+					<view class="self-deliver_btn">
+						<u-button text="鍘诲垱寤�"
+							type="primary"
+							shape="cirle"
+							@click="selfDeliver"></u-button>
+					</view>
 				</view>
 				<view style="position: relative;top: -120px;">
 					<u-empty mode="data"
@@ -32,12 +45,12 @@
 						</view>
 						<view class="second-line"
 							style="width: 94%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
-							v-if="item.orderType==='鍐呴攢'||item.orderType==='澶栬喘'">
+							v-if="item.orderType==='鍐呴攢'||item.orderType==='澶栬喘' || item.orderType==='澶栬喘閫�'">
 							{{item.customerName}}
 						</view>
 						<view class="second-line">
 							<view class="coal-name">
-								<view class="">{{ item.coalName }}</view>
+								<view class="">{{ item.productNames || item.productName }}</view>
 								<view class="black-bar"></view>
 								<view class="coal-type"
 									v-if="item.orderType">{{ item.orderType }}</view>
@@ -67,9 +80,9 @@
 					</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"
@@ -91,7 +104,7 @@
 										size="40"></u-icon></view>
 							</view>
 							<view class="second">
-								<view class="coal-name">{{ item.coalName || '' }}</view>
+								<view class="coal-name">{{  item.productNames || item.productName }}</view>
 								<view class="order-type">{{ item.orderType || '' }}</view>
 							</view>
 							<view class="third">
@@ -107,7 +120,7 @@
 										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>
@@ -159,9 +172,7 @@
 </template>
 
 <script>
-	import card from '@/components/card/card.vue';
 	import combinedTitle from '@/components/combined-title/combined-title.vue';
-	import { customerId } from '@/utils/status';
 	export default {
 		props: {
 			orderPlanDataStore: {
@@ -170,7 +181,6 @@
 			}
 		},
 		components: {
-			card,
 			combinedTitle
 		},
 		watch: {
@@ -190,7 +200,8 @@
 		data() {
 			return {
 				orderPlanData: [],
-				show: false, // 棰嗗彇鎻愮叅鍗曞脊鍑烘
+				personnelType:'', // 鐢ㄦ埛绫诲瀷
+				show: false, // 棰嗗彇鏀跺彂鍗曞脊鍑烘
 				receiveNum: null,
 				getOrderNum: {
 					num: '',
@@ -208,9 +219,9 @@
 				total: 0,
 				// 鏄惁鏄剧ず鏇村鏁版嵁
 				showMoreData: false,
-				cars2: "",
-				carNum: "",
-				// 鍓╀綑鐨勬彁鐓ゅ崟鏁伴噺
+				cars2: "",  //棰嗗彇鏃ヨ鍒掔殑杞︽暟
+				carNum: "",  //鏃ヨ鍒掔殑鎬昏溅鏁�
+				// 鍓╀綑鐨勬敹鍙戝崟鏁伴噺
 				carNumSurplus: '',
 				canClick: false,
 				popupDetermineClickLoading: false
@@ -223,6 +234,7 @@
 			init() {
 				this.GetOrderPlan();
 				this.getJhOrderPlanDataPage();
+				this.getType();
 			},
 			// 鑾峰彇鍙戣繍璁″垝鍒楄〃
 			GetOrderPlan() {
@@ -234,7 +246,7 @@
 					}
 				});
 			},
-			// 鑾峰彇鍘嗗彶鎻愮叅鍗�
+			// 鑾峰彇鍘嗗彶鏀跺彂鍗�
 			getJhOrderPlanDataPage() {
 				uni.showLoading({
 					title: '鍔犺浇涓�'
@@ -259,7 +271,7 @@
 				this.pageCurrent++;
 				this.getJhOrderPlanDataPage();
 			},
-			//fix 鐐瑰嚮鎻愮叅鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁
+			//fix 鐐瑰嚮鏀跺彂鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁
 			ArrSet(Arr, id) {
 				var obj = {};
 				const arrays = Arr.reduce((setArr, item) => {
@@ -268,6 +280,7 @@
 				}, []);
 				return arrays;
 			},
+      //棰嗗彇寮规
 			popupDetermineClick() {
 				if (this.receiveNum > 0) {
 					this.popupDetermineClickLoading = true;
@@ -310,7 +323,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
 			},
@@ -323,18 +336,18 @@
 				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: `/subPages/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&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}`
+					url: `/subPages/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}&productNames=${v.productNames || v.productName}&deptName=${v.deptName}`
 				});
 			},
 			// 杞彂
@@ -342,6 +355,23 @@
 				if (obj.cars2 == 0) return this.$u.toast('璇峰厛棰嗗彇鍚庡啀杞彂');
 				uni
 					.navigateTo({ url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}` });
+			},
+			// 鑷富閰嶉��
+			selfDeliver() {
+				uni.navigateTo({
+					url: '/subPages/addDailyPlan/addDailyPlan'
+				})
+			},
+			//鑾峰彇鐢ㄦ埛鏍囪瘑
+			getType(){
+				this.$reqGetId('getPersonnelType',uni.getStorageSync('customerId')).then(res=>{
+					console.log(res,'ressss')
+					if(res.code === 0){
+					  this.personnelType = res.data.personnelType;
+					}else{
+						this.personnelType = '';
+					}
+				})
 			}
 		}
 	};
@@ -349,11 +379,40 @@
 
 <style lang="scss"
 	scoped>
+	
 	@mixin flex {
 		display: flex;
 		justify-content: space-between;
 		align-items: center;
 	}
+	// 鑷富閰嶉��
+			.self-deliver {
+				position: relative;
+				top: vww(-150);
+				width: 88%;
+				height: vww(50);
+				margin: vww(8) auto;
+				padding: 0 vww(8);
+				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;
+
+			
+			}
+				/deep/.u-button {
+					width: 100%;
+					height: 28px !important;
+					line-height: 40px;
+					padding: 0 12px;
+					font-size: 28rpx;
+					font-weight: 300;
+					color: #ffffff;
+					background: #497bfb !important;
+					letter-spacing: 4rpx;
+					border-radius: 37rpx 37rpx 37rpx 37rpx !important;
+					box-shadow: 2rpx 3rpx 13rpx 0rpx rgba(43, 98, 239, 0.5), 0rpx 0rpx 9rpx 0rpx rgba(247, 250, 253, 0.29);
+				}
 
 	.wait-collection {
 		width: 100%;
@@ -692,4 +751,4 @@
 			}
 		}
 	}
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.1