index.wxml 2.2 KB

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