<navigator url="#" wx:for="{{list}}" wx:key="itemid" class="item-box">
    <view class="top" bindtap="changeResults" data-item="{{item}}">
        <view class="image">
            <van-image width="100%" height="100%" fit="cover" src="{{item.attinfos[0].subfiles[0].url||item.attinfos[0].url||item.cover}}" use-loading-slot use-error-slot lazy-load>
                <van-loading slot="loading" type="spinner" size="20" vertical />
                <text slot="error">加载失败</text>
            </van-image>
        </view>
        <view class="content">
            <view class="title">
                <text class="line-1">{{item.itemname}}</text>
                <text class="iconfont icon-guanlian-shanchu" catchtap="deteleItem" data-item="{{item}}" />
            </view>
            <view class="exp">编号：{{item.itemno}}</view>
            <view class="exp">规格：{{item.spec}}</view>
            <view class="exp">型号：{{item.model}}</view>
            <view class="exp">品牌：{{item.brandname}}</view>
            <view class="exp">领域：{{item.tradefield_shoppingcart}}</view>
            <view class="exp"><text style="font-size: 24rpx;font-weight: 600;color: #FF3B30;">{{item.showPrice}}</text></view><!-- /<text style="font-size: 20rpx;">￥{{item.oldprice}}</text> -->
        </view>
    </view>
    <view class="bottom">
        <view class="check" bindtap="changeResults" data-item="{{item}}">
            <van-checkbox shape='square' disabled="{{sa_brandid && sa_brandid!=item.sa_brandid}}" icon-size='24rpx' label-class='label-class' value="{{ decide.checked(item.sa_shoppingcartid,results) }}" bind:change="onChange">
                起订量:{{item.orderminqty}}，增减量:{{item.orderaddqty}}
            </van-checkbox>
        </view>
        <van-stepper value="{{ item.qty }}" min="{{item.orderminqty}}" step="{{item.orderaddqty}}" input-class='input-class' data-index="{{index}}" bind:minus='stepperChange' bind:plus='stepperChange' bind:blur='inputBlur' />
    </view>
</navigator>
<Yl_Empty wx:if="{{list.length === 0}}" />
<!-- 底部 -->
<view style="height: 130rpx;" />
<view class="footer">
    <view class="left">
        <view class="sum">
            <van-checkbox icon-class='icon-class' icon-size="26rpx" shape='square' value="{{ isAll }}" bind:change="setIsAll">全选 合计:</van-checkbox><text>{{sum}}</text>
        </view>
        <view class="transport">
            {{logistics}}
        </view>
    </view>
    <picker wx:if="{{classList.length>=2}}" range='{{classList}}' range-key='name' disabled='{{!results.length}}' bindchange="submit">
        <van-button custom-class='but' disabled='{{!results.length}}' bind:click="clickBut">生成订单</van-button>
    </picker>
    <van-button wx:else custom-class='but' disabled='{{!results.length}}' bind:click="clickBut">生成订单</van-button>
</view>
<wxs module="decide">
    module.exports = {
        checked: function (id, list) {
            return list.some(function (v) {
                return v == id
            });
        }
    }
</wxs>
<wxs module="gap">
    module.exports.price = function (figure, defaultamount) {
        return (figure - defaultamount).toFixed(2)
    }
</wxs>