From 58826419a37c0fa746b54c7942877f5c10ddf9d5 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期五, 14 六月 2024 08:36:14 +0800 Subject: [PATCH] feat:添加押运员更改按钮条件 --- pages/driver-page/driver-index/driver-index.vue | 121 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 118 insertions(+), 3 deletions(-) diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue index c979b86..eb39f0c 100644 --- a/pages/driver-page/driver-index/driver-index.vue +++ b/pages/driver-page/driver-index/driver-index.vue @@ -155,7 +155,11 @@ <!-- <view class="order-type">{{ item.orderType }}</view> --> </view> </view> - <view class="fourth-line"> + <view class="fifth-line"> + <view class="button-img" + @click.stop="cancelCerifCate(item)"> + 娣诲姞鎶艰繍鍛� + </view> <view class="button-img" @click.stop="cancelAppoint(item)"> 璇锋眰閫�鍗� @@ -256,7 +260,11 @@ </view> </view> <view class="fourth-line" - v-if="item.status<3"> + v-if="item.isDanger === 1"> + <view class="button-img" + @click.stop="cancelCerifCate(item)"> + 娣诲姞鎶艰繍鍛� 鎶艰繍鍛� + </view> <view class="button-img" @click.stop="cancelAppoint(item)"> 璇锋眰閫�鍗� @@ -268,6 +276,31 @@ </view> </view> </view> + <u-popup :show="show" + @close="close" + @open="open" + mode="center" + round="10"> + <view class="receiverPopup"> + <uni-table border + stripe + type="selection" + @selection-change="selectionChange" + emptyText="鏆傛棤鏇村鏁版嵁"> + <uni-tr> + <uni-th align="center">鎶艰繍鍛�</uni-th> + </uni-tr> + <uni-tr v-for="(item, index) in inspectData" + :key="item.id"> + <uni-td align="center">{{ item.name.split("|")[0] }}</uni-td> + </uni-tr> + </uni-table> + <view class="receiverPopup__btn"><u-button text="纭畾" + type="primary" + @click="popClick" + :loading="ClickLoading"></u-button></view> + </view> + </u-popup> </view> </template> @@ -307,6 +340,9 @@ }, data() { return { + show: false, + yaList:[], + inspectData:[], driverBillOfLoadingData: { list1: [], list2: [], @@ -334,6 +370,32 @@ this.init(); }, methods: { + open() {}, + close() { + this.show = false; + }, + selectionChange(e) { + this.yaList= e.detail.index.map(item=>{ + return this.inspectData[item] + }) + }, + popClick(){ + let data=this.yaList.map(item=>{ + return item.name + }) + let paramsData={ + idCardEscort:data.join(','),roadTransportId:this.yaList[0].roadTransportId,id: this.yaList[0].Id + } + this.$reqPut('saveMyEscort', paramsData, 'json') + .then(res => { + if (res.code == 0) { + this.$u.toast('娣诲姞鎴愬姛'); + this.show=false + } else { + this.$u.toast(res.msg ? res.msg : '娣诲姞澶辫触'); + } + }) + }, // 璺宠浆鍦板浘 skipMap(val) { uni.navigateTo({ @@ -343,6 +405,7 @@ }); }, init() { + this.inspectData=[] this.qiangDanList(); }, // 鍙告満棣栭〉鍒楄〃 @@ -453,6 +516,22 @@ } this.cancelAppointShow = true this.cancelAppointId = item.id + }, + cancelCerifCate(value){ + this.$reqGet('getMyEscortList', { customerId: value.customerId }).then(res => { + this.inspectData=[] + if (res.code == 0) { + this.inspectData=res.data.persons.map(item=>{ + return {name:item,roadTransportId:res.data.id,Id: value.id} + }) + this.show=true + } else { + this.$u.toast(res.msg ? res.msg : '璇锋坊鍔犻亾璺繍杈撹瘉'); + uni.navigateTo({ + url: '/pages/driver-page/drvier-my/certifiCate/certifiCate' + }) + } + }) }, // 閫�鍗曞脊绐楃‘璁� cancelAppointConfirm() { @@ -591,7 +670,26 @@ } } - + .receiverPopup { + height: vww(110); + width: 300rpx; + + .receiverPopup__title { + margin: vww(10) auto 0; + width: 80%; + text-align: center; + } + + + &__btn { + margin: vww(10) auto; + width: 50%; + + .u-button { + height: vww(20); + } + } + } /deep/.u-button { width: 100%; height: 28px !important; @@ -1029,6 +1127,23 @@ .fourth-line { @include fourthLine; } + .fifth-line { + height: vww(68); + display: flex; + align-items: center; + .button-img { + width: vww(122); + height: vww(41); + background: url('https://mx.jzeg.cn:9096/appimg/image/banner/button.png') no-repeat; + background-size: cover; + font-size: 28rpx; + font-weight: 300; + color: #ffffff; + text-align: center; + line-height: vww(40); + + } + } } } -- Gitblit v1.9.1