From 983619ef25f84e095bcbf6f4996b0cb58210c73b Mon Sep 17 00:00:00 2001 From: 819527061@qq.com <123456> Date: 星期四, 08 八月 2024 18:25:24 +0800 Subject: [PATCH] 质检页面 --- pages/loadUnload-page/selectTarget/selectTarget.vue | 97 ++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 80 insertions(+), 17 deletions(-) diff --git a/pages/loadUnload-page/selectTarget/selectTarget.vue b/pages/loadUnload-page/selectTarget/selectTarget.vue index 1c530ee..64fce36 100644 --- a/pages/loadUnload-page/selectTarget/selectTarget.vue +++ b/pages/loadUnload-page/selectTarget/selectTarget.vue @@ -11,6 +11,7 @@ ></u-tag> </view> <!-- 鐐瑰嚮鏌ョ湅鍘熺洂閽欓晛 --> + <view class="self-deliver"> <view class="self-deliver_text"> 鏌ョ湅鍘熺洂閽欓晛缁撴灉 @@ -22,6 +23,11 @@ @click="todoDetail"></u-button> </view> </view> + <view + v-if="messageObj.carNo" + class="notice-bar"><u-notice-bar :text="messageText" + :fontSize="30" :showIcon = 'true' + ></u-notice-bar></view> <!-- <u--form labelPosition="top" labelWidth="20%" :borderBottom="false" @@ -175,8 +181,8 @@ </u--input> <text> {{isNumOk ? '浠�' : '鍚�' }}</text> </view> - <!-- pvc 骞朵笖鏄ぇ鍖� --> - <view class="pvcBig" v-if="activeObj.productName === 'PVC' && activeObj.packingType === 5"> + <!-- 鑱氭隘涔欑儻鏍戣剛 骞朵笖鏄ぇ鍖� --> + <view class="pvcBig" v-if="activeObj.productName === '鑱氭隘涔欑儻鏍戣剛' && activeObj.packingType === 5"> </view> <view v-if="isNumOk && activeObj.productQuantity">褰撳墠鏁伴噺锛歿{activeObj.productQuantity}}浠�</view> @@ -230,7 +236,7 @@ </template> <script> - import { BaseUrl } from '@/api/publicInterface.js' + import { mapState, mapMutations, mapGetters } from 'vuex'; export default { props: { loadUnloadData: { @@ -254,7 +260,16 @@ } - } + }, + messageText(){ + if(this.messageObj.carNo){ + return `鏃堕棿:${this.messageObj.now}锛�${this.messageObj.carNo}锛屼骇鍝�${this.messageObj.productNames}鍦�${this.messageObj.bunkerName}鍏ュ満浜嗭紝璇峰強鏃舵鏌ワ紒` + }else{ + return '鏆傛棤娑堟伅' + } + + }, + ...mapGetters(['websocketData']) }, watch: { @@ -265,6 +280,29 @@ }, deep: true, immediate: true + }, + //鐩戝惉娑堟伅 + 'websocketData': { + handler(v) { + console.log(v, '鎺ュ彈鐨剋s鏁版嵁'); + if(v) { + if (v.startsWith('kgTipHead')) { + console.log('vvvvv',v.slice(11)) + let nowWeighObj = JSON.parse(v.slice(11)); + console.log(nowWeighObj,'nowWeight'); + this.messageObj = nowWeighObj; + // this.messageList = JSON.parse(v.slice(5)); + // this.messageList = { + // ...this.messageList, + // title: this.messageList.title.slice(0, 8) + '...', + // content: removeTags(this.messageList.content).trim().slice(0, 8) + '...' + // } + // this.messagePushShow = true; + } + } + }, + deep: true, + immediate: true } }, data() { @@ -274,6 +312,9 @@ secondClass: "", orderType: '', bunkerIds:"" + }, + messageObj:{ + carNo:'', }, isEmptyCar:null, //鏄惁绌鸿溅鍑哄巶 checkStatusList:[ @@ -342,11 +383,18 @@ uni.hideLoading() if (res.code === 0) { this.firstClassActionsList = res.data; + this.firstClassActionsList.unshift({name:'鍏ㄩ儴',id:res.data.map(item=>item.id).join(',')}) if(res.data.length){ - this.dataForm.bunkerIds = res.data.map(item=>item.id).join(',') - uni.setStorageSync('bunkerIds',res.data.map(item=>item.id).join(',')) - this.firstClassActionsList.unshift({name:'鍏ㄩ儴',id:res.data.map(item=>item.id).join(',')}) - this.dataForm.firstClass = '鍏ㄩ儴' + if(!uni.getStorageSync('bunkerIds')){ + this.dataForm.firstClass = '鍏ㄩ儴' + this.dataForm.bunkerIds = res.data.map(item=>item.id).join(',') + uni.setStorageSync('bunkerIds',res.data.map(item=>item.id).join(',')) + }else{ + this.dataForm.bunkerIds = uni.getStorageSync('bunkerIds'); + uni.setStorageSync('bunkerIds',this.dataForm.bunkerIds) + } + + this.getDetailData(); } @@ -354,7 +402,7 @@ this.$u.toast('鍔犺浇澶辫触') } }).then(() => { - this.getUserInfo() + }) }, firstClassSelect() { @@ -427,7 +475,7 @@ // } // }) - // 璁′欢锛� 0 pvc type + // 璁′欢锛� 0 鑱氭隘涔欑儻鏍戣剛 type // 鎶樺惃: this.activeObj = item; if( (parintItem.orderType === '澶栬喘' ||parintItem.orderType === '澶栬喘閫�' ) && item.isWeight === 0){ @@ -442,8 +490,8 @@ this.isNumOk = false; this.isClean = false; } - //pvc - if(parintItem.orderType ==='澶栭攢' && item.productName ==='PVC' && (item.packingType === 3 || item.packingType === 4)){ + //鑱氭隘涔欑儻鏍戣剛 + if(parintItem.orderType ==='澶栭攢' && (/鑱氭隘涔欑儻鏍戣剛/.test(item.productName) || item.productName === 'PVC') && (item.packingType === 3 || item.packingType === 4)){ this.isNumOk = true; this.isClean = false; } @@ -455,7 +503,7 @@ } // //pvc澶у寘鑷姩璁$畻鎶樺惃 - if(item.productName === 'PVC' && item.packingType === 5){ + if((/鑱氭隘涔欑儻鏍戣剛/.test(item.productName) || item.productName === 'PVC') && item.packingType === 5){ this.isNumOk = true; this.isClean = false; } @@ -572,13 +620,27 @@ } } +.notice-bar{ + margin-left: vww(10); + margin-bottom: 20rpx; + margin-top: 20rpx; + + width: 98%; + .u-notice-bar{ + border-radius: 20rpx; + margin-top: 20rpx; + height: 40rpx; + } +} // 鑷富閰嶉�� .self-deliver { - position: relative; + position: relative; + text-indent: 20rpx; top: vww(10); - width: 98%; + width: 95%; height: vww(40); - margin: vww(8) 10rpx; + margin: vww(13) 10rpx; + margin-left: 20rpx; 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); @@ -591,6 +653,7 @@ height: 28px !important; line-height: 40px; padding: 0 12px; + text-indent: 0!important; font-size: 28rpx; font-weight: 300; color: #ffffff; @@ -655,7 +718,7 @@ top: vww(-160); .top-tag{ width: 60%; - margin-left: 55%!important; + margin-left: 55%; height: 100rpx; margin-left: 50%; display: flex; -- Gitblit v1.9.1