index.wxml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <van-tabs active="{{ active }}" bind:change="onChange" title-active-color='var(--assist)' color='var(--assist)'>
  2. <van-tab title="关联客户" />
  3. <van-tab title="我的客户" />
  4. </van-tabs>
  5. <van-search class="search" value="{{ content.where.condition }}" shape="round" placeholder="请输入搜索关键词" bind:search='startSearch' bind:clear='onClear' />
  6. <My_listBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>
  7. <view class="total">共{{content.total}}个</view>
  8. <navigator class="setclient-list-item" url="#" wx:for="{{list}}" wx:key="item.sys_enterpriseid" data-id="{{item.sys_enterpriseid}}" bindtap="changeResult">
  9. <view class="con">
  10. <view class="portrait {{item.enterprisename <=2?'min-portrait':''}}">
  11. {{handle.getName(item.enterprisename)}}
  12. </view>
  13. <view class="mian">
  14. <view class="label line-1">{{item.enterprisename}}</view>
  15. <view class="tag-box">
  16. <van-tag custom-class='tag' wx:if="{{item.type}}" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{item.type}}</van-tag>
  17. <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{tag}}</van-tag>
  18. <van-tag custom-class='tag' wx:for="{{item.tags.datatag}}" wx:for-item='tag' color='#FAAB16' text-color='#fff' round>{{tag}}</van-tag>
  19. </view>
  20. </view>
  21. <view class="checkbox" wx:if="{{!radio}}">
  22. <van-checkbox value='{{handle.isCheck(item.sys_enterpriseid,result)}}' />
  23. </view>
  24. </view>
  25. </navigator>
  26. <view style="height: 230rpx;" />
  27. <My_empty wx:if="{{!list.length}}" />
  28. </My_listBox>
  29. <block wx:if="{{!radio}}">
  30. <view style="height: 130rpx;" />
  31. <view class="footer">
  32. <view class="count">
  33. 已选:{{result.length}}
  34. </view>
  35. <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">确定</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>