From 75811022288e2c4832974a1586f442608706c30a Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 12 九月 2024 17:40:10 +0800 Subject: [PATCH] feat:司机接单pvc吨数提示 --- pages/doorkeeper-page/doorkeeper-index/doorkeeper-index.vue | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 111 insertions(+), 9 deletions(-) diff --git a/pages/doorkeeper-page/doorkeeper-index/doorkeeper-index.vue b/pages/doorkeeper-page/doorkeeper-index/doorkeeper-index.vue index 6291997..74a9f1e 100644 --- a/pages/doorkeeper-page/doorkeeper-index/doorkeeper-index.vue +++ b/pages/doorkeeper-page/doorkeeper-index/doorkeeper-index.vue @@ -4,6 +4,15 @@ <u-search @change="change" :searchIconSize="40" placeholder="璇疯緭鍏ヨ溅鐗屽彿" height="60" clearabled v-model="carNo" @search="search" @custom="custom" @clear="clear" > </u-search > </view> + <u-collapse + ref="myCollapse" + :value='["1"]' + > + <u-collapse-item + ref="collapseHeight" + name='1' + class="collItem" + :title="'寰呮鏌ュ徃鏈�'"> <view style="position: relative;top: -40px;"> <u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" @@ -23,7 +32,7 @@ <view class="dispatch">{{ item.customerName ||'' }}</view> </view> <view class="point-number"> - <text class="order-type">{{ item.productNames || '' }}</text> + <text class="order-type">{{ item.productNames?limitString(item.productNames,20,'...'):'' || '' }}</text> </view> </view> <view class="second-line"> @@ -38,7 +47,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:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover"> + style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/clock.png') no-repeat;background-size: cover"> </view> </view> <view class="send-date">{{ item.sendDate }} {{ item.startTime || '' }}-{{item.endTime || ""}}</view> @@ -47,7 +56,7 @@ <view class="receive" v-if="item.roadTransportId" @click.stop="lookRoad(item)"> - <view class="button-image">閬撹矾杩愯緭璇�</view> + <view class="button-image">鍓ф瘨杩愯緭璇�</view> </view> <view class="forward" @click.stop="yuYueBtnClick(item)"> @@ -56,6 +65,65 @@ </view> </view> </view> + </u-collapse-item> + </u-collapse> + <u-collapse + ref="myCollapse" + > + <u-collapse-item + name='2' + class="collItem" + :title="'宸叉鏌ュ徃鏈�'"> + <view style="position: relative;top: -40px;"> + <u-empty mode="data" + icon="http://cdn.uviewui.com/uview/empty/data.png" + textSize="30" + iconSize="1000" + text="鏆傛棤杞﹁締" + v-if="driverBillOfLoadingDatas.length == 0"></u-empty> + </view> + <view class="collection-form" style="margin-bottom: 60px;"> + <view class="collection-form-item" + v-for="(item, index) in driverBillOfLoadingDatas" + :key="index"> + <view class="first-line"> + <view class="dispatch-receive"> + <view class="dispatch-dept">{{ item.code || '' }}</view> + <view class="black-bar"></view> + <view class="dispatch">{{ item.customerName ||'' }}</view> + </view> + <view class="point-number"> + <text class="order-type">{{ item.productNames?limitString(item.productNames,20,'...'):'' || '' }}</text> + </view> + </view> + <view class="second-line"> + <view class="coal-name"> + <view class="dispatch-dept">{{ item.carNo || '' }}</view> + <view class="black-bar"></view> + <view class="dispatch">{{ item.driver ||'' }}</view> + <view class="black-bar"></view> + <text>{{ item.phone || '' }}</text> + </view> + </view> + <view class="third-line"> + <view class="time-icon"> + <view + style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://wrzs.czjlchem.com:9090/appimg/image/banner/clock.png') no-repeat;background-size: cover"> + </view> + </view> + <view class="send-date">{{ item.inTime?item.inTime.slice(10,19):null }} </view> + </view> + <view class="fourth-line"> + <view class="receive" + v-if="item.roadTransportId" + @click.stop="lookRoad(item)"> + <view class="button-image">鍓ф瘨杩愯緭璇�</view> + </view> + </view> + </view> + </view> + </u-collapse-item> + </u-collapse> <u-popup :show="imgshow" @close="closeimg" @open="openimg" @@ -136,6 +204,7 @@ <script> import { BaseUrl } from '@/api/publicInterface.js'; + import combinedTitle from '@/components/combined-title/combined-title.vue'; import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue'; export default { components: { @@ -145,6 +214,7 @@ return { show: false, // 寮瑰嚭鍏ㄩ儴棰嗗彇鎻愮ず driverBillOfLoadingData:[], + driverBillOfLoadingDatas:[], inspectData:[], isAllSelected:false, form:{}, @@ -166,6 +236,26 @@ this.init(); }, methods: { + handleOpenChange() { + // 鏂规硶涓� + console.log(this.$refs.collapseHeight); + // let long = this.$refs.collapseHeight.length; + // setTimeout(() => { + // for (let i = 0; i < long; i++) { + // this.$refs.collapseHeight[i].queryRect();// 璁$畻楂樺害 + // } + // }, 20); + + // 鏂规硶浜� + this.$nextTick(() => { + this.$refs.collapseHeight.init() + }); + + }, + limitString(str, limit, suffix = '...') { + if (str.length <= limit) return str; + return str.slice(0, limit) + suffix; + }, falseConfirm(){ this.inspectData=[] uni.showLoading({ title: '鍔犺浇涓�...' }); @@ -313,22 +403,36 @@ uni.showLoading({ title: '鍔犺浇涓�...' }); - if(!this.carNo){ this.$reqGet('getCheckTaskCoal',{flag:0}).then(res => { uni.hideLoading(); this.driverBillOfLoadingData = res.data; uni.stopPullDownRefresh(); + this.handleOpenChange(); }); }else{ this.$reqGet('getCheckTaskCoal',{flag:0,carNo:this.carNo}).then(res => { uni.hideLoading(); this.driverBillOfLoadingData = res.data; uni.stopPullDownRefresh(); + this.handleOpenChange(); }); } - - + if(!this.carNo){ + this.$reqGet('getAlreadyCheckTaskCoal',{flag:0}).then(res => { + uni.hideLoading(); + this.driverBillOfLoadingDatas = res.data; + uni.stopPullDownRefresh(); + this.handleOpenChange(); + }); + }else{ + this.$reqGet('getAlreadyCheckTaskCoal',{flag:0,carNo:this.carNo}).then(res => { + uni.hideLoading(); + this.driverBillOfLoadingDatas = res.data; + uni.stopPullDownRefresh(); + this.handleOpenChange(); + }); + } }, change(res) { }, @@ -504,12 +608,10 @@ } .point-number { - width: 15%; + width: 33%; .order-type { color: #035cfb; - border: 2px solid #035cfb; border-radius: 4rpx; - padding: vww(2) vww(4); text-align: center; } // text { -- Gitblit v1.9.1