index.wxml 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!--pages/reservationPipe/index.wxml-->
  2. <view class="container listMain">
  3. <block wx:if="{{loginStatus}}">
  4. <view url="" class="addBtn" catch:tap="changeAdd" hover-class="none" catchtouchmove="buttonMove" bindtouchstart="buttonStart" bindtouchend="buttonEnd" style="top:{{buttonTop}}px;left:{{buttonLeft}}px;" wx:if="{{roleCodeList == 'driver'}}">
  5. <van-icon name="plus" size="30px" />
  6. </view>
  7. <van-sticky>
  8. <view class="topSeach">
  9. <view class="rightBox" style="position: relative;">
  10. <van-search value="{{ searchVal }}" shape="round" placeholder="查询计划单号/车牌号码" bind:change="onChange" bind:search="onSearch" bind:cancel="onCancel" use-action-slot>
  11. <view slot="label" style="width:160rpx;margin-right: 20rpx;">
  12. <van-field label="" input-align="center" style="width: 100%;">
  13. <view slot="input" style="width: 100%;">
  14. <input name="status" value='{{appointmentStatusArray[appointmentStatusIndex].dictValue}}' hidden='true' />
  15. <picker bindchange="bindPickerChange" value="{{appointmentStatusIndex}}" range="{{appointmentStatusArray}}" range-key="dictLabel" data-pickername='appointmentStatus'>
  16. <view wx:if="{{appointmentStatusArray[appointmentStatusIndex].dictLabel}}" style="font-size: 12px;white-space: nowrap;"> {{appointmentStatusArray[appointmentStatusIndex].dictLabel}}</view>
  17. <view wx:else class="selectPlaceholder" style="font-size: 12px;white-space: nowrap;">{{defaultText}}</view>
  18. </picker>
  19. </view>
  20. <view slot="right-icon">
  21. <van-icon name="arrow-down" />
  22. </view>
  23. </van-field>
  24. </view>
  25. <van-icon slot="action" class-prefix="iconfont" name="arrow3-right_fill" size="28px" color="#4B70EA" bind:tap="toSearch" />
  26. </van-search>
  27. </view>
  28. </view>
  29. </van-sticky>
  30. <view class="width710">
  31. <block wx:if="{{!requestStatu}}">
  32. <block wx:if="{{resData.length>0}}">
  33. <block wx:for="{{resData}}" wx:key="index">
  34. <navigator url="info?id={{item.id}}&planNumber={{item.planNumber}}&index={{index}}" class="listItem">
  35. <view class="title van-ellipsis">
  36. <van-icon class='iconfont' name='/images/codeNumber.png' size="36rpx"></van-icon>
  37. <text>{{item.planNumber}}</text>
  38. <text wx:if="{{item.status}}" class="status status{{item.status}}">{{item.statusName}}</text>
  39. </view>
  40. <view class="info">
  41. <text decode="{{true}}">司机:{{item.driverName?item.driverName:'未填写'}} / {{item.driverMobile?item.driverMobile:'未填写'}}</text>
  42. </view>
  43. <view class="time"><text>出入场时间:{{item.enterTime?filters.tosubStr(item.enterTime,0,16):''}} ~ {{item.leaveTime?filters.tosubStr(item.leaveTime,0,16):''}}</text></view>
  44. <view class="bottomBtn" wx:if="{{ roleCodeList == 'driver' && (item.status == '2' || item.status == '4') }}">
  45. <van-button type="info" size="small" data-url="edit?index={{index}}" catchtap="toLink" style="margin-right: 20rpx;" wx:if="{{ roleCodeList == 'driver' && (item.status == '2' || item.status == '4') }}">修改</van-button>
  46. <van-button type="danger" size="small" data-id="{{item.id}}" data-plan-number="{{item.planNumber}}" catchtap="delFun" style="margin-right: 20rpx;" wx:if="{{ roleCodeList == 'driver' && (item.status == '2' || item.status == '4') }}">删除</van-button>
  47. <van-button type="warning" size="small" data-id="{{item.id}}" data-plan-number="{{item.planNumber}}" catchtap="cancelFun" style="margin-right: 20rpx;" wx:if="{{ roleCodeList == 'driver' && item.status == '4' }}">取消</van-button>
  48. </view>
  49. </navigator>
  50. </block>
  51. <!-- 底部加载动画 -->
  52. <view class='more'>
  53. <block wx:if="{{more}}">
  54. <van-loading size="24px" color="#1989fa">加载中...</van-loading>
  55. </block>
  56. <block wx:else>{{nomore}}</block>
  57. </view>
  58. <view style="height: 200rpx;"> </view>
  59. </block>
  60. <block wx:else>
  61. <van-empty description="未搜索到预约记录" image="/images/null5.png" />
  62. </block>
  63. </block>
  64. </view>
  65. </block>
  66. <block wx:else>
  67. <view>
  68. <van-empty image="/images/loginNull.png">
  69. <view slot="description" style="text-align: center;">
  70. <text style="display:block;margin-bottom: 20rpx;">您还未登录,登录后查看更多~</text>
  71. <van-button type="info" bindtap="toLogin">立即登录</van-button>
  72. </view>
  73. </van-empty>
  74. </view>
  75. </block>
  76. </view>
  77. <wxs module="filters" src="../../utils/filter.wxs"></wxs>