<van-search class="search" value="{{ content.where.condition }}" shape="round" placeholder="请输入搜索关键词" bind:search='startSearch' bind:clear='onClear' />
<My_listBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>
    <view class="total">共{{content.total}}个</view>
    <navigator class="setclient-list-item" url="#" wx:for="{{list}}" wx:key="item.sys_enterpriseid" data-id="{{item.sys_enterpriseid}}" bindtap="changeResult">
        <view class="con">
            <view class="portrait {{item.enterprisename <=2?'min-portrait':''}}">
                {{handle.getName(item.enterprisename)}}
            </view>
            <view class="mian">
                <view class="label line-1">{{item.enterprisename}}</view>
                <view class="tag-box">
                    <van-tag custom-class='tag' color='#E7EEFF' wx:if="{{item.type}}" text-color='#3874F6' round>{{item.type}}</van-tag>
                    <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>
                    <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>
                </view>
            </view>
            <view class="checkbox">
                <van-checkbox value='{{handle.isCheck(item.sys_enterpriseid,result)}}' />
            </view>
        </view>
    </navigator>
    <view style="height: 230rpx;" />
    <My_empty wx:if="{{!list.length}}" />
</My_listBox>

<view style="height: 130rpx;" />
<view class="footer">
    <view class="count">
        已选：{{result.length}}
    </view>
    <van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">确定</van-button>
</view>
<wxs module="handle">
    module.exports = {
        getName: function (name) {
            return name.substring(0, 4)
        },
        isCheck: function (id, list) {
            return list.some(function (v) {
                return v == id
            });
        },
    }
</wxs>