yangan
2024-06-14 58826419a37c0fa746b54c7942877f5c10ddf9d5
pages/driver-page/driver-index/driver-index.vue
@@ -68,7 +68,7 @@
                           size="40"></u-icon></view>
                     <view class="send-date">{{ item.sendDate }}</view>
                     <view class="type">
                        <view class="coal-name">{{ item.coalName }}</view>
                        <view class="coal-name">{{ item.productNames || item.productName }}</view>
                     </view>
                  </view>
                  <view class="fourth-line"
@@ -151,11 +151,15 @@
                           <view class="send-date">{{ item.sendDate }}</view>
                        </view>
                        <view class="type">
                           <view class="coal-name">{{ item.coalName }}</view>
                           <view class="coal-name">{{ item.productNames || item.productName }}</view>
                           <!-- <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)">
                           请求退单
@@ -251,12 +255,16 @@
                           <view class="send-date">{{ item.yuYueSection|| ''  }}</view>
                        </view>
                        <view class="type">
                           <view class="coal-name">{{ item.coalName || '' }}</view>
                           <view class="coal-name">{{ item.productNames || item.productName }}</view>
                           <!-- <view class="order-type">{{ item.orderType }}</view> -->
                        </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);
                  }
               }
            }
         }