<!--packageH/installationSever/installationSeverRefund/installationSeverRefund.wxml-->

<wxs module="tool">
  var substr = function (str, start, end) {
    if ((typeof str) == 'undefined') return;
    console.log(str)
    return str.substring(start, end);
  }
  module.exports.substr = substr;
</wxs>

<view class="installShop">
  <view class="shopTitle">
    <view>订单号：{{detailInfo.order_sn}}</view>
    <view style="color: #f15354">{{detailInfo.state_name}}</view>
  </view>
  <view class="shopList" wx:for="{{detailInfo.goods_list}}" :key="index">
    <view class="shoplis">
      <view class="imgbox">
        <image src="{{item.thumb}}"></image>
      </view>
      <view class="shoptxt">{{item.title}}</view>
      <view class="total">数量：x{{item.total}}</view>
    </view>
    <view class="shopBtns">
      <view class="shopBtn" wx:for="{{item.button_group}}" wx:for-item="btn" data-item="{{item}}" data-btn="{{btn}}"
        catchtap="gotoInstallationSeverAfterApply">{{btn.name}}</view>
    </view>
  </view>

  <view class="severPrice">
    <view>安装服务费：<text style="color: #f15354">￥{{detailInfo.service_amount}}</text></view>
    <view>订单实付金额：<text style="color: #f15354">￥{{detailInfo.price}}</text></view>
  </view>
</view>
<!-- 安装商品end -->
<!-- 订单信息 -->
<view class="orderDetail">
  <view class="detailTxt"><text class="txt">订单类型：</text><text>{{detailInfo.order_type_name}}</text></view>
  <view class="detailTxt"><text class="txt">预约安装时间：</text><text>{{detailInfo.reserve_time}}</text></view>
  <view class="detailTxt"><text class="txt">买家留言：</text><text>{{detailInfo.install_comment}}</text></view>
</view>
<!-- 订单信息end -->
<!-- 流程 -->
<view class="flowPath">
  <view class="pathItem">
    <view class="pathTime">
      <block wx:if="{{detailInfo.worker_time!=''}}">
        <text class="time">{{tool.substr(detailInfo.worker_time,11,16)}}</text>
        <text class="day">{{tool.substr(detailInfo.worker_time,0,10)}}</text>
      </block>
    </view>
    <view class="circle {{detailInfo.worker_time!='' ? 'selected' : ''}}">
      <i class="iconfont icon-fontclass-shangpindingdan {{detailInfo.worker_time!='' ? 'selected' : ''}}"></i>
    </view>
    <text class="{{detailInfo.worker_time!='' ? 'selected' : ''}}">接单</text>
  </view>
  <view class="pathDetail">
    <view class="line {{detailInfo.worker_time!='' ? 'selected' : ''}}"></view>
    <view class="connection" wx:if="{{detailInfo.worker_time!=''}}">
      <text>{{detailInfo.another_name.worker_name}}：{{detailInfo.worker_name}}</text>
      <text bindtap="bindPhone" data-mobile="{{detailInfo.worker_mobile}}">联系电话：{{detailInfo.worker_mobile}}</text>
    </view>
  </view>

  <view class="pathItem">
    <view class="pathTime">
      <block wx:if="{{detailInfo.take_time!=''}}">
        <text class="time">{{tool.substr(detailInfo.take_time,11,16)}}</text>
        <text class="day">{{tool.substr(detailInfo.take_time,0,10)}}</text>
      </block>

    </view>
    <view class="circle {{detailInfo.take_time!='' ? 'selected' : ''}}">
      <i class="iconfont icon-fontclass-kucun {{detailInfo.take_time!='' ? 'selected' : ''}}"></i>
    </view>
    <text class="{{detailInfo.take_time!='' ? 'selected' : ''}}">取货</text>
  </view>
  <view class="pathDetail">
    <view class="line {{detailInfo.install_start_time!='' ? 'selected' : ''}}"></view>
  </view>

  <view class="pathItem">
    <view class="pathTime">
      <block wx:if="{{detailInfo.install_start_time!=''}}">
        <text class="time">{{tool.substr(detailInfo.install_start_time,11,16)}}</text>
        <text class="day">{{tool.substr(detailInfo.install_start_time,0,10)}}</text>
      </block>
    </view>
    <view class="circle {{detailInfo.install_start_time!='' ? 'selected' : ''}}">
      <i class="iconfont icon-fontclass-anzhuang {{detailInfo.install_start_time!='' ? 'selected' : ''}}"></i>
    </view>
    <text class="{{detailInfo.install_start_time!='' ? 'selected' : ''}}">上门安装</text>
  </view>
  <view class="pathDetail">
    <view class="line {{detailInfo.finish_time!='' ? 'selected' : ''}}"></view>
  </view>

  <view class="pathItem">
    <view class="pathTime">
      <block wx:if="{{detailInfo.finish_time!=''}}">
        <text class="time">{{tool.substr(detailInfo.finish_time,11,16)}}</text>
        <text class="day">{{tool.substr(detailInfo.finish_time,0,10)}}</text>
      </block>
    </view>
    <view class="circle {{detailInfo.finish_time!='' ? 'selected' : ''}}">
      <i class="iconfont icon-fontclass-shouchu {{detailInfo.finish_time!='' ? 'selected' : ''}}"></i>
    </view>
    <text class="{{detailInfo.finish_time!='' ? 'selected' : ''}}">完成安装</text>
  </view>

</view>
<!-- 安装完成后图片 -->
<view class="imageBox" wx:if="{{detailInfo.finish_image.length>0}}">
  <view class="tit">安装完成图片</view>
  <view class="imglist">
    <view class="img" wx:for="{{detailInfo.finish_image}}" wx:key="index">
      <image src="{{item}}"></image>
    </view>
  </view>
</view>
<!-- 售后 -->
<view class="afterSale" bindtap="gotoInstallationSeverAftersale" wx:if="{{false}}">
  <text style="font-size: 0.94rem;">售后</text>
  <i class="iconfont icon-member_right"></i>
</view>
<view style="width:100%;height:6rem;"></view>
<!-- 按钮 -->
<view class="posBtn set-pc-styleLeft">
  <view class="btn" wx:for="{{detailInfo.button_group}}" data-btn="{{item}}" bindtap="bindBtnClick">{{item.name}}</view>
</view>