index.wxml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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="{{ content.where.condition }}" shape="round" placeholder="请输入搜索关键词" bind:search='startSearch' bind:clear='onClear' />
  6. <Yl_ListBox id='ListBox' bind:getlist='getList'>
  7. <view class="total">共{{content.total}}个</view>
  8. <navigator class="setclient-list-item" url="#" wx:for="{{list}}" wx:key="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' color='#E7EEFF' wx:if="{{item.type}}" text-color='#3874F6' round>{{item.type}}</van-tag>
  17. <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:for-item='tag' wx:key="index" color='#E7EEFF' text-color='#3874F6' round>{{tag}}</van-tag>
  18. <van-tag custom-class='tag' wx:for="{{item.tags.datatag}}" wx:for-item='tag' wx:key="index" color='#FFEFD9' text-color='#FA8C16' round>{{tag}}</van-tag>
  19. </view>
  20. </view>
  21. <view class="checkbox">
  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. </Yl_ListBox>
  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. <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>