<!--components/productCard/index.wxml-->
<view class="card">
  <view class="flex">
    <image wx:if="{{data.attinfos[0].url}}" src="{{data.attinfos[0].url}}" mode="aspectFill" />
    <view>
      <view>{{data.itemname}}</view>
      <view class="small">
        商品编号:{{data.itemno}}
      </view>
      <view class="small">
        商品型号:{{data.model}}
      </view>
      <block wx:if="{{model==1}}">
        <view wx:if="{{changeQty}}" class="small flex-align-center">
          数量:<input value="{{data.qty}}" bindinput="inputChange" placeholder="输入数量"></input>
        </view>
        <view wx:else="{{changeQty}}" class="small flex-align-center">
          数量:{{data.qty?data.qty:0}}
        </view>
      </block>
      <block wx:if="{{model==3}}">
        <view class="small">
          数量:{{data.qty?data.qty:0}}
        </view>
        <view class="small">
          处理过程:{{data.processing}}
        </view>
        <view class="small">
          处理结果:{{data.result}}
        </view>
        <view class="small">
          原因分析:{{data.reason}}
        </view>
      </block>
    </view>
  </view>
  <view wx:if="{{model!=3}}" class="deleteBtn">
    <t-icon size="36rpx" name="delete" bind:click="onIconTap" />
  </view>
  <block wx:if="{{model==2}}">
    <view class="input">
      <view class="label">数量</view>
      <input type="digit" value="{{data.qty}}" data-name='qty' bindblur='onBlur' />
    </view>
    <view class="input">
      <view class="label">处理过程</view>
      <textarea auto-height value="{{data.processing}}" data-name='processing' bindblur='onBlur' />
    </view>
    <view class="input">
      <view class="label">处理结果</view>
      <textarea auto-height value="{{data.result}}" data-name='result' bindblur='onBlur' />
    </view>
    <view class="input">
      <view class="label">原因分析</view>
      <textarea auto-height value="{{data.reason}}" data-name='reason' bindblur='onBlur' />
    </view>
  </block>
</view>