<cu-custom bgColor="bg-color" isBack="{{true}}" title="订单列表"></cu-custom>
<view class="toptip {{tipStaus}} text-white {{tipType}}" style='top:{{CustomBar}}px;'>{{tipText}}</view>
<view class="query_top_hu"></view>
<view class="worker_search">
  <view class="worker_search_con">
    <input type="text" placeholder="请输入关键字" value="{{keyword}}" bindinput="setKeyword"></input>
    <view class="text-color" bindtap="searchList"><text class="cuIcon-search"></text>搜索</view>
  </view>
  <view class="tabs">
    <view bindtap="setTab" data-type="dateTime">
      <!-- <view style="{{dateTime ? 'color:#2D59E6':''}}">{{dateTime ? dateTime:'下单时间'}}</view> -->
      <picker mode="date" value="{{orderTime}}" bindchange="setorderTime" bindcancel='orderTimeCancel' >
        <view class="picker" style="{{orderTime ?'color:#2D59E6':''}}">
          {{orderTime || "下单时间"}}
        </view>
      </picker>
      <image src="../../../img/query.png"></image>
    </view>
    <view bindtap="setTab" data-type="transportStatus">
      <view style="{{transportStatusInit ?'color:#2D59E6':''}}">{{transportStatusInit ? seleteName:'运输状态'}}</view>
      <image src="../../../img/query.png"></image>
    </view>
    <!-- <view>
      <picker mode="date" value="{{startDate}}" bindchange="setStartDate" bindcancel='pickerCancel' >
        <view class="picker" style="{{startDate ?'color:#2D59E6':''}}">
          {{startDate || "选择日期"}}
        </view>
      </picker>
      <image src="../../../img/query.png"></image>
    </view> -->
  </view>
  <view class="selectTab" style="{{isTab ? 'display:block':'display:none'}}">
    <view class="tabText">
      <block wx:for="{{tabDetail}}" wx:for-item="item" wx:for-index="index" wx:key='index'>
        <view bindtap="seleteTab" data-item="{{item}}" data-type="{{item.type}}"
          class="{{item.isSelete ? 'isActive' :''}}">{{item.name}}</view>
      </block>
    </view>
    <view class="tabBut">
      <text class="cancel" bindtap="cancel">重置</text>
      <text class="query" bindtap="searchType">确定</text>
    </view>
  </view>
</view>
<view class="query_list">
  <view class="query_item" wx:for="{{list}}" wx:key="id">
    <view>
      <view class="query_item_txt"><text class="query_item_label">订单号:</text> <text>{{item.code || "N/A"}}</text></view>
      <view class="query_item_txt"><text class="query_item_label">下单日期:</text> <text>{{item.orderTime || "N/A"}}</text>
      </view>
      <view class="query_item_txt">
        <text class="query_item_label">客户名称: </text>
        <view> {{item.cusName || "N/A"}}</view>
      </view>
      <view class="query_item_txt">
        <text class="query_item_label">承运商: </text>
        <text> {{item.transportName || "N/A"}}</text>
      </view>
      <view class="query_item_txt">
        <text class="query_item_label">运抵省份: </text>
        <text> {{item.province || "N/A"}}</text>
      </view>
      <view class="query_item_txt">
        <text class="query_item_label">车牌: </text>
        <text> {{item.plateNum || "N/A"}}</text>
      </view>
    </view>
    <view class="query_btn" wx:if="{{item.chainId}}" bindtap="goChainInfo" data-id="{{item.chainId}}" data-cid="{{item.uid}}">
      查看详情
    </view>
  </view>
</view>
<view class="no_data" wx:if="{{list.length<=0}}">
  <image src="/img/nodata_img2.png"></image>
  <view class="no_data_txt">暂无数据</view>
</view>
<view class="cha_win" bindtap="closeChaWin" style="{{isTab ? 'display:block':'display:none'}}"></view>
