index.wxml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!--pages/add-inner-device/index.wxml-->
  2. <view class="sg-container">
  3. <view class="sg-search-box sg-fix-top">
  4. <view class="sg-search-box sg-flex sg-align-center">
  5. <van-dropdown-menu active-color="#5992fd">
  6. <van-dropdown-item value="{{ name }}" options="{{ names }}" bind:change="onChange"/>
  7. </van-dropdown-menu>
  8. <van-search value="{{ number }}" placeholder="请输入规格型号模糊查询" class="sg-flex-grow" bind:change="onsearch" data-name="number"
  9. left-icon="false" bind:search="search" use-right-icon-slot>
  10. <van-icon name="search" bind:tap="search" class="sg-index-color sg-icon" slot="right-icon"></van-icon>
  11. </van-search>
  12. </view>
  13. </view>
  14. <view class="sg-list sg-pad">
  15. <inner-device-card wx:for="{{list}}" wx:key="index" index="{{index}}" item="{{item}}" showChecked="{{true}}"
  16. bind:checked="switchSelect"></inner-device-card>
  17. </view>
  18. <van-dialog show="{{ showAdded }}" use-slot title="已添加设备" confirm-button-color="#5693FC" show-cancel-button
  19. bind:confirm="switchShowAdded" z-index="200" data-show="{{false}}" bind:cancel="cancel">
  20. <view class="sg-added-list">
  21. <view class="sg-item sg-pad sg-bottom-border sg-flex sg-align-center sg-space-between" wx:for="{{add_devices}}"
  22. wx:key="index">
  23. <view class="sg-left">
  24. <view class="sg-name sg-font-small">{{item.inner_name ? item.inner_name + ' - ' : ''}}{{item.spec_name}}
  25. </view>
  26. <view class="sg-dates sg-font-xs sg-gray-color">
  27. {{item.start_date ? item.start_date + '至' + item.end_date : ''}}</view>
  28. </view>
  29. <view class="sg-right sg-white sg-pad-sm"
  30. style="text-align:center;background-color: #737477;color:#fff;border-radius: 20rpx;font-size:24rpx;width:80rpx"
  31. bindtap="deleteDevice" data-index="{{index}}">删除</view>
  32. </view>
  33. </view>
  34. </van-dialog>
  35. <van-calendar show="{{ showDate }}" bind:close="switchShowDate" bind:confirm="confirmDate" data-show="{{false}}"
  36. type="range" class="sg-calendar" default-date="{{default_dates}}" color="#5992fd" />
  37. <view class="sg-submit-box sg-fix-bottom sg-flex sg-align-center sg-center">
  38. <!-- <view class="sg-action sg-pad sg-white-bg" bindtap="switchShowAdded" data-show="{{true}}">已添加({{add_devices.length}})</view> -->
  39. <!-- <view class="sg-action sg-draft sg-pad sg-border-right sg-green-bg sg-white" bindtap="complete">完成</view> -->
  40. <view class="sg-action sg-draft sg-pad sg-border-right sg-index-bg sg-white" style="width:100%"
  41. bindtap="switchShowDate" data-show="{{true}}" data-type='draft'>立即添加</view>
  42. </view>
  43. </view>