index.wxml 2.4 KB

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