<!--pages/upDownSubmit/index.wxml-->
<view class="container listMain">
  <block wx:if="{{loginStatus}}">
    <van-sticky>
      <view class="topFilter">
        <view class="topSeach">
          <view class="rightBox" style="position: relative;">
            <van-search value="{{ searchVal }}" shape="round" placeholder="请输入车牌号码" bind:change="onChange" bind:search="onSearch" bind:cancel="onCancel" use-action-slot>
            </van-search>
          </view>
        </view>
      </view>
    </van-sticky>

    <view class="width710">
      <block wx:if="{{!requestStatu}}">
        <block wx:if="{{resData.length>0}}">
          <block wx:for="{{resData}}" wx:key="index">
            <navigator url="info?id={{item.id}}&name={{item.name}}&account={{item.account}}&index={{index}}" class="listItem">
              <view class="title van-ellipsis">
                <van-icon class='iconfont' name='/images/licensePlate.png' size="36rpx"></van-icon><text>{{item.licenseNumber}}</text>
                <text wx:if="{{item.status}}" class="status status{{item.status}}">{{item.statusName}}</text>
              </view>
              <view class="info">
                <text>订单编号：{{item.orderNumber?item.orderNumber:'未填写'}}</text>
              </view>
              <view class="info">
                <text decode="{{true}}">司{{str+str}}机：{{item.driverName?item.driverName:'未填写'}} {{item.driverMobile?item.driverMobile:'司机电话'}}</text>
              </view>
              <view class="time"><text>提货时间：{{item.beginTime?filters.tosubStr(item.beginTime,0,16):'提货开始时间'}} 至 {{item.endTime?filters.tosubStr(item.endTime,0,16):'提货结束时间'}}</text></view>

              <view class="bottomBtn">
                <van-button type="primary" size="small" data-id="{{item.id}}" data-tips="{{ item.id }}" catchtap="executeFun" style="margin-right: 20rpx;">执行</van-button>
                <van-button type="danger" size="small" data-id="{{item.id}}" data-tips="{{ item.id }}" catchtap="0finishFun">结束</van-button>
              </view>
            </navigator>
          </block>
          <!-- 底部加载动画 -->
          <view class='more'>
            <block wx:if="{{more}}">
              <van-loading size="24px" color="#1989fa">加载中...</van-loading>
            </block>
            <block wx:else>{{nomore}}</block>
          </view>
          <view style="height: 180rpx;"> </view>
        </block>
        <block wx:else>
          <van-empty description="未搜索到预约记录" image="/images/null1.png" />
        </block>
      </block>
    </view>
  </block>
  <block wx:else>
    <view>
      <van-empty image="/images/loginNull.png">
        <view slot="description" style="text-align: center;">
          <text style="display:block;margin-bottom: 20rpx;">您还未登录，登录后查看更多～</text>
          <van-button type="info" bindtap="toLogin">立即登录</van-button>
        </view>
      </van-empty>
    </view>
  </block>
</view>

<!-- 弹窗 -->
<van-popup show="{{ show }}" position="bottom" round closeable custom-style="width:100%;padding:0rpx 30rpx 160rpx;" bind:close="onClose">
  <view style="height: 90rpx;line-height: 90rpx;text-align: center;">起卸填报</view>
  <form bindsubmit="formSubmit">
    <view class="part">
      <view class="height20"> </view>
      <view class="height20"> </view>
      <input name="id" value='{{id}}' hidden='true' />
      <van-field label="填报数量" required name="qxnumber" value="{{ qxnumber }}" input-align="right" placeholder="请输入填报数量" ></van-field>
    </view>

    <view class="submitBtn">
      <view style="padding-top: 60rpx;">
        <van-button block round type="info" form-type="submit" color="#0396FF">确认</van-button>
      </view>
    </view>
  </form>
</van-popup>

<wxs module="filters" src="../../utils/filter.wxs"></wxs>