From 05273ace3da665cb10c36ca0dac4413a8284302a Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期三, 17 五月 2023 18:10:36 +0800 Subject: [PATCH] 增加部分限制,增加新功能 --- pages/driver-page/driver-index/driver-index.vue | 283 ++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 183 insertions(+), 100 deletions(-) diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue index 5e5d716..e20bc70 100644 --- a/pages/driver-page/driver-index/driver-index.vue +++ b/pages/driver-page/driver-index/driver-index.vue @@ -2,30 +2,17 @@ <view class=""> <view class="driver-index"> <view class="driver-index-body"> - <!-- <combined-title title="寰呴鍙�"></combined-title> --> - <!-- <u-empty - mode="data" - icon="http://cdn.uviewui.com/uview/empty/data.png" - textSize="30" - iconSize="1000" - v-if="driverBillOfLoadingData.list1 ? (driverBillOfLoadingData.list1.length == 0 ? true : false) : true" - ></u-empty> --> - <!-- 寰呴鍙栨彁鐓ゅ崟 --> <view class="wait-collection" style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/diverbanner.png') no-repeat;background-size:contain"></view> <view class="collection-form"> <view class="collection-form-item" v-for="(item, index) in driverBillOfLoadingData.list1" :key="index"> + <view class="main-divider"></view> <view class="first-line"> - <view class="dispatch-receive"> - <view v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'" class="container"> - <view class="dispatch">{{ item.deptName }}</view> - <view class="receive-icon"></view> - <view class="receive">{{ item.customerNameCopy }}</view> - </view> - <view v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'" class="container"> - <view class="dispatch">{{ item.customerNameCopy }}</view> - <view class="receive-icon"></view> - <view class="receive">{{ item.deptName }}</view> + <view class="main-information"> + <view class="sign">瑁�</view> + <view class="filedname exceedHide"> + <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text> + <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerNameCopy }}</text> </view> </view> <view class="point-number"> @@ -33,14 +20,26 @@ <text>/{{ item.carNum }}</text> </view> </view> - <view class="second-line"> - <view class="coal-name">{{ item.coalName }}</view> - <!-- <view class="black-block"><view class="black-bar"></view></view> - <view class="coal-type">{{ item.orderType }}</view> --> + <view class="first-extra"> + <view class="main-information"> + <view class="sign">鍗�</view> + <view class="filedname exceedHide"> + <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'"> + {{ item.customerNameCopy ? item.customerNameCopy : item.customerName }} + </text> + <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text> + </view> + </view> </view> + <!-- <view class="second-line"> + <view class="coal-name">{{ item.coalName }}</view> + </view> --> <view class="third-line"> <view class="time-icon"><u-icon name="clock" color="#515151" size="40"></u-icon></view> <view class="send-date">{{ item.sendDate }}</view> + <view class="type"> + <view class="coal-name">{{ item.coalName }}</view> + </view> </view> <view class="fourth-line" @click="qiangDanBtn(item)" v-if="item.carNum - item.taskNum !== 0"><view class="button-img">绔嬪嵆鎶㈠崟</view></view> </view> @@ -63,28 +62,28 @@ <view class="appointment-form"> <view class="appointment-form-item" v-for="(item, index) in driverBillOfLoadingData.list3" :key="index"> + <view class="main-divider"></view> <view class="first-line"> <view class="main-information"> <view class="sign">瑁�</view> - <view class="filedname"> + <view class="filedname exceedHide"> <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text> <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerName }}</text> </view> </view> - <view class="main-divider"></view> - <view class="map-icon"> + <view class="map-icon" @click.stop="skipMap(item)"> <view><u-icon name="map" color="#4978F0" size="40"></u-icon></view> </view> </view> - <view class="second-line"> + <view class="first-extra"> <view class="main-information"> <view class="sign">鍗�</view> - <view class="filedname"> + <view class="filedname exceedHide"> <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerName }}</text> <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text> </view> </view> - <view class="map-icon"> + <view class="map-icon" @click.stop="skipMap(item)"> <view><u-icon name="map" color="#4978F0" size="40"></u-icon></view> </view> </view> @@ -115,28 +114,28 @@ ></u-empty> <view class="appointment-form"> <view class="appointment-form-item" v-for="(item, index) in driverBillOfLoadingData.list2" :key="index" @click="list3CardIconClick(item)"> + <view class="main-divider"></view> <view class="first-line"> <view class="main-information"> <view class="sign">瑁�</view> - <view class="filedname"> + <view class="filedname exceedHide"> <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.deptName }}</text> <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.customerName }}</text> </view> </view> - <view class="main-divider"></view> - <view class="map-icon"> + <view class="map-icon" @click.stop="skipMap(item)"> <view><u-icon name="map" color="#4978F0" size="40"></u-icon></view> </view> </view> <view class="second-line"> <view class="main-information"> <view class="sign">鍗�</view> - <view class="filedname"> + <view class="filedname exceedHide"> <text v-if="item.orderType == '澶栭攢' || item.orderType == '鍐呴攢' || item.orderType == '杞嚭'">{{ item.customerName }}</text> <text v-else-if="item.orderType == '澶栬喘' || item.orderType == '鍐呰喘' || item.orderType == '杞叆'">{{ item.deptName }}</text> </view> </view> - <view class="map-icon"> + <view class="map-icon" @click.stop="skipMap(item)"> <view><u-icon name="map" color="#4978F0" size="40"></u-icon></view> </view> </view> @@ -152,7 +151,7 @@ </view> </view> </view> - <view class="white-block" v-if="driverBillOfLoadingData.list2.length !== 0">娌℃湁鏁版嵁浜�...</view> + <view class="white-block"></view> </view> </view> </view> @@ -162,6 +161,7 @@ <script> import { customerId } from '@/utils/status'; import combinedTitle from '@/components/combined-title/combined-title.vue'; + export default { components: { combinedTitle @@ -183,7 +183,11 @@ }, data() { return { - driverBillOfLoadingData: {}, + driverBillOfLoadingData: { + list1: [], + list2: [], + list3: [] + }, // 鎶㈠崟妯℃�佹 qiangDanShow: false, qiangDanTitle: '鎶㈠崟鎻愮ず', @@ -198,6 +202,14 @@ this.init(); }, methods: { + // 璺宠浆鍦板浘 + skipMap(val) { + uni.navigateTo({ + url: `/pages/public-page/mapRoute/mapRoute?customerId=${val.customerId}&filedId=${val.filedId}&orderType=${val.orderType}${ + val.toFiledId ? `&toFiledId=${val.toFiledId}&filedId=${val.filedId}` : '' + }` + }); + }, init() { this.qiangDanList(); }, @@ -302,12 +314,12 @@ height: 24rpx; line-height: 24rpx; font-size: 28rpx; - font-family: Microsoft YaHei; font-weight: 300; color: #515151; } .havedclock { width: 58% !important; + margin-right: 0 !important; .send-date { width: 100%; margin-left: vww(12); @@ -330,22 +342,26 @@ .button-img { width: 100%; height: 100%; - background: url('../../../static/image/banner/button.png') no-repeat; + background: url('https://mx.jzeg.cn:9095/appimg/image/banner/button.png') no-repeat; background-size: cover; font-size: 28rpx; - font-family: Microsoft YaHei; font-weight: 300; color: #ffffff; text-align: center; line-height: vww(40); } } +.exceedHide { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} ::v-deep.driver-index { width: 100%; margin: 0 auto; // 涓讳綋 .driver-index-body { - margin-bottom: vww(56); + // margin-bottom: vww(56); // 寰呴鍙栨彁鐓ゅ崟 .wait-collection { width: 100%; @@ -358,7 +374,7 @@ top: vww(-120); .collection-form-item { width: vww(345); - height: vww(150); + height: vww(185); margin-top: vww(5); background: #ffffff; box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15); @@ -367,78 +383,98 @@ display: flex; flex-direction: column; justify-content: space-around; + .main-divider { + width: 560rpx; + height: 2rpx; + background: #e3e3e3; + position: absolute; + top: 122rpx; + left: 128rpx; + } .first-line { width: 94%; height: vww(68); margin: vww(18) vww(16) 0 vww(16); display: flex; justify-content: space-between; - .dispatch-receive { - width: 70%; + .main-information { + width: 88%; + height: vww(28); display: flex; - justify-content: space-between; + justify-content: flex-start; align-items: center; - .container { - width: 100%; - display: flex; - justify-content: space-between; - align-items: center; - } - .receive-icon { - width: 62rpx; - height: 14rpx; - border-bottom: 3px solid #275fa5; - position: relative; - &:after { - content: ''; - position: absolute; - width: 3px; - height: 10px; - background-color: #275fa5; - right: 0; - transform: rotate(-45deg); - } + .sign { + width: vww(28); + height: vww(28); + line-height: vww(28); + text-align: center; + background: url('https://mx.jzeg.cn:9095/appimg/image/banner/blueblock.png') no-repeat; + background-size: contain; + font-size: 30rpx; + font-weight: 400; + color: #ffffff; + margin-right: vww(20); } } .point-number { + position: absolute; + right: 0; width: 15%; text { font-size: 24rpx; - font-family: Microsoft YaHei; font-weight: 400; color: #c78a64; } .residue { font-size: 40rpx; - font-family: CTCuHeiSJ; font-weight: 400; color: #f81414; + } + } + } + .first-extra { + @include firstLine; + .main-information { + width: 100%; + height: vww(28); + display: flex; + justify-content: flex-start; + align-items: center; + .sign { + width: vww(28); + height: vww(28); + line-height: vww(28); + text-align: center; + background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat; + background-size: contain; + font-size: 30rpx; + font-weight: 400; + color: #ffffff; + margin-right: vww(20); } } } .second-line { width: 100%; height: vww(68); - margin-left: vww(12); + margin-left: vww(21); display: flex; justify-content: flex-start; align-items: center; .coal-name { min-width: vww(50); - height: 30rpx; + height: 35rpx; font-size: 30rpx; - font-family: Microsoft YaHei; font-weight: 300; color: #515151; position: relative; display: flex; - justify-content: center; + justify-content: flex-start; } .black-block { min-width: vww(50); height: 30rpx; font-size: 30rpx; - font-family: Microsoft YaHei; font-weight: 300; color: #515151; position: relative; @@ -456,7 +492,6 @@ min-width: vww(50); height: 30rpx; font-size: 30rpx; - font-family: Microsoft YaHei; font-weight: 300; color: #515151; text-align: center; @@ -465,7 +500,7 @@ .third-line { width: 100%; height: vww(68); - margin-left: vww(15); + margin-left: vww(21); display: flex; justify-content: flex-start; align-items: center; @@ -473,11 +508,33 @@ width: 148rpx; height: 24rpx; margin-left: vww(14); + margin-right: vww(56); line-height: 24rpx; font-size: 28rpx; - font-family: Microsoft YaHei; font-weight: 300; color: #515151; + } + .type { + flex: 1; + margin-right: vww(10); + display: flex; + justify-content: center; + align-items: center; + .coal-name { + width: 120rpx; + height: 42rpx; + line-height: 42rpx; + border: 2px solid #035cfb; + border-radius: 4rpx; + font-size: 28rpx; + font-weight: 300; + color: #035cfb; + text-align: center; + padding: vww(3) vww(11); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } } } .fourth-line { @@ -487,15 +544,14 @@ display: flex; justify-content: flex-end; position: relative; - left: vww(190); - bottom: vww(10); + left: vww(203); + bottom: vww(3); .button-img { width: 100%; height: 100%; - background: url('../../../static/image/banner/button.png') no-repeat; + background: url('https://mx.jzeg.cn:9095/appimg/image/banner/button.png') no-repeat; background-size: cover; font-size: 28rpx; - font-family: Microsoft YaHei; font-weight: 300; color: #ffffff; text-align: center; @@ -516,57 +572,81 @@ @include formItem; height: vww(191); justify-content: space-between; + overflow: hidden; + .main-divider { + width: 560rpx; + height: 1rpx; + background: #e3e3e3; + position: absolute; + top: 122rpx; + left: 128rpx; + } .first-line { position: relative; - @include firstLine .main-information { - width: 40%; + @include firstLine; + .main-information { + width: 100%; height: vww(28); display: flex; - justify-content: space-between; + justify-content: flex-start; align-items: center; - .sign { width: vww(28); height: vww(28); line-height: vww(28); text-align: center; - background: url('../../../static/image/banner/blueblock.png') no-repeat; + background: url('https://mx.jzeg.cn:9095/appimg/image/banner/blueblock.png') no-repeat; background-size: contain; font-size: 30rpx; - font-family: Microsoft YaHei; font-weight: 400; color: #ffffff; + margin-right: vww(20); } } - .main-divider { - width: 548rpx; - height: 1rpx; - background: #e3e3e3; - position: absolute; - top: vww(40); - left: vww(50); + } + .first-extra { + @include firstLine; + .main-information { + width: 100%; + height: vww(28); + display: flex; + justify-content: flex-start; + align-items: center; + .sign { + width: vww(28); + height: vww(28); + line-height: vww(28); + text-align: center; + background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat; + background-size: contain; + font-size: 30rpx; + font-weight: 400; + color: #ffffff; + margin-right: vww(20); + } } } .second-line { - @include firstLine margin: 0; + @include firstLine; + margin: 0; margin-left: vww(16); .main-information { - width: 40%; + width: 100%; height: vww(28); display: flex; - justify-content: space-between; + justify-content: flex-start; align-items: center; .sign { width: vww(28); height: vww(28); line-height: vww(28); text-align: center; - background: url('../../../static/image/banner/redblock.png') no-repeat; + background: url('https://mx.jzeg.cn:9095/appimg/image/banner/redblock.png') no-repeat; background-size: contain; font-size: 30rpx; - font-family: Microsoft YaHei; font-weight: 400; color: #ffffff; + margin-right: vww(20); } } } @@ -574,10 +654,11 @@ @include thirdLine; width: 94%; justify-content: flex-start; + margin-left: vww(18); .clock { - width: 33%; + width: 40%; height: vww(21); - // margin-right: vww(70); + margin-right: vww(50); line-height: vww(21); @include flex; justify-content: flex-start; @@ -593,17 +674,19 @@ align-items: center; .order-type, .coal-name { - // min-width: 120rpx; + width: 120rpx; height: 42rpx; line-height: 42rpx; border: 2px solid #035cfb; border-radius: 4rpx; font-size: 28rpx; - font-family: Microsoft YaHei; font-weight: 300; color: #035cfb; text-align: center; padding: vww(3) vww(11); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } } } -- Gitblit v1.9.1