<wxs src="../../utils/format.wxs" module="format" />
<view>
  <image src="/static/images/csr.png"
    style="width: 80px;height: 80px;position: fixed;z-index: 9;top: 360rpx;right: 15rpx;"></image>
  <contact-button class="csr" type="default-dark"
    style="opacity: 0;position: fixed;z-index: 99999;right: 15rpx; width: 100rpx;height: 100rpx;top:400rpx"
    session-from="weapp" size="27">
  </contact-button>
</view>
<view class="container" style="filter:blur({{myqr_blur}}rpx)">


  <view class="orders-switch">
    <view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab" data-index='0'>
      <view class="txt">全部问题</view>
    </view>
    <view class="item {{ showType == 1 ? 'active' : ''}}" bindtap="switchTab" data-index='1'>
      <view class="txt">处理中</view>
    </view>
    <view class="item {{ showType == 2 ? 'active' : ''}}" bindtap="switchTab" data-index='2'>
      <view class="txt">已完结</view>
    </view>
    <view class="item {{ showType == 3 ? 'active' : ''}}" bindtap="switchTab" data-index='3'>
      <view class="txt">已取消</view>
    </view>
  </view>

  <view class="no-order" wx:if="{{list.length <= 0}}">
    <view class="c">
      <text>还没有报备问题呢</text>
    </view>
  </view>

  <view class="orders">

    <view class='order' wx:for="{{list}}" wx:for-item="item" wx:key="item">
      <view class="h">
        <view class="l">提交时间：{{item.createTime}}</view>
        <view class="r">{{item.status}}</view>
      </view>
      <view class="goods" catchtap="goDetail" data-sn="{{item.ticketSn}}">
        <view class="info">
          <text class="name">{{item.title}}</text>
          <text class="number">工单编号:{{item.ticketSn}}</text>
          <text class="number" decode="{{true}}">客户名称：{{item.cusName}} &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
            手机：{{item.cusMobile}}</text>
          <text class="number"></text>
        </view>
      </view>
      <view class="order-item-operate">
        <!-- <view class="order-item-result"></view> -->
        <view class="order-operate-wrapper">
          <view wx:if="{{item.status=='处理中-升级'}}" style="border:0rpx;color:#09afff">已催办</view>
          <view catchtap="goUrge" style="color:red"
            wx:if="{{item.statusId!=2&&item.statusId!=3&&item.status!='处理中-升级'}}" data-sn="{{item.ticketSn}}">催办</view>
          <view catchtap="goCancel" wx:if="{{item.statusId==1}}" data-sn="{{item.ticketSn}}">取消</view>
          <!-- item.statusId==2&& -->
          <view catchtap="goComment" wx:if="{{item.statusId==2&&item.isCommented==false}}" data-id="{{item.ticketId}}"
            data-sn="{{item.ticketSn}}">去评价</view>
          <view catchtap="goDetail" data-sn="{{item.ticketSn}}">详情</view>
        </view>
      </view>

    </view>
    <!-- 
    <view class='book' wx:for="{{list}}" wx:for-item="item" wx:key="item">
      <view style="border-bottom:0.5rpx dashed #999">
        <view class="status">{{item.status}}</view>
        <view class="bookname">提交时间：{{item.createTime}}</view>
        <view class="address">报备问题：{{item.title}}</view> 
        <view class="serviceTime">工单编号：{{item.ticketSn}}</view>
        <view class="goodsname">客户名称：{{item.cusName}}  <span style='margin-left:30rpx'>手机：{{item.cusMobile}}</span></view>
      </view>  

      <view class="tool"  wx:if="{{item.statusId!=2}}"> 
        <button class="btn1" data-mobile="{{item.userPhone}}" bindtap="makeCall">联系客服</button>  
        <button class="btn1" bindtap="editPre" data-bookno="{{item.id}}">催办</button>
      </view>
    </view>-->

  </view>

</view>

<view class="footer" style="filter:blur({{myqr_blur}}rpx)">
  <button class="btn" bindtap="goProblemList">新增问题报备</button>
  <button class="btn" bindtap="goQuickList">快捷报备</button>
</view>


<view class="myqr" wx:if="{{myqr_show}}">
  <view style="text-align:center">
    <image class="cancel" src="/static/images/cancel.png" bindtouchstart="qrtouchstart"></image>
    <span style="font-size: 16px;color: #333;margin-top: 30rpx;font-weight:600">评价报备处理</span>
  </view>
  <view style="text-align:center;margin:0rpx auto">
    <view class="star">
      <view style="line-height: 70rpx;font-size: 32rpx;color: #333;">总体：</view>
      <image wx:for="{{comments.stars}}" wx:key="id" src="{{item.checked?item.imgSelected:item.img}}"
        data-level="{{item.level}}" bindtap="clickStar"></image>
      <view style="line-height: 70rpx;margin-left:10rpx;color: #333;">
        {{comments.selectedDes}}
      </view>
    </view>
    <view style="margin:10rpx 0;padding: 5rpx 0;height: 322rpx;">
      <textarea class="comment-txt" bindinput="bindCommentRemark" value="{{comments.comment}}"
        placeholder='请输入处理速度、结果等'></textarea>
    </view>
  </view>
  <view style="text-align: center;display: flex;justify-content: center;margin:20rpx">
    <view class="btn" bindtap="goSaveCommnet">提交</view>
  </view>
</view>