From 2490d3321f6d6f9b5bacf29225387f7c3f89a2b4 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 20 六月 2024 15:47:15 +0800 Subject: [PATCH] feat:司机填写集装箱号 --- pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 303 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 281 insertions(+), 22 deletions(-) diff --git a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue index 47a3abb..54e89c5 100644 --- a/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue +++ b/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue @@ -15,13 +15,13 @@ <view class="" v-if="orderType == '杞叆' || orderType == '杞嚭'">鐓ゅ満:{{ coalDetailsData.filedName || '' }}</view> <view class="" - v-else>鐓ゅ満:{{ coalDetailsData.filedName || '鏆傛棤' }}</view> + v-else>浠撳簱:{{ coalDetailsData.filedName || '鏆傛棤' }}</view> </view> </view> <view class="block-information"> <view class="block-main"> <view class="basic"> - <view class="coalName">{{ coalDetailsData.coalName }}</view> + <view class="coalName">{{ coalDetailsData.productNames || coalDetailsData.productName }}</view> <view class="status-button" style="background: url('https://mx.jzeg.cn:9096/appimg/image/banner/statusbutton.png') no-repeat; background-size: cover;"> @@ -34,7 +34,9 @@ size="40"></u-icon></view> <view class="send-date">{{ coalDetailsData.sendDate }}</view> </view> - <view class="coal-code">鎻愮叅鍗曠紪鍙�: {{ coalDetailsData.code || '' }}</view> + <view class="coal-code">绫诲瀷: {{ coalDetailsData.orderType || '' }}</view> + <view class="coal-code">鏀跺彂鍗曠紪鍙�: {{ coalDetailsData.code || '' }}</view> + <view class="coal-code">杞︾墝鍙�: {{ coalDetailsData.carNo || '' }}</view> <view class="order-code" v-if="!isSpecial"> 璁㈠崟缂栧彿: {{ coalDetailsData.orderCode || '' }}</view> @@ -44,26 +46,74 @@ v-show="timeLineStatus===9"> 鏌ョ湅瑁呰浇鎯呭喌 </view> - <view class="weigh-item"> + <view class="weigh-item" v-if="isShowClean"> <view class="item"> <view class="concrete" style="background: url('https://mx.jzeg.cn:9096/appimg/image/banner/skin.png') no-repeat;background-size: cover;"> 鐨�</view> - <view class="num">{{ coalDetailsData.skin||"" }}</view> + <view class="num" v-if="weightObj.skin">{{ Number(weightObj.skin).toFixed(2) ||"" }}</view> </view> <view class="item"> <view class="concrete" style="background: url('https://mx.jzeg.cn:9096/appimg/image/banner/hair.png') no-repeat;background-size: cover;"> 姣�</view> - <view class="num">{{ coalDetailsData.hair||"" }}</view> + <view class="num" v-if="weightObj.hair">{{ Number(weightObj.hair).toFixed(2) ||"" }}</view> </view> <view class="item"> <view class="concrete" style="background: url('https://mx.jzeg.cn:9096/appimg/image/banner/clean.png') no-repeat;background-size: cover;"> 鍑�</view> - <view class="num">{{ coalDetailsData.clean||"" }}</view> + <view class="num" v-if="weightObj.clean">{{ Number(weightObj.clean).toFixed(2) ||"" }}</view> </view> </view> + </view> + </view> + </view> + <!-- 瀛愯彍鍗� ---琛ㄦ牸 --> + <view class="sub-table"> + <view class="first-line"><combined-title title="浜у搧淇℃伅"></combined-title></view> + <view class="table"> + <uni-table border + id="table-box" + emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <uni-th align="center" >浜у搧</uni-th> + <uni-th align="center">鐨噸</uni-th> + <uni-th align="center">姣涢噸</uni-th> + <uni-th align="center">鍑�閲�</uni-th> + <uni-th align="center">鎵e惃</uni-th> + </uni-tr> + <uni-tr v-for="(subItem, index) in tmTaskCoalList" :key="index"> + <uni-td align="center"> + <view class="name">{{ subItem.productName }}</view></uni-td> + <uni-td align='right'> + <view v-if="subItem.skin">{{ Number( subItem.skin).toFixed(2) || ''}}</view> + </uni-td> + <uni-td align='right'> + <view class="name" v-if="subItem.hair">{{ Number(subItem.hair) .toFixed(2) || '' }}</view> + </uni-td> + <uni-td align='right'> + <view class="name" v-if="subItem.clean">{{ Number( subItem.clean).toFixed(2) || '' }}</view> + </uni-td> + + 聽 <uni-td align="right"> + <view>{{ subItem.discount }}</view + ></uni-td> + + </uni-tr> + </uni-table> + </view> + <!-- 璇疯緭鍏ラ泦瑁呯鍙� --> + <view class="codeBox"> + <text>闆嗚绠卞彿:</text> + <view class="inp"> + <u--input + placeholder="璇疯緭鍏ラ泦瑁呯鍙�" + v-model="coalDetailsData.containerNumber" + ></u--input> + </view> + <view> + <u-button type="primary" text="纭畾" @click="enterClick"></u-button> </view> </view> </view> @@ -71,8 +121,17 @@ v-if="originInfoVisible&&!isSpecial"> <view class="origin-info_wrapper"> <view class="origin-info_content"> - <view class="first-line"><combined-title title="鍘熷彂淇℃伅"></combined-title></view> - <u-form :model="originInfoForm" + <!-- 鎶樺彔 --> + <zh-collapse accordion> + <zh-collapse-item + class="collItem"> + <!-- title --> + <view slot="title"> + <view class="first-line"><combined-title title="鍘熷彂淇℃伅"></combined-title></view> + + </view> + <view class="" slot='cont'> +<u-form :model="originInfoForm" :rules="rules" label-position="top" label-width="160" @@ -151,6 +210,11 @@ :disabled="isModifyoriginInfo" :loading="submitOriginInfoLoading"></u-button> </view> + </view> + </zh-collapse-item> + </zh-collapse> + + </view> </view> </view> @@ -208,7 +272,7 @@ :disabled="haveInputOrigin&&!isSpecial" :loading="weighHouseLoading"></u-button> </view> - <view class="weigh-button" + <!-- <view class="weigh-button" v-show='ablePrintInduction&&!(coalDetailsData.skin&&coalDetailsData.hair)'> <u-button text="鎵撳嵃鍏ラ棬璇�" @click="printBefore('in')" @@ -216,8 +280,8 @@ shape="circle" :loading="enterLoading" loadingText="鎵撳嵃涓�,璇风◢鍊�"></u-button> - </view> - <view class="weigh-button" + </view> --> + <!-- <view class="weigh-button" v-show="ablePrintOut"> <u-button text="鎵撳嵃鍑洪棬璇�" @click="printBefore('out')" @@ -225,9 +289,14 @@ shape="circle" :loading="outLoading" loadingText="鎵撳嵃涓�,璇风◢鍊�"></u-button> - </view> + </view> --> <view class="weigh-button"><u-button text="灞曠ず鎻愮叅鍗�" @click="showCaolPickUpBill" + type="primary" + shape="circle"></u-button></view> + <!-- 鏌ョ湅璺嚎鎸囧紩 --> + <view class="weigh-button"><u-button text="鏌ョ湅璺嚎鎸囧紩" + @click="reviewGuidelines" type="primary" shape="circle"></u-button></view> </view> @@ -255,6 +324,31 @@ :show="servieceShow" cancelText="鍙栨秷"></u-action-sheet> </view> + <u-popup :show="guideLineshow" mode="bottom" @close="close"> + <view style="margin-top: 35rpx;padding-left: 20rpx;"> + <u-radio-group + v-model="radioValue" + placement="row" + @change="radioChange" + > + <u-radio label="鐓ゅ満" :name="'鐓ゅ満'" :labelSize="30" :size="30"></u-radio> + <u-radio label="鍗曚綅" :name="'鍗曚綅'":labelSize="30" :size="30"></u-radio> + </u-radio-group> + + <div class="guidebox"> + <u-swiper + v-if="guideLineshow" + :height="200" + @click="swiperClick" + :list="swiperList" + keyName="image" + circular + ></u-swiper> + <view>{{ activeText }}</view> + <u-album :urls="swiperList" ref="swiperAlbum" keyName="src2"></u-album> + </div> + </view> + </u-popup> <!-- 纾呮埧蹇欑鎻愮ず寮圭獥 --> <view class=""> <u-modal :show="wsgShow" @@ -323,10 +417,22 @@ }, data() { return { + swiperList:[], orderPlanId: null, + radioValue:'鐓ゅ満', + tmTaskCoalList:[], + currentNum:0, + guideLineshow:false, yyId: null, dayRZ: [], - coalDetailsData: {}, // 鎻愮叅鍗曡鎯� + activeText:'', + activeObj:{ + affiliationId:'', + type:2, + }, + coalDetailsData: { + tmTaskCoalList:[] + }, // 鎻愮叅鍗曡鎯� currentPageCoalStatus: 0, // 褰撳墠椤甸潰鎻愮叅鍗曠姸鎬� // 鑾峰彇鎵�鍦ㄧ鎴垮弬鏁� getWeightHouseObj: { @@ -413,6 +519,7 @@ timeout: '0', wsgShow: false, timeLineStatus: null, + timeLineEqCode: '', originInfoNotice: '濉啓鍘熷彂淇℃伅鍚庡彲涓婄璁¢噺', submitOriginInfoLoading: false, @@ -476,6 +583,35 @@ }, isNeedOrigin() { return uni.getStorageSync('isNeedOrigin') + }, + //鏄惁灞曠ず鐨瘺鍑� + isShowClean(){ + let flag = true; + console.log(this.coalDetailsData.tmTaskCoalList) + const tempArr = this.coalDetailsData.tmTaskCoalList.filter(item=> item.isWeight === 1); + if(!tempArr.length ){ + return false; //濡傛灉閮芥病鏈夎繑鍥炲亣 + } else { + flag = tempArr.every(obj => obj['skin'] !== null && obj['clean'] !== null && obj['hair'] !== null ); + console.log(flag,'f;ag') + return flag; + } + + }, + //鐨瘺鍑� + weightObj(){ + const index = 0;//涓嬫爣浣� 锛岃鍙栫鍑犵粍鐨勭毊姣涘噣锛�,榛樿鏈�鍚庝竴缁�; + const tempArr = this.coalDetailsData.tmTaskCoalList.filter(item=> item.isWeight === 1); + const result =tempArr.find(item=>!item.skin || !item.hair || !item.clean); + console.log(result,'result') + if(result){ + return result + }else{ + return tempArr[index]; + } + + + } }, methods: { @@ -563,6 +699,7 @@ this.originInfoForm.coalContactSkin = this.coalDetailsData.skinTwo; this.originInfoForm.coalContactHair = this.coalDetailsData.hairTwo; this.originInfoForm.contactPicture = this.coalDetailsData.contactPicture + this.tmTaskCoalList = this.coalDetailsData.tmTaskCoalList; if (this.coalDetailsData.contactPicture) { this.fileList1 = this.coalDetailsData.contactPicture.split(',').map(v => { return { @@ -578,7 +715,9 @@ } }).then(() => { // 鍒ゆ柇褰撳墠鏃堕棿鏄惁瓒呭嚭棰勭害鏃堕棿 - setTimeout(() => { + ; + if([1, 2, 13].includes(this.coalDetailsData.status) ){ + setTimeout(() => { let endTime = this.coalDetailsData.yuYueSection.slice(0, 10) + ' ' + this .coalDetailsData .yuYueSection.slice(-5); @@ -592,6 +731,8 @@ this.timeout = '1' } }, 1000) + } + }) }, // 鏃ュ織鏌ヨ @@ -726,7 +867,7 @@ res.data.id }&gateCameraId=${res.data.lastEquipmentId}&gateCameraCode=${res.data.lastEquipmentCode}&weighHouseCode=${res.data.code}&primarySkin=${ this.primarySkin - }&primaryHair=${this.primaryHair}&primaryClean=${this.primaryClean}&sceneInOut=${res.data.sceneInOut}&overTmWaixiao=${this.overTmWaixiao}` + }&primaryHair=${this.primaryHair}&primaryClean=${this.primaryClean}&sceneInOut=${res.data.sceneInOut}&overTmWaixiao=${this.overTmWaixiao}&deptId=${this.getWeightHouseObj.deptId }` }); } else { this.$u.toast(res.msg ? res.msg : '鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�'); @@ -975,13 +1116,109 @@ uni.navigateTo({ url: `/pages/public-page/driverStream/driverStream?eqCode=${this.timeLineEqCode}` }) + }, + getguideFun(){ + this.$reqGet('getRoute', this.activeObj).then((res)=>{ + console.log(res,'res'); + if(res.data.length){ + this.swiperList = res.data[0].guideImg.split(',').map(item=>{ + return BaseUrl + item; + });//鏁扮粍 + console.log(this.swiperList,'swiperList'); + this.activeText = res.data[0].guideText; + }else{ + this.swiperList = []; + this.activeText = '鏆傛棤鏁版嵁' + } + + }) + + }, + reviewGuidelines(){ + this.guideLineshow = true; + this.swiperList = []; + this.activeText = ''; + this.activeObj.affiliationId = this.coalDetailsData.filedId; //榛樿鏌ョ叅鍦� + this.getguideFun(); + + }, + close(){ + this.guideLineshow = false; + }, + radioChange(item){ + console.log(item); + if(item == '鐓ゅ満'){ + this.activeObj.affiliationId = this.coalDetailsData.filedId; + this.activeObj.type = 2 + }else{ + this.activeObj.affiliationId = this.coalDetailsData.deptId; + this.activeObj.type = 1 + } + this.getguideFun(); + + }, + //鎵撳紑鍥剧墖棰勮 + swiperClick(){ + console.log(this.$refs.swiperAlbum,'swiperAlbum') + this.$nextTick(()=>{ + this.$refs.swiperAlbum.onPreviewTap(); + this.$refs.swiperAlbum.openPage(); + }) + }, + enterClick(){ + console.log('click') + this.$reqPut('addContainer',{id:this.coalDetailsData.id,containerNumber:this.coalDetailsData.containerNumber},'json').then(res=>{ + console.log(res,'res') + this.$u.toast('鎿嶄綔鎴愬姛') + }) } } }; </script> -<style lang="scss" - scoped> +<style lang="scss" scoped> +.codeBox{ + height: 100rpx; + display: flex; + width: 100%; + justify-content: space-around; + align-items: center; + .inp{ + border: solid 1px #ccc; + input{ + + text-indent: 15px; + } + + } + + +} +.table{ + width: 100%; + /deep/ .uni-table{ + min-width: 0!important; + margin-left: 20rpx; + } + +} + .guidebox{ + height:600rpx; + padding: 20rpx + } + .indicator-num { + padding: 2px 0; + background-color: rgba(0, 0, 0, 0.35); + border-radius: 100px; + width: 35px; + @include flex; + justify-content: center; + + &__text { + color: #FFFFFF; + font-size: 12px; + } + } /deep/.u-steps { .u-steps-item { .u-steps-item__content { @@ -1017,7 +1254,8 @@ width: 94%; margin: 0 auto; height: vww(52); - @include flex position: relative; + @include flex; + position: relative; flex-direction: column; justify-content: space-between; align-items: flex-start; @@ -1061,7 +1299,8 @@ overflow: hidden; .block-main { - @include flex width: 94%; + @include flex ; + width: 94%; height: 336rpx; margin: vww(18) vww(7) vww(11) vww(17); flex-direction: column; @@ -1171,10 +1410,28 @@ } } } + .sub-table{ + width: 690rpx; + min-height: 300rpx; + margin: vww(20) vww(15) vww(13); + 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; + flex-direction: column; + justify-content: center; + overflow: hidden; + position: relative; + top: vww(130); + align-items: flex-start; + /deep/ .uni-table{ + min-width: 0!important; + } + + } .origin-info { width: 690rpx; - height: 600rpx; margin: vww(20) vww(15) vww(13); background: #ffffff; box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12); @@ -1187,7 +1444,6 @@ &_wrapper { width: 650rpx; - height: 600rpx; @include flex; flex-direction: column; margin-bottom: vww(20); @@ -1356,4 +1612,7 @@ } } } + ::v-deep .u-album{ + display: none!important; + } </style> \ No newline at end of file -- Gitblit v1.9.1