<!-- packageH/stock/details/details.wxml -->
<view class="inventory-details">
  <navigator url="{{ '/packageA/detail_v2/detail_v2?id='+goods.id }}" open-type="navigate">
    <goods-item data="{{ goods }}" />
  </navigator>
  <view class="details">
    <view class="details-title">库存明细</view>
    <view class="detail-list">
      <view class="detail-item" wx:for="{{ details }}" wx:for-item="detailItem" wx:key="id">
        <block wx:if="{{ detailItem.type == 3 }}">
          <view class="detail-date">{{ detailItem.created_at }}</view>
          <view class="detail-title">修改库存为{{ detailItem.stock }}</view>
        </block>
        <block wx:else>
          <view class="detail-date">{{ detailItem.created_at }}</view>
          <view class="detail-title">{{ detailItem.type===1?'出货':'进货' }}</view>
          <view class="detail-title">{{ detailItem.type===1?'出货数量:':'进货数量:' }}
            <text style="color: red;">{{ detailItem.type===1?'-':'+' }}{{detailItem.goods_total}}</text>
          </view>
          <view class="detail-title">
            {{ detailItem.type===1?'出货价格:':'进货价格:' }}
            <text style="color: red;">{{detailItem.price}}</text>
          </view>
        </block>
        
      </view>
    </view>
  </view>
</view>