From 29611eb117777efebb245e85e448693a349167a8 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期五, 10 十一月 2023 11:17:38 +0800 Subject: [PATCH] 验质增加单位,回显示bug修复 --- pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue | 325 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 311 insertions(+), 14 deletions(-) diff --git a/pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue b/pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue index 118f719..9ac0585 100644 --- a/pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue +++ b/pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan.vue @@ -1,11 +1,12 @@ <template> - <view> - <view style="position: relative;top: -120px;"> + <view class="main"> + <view> <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" textSize="30" iconSize="1000" - v-if="orderPlanData.length == 0"></u-empty> + text="鏆傛棤鏁版嵁" + v-if="orderPlanData.length===0"></u-empty> </view> <view class="collection-form"> <view class="collection-form-item" @@ -29,10 +30,15 @@ v-if="item.orderType">{{ item.orderType||'' }}</view> </view> </view> + <view class="second-line"> + <view class="coal-name"> + <view class="">{{ item.orderCode ||''}}</view> + </view> + </view> <view class="third-line"> <view class="time-icon"> <view - style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/carNO.png') no-repeat;background-size: cover"> + :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carNO.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}"> </view> </view> <view class="car-num">{{ item.carNo||''}}</view> @@ -40,7 +46,7 @@ <view class="third-line"> <view class="time-icon"> <view - style="width: 24rpx;height: 24rpx;li ne-height: 24rpx;background: url('https://mx.jzeg.cn:9095/appimg/image/banner/clock.png') no-repeat;background-size: cover"> + :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/clock.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}"> </view> </view> <view class="send-date">{{ item.sendDate }}</view> @@ -54,53 +60,342 @@ </view> </view> </view> + <view class="history-numbers"> + <combined-title title="鍘嗗彶楠岃川瀹屾垚"></combined-title> + <scroll-view :scroll-top="scrollTop" + scroll-y="true" + class="scroll-Y" + @scrolltolower="historyScrolltolower"> + <u-empty mode="data" + icon="http://cdn.uviewui.com/uview/empty/data.png" + textSize="30" + iconSize="1000" + text="鏆傛棤鏁版嵁" + v-if="historyCoalData.length==0"></u-empty> + <view class="history-information" + v-for="(item, index) in historyCoalData" + :key="index" + @click="faYundetail(item)"> + <view class="first"> + <view class="">{{ item.filedName || '' }}</view> + <view class=""><u-icon name="arrow-right" + color="#999999" + size="40"></u-icon></view> + </view> + <view class="second"> + <view class="coal-name">{{ item.coalName || '' }}</view> + <view class="order-type">{{ item.orderType || '' }}</view> + </view> + <view class="third"> + <view class="third-line"> + <view + :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carNO.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}"> + </view> + <view class="third-line_num" + style=" color: #303030;">{{ item.carNo }}</view> + </view> + </view> + <view class="fourth"> + <view class="fourth-icon"> + <view + :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/clock.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}"> + </view> + </view> + <view class="senddate">{{ item.sendDate }}</view> + </view> + <view class="fourth"> + <view class="fourth-icon"> + <view + :style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carnNUm.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}"> + </view> + </view> + <view class="senddate">{{ item.orderCode }}</view> + </view> + </view> + <view class="more_text" + v-if="showMoreData && historyCoalData.length !== 0">娌℃湁鏁版嵁浜�...</view> + <view class="white-block"></view> + </scroll-view> + </view> + <view style="height: 160rpx;width: 100%;"> + + </view> + <!-- 鍥剧墖棰勮寮瑰嚭妗� --> + <view class="previewImage-container"> + <view class="previewImage-container"> + <previewImage ref="previewImage" + :imgs="customerTourImgList" + :saveBtn='false'></previewImage> + </view> + </view> + <view class="noob-tour" + v-if="roleType===4&&isFirstLogin"> + <combined-title title="鎿嶄綔鎸囧紩"></combined-title> + <u-cell-group> + <u-cell title="鏂版墜鎸囧紩" + name='1' + :clickable="true" + @click="noobTour"> + <u-badge type="primary" + value="01" + slot='icon'></u-badge> + <u-icon slot="value" + name="arrow-right" + size="30" + color="#b8b8b8"></u-icon> + </u-cell> + </u-cell-group> + </view> + <tab-bar :current="0"></tab-bar> </view> </template> <script> + import { onlineurl } from '@/api/request.js' + import { mapState } from 'vuex' + import { BaseUrl } from '@/api/publicInterface.js' + import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue'; export default { data() { return { orderPlanData: [], - index: null + historyCoalData: [], + // 姣忛〉鏁版嵁閲� + pageSize: 10, + // 褰撳墠椤� + pageCurrent: 1, + // 鏄惁鏄剧ず鏇村鏁版嵁 + showMoreData: false, + total: null, + isFirstLogin:false, + onlineurl, }; }, + components:{ + previewImage + }, computed: { + ...mapState(['customerTourImgList']), roleType() { return uni.getStorageSync('roleType') } }, - onLoad(params) { - this.index = params.index ? params.index : '' + mounted() { + this.getLogOn(); }, onShow() { this.GetOrderPlan() + this.qualityInspectionHistory() }, methods: { + init(){ + this.GetOrderPlan() + this.qualityInspectionHistory() + }, GetOrderPlan() { uni.showLoading({ title: '鍔犺浇涓�...' }); - this.$reqGet('GetOrderPlan').then(res => { + this.$reqGet('qualityInspection').then(res => { if (res.data) { - this.orderPlanData = res.data[this.index].tmTaskCoals ? res.data[this.index].tmTaskCoals : - [] uni.hideLoading(); + this.orderPlanData = res.data } else { + uni.hideLoading(); this.$u.toast('鍔犺浇澶辫触') - uni.hideLoading() } }) }, + // 楠岃川鍘嗗彶 + qualityInspectionHistory() { + uni.showLoading({ title: '鍔犺浇涓�...' }); + this.$reqGet('qualityInspectionHistory', { current: this.pageCurrent, size: this.pageSize }).then(res => { + if (res.data) { + uni.hideLoading(); + this.total = res.data.total; + if (this.pageCurrent > 1) { + this.historyCoalData = this.historyCoalData.concat(res.data.records); + this.historyCoalData = this.ArrSet(this.historyCoalData, 'id'); + } else { + this.historyCoalData = res.data.records; + + } + } else { + uni.hideLoading(); + this.$u.toast('鍔犺浇澶辫触') + } + }) + }, + // 涓婃媺鍔犺浇 + historyScrolltolower() { + if (this.pageCurrent * this.pageSize >= this.total) return (this.showMoreData = true); + this.pageCurrent++; + this.qualityInspectionHistory(); + }, + //fix 鐐瑰嚮閫氱煡鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁 + ArrSet(Arr, id) { + var obj = {}; + const arrays = Arr.reduce((setArr, item) => { + obj[item[id]] ? '' : (obj[item[id]] = true && setArr.push(item)); + return setArr; + }, []); + return arrays; + }, + // 楠岃川閫夋嫨 validateClick(item) { uni.navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${item.id}` }) - } + }, + // 鍘嗗彶 + faYundetail(item) { + uni.navigateTo({ + url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?orderPlanId=${item.id}&flag=${true}` + }) + }, + noobTour(v) { + this.$refs.previewImage.open('https://mx.jzeg.cn:9095/appimg/image/tour/quality/quality1.jpg') + }, + getLogOn() { + this.$reqGet('getUserEntity').then(res => { + this.phone = res.data.phone + }).then(() => { + uni.request({ + url: `${BaseUrl}/admin/log/getLogOnType?phone=${this.phone}`, + success: res => { + // res.data.data 涓�1 浠h〃绗竴娆$櫥褰� 涓�0鍙栨秷瀛︿範鎸囧紩 涓�2浠h〃瀛樺湪 + if (res.data.data === 1) { + this.noobTour() + } else if (res.data.data === 2) { + this.isFirstLogin = true + } else { + this.isFirstLogin = false + } + } + }); + }) + }, }, } </script> <style lang="scss" scoped> + @mixin flex { + display: flex; + justify-content: space-between; + align-items: center; + } + + .main { + width: 100%; + margin: 30px auto; + } + + .scroll-Y { + height: 900rpx; + + .more_text { + color: #333; + font-size: 24rpx; + text-align: center; + } + } + + .history-numbers { + width: 100%; + position: relative; + // top: vww(-110); + + .history-information { + width: 690rpx; + height: 398rpx; + margin: vww(10) vww(15); + 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; + align-items: flex-start; + justify-content: space-evenly; + overflow: hidden; + + .first { + width: 96%; + height: 34rpx; + font-size: 32rpx; + font-weight: 300; + color: #303030; + @include flex; + margin: vww(10) vww(10) 0; + } + + .second { + width: 100%; + height: 31rpx; + font-size: 30rpx; + font-weight: 300; + color: #515151; + margin: vww(10) vww(10) 0; + @include flex; + justify-content: flex-start; + + .coal-name { + min-width: vww(30); + height: vww(20); + margin-right: vww(21); + } + + .order-type { + color: #035cfb; + border: 2px solid #035cfb; + border-radius: 4rpx; + padding: vww(2) vww(4); + text-align: center; + } + } + + .third { + width: 96%; + height: 31rpx; + font-size: 30rpx; + font-weight: 300; + color: #515151; + margin: vww(10) vww(10) 0; + @include flex; + + .third-line { + @include flex; + + &_text { + color: #919090; + } + + &_num { + color: #035cfb; + } + } + } + + .fourth { + width: 100%; + height: 31rpx; + font-size: 30rpx; + font-weight: 300; + color: #515151; + margin: vww(10) vww(10) 0; + @include flex; + + .fourth-icon { + width: vww(13); + height: vww(13); + margin-right: vww(14); + } + + .senddate { + flex: 1; + } + } + } + } + .collection-form { width: vww(345); margin: 0 vww(15); @@ -113,7 +408,8 @@ box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15); border-radius: 20rpx; overflow: hidden; - @include flex flex-direction: column; + @include flex; + flex-direction: column; position: relative; align-items: flex-start; margin-top: vww(10); @@ -205,6 +501,7 @@ } .car-num { + color: #515151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -- Gitblit v1.9.1