MrShi
2026-05-19 ce06ca62a0dd65d4a8fb57126948449c804ad77e
small-program/pages/itinerary/itinerary.vue
@@ -7,6 +7,12 @@
            <view class="header-bar" :style="{ height: navHeight + 'px' }">
               <text class="header-title">我的行程</text>
            </view>
            <view class="top-search">
               <view class="searchbox">
                  <u-icon name="search" color="#999999" size="28"></u-icon>
                  <input class="search-input" v-model="keyword" @confirm="getFirstPageData" type="text" placeholder="输入姓名、电话、订单编号搜索">
               </view>
            </view>
            <scroll-view scroll-x class="tabs-row page-padding" style="padding: 0 0 0 30rpx !important;" show-scrollbar="false">
               <view class="tabs-inner">
                  <view
@@ -89,7 +95,7 @@
                  <view class="amount-area">
                     <view class="pay-row">
                        <text class="pay-label">实付款:</text>
                        <text class="pay-value">{{((item.estimatedAmount || 0)/100).toFixed(2) }}</text>
                        <text class="pay-value">{{(((item.estimatedAmount || 0) - (item.deductionAmount || 0)) / 100).toFixed(2) }}</text>
                     </view>
                     <view class="insurance-row">
                        <text class="insurance-label">含行李保费:</text>
@@ -109,10 +115,10 @@
                     <view class="footer-btn primary-btn" @click="evaluateOrder(item)" v-if="item.status ===7 && !item.commentStatus ">评价订单</view>
                  </view>
                  <view class="footer-actions" v-else>
                     <view class="footer-btn contact-btn" @click="contactPhone(item,0)" v-if="item.status ===1 || item.status ==2">联系门店</view>
                     <view class="footer-btn contact-btn" @click="contactPhone(item,2)" v-if="item.status ===3 || item.status ===4 ">联系骑手</view>
                     <view class="footer-btn contact-btn" @click="contactPhone(item,1)" v-if="item.status ===5">联系门店</view>
                     <view class="footer-btn contact-btn" v-if="item.status ===0"  @click="cancelOrder(item)">取消订单</view>
                     <view class="footer-btn contact-btn" @click="contactPhone(item,0)" v-if="(item.status ===1 || item.status ==2) && item.takeShopId">联系门店</view>
                     <view class="footer-btn contact-btn" @click="contactPhone(item,2)" v-if="[3,4,5].includes(item.status) && !item.takeShopId">联系骑手</view>
                     <view class="footer-btn contact-btn" @click="contactPhone(item,1)" v-if="item.status ===5 && item.takeShopId">联系门店</view>
                     <view class="footer-btn contact-btn" v-if="[0,1,2].includes(item.status)"  @click="cancelOrder(item)">取消订单</view>
                     <view class="footer-btn primary-btn" @click="payOrder(item)" v-if="item.status ===0">立即支付</view>
                     <view class="footer-btn primary-btn" @click="payOrderFee(item)" v-if="item.status ===5 && item.overdueStatus===3 ">立即支付</view>
                     <view class="footer-btn contact-btn" @click="deleteOrder(item)" v-if="item.status ===7 || item.status===96 || item.status == 99">删除订单</view>
@@ -198,16 +204,26 @@
         </view>
      </u-popup>
      <u-popup :show="showQrcode" round="15" @close="openQrcode()"   :safeAreaInsetBottom="false" mode="bottom"  :closeable="true" :closeOnClickOverlay="false">
         <view class="tc" style="height: 700rpx;width: 100%; ">
         <view class="tc" style="height: auto;width: 100%; ">
            <view class="tc-contemt" style="text-align: center;">
               <view class="tc-contemt-title" style="text-align: center;">核销码</view>
               <view  style="margin-bottom: 30rpx;">
                  <text class="pickup-code" style="font-size: 48rpx;">行李编号:{{ currentOrder.sortnum||'' }}</text>
                  <view class="pickup-code" style="margin-left: 60rpx;font-size: 28rpx;text-align: left;font-weight: normal;">用户:{{currentOrder.takeUser||''}}({{currentOrder.takePhone||''}})</view>
                  <view class="pickup-code" style="margin-left: 60rpx;font-size: 28rpx;text-align: left;font-weight: normal;">门店:{{currentOrder.depositShopName||''}}</view>
                  <view class="item-form-list" style="align-items:baseline;" v-if="currentOrder && currentOrder.orderImages && currentOrder.orderImages.length">
                     <view class="item-form-list-row" v-for="(item,index) in currentOrder.orderImages" key="item">
                        <image :src="item" mode="widthFix" @click="previewImage(currentOrder.orderImages,index)"  ></image>
                     </view>
                  </view>
                  </view>
               <view class="qrcode-box">
                  <canvas canvas-id="qrcodeCanvas" id="qrcodeCanvas" style="width: 100px; height: 100px;"></canvas>
                  <image class="qrcode-image" :src="qrcodeImage" mode="widthFix"></image>
               </view>
               <text class="pickup-code">{{ currentOrder.memberVerifyCode||'' }}</text>
               <text class="pickup-tip" @tap="copyCode">点击复制自提码</text>
               <text class="pickup-code">核销码:{{ currentOrder.memberVerifyCode||'' }}</text>
               <text class="pickup-tip" @tap="copyCode">点击复制核销码</text>
            </view>
         </view>
      </u-popup>
      <custom-tabbar></custom-tabbar>
@@ -236,6 +252,7 @@
            showPhone:false,
            total:0,
            hasNext:true,
            keyword:'',
            userType: 0,
            qrcodeImage:null,
            isLoadingMore: false,
@@ -302,7 +319,7 @@
         if (orderStatus != null &&orderStatus != undefined ) {
            if( Number(orderStatus) === -2){
               this.activeTab = 0
            } else{
            } else if( Number(orderStatus) !== 0 ){
               this.activeTab =  Number(orderStatus)
            }
         }
@@ -313,6 +330,12 @@
         this.getDataList();
      },
      methods: {
         previewImage(images,index = 0) {
            uni.previewImage({
               current: index,
               urls: images
            });
         },
         changeTab(item){
             this.activeTab = item.value
             this.getFirstPageData()
@@ -478,7 +501,7 @@
               data: this.currentOrder.memberVerifyCode,
               success: () => {
                  uni.showToast({
                     title: '已复制自提码',
                     title: '已复制核销码',
                     icon: 'none'
                  })
               }
@@ -530,12 +553,13 @@
               var that =this 
               let res ={};
               res = await that.$u.api.myOrderPage({
                     capacity:10,
                     model: {
                        combinedStatus: this.activeTab == -1?'':this.activeTab
                     },
                     page:this.currentPage
                  });
                  capacity:10,
                  model: {
                     combinedStatus: this.activeTab == -1?'':this.activeTab,
                     keyword: this.keyword
                  },
                  page:this.currentPage
               });
                
               console.log(res)
               if (res.code === 200 ) { 
@@ -611,6 +635,38 @@
      align-items: center;
      justify-content: space-between;
      box-sizing: border-box;
   }
   .top-search {
      width: 100%;
      height: 88rpx;
      padding: 8rpx 30rpx;
      box-sizing: border-box;
      display: flex;
      align-items: center;
   }
   .searchbox {
      width: 100%;
      display: flex;
      align-items: center;
      padding: 0 30rpx;
      box-sizing: border-box;
      background: rgba(255,255,255,0.9);
      border-radius: 16rpx;
      overflow: hidden;
   }
   .search-input {
      flex: 1;
      height: 72rpx;
      background: #F9F9FB;
      border-radius: 16rpx;
      border: 1rpx solid #EEEEEE;
      font-weight: 400;
      font-size: 26rpx;
      color: #333333;
      margin-left: 16rpx;
   }
   .header-title {
@@ -879,14 +935,15 @@
      color: #8C939F;
   }
   .price-line{
      padding: 0 30rpx;
      box-sizing: border-box;
      display: flex;
      align-items: flex-end;
   }
   .amount-area {
      width: 50%;
      padding: 0 30rpx;
      box-sizing: border-box;
      // padding: 0 30rpx;
      // box-sizing: border-box;
      display: flex;
      flex-direction: column;
      align-items: flex-end;
@@ -1003,7 +1060,22 @@
         opacity: 0;
      }
   }
   .item-form-list {
      max-width: 100%;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 20rpx;
      .item-form-list-row {
         border-radius: 8rpx;
         overflow: hidden;
         image {
            width: 130rpx;
            max-height: 150rpx;
         }
      }
   }
   .qrcode-image {
      width: 100%;
      height: 100%;