ll
liukangdong
2025-03-12 5c802188cf8bc8783cdcbff336b2fe29ec608b4e
h5/pages/wdata/detail.vue
@@ -81,7 +81,7 @@
                     <image v-else src="@/static/waybill/ic_dingdan@2x.png" mode=""></image>
                  </view>
                  <view class="content">
                     <view class="name">{{item.receiveLocation}}</view>
                     <view class="name" :class="{primaryColor: (info.logisticsStatus == 1 && item.actualArrivedDate) || info.logisticsStatus == 2}">{{item.receiveLocation}}</view>
                     <view class="status">
                        <view v-if="info.logisticsStatus == 0" class="btn">到货</view>
                        <view v-else-if="info.logisticsStatus == 1 && !item.actualArrivedDate" @click="startAri(item.stopNumber)"
@@ -95,12 +95,21 @@
               </view>
               <view class="top1">
                  <view class="left_icon"></view>
                  <view class="time">到货时间:{{ item.actualArrivedDate || '-' }}</view>
                  <view class="time" v-if="item.actualArrivedDate">到货时间:{{ item.actualArrivedDate}}</view>
                  <view class="time" style="margin-top: -10rpx;" v-else>-</view>
               </view>
            </view>
         </view>
      </view>
      <view v-if="info.logisticsStatus == 0" @click="startTrans" class="start_btn">启运</view>
      <!--  -->
      <view v-if="showTip" class="tip_wrap">
         <view class="title">提示</view>
         <view class="text">车辆刚启运,暂无法进行到</view>
         <view class="text">货操作,请5分钟后再试</view>
         <view class="btn" @click="showTip = false">我知道了</view>
      </view>
      <view  v-if="showTip" class="shade"></view>
   </view>
</template>
@@ -109,7 +118,6 @@
      putTaskDetail,
      putDriverArrival,
      putDriverStart,
   } from '@/api'
   export default {
      data() {
@@ -117,7 +125,8 @@
            info: {
               productDetails: [],
               transportStop: []
            }
            },
            showTip: false
         };
      },
      onLoad(options) {
@@ -142,8 +151,12 @@
                        id: this.id,
                        optType: 0
                     }).then((ress) => {
                        if (ress.code == 200) {
                           this.showToast('启运成功')
                        if (ress.code == 200) {
                           const transportList = uni.getStorageSync('transportList') || []
                           transportList.push({ id: this.id, time: new Date().getTime() })
                           uni.setStorageSync('transportList', transportList)
                           this.showToast('启运成功')
                           this.getDetail()
                        }
                     })
                  }
@@ -155,14 +168,24 @@
               title: '提示',
               content: '确认到货么?',
               success: (res) => {
                  if (res.confirm) {
                  if (res.confirm) {
                     const transportList = uni.getStorageSync('transportList') || []
                     const item = transportList.find(i => i.id == this.id)
                     if(item && item.id){
                        const timeN = new Date().getTime() - item.time
                        if(timeN < 5 * 60 * 1000){
                           this.showTip = true
                           return
                        }
                     }
                     putDriverArrival({
                        stopNumber,
                        optType: 1,
                        id: this.id
                     }).then(ress => {
                        if (ress.code == 200) {
                           this.showToast('到货成功')
                           this.showToast('到货成功')
                           this.getDetail()
                        }
                     })
                  }
@@ -176,8 +199,52 @@
<style lang="scss">
   page {
      background-color: #f7f7f7;
   }
   .shade{
      width: 100vw;
      height: 100vh;
      background: #000000;
      opacity: 0.4;
      position: fixed;
      left: 0;
      top: 0;
      z-index: 99;
   }
   .tip_wrap{
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      right: 0;
      margin: auto;
      width: 560rpx;
      height: 328rpx;
      background: #FFFFFF;
      border-radius: 24rpx;
      text-align: center;
      z-index: 999;
      .title{
         font-weight: 500;
         font-size: 32rpx;
         color: #111111;
         margin: 40rpx 0 30rpx;
      }
      .text{
         font-weight: 400;
         font-size: 28rpx;
         color: #333333;
      }
      .btn{
         margin-top: 32rpx;
         height: 100rpx;
         display: flex;
         justify-content: center;
         align-items: center;
         border-top: 1rpx solid #E5E5E5;
         color: #279BAA;
         font-size: 32rpx;
      }
   }
   .head_bg {
      width: 750rpx;
      height: 240rpx;
@@ -185,7 +252,6 @@
      position: absolute;
      top: 0;
      left: 0;
      z-index: -1;
   }
   .info {
@@ -193,7 +259,8 @@
      overflow: hidden;
      margin-top: 30rpx;
      background: #FFFFFF;
      position: relative;
      z-index: 1;
      .head {
         display: flex;
         justify-content: space-between;
@@ -256,7 +323,7 @@
            color: #222222;
            .line {
               height: 68rpx;
               min-height: 68rpx;
               align-items: center;
               display: flex;
               border-bottom: 1px solid #E5E5E5;
@@ -297,7 +364,7 @@
      border-radius: 16rpx;
      padding: 30rpx;
      margin-top: 20rpx;
      margin-bottom: 20rpx;
      .title {
         font-weight: 500;
         font-size: 32rpx;
@@ -308,7 +375,10 @@
      .list {
         .item {
            position: relative;
            padding-bottom: 24rpx;
            &:nth-last-child(1){
               padding-bottom: 0;
            }
            .dian {
               border: 1rpx dashed #CCCCCC;
               height: calc(100% - 48rpx);
@@ -320,7 +390,6 @@
            .top1 {
               display: flex;
               .left_icon {
                  width: 78rpx;
@@ -334,7 +403,7 @@
                  flex: 1;
                  display: flex;
                  justify-content: space-between;
                  align-items: center;
                  // align-items: center;
                  margin-bottom: 12rpx;
                  .name {
@@ -346,7 +415,7 @@
                  .status {
                     display: flex;
                     align-items: center;
                     // align-items: center;
                     font-size: 26rpx;
                     .btn {
@@ -362,7 +431,8 @@
                     .pri {
                        color: #fff;
                        background-color: $uni-color-primary;
                        background-color: $uni-color-primary;
                        border: 1rpx solid $uni-color-primary;
                     }
                     image {