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/public-page/forward/forward.vue |   41 +++++++++++++++++++++++++++++++++--------
 1 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue
index 24a7af3..e4a209e 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 text="鍒嗛厤鏃ヨ鍒掑惃鏁�" type="primary" :plain="true" @click="todoFenPei"></u-button></view>
+									<view><u-button v-if="fenpeiFlag " text="鍒嗛厤鏃ヨ鍒掑惃鏁�" type="primary" :plain="true" @click="todoFenPei(val)"></u-button></view>
 								</view>
 							</view>
 						</view>
@@ -166,6 +166,8 @@
 			this.isshow=!reg.test(params.orderType)
 			this.productName = params.productName;
 			this.customerId = params.customerId;
+			this.packingType = params.packingType;
+			this.pvcPlanMeasure = params.pvcPlanMeasure;
 			// 瀹㈡埛
 			this.cars2 = Number(params.cars2);
 			this.tempcarNumSurplus1 = this.carNumSurplus1 = Number(params.carNumSurplus1 || 0);
@@ -196,8 +198,10 @@
 		data() {
 			return {
 				isshow:false,
+				pvcPlanMeasure:'',
 				forwardSurplus: 0,
 				paramsName: {},
+				packingType:'',
 				productName:'',
 				customerId:'',
 				huoDaiData: [],
@@ -239,6 +243,7 @@
 				}],
 				loading: false, //鎻愪氦loading
 				originForwardName: '', //鍘熻浆鍙戝璞�
+				isShow:false,
 				laterForwardName: '', //鍚庤浆鍙戝璞�
 				errorDataList: [], // 閿欒鏁版嵁
 				isDirectAdd: false, // 鏄惁鏄湪鍘熸潵鏈夊璞$殑item淇敼 鏄殑涓簍rue
@@ -248,6 +253,7 @@
 		onShow() {
 			this.init();
 			this.getBuild();
+			// this.getOrderPlan();
 			if (this.roleType == 2) {
 				this.list1.splice(1, 1);
 				this.tabHuoDai = false;
@@ -262,6 +268,14 @@
 			},
 			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
+				}
 			}
 		},
 		methods: {
@@ -271,6 +285,12 @@
 				})
 				this.$reqGet('forwardList', { OrderPlanId: this.orderPlanId }).then(res => {
 					uni.hideLoading()
+					if(res.data.length){
+						this.isShow = true;
+					}else{
+						this.isShow =  false;
+
+					}
 					if (res.data.length !== 0 && this.roleType == 1) {
 						this.jhOrderPlanForwardList = res.data.map((item, index) => {
 							return {
@@ -487,6 +507,7 @@
 					// 	this.selectPopupShow = true;
 					// }
 					// } else {
+					console.log(this.jhOrderPlanForwardList,item,'jhOrderPlanForwardList')
 					let isableAdd = this.jhOrderPlanForwardList.filter(v => item.name === v.name);
 					if (isableAdd.length > 0) {
 						this.$u.toast('瀛樺湪閲嶅娣诲姞');
@@ -634,6 +655,10 @@
 						this.$u.toast('璇疯緭鍏ュ悎娉曟暟瀛�');
 						isPass = false;
 						return isPass;
+					} else if (!v.name){
+						this.$u.toast('璇烽�夋嫨杞﹂槦');
+						isPass = false;
+						return isPass;
 					} else {
 						isPass = true;
 						return isPass;
@@ -645,13 +670,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}`});
+					.navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&status=${1}&pvcPlanMeasure=${this.pvcPlanMeasure}`});
 
 								},500)
 					
@@ -678,9 +703,9 @@
 					this.tabHuoDai = false;
 				}
 			},
-			todoFenPei(){
+			todoFenPei(val){
 				uni
-					.navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}`});
+					.navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&fleetId=${val.fleetId}&pvcPlanMeasure=${this.pvcPlanMeasure}`});
 			}
 		}
 	};

--
Gitblit v1.9.1