<wxs src='/utils/numberFormat.wxs' module="numberFormat"></wxs>

<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>

<van-empty wx:if="{{list.length<=0}}" description="暂无数据" /> 
<view wx:for="{{list}}" data-item="{{item}}" class="main-class">
  <view class="main-foot" style="border-radius: 15rpx;">
    <view class="table">
      <view style="display:flex;">

        <view style="display: flex;justify-content: center;align-items: center;width: 12%;"  data-value="{{item.checked}}" bind:tap="onChangeFlag" data-index="{{index}}">
          <van-checkbox value="{{item.checked}}" data-index="{{index}}" checked-color="#1989FA" />
        </view>
        <view style="width: 88%;font-size: 14px;color:#1B365D;">
          <view wx:for="{{content}}" wx:for-item="col" data-item="{{col}}" wx:for-index="colIndex">
            <view wx:if="{{col.type !== 'switch' && col.type!== 'commission'}}" style="padding:10rpx;display: flex;justify-content: left;">
              <view style="width: 30%;text-align: left;">{{col.title}}</view>
              <view> {{item[col.code] ? item[col.code] : ''}}</view>
            </view>
            <view wx:if="{{col.type == 'switch'}}" style="padding:10rpx;display: flex;justify-content: left;align-items: center;">
              <view style="width: 30%;text-align: left;">{{col.title}}</view>
              <van-switch size="30rpx" custom-class='switch' data-index="{{index}}" checked="{{ item[col.code] }}" catchtap="onChangeSwitch" />
            </view>
            <view style="display: flex;padding:10rpx;" wx:if="{{col.type == 'commission'}}">
              <view style="width: 30%;">{{col.title}}</view>
              <view wx:if="{{item.checked}}">  
                <input style=" width: 120rpx; display: inline-block;vertical-align: middle;" type="digit" bindinput="inputChange" data-key="{{col.code}}" data-id="{{item[col.idKey]}}" bindblur="inputBlurChange" data-index="{{index}}" value="{{item[col.code]}}" placeholder="" />
              </view>
              <view wx:else>
                {{item[col.code]}}
              </view>
            </view>
          </view>
        </view>
      </view>
    </view>
  </view>
</view>



<van-divider wx:if="{{nomore}}" contentPosition="center" borderColor="#DCDCDC">到底了~</van-divider>
<view style="height:200rpx;width:100%"></view>

<view class="bottom-class-1">
  <view style="position:fixed;bottom:0;z-index: 10;text-align: center;width: 100%; margin-bottom: 42rpx;">
    <van-button color="#1B365D;" type="info" custom-style="width: 640rpx;height: 88rpx;" block round bindtap="btnOK">确定</van-button>
  </view>
</view>