select.wxml 2.5 KB

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