<view class="container">
   <!-- 地图组件 -->
   <!-- <map 
    id="map"
    class="map"
    longitude="{{longitude}}"
    latitude="{{latitude}}"
    scale="16"
    markers="{{markers}}"
    polyline="{{polyline}}"
    show-location
  ></map> -->
  <map 
    id="map"
    class="map"
    longitude="{{longitude}}"
    latitude="{{latitude}}"
    markers="{{markers}}"
    polyline="{{plannedRoute}}"
    include-points="{{trackPoints}}"
    bindcontroltap="controltap"
    show-location
  ></map>
   <!-- 规划路线叠加显示 -->
   <!-- controls="{{controls}}" -->
 
 
  
  <!-- 信息提示 -->
  <view class="info" wx:if="{{infoText}}">
    {{infoText}}
  </view>
  <!-- 加载提示 -->
  <view wx:if="{{loading}}" class="loading-mask">
    <view class="loading-view">
      <loading size="large" color="#007aff">获取路线中...</loading>
    </view>
  </view>

  <!-- 错误提示 -->
  <view wx:if="{{error && !loading}}" class="error-message">
    {{error}}
  </view>
  <view class="detailsbox">

 
</view>
 
</view>
<verification-popup 
  isShow="{{showVerification}}"
  phoneNumber="{{phoneNumber}}"
  countdownSeconds="60"
  bind:close="onPopupClose"
  bind:confirm="onCodeConfirm"
  bind:resend="onResendCode"
  bind:complete="onCodeComplete"
/>

<!-- pages/taxi-detail/taxi-detail.wxml -->
<view class="taxi-card-container">
  <!-- 背景遮罩（仅非全屏/非最小档显示） -->
  <view 
    class="mask" 
    wx:if="{{cardHeight !== 'min' && cardHeight !== 'mid' && cardHeight !== 'max'}}"
    style="opacity: {{maskOpacity}};"
    bindtap="closeCard"
  ></view>

  <!-- 可拖动卡片（全屏时取消底部圆角） -->
  <view 
    class="taxi-card"
    style="height: {{currentHeight}}px;bottom: 0;transition: height 0.3s ease;border-top-left-radius: {{cardHeight === 'max' ? '0' : '16px'}};border-top-right-radius: {{cardHeight === 'max' ? '0' : '16px'}};" bindtouchstart="handleTouchStart" bindtouchmove="handleTouchMove" bindtouchend="handleTouchEnd">
    <!-- 拖动指示器（全屏时隐藏） -->
    <view class="drag-handler">
      <view class="drag-bar"></view>
    </view>
    <!-- 卡片内容（全屏时增加内边距适配导航栏） -->
    <view class="card-content" style="padding-top: {{cardHeight === 'max' ? '40rpx' : '20rpx'}};">
      <view class="storagecartext">
<view>
  <view class="destination-title">
     <text wx:if="{{orderdata.workorderType==0}}" style="font-weight: 600;">待处理</text>
      <text wx:if="{{orderdata.workorderType==1}}" style="font-weight: 600;">待处理</text>
      <text wx:if="{{orderdata.workorderType==2}}">行驶中</text>
      <text wx:if="{{orderdata.workorderType==3}}">到达指定地点</text>
     <text wx:if="{{orderdata.workorderType==4}}">工作中</text>
     <text wx:if="{{orderdata.workorderType==5}}">完成工作</text>
    </view>
  <view class="destination-title1" style="margin-top: 20rpx;">
      目的地：{{orderdata.poiName}}
    </view>
    <view class="destination-font" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
    <view class="driver" wx:if="{{orderdata.driverphone==''}}">司机：<text style="color: #ff6b00;">待接单</text> </view>
    <view class="driver" wx:else>司机：{{orderdata.driverName}}·{{orderdata.carName}} 
    
    </view> 
    </view>
    <view class="destination-font" wx:if="{{userdata.operationRole==4}}">客户：{{orderdata.receiver}} <t-icon name="call-1-filled" size="28rpx" data-name="call-1-filled" data-phone="{{orderdata.phone}}" bind:tap="ontelephone" style="margin-left:20rpx"/> </view>

</view>
  <image wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}" class="storagecar" src="https://esos-iot.com/myminio/project/c152026b9bc2485f83b39a6132df3ce7.png" mode="heightFix"/>
 
<image wx:if="{{userdata.operationRole==4}}" class="storagecar1" src="https://esos-iot.com/myminio/project/d98e4fde125f40819f8bd8fe872e409c.png" bind:tap="navigation" mode="heightFix"/>
</view> 
<view class="card_more" wx:if="{{(userdata.operationRole==5||userdata.operationRole==6)&&orderdata.workorderType!=0}}">
<view class="card_morebox">开发票</view>
<view class="card_morebox">联系客服</view>
<view class="card_morebox" data-phone="{{orderdata.driverphone}}" bind:tap="ontelephone">打电话</view>
<view class="card_morebox">再来一单</view>
</view>
<view class="card_box" wx:if="{{userdata.operationRole==5||userdata.operationRole==6}}">
 
   <!-- 行程详情 -->
   <view class="detail-section" style="border-bottom: 1rpx solid #f5f5f5;">
    <view class="viewmore_box" bind:tap="onmore">
  <view class="section-title">工单详情</view>
<view class="viewmore_right">
 <text wx:if="{{!moretype}}">展开详情</text> 
 <text wx:if="{{moretype}}">收起</text> 
<t-icon name="chevron-up" wx:if="{{moretype}}" size="22px" data-name="chevron-up"/>
<t-icon name="chevron-down" wx:if="{{!moretype}}" size="22px" data-name="chevron-down"/>
</view>
</view>
      <view class="detail-list" wx:if="{{moretype}}">
        <view class="detail-item">
          <view class="item-label">工单号</view>
          <view class="item-value">{{orderdata.workorderId}}</view>
        </view>
        <view class="detail-item">
          <view class="item-label">创建时间</view>
          <view class="item-value">{{orderdata.workorderCreatetime}}</view>
        </view>
        <view class="detail-item">
          <view class="item-label">工单类型</view>
          <view class="item-value" wx:if="{{orderdata.chargedischargeType==1}}">充电</view>
          <view class="item-value" wx:if="{{orderdata.chargedischargeType==2}}">放电</view>
        </view>
        <view class="detail-item">
          <view class="item-label">需求电量</view>
          <view class="item-value">{{orderdata.workorderElectricity}}</view>
        </view>
        <view class="detail-item">
          <view class="item-label">SOC</view>
          <view class="item-value">{{orderdata.soc}}</view>
        </view>
        <view class="detail-item">
          <view class="item-label">车型</view>
          <view class="item-value">{{orderdata.carMondel}}</view>
        </view>
        <view class="detail-item">
          <view class="item-label">里程</view>
          <view class="item-value">12.5km</view>
        </view>
        <view class="detail-item">
          <view class="item-label">预计时长</view>
          <view class="item-value">50分钟</view>
        </view>
      </view>
      <view style="height: 20rpx;" wx:if="{{moretype}}"></view>

    </view>

   <!-- 费用明细 -->
 <view class="detail-section">
      <view class="viewmore_box" bind:tap="oncostdetails">
  <view class="section-title1">100.1 <text class="section_yuan">元</text> </view>
<view class="viewmore_right">
 <text wx:if="{{!costdetails}}">费用明细</text> 
 <text wx:if="{{costdetails}}">费用明细</text> 
<t-icon name="chevron-up" wx:if="{{costdetails}}" size="22px" data-name="chevron-up"/>
<t-icon name="chevron-down" wx:if="{{!costdetails}}" size="22px" data-name="chevron-down"/>
</view>
</view>
      <view class="fee-list" wx:if="{{costdetails}}">
        <view class="fee-item">
          <view class="fee-label">起步价</view>
          <view class="fee-value">¥13.00</view>
        </view>
        <view class="fee-item">
          <view class="fee-label">里程费</view>
          <view class="fee-value">¥32.00</view>
        </view>
        <view class="fee-item">
          <view class="fee-label">时长费</view>
          <view class="fee-value">¥8.50</view>
        </view>
        <view class="fee-item">
          <view class="fee-label">服务费</view>
          <view class="fee-value">¥5.00</view>
        </view>
        <view class="fee-item">
          <view class="fee-label">电费</view>
          <view class="fee-value">¥5.00</view>
        </view>
     
        <!-- <view class="fee-item total-fee">
          <view class="fee-label">实付款</view>
          <view class="fee-value">¥58.50</view>
        </view> -->
      </view>
      <view style="height: 1rpx;"></view>
    </view>
  </view> 
  <view class="card_box" wx:if="{{userdata.operationRole==4}}">
 
 <!-- 行程详情 -->
 <view class="detail-section" style="border-bottom: 1rpx solid #f5f5f5;">
  <view class="viewmore_box" bind:tap="onmore">
<view class="section-title">工单详情</view>
<view class="viewmore_right">
<text wx:if="{{!moretype}}">展开详情</text> 
<text wx:if="{{moretype}}">收起</text> 
<t-icon name="chevron-up" wx:if="{{moretype}}" size="22px" data-name="chevron-up"/>
<t-icon name="chevron-down" wx:if="{{!moretype}}" size="22px" data-name="chevron-down"/>
</view>
</view>
    <view class="detail-list" wx:if="{{moretype}}">
      <view class="detail-item">
        <view class="item-label">工单号</view>
        <view class="item-value">{{orderdata.workorderId}}</view>
      </view>
      <view class="detail-item">
        <view class="item-label">创建时间</view>
        <view class="item-value">{{orderdata.workorderCreatetime}}</view>
      </view>
      <view class="detail-item">
        <view class="item-label">工单类型</view>
        <view class="item-value" wx:if="{{orderdata.chargedischargeType==1}}">充电</view>
        <view class="item-value" wx:if="{{orderdata.chargedischargeType==2}}">放电</view>
      </view>
      <view class="detail-item">
        <view class="item-label">需求电量</view>
        <view class="item-value">{{orderdata.workorderElectricity}}</view>
      </view>
      <view class="detail-item">
        <view class="item-label">SOC</view>
        <view class="item-value">{{orderdata.soc}}</view>
      </view>
      <view class="detail-item">
        <view class="item-label">车型</view>
        <view class="item-value">{{orderdata.carMondel}}</view>
      </view>
      <view class="detail-item">
        <view class="item-label">里程</view>
        <view class="item-value">{{distance}} km</view>
      </view>
      <view class="detail-item">
        <view class="item-label">约定时间</view>
        <view class="item-value">{{orderdata.workorderStarttime}}</view>
      </view>
    </view>
    <view style="height: 20rpx;" wx:if="{{moretype}}"></view>

  </view>

</view> 
  <view style="height: 140rpx;" wx:if="{{moretype}}"></view>
  <!-- 控制按钮区域 -->
  <view class="control-panel">
    <slide-confirm 
    wx:if="{{orderdata.workorderType==1&&userdata.operationRole==4}}"
    id="mySlideConfirm"
data-type="{{orderdata.workorderType}}"
  bind:success="onSlideSuccess" 
  width="300" 
  height="50"
  defaultText="开始出发"
  successText="验证通过"
/>

<slide-confirm 
wx:if="{{orderdata.workorderType==2&&userdata.operationRole==4}}"
id="mySlideConfirm"
data-type="{{orderdata.workorderType}}"

  bind:success="onSlideSuccess" 
  width="300" 
  height="50"
  defaultText="到达目的地"
  successText="验证通过"
/>
<slide-confirm 
wx:if="{{orderdata.workorderType==3&&userdata.operationRole==4}}"
id="mySlideConfirm"
data-type="{{orderdata.workorderType}}"
  bind:success="showVerificationPopup" 
  width="300" 
  height="50"
  defaultText="开始工作"
  successText="验证通过"
/>
<slide-confirm 
wx:if="{{orderdata.workorderType==4&&userdata.operationRole==4}}"
id="mySlideConfirm"
data-type="{{orderdata.workorderType}}"

  bind:success="onSlideSuccess" 
  width="300" 
  height="50"
  defaultText="完成工作"
  successText="验证通过"
/>
     
  
  </view>
    </view>
  </view>
</view>