From 25c5c75592946943b7c11fe0090d838c40c066b9 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 13 六月 2024 11:51:07 +0800 Subject: [PATCH] feat:库管查看原盐钙镁 --- pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details.vue | 307 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 280 insertions(+), 27 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 e2a8418..d7ff858 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 @@ -21,7 +21,7 @@ <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,39 +34,90 @@ size="40"></u-icon></view> <view class="send-date">{{ coalDetailsData.sendDate }}</view> </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> - <view class="weigh-item"> + <view class="stream-view" + style="color: #475bfd;" + @click="streamView" + v-show="timeLineStatus===9"> + 鏌ョ湅瑁呰浇鎯呭喌 + </view> + <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">浠撳簱</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="center"> + <view>{{ subItem.bunkerName }}</view></uni-td> --> + + </uni-tr> + </uni-table> </view> </view> <view class="origin-info" 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" @@ -145,6 +196,11 @@ :disabled="isModifyoriginInfo" :loading="submitOriginInfoLoading"></u-button> </view> + </view> + </zh-collapse-item> + </zh-collapse> + + </view> </view> </view> @@ -199,9 +255,10 @@ @click="cengZhongClick" type="primary" shape="circle" - :disabled="haveInputOrigin&&!isSpecial"></u-button> + :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')" @@ -209,8 +266,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')" @@ -218,9 +275,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> @@ -248,6 +310,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" @@ -280,10 +367,10 @@ this.orderPlanId = value.orderPlanId; this.yyId = value.yyId; this.originInfoVisible = value.orderType === '澶栬喘' - if (value.overTmWaixiao) { - this.overTmWaixiao = value.overTmWaixiao - this.getWeightHouseObj.overTmWaixiao = value.overTmWaixiao - } + // if (value.overTmWaixiao) { + // this.overTmWaixiao = value.overTmWaixiao + // this.getWeightHouseObj.overTmWaixiao = value.overTmWaixiao + // } this.fileList1 = [] this.changeglobalIsFirstWeighing(1) if (this.globalIsFirstWeighing === 1) { @@ -316,10 +403,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: { @@ -406,11 +505,14 @@ timeout: '0', wsgShow: false, timeLineStatus: null, + + timeLineEqCode: '', originInfoNotice: '濉啓鍘熷彂淇℃伅鍚庡彲涓婄璁¢噺', submitOriginInfoLoading: false, ischeckedDefault: 0, isSpecial: null, //1 鏄壒娈� 0涓嶆槸鐗规畩 printerType: '', //鍒ゆ柇鎵撳嵃鐨勬槸鍑洪棬璇佽繕鏄叆闂ㄨ瘉 + weighHouseLoading: false }; }, watch: { @@ -467,6 +569,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: { @@ -475,6 +606,7 @@ this.$reqGet('coalDayPage', { id: this.orderPlanId, timeout: this.timeout }).then(res => { if (res.code == 0) { this.timeLineStatus = res.data[0].taskStatus + this.timeLineEqCode = res.data[0].eqCode this.dayRZ = res.data.map(v => { let slicedate = v.taskStatusDes.slice(0, 10); if (slicedate == this.currentDate) { @@ -553,6 +685,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 { @@ -568,15 +701,24 @@ } }).then(() => { // 鍒ゆ柇褰撳墠鏃堕棿鏄惁瓒呭嚭棰勭害鏃堕棿 - setTimeout(() => { + ; + if([1, 2, 13].includes(this.coalDetailsData.status) ){ + setTimeout(() => { let endTime = this.coalDetailsData.yuYueSection.slice(0, 10) + ' ' + this .coalDetailsData .yuYueSection.slice(-5); - if (dayjs(this.currentTime).isAfter(endTime) && this.coalDetailsData.status <= 1) { + // 鏈�澶х害鏉熸椂闂� maxRestrainTime + const maxRestrainTime = dayjs().subtract(this.coalDetailsData.flexibleTime, + 'minute') + .format('YYYY-MM-DD HH:mm:ss'); + console.log(maxRestrainTime, this.correctStatus); + if (dayjs(maxRestrainTime).isAfter(endTime) && this.correctStatus <= 1) { // this.$u.toast('宸茶秴鍑洪绾︽椂闂�,鍙偣鍑诲叆鍦虹敵璇烽噸鏂板叆鍦�') this.timeout = '1' } }, 1000) + } + }) }, // 鏃ュ織鏌ヨ @@ -585,6 +727,7 @@ this.$reqGet('coalDayPage', { id: this.orderPlanId, timeout: this.timeout }).then(res => { if (res.code == 0) { this.timeLineStatus = res.data[0].taskStatus + this.timeLineEqCode = res.data[0].eqCode this.dayRZ = res.data.map(v => { let slicedate = v.taskStatusDes.slice(0, 10); if (slicedate == this.currentDate) { @@ -688,8 +831,10 @@ // 绉伴噸 cengZhongClick() { this.changeglobalIsFirstWeighing(2) + this.weighHouseLoading = true this.$reqGet('getWeighHouse', this.getWeightHouseObj).then(res => { console.log(res, '鑾峰彇纾呮埧'); + this.weighHouseLoading = false if (res.code == 0) { this.weighData.sceneId = res.data.id; this.weighData.gateCameraId = res.data.lastEquipmentId; @@ -708,12 +853,14 @@ 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 : '鏈湪纾呮埧锛岃鍓嶅線纾呮埧鍚庡啀璇曪紒锛�'); } - }); + }).catch(() => { + this.weighHouseLoading = false + }) }, // 鏀剧┖ evacuation() { @@ -950,13 +1097,91 @@ } else { uni.$u.toast('璇峰~鍐欏畬鏁村師鍙戜俊鎭�') } + }, + streamView() { + 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(); + }) + } } }; </script> -<style lang="scss" - scoped> +<style lang="scss" scoped> +.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 { @@ -992,7 +1217,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; @@ -1036,7 +1262,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; @@ -1110,6 +1337,12 @@ color: #7d7d7d; } + .stream-view { + height: vww(18); + margin: vww(8); + margin-left: 0; + } + .weigh-item { width: 100%; height: vww(36); @@ -1140,10 +1373,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); @@ -1156,7 +1407,6 @@ &_wrapper { width: 650rpx; - height: 600rpx; @include flex; flex-direction: column; margin-bottom: vww(20); @@ -1325,4 +1575,7 @@ } } } + ::v-deep .u-album{ + display: none!important; + } </style> \ No newline at end of file -- Gitblit v1.9.1