select.wxml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <van-tabs bindchange="tabChange" color='var(--assist)' custom-class='custom-class'>
  2. <van-tab title="客户" />
  3. <van-tab title="经销商" />
  4. </van-tabs>
  5. <van-search class="search" value="{{ params.content.where.condition }}" shape="round" placeholder="请输入搜索关键词" bind:search='startSearch' bind:clear='onClear' />
  6. <Yl_ListBox id='ListBox' bind:getlist='getList'>
  7. <view class="total">共{{params.content.total}}个</view>
  8. <navigator class="setclient-list-item" url="#" wx:for="{{list}}" wx:key="index" data-id="{{item[idname]}}" bindtap="changeResult">
  9. <van-checkbox wx:if="{{!radio}}" value="{{ handle.isCheck(item[idname],result) }}" shape="square" icon-size='28rpx' />
  10. <view class="con">
  11. <view class="portrait {{item.enterprisename <=2?'min-portrait':''}}">
  12. {{handle.getName(item.enterprisename)}}
  13. </view>
  14. <view class="mian">
  15. <view class="label line-1">{{item.enterprisename}}</view>
  16. <view class="tag-box">
  17. <van-tag custom-class='tag' wx:if="{{item.type}}" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{item.type}}</van-tag>
  18. <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{tag}}</van-tag>
  19. <van-tag custom-class='tag' wx:for="{{item.tags.datatag}}" wx:key="index" wx:for-item='tag' color='#FAAB16' text-color='#fff' round>{{tag}}</van-tag>
  20. </view>
  21. </view>
  22. </view>
  23. </navigator>
  24. <view style="height: 230rpx;" />
  25. <My_empty wx:if="{{!list.length}}" />
  26. </Yl_ListBox>
  27. <block wx:if="{{!radio}}">
  28. <view style="height: 130rpx;" />
  29. <view class="footer">
  30. <view class="count">
  31. 已选:{{result.length}}
  32. </view>
  33. <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">确定</van-button>
  34. </view>
  35. </block>
  36. <wxs module="handle">
  37. module.exports = {
  38. getName: function (name) {
  39. return name.substring(0, 4)
  40. },
  41. isCheck: function (id, list) {
  42. return list.some(function (v) {
  43. return v == id
  44. });
  45. },
  46. }
  47. </wxs>