select.wxml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <van-search class="search" value="{{ params.content.where.condition }}" shape="round" placeholder="{{language['关键字']||'请输入搜索关键词'}}" bind:search='startSearch' bind:clear='onClear' />
  2. <view class="total">
  3. <text wx:if="{{language['总共']}}">{{language['总共']}}:{{params.content.total}}</text>
  4. <text wx:else>共{{params.content.total}}个</text>
  5. </view>
  6. <Yl_ListBox id='ListBox' bind:getlist='getList'>
  7. <navigator class="setclient-list-item" url="#" wx:for="{{list}}" wx:key="index" data-id="{{item[idname]}}" bindtap="changeResult">
  8. <van-checkbox wx:if="{{!radio}}" value="{{ handle.isCheck(item[idname],result) }}" shape="square" icon-size='28rpx' />
  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"><text wx:if="{{language[item.brandName]||item.brandName}}">【{{language[item.brandName]||item.brandName}}】</text>{{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>{{language[item.type]||item.type}}</van-tag>
  17. <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>
  18. <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>
  19. </view>
  20. </view>
  21. </view>
  22. </navigator>
  23. <My_empty wx:if="{{!list.length}}" />
  24. </Yl_ListBox>
  25. <block wx:if="{{!radio}}">
  26. <view style="height: 130rpx;" />
  27. <view class="footer">
  28. <view class="count">
  29. {{language['已选']||'已选'}}:{{result.length}}
  30. </view>
  31. <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['确定']||'确定'}}</van-button>
  32. </view>
  33. </block>
  34. <wxs module="handle">
  35. module.exports = {
  36. getName: function (name) {
  37. return name.substring(0, 4)
  38. },
  39. isCheck: function (id, list) {
  40. return list.some(function (v) {
  41. return v == id
  42. });
  43. },
  44. }
  45. </wxs>