From 1b2b99dc4ebf5dd1b40f516d334e02ecb64827cf Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期一, 13 一月 2025 17:37:13 +0800
Subject: [PATCH] feat:客户分享日计划限制& 库管查看拼单按钮增加传参

---
 pages/public-page/forward/forward.vue |   42 ++++++++++++++++++++++++++++++++++--------
 1 files changed, 34 insertions(+), 8 deletions(-)

diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue
index 1e64080..a08d5be 100644
--- a/pages/public-page/forward/forward.vue
+++ b/pages/public-page/forward/forward.vue
@@ -49,13 +49,13 @@
 												:readonly="true"
 												border="bottom"></u--input>
 										</u-form-item>
-										<u-form-item label="杈撳叆鏁伴噺"
+										<u-form-item label="杈撳叆杞︽暟"
 											ref="item2"
 											labelWidth="21%">
 											<view class="forward-card-amount">
 												<view class="forward-card-amount-input">
 													<u--input v-model="val.carNum"
-														placeholder="璇疯緭鍏ヨ浆鍙戞暟閲�"
+														placeholder="璇疯緭鍏ヨ浆鍙戣溅鏁�"
 														@input="debouncecarNumInput(index, val.carNum,val.xsUserId)"
 														@blur="blurInput(index, val.carNum,val.xsUserId)"
 														border="bottom"></u--input>
@@ -75,7 +75,7 @@
 										</u-form-item>
 										
 									</u--form>
-									<view><u-button v-if="/鑱氭隘涔欑儻鏍戣剛/.test(this.productName) &&  isShow" text="鍒嗛厤鏃ヨ鍒掑惃鏁�" type="primary" :plain="true" @click="todoFenPei(val)"></u-button></view>
+									<view><u-button v-if="fenpeiFlag " text="鍒嗛厤鏃ヨ鍒掑惃鏁�" type="primary" :plain="true" @click="todoFenPei(val)"></u-button></view>
 								</view>
 							</view>
 						</view>
@@ -92,7 +92,7 @@
 					:disabled="whetherClick"></u-button></view>
 			<!--鍒嗕韩鏃ヨ鍒�  -->
 			<view 
-			class="AdddBtn" v-if="isshow && roleType!== 2 "><u-button text="鍒嗕韩鏃ヨ鍒�"
+			class="AdddBtn" v-if="isshow && roleType!== 2  && btnFlag"><u-button text="鍒嗕韩鏃ヨ鍒�"
 					:hairline="false"
 					open-type="share"
 					:loading='loading'></u-button></view>
@@ -166,7 +166,9 @@
 			this.isshow=!reg.test(params.orderType)
 			this.productName = params.productName;
 			this.customerId = params.customerId;
+			this.packingType = params.packingType;
 			this.pvcPlanMeasure = params.pvcPlanMeasure;
+			this.productId = params.productId;
 			// 瀹㈡埛
 			this.cars2 = Number(params.cars2);
 			this.tempcarNumSurplus1 = this.carNumSurplus1 = Number(params.carNumSurplus1 || 0);
@@ -200,6 +202,8 @@
 				pvcPlanMeasure:'',
 				forwardSurplus: 0,
 				paramsName: {},
+				packingType:'',
+				productId:'',
 				productName:'',
 				customerId:'',
 				huoDaiData: [],
@@ -230,6 +234,7 @@
 				formNum: 1,
 				// 涓汉杞彂鏁版嵁
 				personalForward: {},
+				falseProductNames:['1818237609508347905','1818237832536268801','1818211942485995521'],
 				whetherClick: false,  //娣诲姞鎸夐挳
 				whetherClick1: false,
 				// 婊戝姩鍗曞厓鏍奸厤缃�
@@ -266,6 +271,22 @@
 			},
 			text1() {
 				return `宸叉嫢鏈�${this.carNum}寮犳敹鍙戝崟,鍓╀綑${this.carNumSurplusHuodai}寮犳敹鍙戝崟`;
+			},
+			fenpeiFlag(){
+				console.log(this.productName,this.packingType,'122222222cumped',/鑱氭隘涔欑儻鏍戣剛/.test(this.productName) || (this.packingType &&  this.packingType == '1'))
+				if(/鑱氭隘涔欑儻鏍戣剛/.test(this.productName) || (this.packingType &&  this.packingType == '1')){
+					return true
+				}else{
+					return false
+				}
+			},
+			btnFlag(){
+				if(this.falseProductNames.includes(this.productId)){
+					return false;
+				}else{
+					return true;
+				}
+		        
 			}
 		},
 		methods: {
@@ -645,6 +666,10 @@
 						this.$u.toast('璇疯緭鍏ュ悎娉曟暟瀛�');
 						isPass = false;
 						return isPass;
+					} else if (!v.name){
+						this.$u.toast('璇烽�夋嫨杞﹂槦');
+						isPass = false;
+						return isPass;
 					} else {
 						isPass = true;
 						return isPass;
@@ -656,13 +681,13 @@
 					this.$reqPost('forward', this.jhOrderPlanForwardList, 'json').then(res => {
 						console.log(res, 'zh');
 						// res.data.length == 0 鎻愪氦鎴愬姛 鍚﹀垯鎻愪氦澶辫触
-						if (res.data.length == 0) {
+						if (res.code === 0) {
 							this.loading = false
 							this.$u.toast('鎻愪氦鎴愬姛');
-							if(/鑱氭隘涔欑儻鏍戣剛/.test(this.productName)){
+							if(this.fenpeiFlag){
 								setTimeout(()=>{
 									uni
-					.navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&status=${0}&pvcPlanMeasure=${this.pvcPlanMeasure}`});
+					.navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&status=${1}&pvcPlanMeasure=${this.pvcPlanMeasure}`});
 
 								},500)
 					
@@ -692,7 +717,8 @@
 			todoFenPei(val){
 				uni
 					.navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&fleetId=${val.fleetId}&pvcPlanMeasure=${this.pvcPlanMeasure}`});
-			}
+			},
+			
 		}
 	};
 </script>

--
Gitblit v1.9.1