From c612912d4132e4d7b4a58279071fac837891c381 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期五, 27 九月 2024 17:08:25 +0800 Subject: [PATCH] feat:库管确认装卸毛重净重按条件显示,司机填原发信息增加限制 --- pages/public-page/forward/forward.vue | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 51 insertions(+), 5 deletions(-) diff --git a/pages/public-page/forward/forward.vue b/pages/public-page/forward/forward.vue index a9ba7cb..db7585b 100644 --- a/pages/public-page/forward/forward.vue +++ b/pages/public-page/forward/forward.vue @@ -73,7 +73,9 @@ </u-checkbox-group> </view> </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> </view> </view> @@ -90,7 +92,7 @@ :disabled="whetherClick"></u-button></view> <!--鍒嗕韩鏃ヨ鍒� --> <view - class="AdddBtn" v-if="isshow"><u-button text="鍒嗕韩鏃ヨ鍒�" + class="AdddBtn" v-if="isshow && roleType!== 2 "><u-button text="鍒嗕韩鏃ヨ鍒�" :hairline="false" open-type="share" :loading='loading'></u-button></view> @@ -162,6 +164,9 @@ console.log(params, '杞彂椤甸潰鐨勫弬鏁�'); let reg=RegExp(/閿�/) this.isshow=!reg.test(params.orderType) + this.productName = params.productName; + this.customerId = params.customerId; + this.pvcPlanMeasure = params.pvcPlanMeasure; // 瀹㈡埛 this.cars2 = Number(params.cars2); this.tempcarNumSurplus1 = this.carNumSurplus1 = Number(params.carNumSurplus1 || 0); @@ -192,8 +197,11 @@ data() { return { isshow:false, + pvcPlanMeasure:'', forwardSurplus: 0, paramsName: {}, + productName:'', + customerId:'', huoDaiData: [], isClickFlag:true,// true 鍙互 or false for forward and back to the direction of the car direction (default fleetData: [], @@ -212,7 +220,7 @@ index: '', checkboxValue1: '', selectPopupShow: false, - list1: [{ name: '杞﹂槦' }, { name: '鎵胯繍鍟�' }], + list1: [{ name: '杞﹂槦' }], //{ name: '鎵胯繍鍟�' } tabHuoDai: false, carNumSurplus1: '', //鍓╀綑鐨勬敹鍙戝崟鏁伴噺锛堣浆鍙戠殑鏁伴噺 - 棰嗗彇鐨勬暟閲忥級 tempcarNumSurplus1: '', @@ -233,6 +241,7 @@ }], loading: false, //鎻愪氦loading originForwardName: '', //鍘熻浆鍙戝璞� + isShow:false, laterForwardName: '', //鍚庤浆鍙戝璞� errorDataList: [], // 閿欒鏁版嵁 isDirectAdd: false, // 鏄惁鏄湪鍘熸潵鏈夊璞$殑item淇敼 鏄殑涓簍rue @@ -241,6 +250,8 @@ }, onShow() { this.init(); + this.getBuild(); + // this.getOrderPlan(); if (this.roleType == 2) { this.list1.splice(1, 1); this.tabHuoDai = false; @@ -264,6 +275,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 { @@ -305,6 +322,15 @@ }).catch(e => { uni.hideLoading() }) + }, + getBuild(){ + console.log(this.productName,'opr') + if(/鑱氭隘涔欑儻鏍戣剛/.test(this.productName)){ + this.$reqGet('getBuildList',{orderPlanId:this.orderPlanId,customerId:this.customerId}).then(res=>{ + console.log(res,'resss') + }) + } + }, // 杩斿洖涓婁竴椤� back() { @@ -471,6 +497,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('瀛樺湪閲嶅娣诲姞'); @@ -607,6 +634,7 @@ }, // 鎻愪氦 submitForm() { + //杞︽暟 * 鍚ㄦ暟 < 璁″垝鍚ㄦ暟 let isPass = false; if (this.jhOrderPlanForwardList.length === 0) { this.$u.toast('璇疯嚦灏戦�夋嫨涓�缁勮浆鍙戝璞�'); @@ -615,6 +643,10 @@ this.jhOrderPlanForwardList.forEach(v => { if (!reg.test(v.carNum) || Number(v.carNum) <= 0) { this.$u.toast('璇疯緭鍏ュ悎娉曟暟瀛�'); + isPass = false; + return isPass; + } else if (!v.name){ + this.$u.toast('璇烽�夋嫨杞﹂槦'); isPass = false; return isPass; } else { @@ -628,12 +660,22 @@ 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('鎻愪氦鎴愬姛'); - setTimeout(() => { + if(/鑱氭隘涔欑儻鏍戣剛/.test(this.productName)){ + setTimeout(()=>{ + uni + .navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&status=${1}&pvcPlanMeasure=${this.pvcPlanMeasure}`}); + + },500) + + }else{ + setTimeout(() => { uni.navigateBack({ delta: 1 }); }, 1000); + } + } else { this.loading = false this.errorDataList = res.data @@ -651,6 +693,10 @@ this.tabHuoDai = false; } }, + todoFenPei(val){ + uni + .navigateTo({ url: `/subPages/allocaTetonnage/index?orderPlanId=${this.orderPlanId}&customerId=${this.customerId}&fleetId=${val.fleetId}&pvcPlanMeasure=${this.pvcPlanMeasure}`}); + } } }; </script> @@ -744,7 +790,7 @@ .forward-card { margin-top: vww(10); width: 690rpx; - height: 275rpx; + height: 400rpx; background: #ffffff; box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15); border-radius: 20rpx; -- Gitblit v1.9.1