<!-- pages/agent/billCanUseProduct/index.vue.wxml -->
<t-pull-down-refresh value="{{baseRefresh.value}}" loadingProps="{{loadingProps}}" loadingTexts="{{loadingTexts}}" bind:refresh="onPullDownRefresh" bind:scrolltolower="onReachBottom">
  <view style="padding:10px">
    <t-search model:value="{{value}}" placeholder="{{language['关键字']||'根据商品名称搜索'}}" bind:submit="search" bind:clear="clear" shape="round" />
    <view wx:if="{{selection.length > 0}}" style="padding:10px 10px 0 10px" class="flex-align-center flex-between">
      <t-button size="small" variant="text" bind:tap="refresh">{{language['重置']||'重 置'}}</t-button>
      <t-button theme="primary" size="small" variant="text" bind:tap="onConfirm">
        {{language['添加']||'添加选中的商品'}}
      </t-button>
    </view>
    <t-checkbox-group value="{{selection}}" bind:change="handleGroupChange">
      <t-cell wx:for="{{list}}" wx:key="itemid" title="{{item.itemname}}">
        <view class="avatar" slot="left-icon">
          <image src="{{item.attinfos[0].url}}" style="width: 60px;height: 60px;" mode="aspectFill" />
        </view>
        <view slot="description">
          <view class="small">{{language['商品编号']||'商品编号'}}:{{item.itemno}}</view>
          <view class="small">
            {{language['商品型号']||'商品型号'}}:{{language[item.model]||item.model}}
          </view>
          <block wx:if="{{siteid=='HY'}}">
            <view class="small">{{language['公称通径']||'公称通径'}}:{{item.caliber||' --'}}</view>
            <view class="small">
              {{language['公称压力']||'公称压力'}}:{{join.formatting(item.nominalpressure)}}
            </view>
          </block>
        </view>
        <view class="avatar" slot="right-icon">
          <t-checkbox value="{{item.itemid}}" />
        </view>
      </t-cell>
    </t-checkbox-group>
  </view>
</t-pull-down-refresh>

<wxs src="../../../utils/nominalpressure.wxs" module="join"></wxs>