index.wxml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!--pages/device-inner/index.wxml-->
  2. <view class="sg-container">
  3. <view class="sg-top sg-fix-top">
  4. <van-search value="{{ number }}" placeholder="按设备固定资产编号模糊搜索" left-icon="none" use-action-slot use-right-icon-slot
  5. bind:change="onChange" data-name="number" bind:blur="search">
  6. <van-icon name="search" slot="right-icon" class="sg-icon sg-bold" bindtap="search" />
  7. <van-icon name="filter-o" slot="action" class="sg-icon sg-index-color sg-bold" bindtap="navigate"
  8. data-url="/pages/filter/index" />
  9. </van-search>
  10. <view class="sg-stat-list sg-pad sg-white-bg sg-flex sg-align-center sg-space-around sg-font-xs sg-gray-color">
  11. <view class="sg-item" bindtap="filterSelect" data-status=" ">
  12. <text>全部:</text><text class="sg-bold" style="color:skyblue">{{stat ? stat.free+stat.using+stat.repair+stat.scrap : 0}}</text>
  13. </view>
  14. <view class="sg-item" bindtap="filterSelect" data-status="free">
  15. <text>闲置:</text><text class="sg-bold sg-green">{{stat ? stat.free : 0}}</text>
  16. </view>
  17. <view class="sg-item" bindtap="filterSelect" data-status="using">
  18. <text>在用:</text><text class="sg-bold sg-red">{{stat ? stat.using : 0}}</text>
  19. </view>
  20. <view class="sg-item" bindtap="filterSelect" data-status="repair">
  21. <text>维修:</text><text class="sg-bold sg-yellow">{{stat ? stat.repair : 0}}</text>
  22. </view>
  23. <view class="sg-item" bindtap="filterSelect" data-status="scrap">
  24. <text>报废:</text><text class="sg-bold sg-black">{{stat ? stat.scrap : 0}}</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="sg-list">
  29. <block wx:if="{{list.length > 0}}">
  30. <inner-device-card item="{{item}}" wx:key="index" wx:for="{{list}}" action="record"></inner-device-card>
  31. </block>
  32. <block wx:else>
  33. <view class="sg-text-center sg-center sg-gray-color">没有搜索到设备</view>
  34. </block>
  35. </view>
  36. </view>