<van-nav-bar title="订单详情" left-text="" right-text="" left-arrow bind:click-left="onClickLeft" bind:click-right="onClickRight" style=" position: fixed;left: 0;top: 0;width: 100%;z-index: 10;" />

<!-- 订单标题 -->
<view style=" height:328rpx;position: relative;background: #ffffff;margin-top:{{height}}px;">
  <view style="height:66rpx;padding: 0 24rpx;">
    <text class="time_msg"></text>
    <!-- 订单状态：-2：已取消 -1：拒绝接单 0：待接单 1：已接单  2：已支付（待服务）
                    3：服务中 4：已完成 5申请退款 6退款中 7已退款 8：已结算 -->
    <view wx:if="{{item.status==-2}}" class="status_msg">{{"已取消"}}</view>
    <view wx:if="{{item.status==-1}}" class="status_msg">{{"拒绝接单"}}</view>
    <view wx:if="{{item.status==0}}" class="status_msg">{{"待接单"}}</view>
    <view wx:if="{{item.status==1}}" class="status_msg">{{"已接单"}}</view>
    <view wx:if="{{item.status==2}}" class="status_msg">{{"待服务"}}</view>
    <view wx:if="{{item.status==3}}" class="status_msg">{{"服务中"}}</view>
    <view wx:if="{{item.status==4}}" class="status_msg">{{"已完成"}}</view>
    <view wx:if="{{item.status==5}}" class="status_msg">{{"申请退款"}}</view>
    <view wx:if="{{item.status==6}}" class="status_msg">{{"退款中"}}</view>
    <view wx:if="{{item.status==7}}" class="status_msg">{{"已退款"}}</view>
    <view wx:if="{{item.status==8}}" class="status_msg">{{"已结算"}}</view>
  </view>
  <view class="details_box">
    <image src="{{item.userbAvatar}}" style="width:230rpx;height:230rpx;"></image>
    <view style="margin-left: 31rpx;">
      <view class="title">专业陪护服务（{{item.userbName}}）</view>
      <!-- <view class="detail_number">数量x{{detail.num}}</view> -->
      <view class="money">实付款：<text style="font-size: 30rpx;color: #FF4A4A;font-family: PingFang SC;font-weight: bold;">￥{{item.yuguMoney}}</text></view>
    </view>
  </view>
</view>

<!-- 订单状态：0：待接单 -->
<view wx:if="{{item.status==0}}" class="opt_view">
  <view class="detail_btn" bindtap="cancelOrder">
    取消订单
  </view>
</view>

<!-- 订单状态：1：已接单 -->
<view wx:if="{{item.status==1}}" class="opt_view">
  <view class="detail_btn" style="padding:0 30rpx" bindtap="confirm_pay">
    付款
  </view>
  <view class="detail_btn" bindtap="cancelOrder">
    取消订单
  </view>
</view>

<!-- 订单状态：2：待服务 -->
<view wx:if="{{item.status==2}}" class="opt_view">
  <view class="detail_btn" style="padding:0 30rpx" bindtap="startService">
    确认开始服务
  </view>
  <view class="detail_btn" bindtap="cancelOrderdfw">
    取消订单并退款
  </view>
</view>

<!-- 订单状态：3：服务中 -->
<view wx:if="{{item.status==3}}" class="opt_view">
  <view class="detail_btn" bindtap="cancelOrderfwz">
    确认服务完成
  </view>
</view>

<!-- 联系信息 -->
<view class="contact">
  <view class="contact_title">联系信息</view>
  <view style="display: flex;align-items: center;">
    <image src="{{item.userbAvatar}}" style="width:94rpx;height:94rpx;border-radius:50% ;margin-right:23rpx;">
    </image>
    <view>
      <view style="color: #333;font-size: 28rpx;font-family: PingFang SC;font-weight: bold;">{{item.usercName}}</view>
      <view style="color: #ABABAB;font-size: 24rpx;font-family: PingFang SC;font-weight: 400;width:532rpx;border-right:1rpx solid #e5e5e5">
        地址：{{item.hospitalAddress}}</view>
    </view>
    <image style="width:26rpx;height:26rpx;padding:35rpx 0 0 20rpx" src="/pages/image/phone.png" bindtap="callphone"></image>
  </view>
</view>

<!-- 订单信息 -->
<view class="information">
  <view class="contact_title">
    订单信息
  </view>
  <view style="margin-bottom: 30rpx;">
    <text class="information_title">订单合计</text>
    <text class="information_title" style="color:#FF4A4A;">¥{{item.yuguMoney}}</text>
  </view>
  <!-- <view style="margin-bottom: 30rpx;">
    <text class="information_title">商品数量</text>
    <text class="information_title">{{order.num}}</text>
  </view> -->
  <view style="margin-bottom: 30rpx;">
    <text class="information_title">订单时间</text>
    <text class="information_title">{{item.startTime}}</text>
  </view>
  <view style="margin-bottom: 30rpx;">
    <text class="information_title">订单编号</text>
    <text class="information_title">{{item.orderNumber}}</text>
  </view>
  <view style="margin-bottom: 30rpx;">
    <text class="information_title">手机号码</text>
    <text class="information_title">{{123456789}}</text>
  </view>
</view>


<!-- 蒙层 -->
<view class="mengceng" wx:if="{{mengceng}}" bindtap="mengceng"></view>
<!-- 取消订单弹窗 -->
<view class="qxdd" wx:if="{{dingdan_msg}}">
  <view class="msg_title">
    商品很抢手哦，确定要取消订单吗？
  </view>
  <view style="display: flex;">
    <view class="msg_btn" style="border-right:1px solid #EBEBEB;color:#0A74B1" bindtap="nocancel">我在想想</view>
    <view class="msg_btn" bindtap="cancelok">坚持取消</view>
  </view>
</view>

<!-- 服务中的订单点击取消的蒙层 -->

<!-- 服务中的提前完成订单弹窗 -->
<view class="qxdd" wx:if="{{dingdan_msgfwz}}">
  <view class="msg_title">
    订单结束后按实际服务时间进行结算
  </view>
  <view style="display: flex;">
    <view class="msg_btn" style="border-right:1px solid #EBEBEB;color:#0A74B1" bindtap="nocancel">我在想想</view>
    <view class="msg_btn" bindtap="okcancel">确认结束服务</view>
  </view>
</view>


<!-- 待服务的订单点击取消的蒙层 -->
<!-- <view class="mengceng" wx:if="{{mengcengfwz}}" bindtap="mengcengdfw"></view> -->
<!-- 服务中的订单取消订单弹窗 -->
<view class="qxdd" wx:if="{{dingdan_msgdfw}}">
  <view class="msg_title">
    服务人员正在赶来，确定要取消订单吗？
  </view>
  <view style="display: flex;">
    <view class="msg_btn" style="border-right:1px solid #EBEBEB;color:#0A74B1" bindtap="nocancel">我在想想</view>
    <view class="msg_btn" bindtap="cancelokdfw">坚持取消</view>
  </view>
</view>


<!-- 退款弹窗 -->
<view wx:if="{{refund_box}}" class="refund_box">
  <view class="gang" bindtap="gang"></view>
  <view class="refund_title">
    退款原因</view>
  <scroll-view scroll-y style="height: 500rpx;">
    <radio-group bindchange="radioChange">
      <view wx:for="{{list}}" class="list_box">
        <view>{{item.text}}</view>
        <view>
          <radio></radio>
        </view>
      </view>
    </radio-group>
    <view style="height:50rpx;"></view>
  </scroll-view>
  <button type="primary" plain="true" style="margin-bottom:20rpx" bindtap="isok">完成</button>
</view>


<!-- 退款弹窗 -->
<view wx:if="{{refund_box}}" class="refund_box">
  <view class="gang" bindtap="gang"></view>
  <view class="refund_title">
    退款原因</view>
  <scroll-view scroll-y style="height: 500rpx;">
    <radio-group bindchange="radioChange">
      <view wx:for="{{list}}" class="list_box">
        <view>{{item.text}}</view>
        <view>
          <radio></radio>
        </view>
      </view>
    </radio-group>
    <view style="height:50rpx;"></view>
  </scroll-view>
  <button type="primary" plain="true" style="margin-bottom:20rpx" bindtap="isok">完成</button>
</view>