index.wxml 1.5 KB

12345678910111213141516171819202122232425262728293031
  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 bind:change="onChange" data-name="number">
  5. <van-icon name="search" slot="right-icon" class="sg-icon sg-bold" bindtap="search"/>
  6. <van-icon name="filter-o" slot="action" class="sg-icon sg-index-color sg-bold" bindtap="navigate" data-url="/pages/filter/index"/>
  7. </van-search>
  8. <view class="sg-stat-list sg-pad sg-white-bg sg-flex sg-align-center sg-space-around sg-font-xs sg-gray-color">
  9. <view class="sg-item">
  10. <text>闲置:</text><text class="sg-bold sg-green">{{stat ? stat.free : 0}}</text>
  11. </view>
  12. <view class="sg-item">
  13. <text>在用:</text><text class="sg-bold sg-red">{{stat ? stat.using : 0}}</text>
  14. </view>
  15. <view class="sg-item">
  16. <text>维修:</text><text class="sg-bold sg-yellow">{{stat ? stat.repair : 0}}</text>
  17. </view>
  18. <view class="sg-item">
  19. <text>报废:</text><text class="sg-bold sg-black">{{stat ? stat.scrap : 0}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="sg-list">
  24. <block wx:if="{{list.length > 0}}">
  25. <inner-device-card item="{{item}}" wx:key="index" wx:for="{{list}}" action="record"></inner-device-card>
  26. </block>
  27. <block wx:else>
  28. <view class="sg-text-center sg-center sg-gray-color">没有搜索到设备</view>
  29. </block>
  30. </view>
  31. </view>