jiangping
2024-12-17 0798091933fade5d2ee24891d7441b4e848a4d25
h5/pages/waybill/waybillDetail.vue
@@ -1,207 +1,350 @@
<template>
   <view class="main_app">
      <image src="@/static/driver/wuliuche_bg@2x.png" class="main_bg"></image>
      <view class="form_wrap">
         <view class="item">
            <view class="label">合同编号</view>
            <view class="line">
               <view class="input_wrap"><input v-model="param.aa" placeholder="请输入合同编号" placeholder-class="place" type="text" /></view>
            </view>
         </view>
         <view class="item">
            <view class="label">需方编号</view>
            <view class="line">
               <view class="input_wrap"><input v-model="param.aa" placeholder="请输入合同中需方编号" placeholder-class="place" type="text" /></view>
      <!-- <image class="bg" src="@/static/wuliuche_bg@2x.png" mode="widthFix"></image> -->
      <map id="map" :latitude="latitude" :longitude="longitude" :polyline="polyline" :markers="markers" :scale="4">
      </map>
      <view class="main_content">
         <view class="info">
            <view class="head">
               <view class="code">{{info.contractNumber}}</view>
               <view class="status">{{info.orderStatusDesc}}</view>
            </view>
            <view class="content">
               <view class="line">
                  <view class="la">发货地</view>
                  <view class="val">{{info.deliveryEnterprise || '-'}}</view>
               </view>
               <view class="line">
                  <view class="la">到货地</view>
                  <view class="val">{{info.receiveEnterprise || '-'}}</view>
               </view>
               <view class="line">
                  <view class="la">车牌号</view>
                  <view class="val">{{info.plateName || '-'}}</view>
               </view>
               <view class="line">
                  <view class="la">司机信息</view>
                  <view class="val" @click="callPhone(info.driverTel)">{{ info.driverName  }} <text class="primaryColor ml12">{{info.driverTel}}</text> </view>
               </view>
               <view class="line">
                  <view class="la">车辆位置</view>
                  <view class="val">{{'-'}}</view>
               </view>
               <view class="line">
                  <view class="la">预计到达</view>
                  <view class="val">{{info.plannedArrivedDate}}</view>
               </view>
            </view>
         </view>
         <view class="item">
            <view class="label">验证码</view>
            <view class="line">
               <view class="input_wrap"><input v-model="param.aa" placeholder="请输入验证码" placeholder-class="place" type="text" /></view>
               <image src="" class="auth_code" mode=""></image>
         <view class="drive_info">
            <view class="title">物流信息</view>
            <view class="drive_list" v-for="dri,k in info.cicleStatusList">
               <view class="separate"></view>
               <view class="item_title">
                  <view class="icon_wrap">
                     <image v-if="dri.key == 0 && k != 0" src="@/static/waybill/ic_dingdan@2x.png" class="icon"></image>
                     <image v-if="dri.key == 0 && k == 0" src="@/static/waybill/ic_dingdan_sel@2x.png" class="icon"></image>
                     <image v-if="dri.key == 1 && k != 0" src="@/static/waybill/ic_peizai@2x.png" class="icon"></image>
                     <image v-if="dri.key == 1 && k == 0" src="@/static/waybill/ic_peizai_sel@2x.png" class="icon"></image>
                     <image v-if="dri.key == 2 && k != 0" src="@/static/waybill/ic_cangku@2x.png" class="icon"></image>
                     <image v-if="dri.key == 2 && k == 0" src="@/static/waybill/ic_cangku_sel@2x.png" class="icon"></image>
                     <image v-if="dri.key == 3 && k != 0" src="@/static/waybill/ic_yunshu@2x.png" class="icon"></image>
                     <image v-if="dri.key == 3 && k == 0" src="@/static/waybill/ic_yunshu_sel@2x.png" class="icon"></image>
                     <image v-if="dri.key == 4" src="@/static/waybill/ic_daohuo_sel@2x.png" class="icon"></image>
                     <image v-if="dri.key == 5" src="@/static/waybill/ic_ruku.png" class="icon"></image>
                  </view>
                  <view class="" :class="{primaryColor: k == 0}">{{dri.name}}</view>
               </view>
               <view class="item" v-for="item,i in dri.secondList">
                  <view class="h2" v-if="item.orderStatusDes">
                     <view class="icon_wrap"  v-if="i != 0">
                        <image src="@/static/driver/ic_mostarted.png" class="icon"></image>
                     </view>
                     <view v-else class="icon_wrap"></view>
                     <view class="text" :class="{placeholder3: k==0 && i== 0}" >
                        {{item.orderStatusDes}}
                        <text v-if="item.tel">,发货仓库电话:</text>
                        <text v-if="item.tel" @click="callPhone(item.tel)" class="primaryColor">{{item.tel}}</text>
                     </view>
                  </view>
                  <view class="time">{{item.recordDate}}</view>
               </view>
            </view>
         </view>
         <view class="query">查询</view>
      </view>
      <view class="title">查询结果</view>
      <view class="drive_info">
         <view class="title">合同编号</view>
         <view class="line">
            <view class="label">运输车辆</view>
            <view class="val">11</view>
         </view>
         <view class="line">
            <view class="label">司机信息</view>
            <view class="val">11</view>
         </view>
         <view class="line">
            <view class="label">车辆位置</view>
            <view class="val">11</view>
         </view>
      </view>
      <view class="drive_info">
         <view class="title">物流信息</view>
         <view class="item">
            <view class="h2">
               <view class="icon_wrap"><image src="@/static/driver/ic_mostarted.png" class="icon"></image></view>
               <view class="text">到达卸货地</view>
            </view>
            <view class="time">202422222222</view>
            <view class="separate"></view>
         </view>
         <view class="item">
            <view class="h2 h1">
               <view class="icon_wrap"><image src="@/static/driver/ic_dangqian.png" class="icon"></image></view>
               <view class="text">到达卸货地</view>
            </view>
            <view class="time">202422222222</view>
            <view class="separate separate_ac"></view>
         </view>
         <view class="item">
            <view class="h2">
               <view class="icon_wrap"><image src="@/static/driver/ic_mostarted.png" class="icon"></image></view>
               <view class="text">到达卸货地</view>
            </view>
            <view class="time">202422222222</view>
            <view class="separate"></view>
         </view>
      </view>
   </view>
</template>
<script>
   import {
      orderInfoTms
   } from '@/api'
   export default {
      data() {
         return {
            param: {}
            id: '',
            info: {},
            param: {},
            latitude: 31.783205,
            longitude: 117.262635,
            markers: [],
            includePoints: [
               // {latitude: 31.783205, longitude: 117.262635}, {latitude: 36.783205, longitude: 118.10},
            ],
            polyline: [
               // {
               //    points: [{
               //       latitude: 31.783205,
               //       longitude: 117.262635
               //    }, {
               //       latitude: 36.783205,
               //       longitude: 118.10
               //    }],
               //    color: '#FF0000',
               //    width: 3
               // },
            ]
         };
      },
      onLoad(options) {
         this.id = options.id
         this.getDetail()
      },
      methods: {
         getDetail() {
            orderInfoTms({
               contractNumber: this.id
            }).then(res => {
               this.info = res.data
               if (res.data.deliveryLat && res.data.receiveLat) {
                  this.markers = []
                  this.markers.push({
                     id: 1,
                     latitude: res.data.deliveryLat,
                     longitude: res.data.deliveryLon,
                     width: 36,
                     iconPath: '/static/driver/ic_fahuodi@2x.png',
                     label: {
                        content: ' ',
                        padding: 3,
                        borderWidth: 2,
                        borderRadius: '50%',
                        borderColor: '#fff',
                        borderRadius: 32,
                        bgColor: '#FF0000'
                     }
                  })
                  this.markers.push({
                     id: 2,
                     latitude: res.data.receiveLat,
                     longitude: res.data.receiveLon,
                     width: 36,
                     iconPath: '/static/driver/ic_huowu@2x.png',
                     label: {
                        content: ' ',
                        padding: 3,
                        borderWidth: 2,
                        borderRadius: '50%',
                        borderColor: '#fff',
                        borderRadius: 32,
                        bgColor: '#FF0000'
                     }
                  })
                  this.latitude = (Number(this.markers[0].latitude) + Number(this.markers[1].latitude)) / 2 - 8
                  this.longitude = (Number(this.markers[0].longitude) + Number(this.markers[1].longitude)) / 2
               }
               if (res.data && res.data.gisList && res.data.gisList.length > 0) {
                  this.gisInfo = res.data.gisList[0]
               }
            })
         },
         callPhone(phone){
            uni.makePhoneCall({
               phoneNumber: phone
            });
         }
      }
   }
</script>
<style lang="scss" scoped>
   .form_wrap {
      width: 690rpx;
      height: 646rpx;
      background: #FFFFFF;
      box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(39,155,170,0.16);
      border-radius: 16rpx;
      padding: 10rpx 30rpx;
      margin-bottom: 40rpx;
      .item{
         height: 154rpx;
         padding: 30rpx 0 8rpx;
         border-bottom: 1rpx solid #E5E5E5;
         .label{}
         .line{
            display: flex;
            .input_wrap{
               padding: 18rpx 0;
               flex: 1;
               .place{
                  color: #999999;
                  font-size: 28rpx;
               }
            }
            .auth_code{
               width: 160rpx;
               height: 64rpx;
               border: 2px solid;
            }
         }
      }
      .query{
         width: 630rpx;
         height: 88rpx;
         background: $uni-color-primary;
         border-radius: 44rpx;
         margin-top: 40rpx;
         color: #fff;
         display: flex;
         justify-content: center;
         align-items: center;
         font-size: 30rpx;
      }
   page {
      background-color: #f7f7f7;
   }
   .main_app{
      padding-top: 218rpx;
      .title{
         font-weight: 500;
         font-size: 32rpx;
         margin-bottom: 30rpx;
      }
      .drive_info{
         background: #F7F7F7;
         border-radius: 16rpx;
         padding: 30rpx;
         margin-bottom: 20rpx;
         .line{
   .main_app {
      padding: 0;
      padding-top: 45vh;
      .main_content{
         height: 55vh ;
         overflow: auto;
         padding: 20rpx 30rpx 0;
         position: relative;
         z-index: 999;
      }
      #map {
         width: 750rpx;
         position: absolute;
         left: 0;
         top: 0;
         height: 105vh;
         ::v-deep .amap-marker-label {
            top: 36px !important;
            left: 12px !important;
            border: 3px solid #fff !important;
            border-radius: 50%;
            box-shadow: #222222 0px 0px 1px;
         }
      }
      .drive_info {
         background: #fff;
         border-radius: 16rpx;
         padding: 30rpx;
         margin-bottom: 20rpx;
         position: relative;
         z-index: 999;
         .separate {
            height: calc( 100% - 250rpx );
            width: 1rpx;
            border: 1rpx dashed #CCCCCC;
            position: absolute;
            left: 53rpx;
            top: 102rpx;
            z-index: -1;
         }
         .title {
            font-weight: 500;
            font-size: 32rpx;
            color: #222222;
            margin-bottom: 20rpx;
         }
         .line {
            display: flex;
            margin-bottom: 24rpx;
            .label {
               color: #666666;
               margin-right: 40rpx;
            }
            .val {}
         }
         .item_title{
            font-weight: 600;
            font-size: 32rpx;
            display: flex;
            margin-bottom: 24rpx;
            .label{
               color: #666666;
               margin-right: 40rpx;
            }
            .val{
            }
            align-items: center;
         }
         .item{
            position: relative;
            color: #999999;
            margin-bottom: 30rpx;
            .h2{
               display: flex;
               align-items: center;
         .icon_wrap {
            width: 48rpx;
            margin-right: 30rpx;
            display: flex;
            align-items: center;
            justify-content: center;
            .icon {
               width: 48rpx;
               height: 48rpx;
               .icon_wrap{
                  width: 48rpx;
                  margin-right: 30rpx;
                  display: flex;
                  align-items: center;
                  justify-content: center;
                  .icon{
                     width: 24rpx;
                     height: 24rpx;
                     position: relative;
                     z-index: 2;
                  }
               }
               position: relative;
               z-index: 2;
            }
            .h1{
               .icon_wrap{
                  .icon{
                     width: 48rpx;
                     height: 48rpx;
                  }
               }
            }
            .time{
               padding-left: 78rpx;
               font-size: 24rpx;
               margin-top: 6rpx;
            }
            .separate{
               height: calc( 100% );
               width: 2rpx;
               border: 2rpx dashed red;
               position: absolute;
               left: 22rpx;
               top: 24rpx;
               z-index: 1;
            }
            .separate_ac{
               top: 48rpx;
            }
         }
      }
         }
         .item {
            position: relative;
            color: #999999;
            margin-bottom: 30rpx;
            .text{
               color: #666666;
            }
            .icon {
               width: 20rpx;
               height: 20rpx;
               position: relative;
               z-index: 2;
            }
            .h2 {
               display: flex;
               align-items: center;
               height: 48rpx;
            }
            .h1 {
            }
            .time {
               padding-left: 78rpx;
               font-size: 24rpx;
               margin-top: 6rpx;
            }
         }
      }
      .info {
         border-radius: 12rpx;
         margin-bottom: 20rpx;
         padding: 0 30rpx;
         background-color: #fff;
         overflow: hidden;
         position: relative;
         z-index: 1;
         .head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 30rpx;
            width: 690rpx;
            height: 84rpx;
            margin: 0 -30rpx;
            background: linear-gradient(270deg, #FEFEFF 0%, #E1F7FE 100%);
            .code {
               font-weight: 500;
               font-size: 32rpx;
               color: #222222;
            }
            .status {
               color: $uni-color-primary;
            }
         }
         .content {
            padding: 20rpx 0rpx;
            margin-bottom: 20rpx;
            .line {
               display: flex;
               margin-bottom: 16rpx;
               font-size: 28rpx;
               .la {
                  color: #666666;
                  width: 140rpx;
               }
               .val {}
               &:nth-last-child(1) {
                  margin-bottom: 0;
               }
            }
         }
      }
   }
   .main_bg {
      position: absolute;
      left: 0;
   .main_bg {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      z-index: -1;
      width: 100%;
      z-index: -1;
      color: #222222;
   }
</style>