From 93c421bb25860b60aed6a1a75f2927f8ac4789af Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期一, 28 十月 2024 16:05:05 +0800
Subject: [PATCH] feat:库管修改细节问题

---
 pages/customer-page/customer-index/customer-index.vue |  167 +++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 124 insertions(+), 43 deletions(-)

diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index ed5c598..eb7fb95 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">
+					style="background: url('https://wrzs.czjlchem.com:9090/wrzs/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"
@@ -21,8 +34,8 @@
 						@click="cardBodyClick(item)">
 						<view class="first-line">
 							<view class="dispatch-receive">
-								<view class="dispatch-dept">{{ item.deptName }}</view>
-								<view class="black-bar"></view>
+								<!-- <view class="dispatch-dept">{{ item.deptName }}</view>
+								<view class="black-bar"></view> -->
 								<view class="dispatch">{{ item.filedName }}</view>
 							</view>
 							<view class="point-number">
@@ -32,31 +45,37 @@
 						</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="coal-name-tag">{{ item.productNames || item.productName }}	<text style="margin-left: 20rpx;">{{ proType[item.packingType]}}</text> </view>
+							
 								<view class="black-bar"></view>
 								<view class="coal-type"
 									v-if="item.orderType">{{ item.orderType }}</view>
 							</view>
 						</view>
 						<view class="second-line">
-							{{item.orderCode}}
+							<text>璁㈠崟缂栧彿锛�</text>{{item.orderCode}}
+						</view>
+							<view class="second-line">
+							<text>鏃ヨ鍒掔紪鍙凤細</text>{{item.code}}
 						</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:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover">
+									style="width: 12rpx;height: 12rpx;line-height: 24rpx;background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/clock.png') no-repeat;background-size: cover">
 								</view>
 							</view>
 							<view class="send-date">{{ item.sendDate }}</view>
 						</view>
 						<view class="fourth-line">
 							<view class="receive"
-								@click.stop="receiveClick(item)">
+								@click.stop="receiveClick(item)"
+								v-if="Number(item.cars2)  <  Number(item.carNum)"
+								>
 								<view class="button-image">棰嗗彇</view>
 							</view>
 							<view class="forward"
@@ -67,9 +86,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"
@@ -85,13 +104,13 @@
 							:key="index"
 							@click="faYundetail(item)">
 							<view class="first">
-								<view class="">{{ item.deptName || '' }}</view>
+								<view class="">{{ item.filedName || '' }}</view>
 								<view class=""><u-icon name="arrow-right"
 										color="#999999"
 										size="40"></u-icon></view>
 							</view>
 							<view class="second">
-								<view class="coal-name">{{ item.coalName || '' }}</view>
+								<view class="coal-name">{{  item.productNames || item.productName }} 	<text style="margin-left: 20rpx;">{{ proType[item.packingType]}}</text></view>
 								<view class="order-type">{{ item.orderType || '' }}</view>
 							</view>
 							<view class="third">
@@ -107,14 +126,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:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover">
+										style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/clock.png') no-repeat;background-size: cover">
 									</view>
 								</view>
 								<view class="senddate">{{ item.sendDate }}</view>
@@ -122,7 +141,7 @@
 							<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;">
+										style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover;">
 									</view>
 								</view>
 								<view class="senddate">{{ item.orderCode }}</view>
@@ -159,9 +178,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 +187,6 @@
 			}
 		},
 		components: {
-			card,
 			combinedTitle
 		},
 		watch: {
@@ -190,7 +206,9 @@
 		data() {
 			return {
 				orderPlanData: [],
-				show: false, // 棰嗗彇鎻愮叅鍗曞脊鍑烘
+			    proType:['鏁h','娑叉隘鐡惰','缃愯','PVC25','PVC80','PVC1150','PVc1200'],
+				personnelType:'', // 鐢ㄦ埛绫诲瀷
+				show: false, // 棰嗗彇鏀跺彂鍗曞脊鍑烘
 				receiveNum: null,
 				getOrderNum: {
 					num: '',
@@ -208,9 +226,9 @@
 				total: 0,
 				// 鏄惁鏄剧ず鏇村鏁版嵁
 				showMoreData: false,
-				cars2: "",
-				carNum: "",
-				// 鍓╀綑鐨勬彁鐓ゅ崟鏁伴噺
+				cars2: "",  //棰嗗彇鏃ヨ鍒掔殑杞︽暟
+				carNum: "",  //鏃ヨ鍒掔殑鎬昏溅鏁�
+				// 鍓╀綑鐨勬敹鍙戝崟鏁伴噺
 				carNumSurplus: '',
 				canClick: false,
 				popupDetermineClickLoading: false
@@ -223,6 +241,7 @@
 			init() {
 				this.GetOrderPlan();
 				this.getJhOrderPlanDataPage();
+				this.getType();
 			},
 			// 鑾峰彇鍙戣繍璁″垝鍒楄〃
 			GetOrderPlan() {
@@ -234,7 +253,7 @@
 					}
 				});
 			},
-			// 鑾峰彇鍘嗗彶鎻愮叅鍗�
+			// 鑾峰彇鍘嗗彶鏀跺彂鍗�
 			getJhOrderPlanDataPage() {
 				uni.showLoading({
 					title: '鍔犺浇涓�'
@@ -259,7 +278,7 @@
 				this.pageCurrent++;
 				this.getJhOrderPlanDataPage();
 			},
-			//fix 鐐瑰嚮鎻愮叅鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁
+			//fix 鐐瑰嚮鏀跺彂鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁
 			ArrSet(Arr, id) {
 				var obj = {};
 				const arrays = Arr.reduce((setArr, item) => {
@@ -268,6 +287,7 @@
 				}, []);
 				return arrays;
 			},
+      //棰嗗彇寮规
 			popupDetermineClick() {
 				if (this.receiveNum > 0) {
 					this.popupDetermineClickLoading = true;
@@ -309,8 +329,10 @@
 			 * 棰嗗彇寮规
 			 */
 			receiveClick(item) {
+				console.log(item,'213')
 				this.show = true;
-				this.getOrderNum.id = item.id; // 鑾峰彇棰嗗彇鎻愮叅鍗曠殑id
+				this.receiveNum = item.carNum;
+				this.getOrderNum.id = item.id; // 鑾峰彇棰嗗彇鏀跺彂鍗曠殑id
 				this.cars2 = item.cars2
 				this.carNum = item.carNum
 			},
@@ -323,25 +345,43 @@
 				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}`
 				});
 			},
 			// 杞彂
 			forwardClick(obj) {
+				console.log(111,obj)
 				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}` });
+					.navigateTo({ url: `/pages/public-page/forward/forward?orderPlanId=${obj.id}&orderType=${obj.orderType}&carNumSurplus1=${obj.carNumSurplus1}&carNum=${obj.carNum}&cars2=${obj.cars2}&productName=${obj.productName}&customerId=${obj.customerId}&pvcPlanMeasure=${obj.pvcPlanMeasure}&packingType=${obj.packingType}`});
+			},
+			// 鑷富閰嶉��
+			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 +389,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%;
@@ -408,7 +477,7 @@
 
 			.second {
 				width: 100%;
-				height: 31rpx;
+				height: vw(80);
 				font-size: 30rpx;
 				font-weight: 300;
 				color: #515151;
@@ -417,9 +486,12 @@
 				justify-content: flex-start;
 
 				.coal-name {
-					min-width: vww(30);
-					height: vww(20);
+					width: 70%;
+					height: vww(50);
 					margin-right: vww(21);
+				    white-space: nowrap; /* 涓嶆崲琛� */  
+				   overflow: hidden; /* 瓒呭嚭闅愯棌 */  
+				   text-overflow: ellipsis; 
 				}
 
 				.order-type {
@@ -488,8 +560,8 @@
 				top: vww(-144);
 
 				.collection-form-item {
-					width: 690rpx;
-					height: 370rpx;
+					width: 700rpx;
+					height: 390rpx;
 					background: #ffffff;
 					box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
 					border-radius: 20rpx;
@@ -527,7 +599,7 @@
 							}
 
 							.dispatch {
-								margin-left: vww(12);
+								// margin-left: vww(12);
 								min-width: vww(50);
 							}
 
@@ -552,13 +624,15 @@
 
 					.second-line {
 						width: 100%;
-						height: vww(30);
+						height: vww(50);
 						margin-left: vww(16);
 						display: flex;
 						align-items: center;
 						justify-content: flex-start;
+						    margin-bottom: 15rpx;
 
 						.coal-name {
+							width: 80%;
 							flex-grow: 1;
 							height: 30rpx;
 							font-size: 30rpx;
@@ -566,7 +640,14 @@
 							color: #515151;
 							position: relative;
 							display: flex;
+							margin-top: 20rpx;
 							align-items: center;
+							.coal-name-tag{
+								width: 70%;
+							white-space: nowrap; /* 涓嶆崲琛� */  
+							overflow: hidden; /* 瓒呭嚭闅愯棌 */  
+					   		 text-overflow: ellipsis; 
+							}
 
 							.black-bar {
 								width: 2rpx;
@@ -596,8 +677,8 @@
 						align-items: center;
 
 						.send-date {
-							margin-left: vww(14);
-							width: 148rpx;
+							margin-left: vww(5);
+							width: 170rpx;
 							height: 24rpx;
 							line-height: 24rpx;
 							font-size: 28rpx;
@@ -608,7 +689,7 @@
 
 					.fourth-line {
 						width: 100%;
-						height: vww(30);
+						height: vww(40);
 						@include flex;
 						justify-content: flex-start;
 						position: relative;
@@ -692,4 +773,4 @@
 			}
 		}
 	}
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.1