<template>
  <view class="accessories_nfo_card" @tap.stop="toUrl">
    <view class="accessories_nfo_ac">
      <view class="accessories_nfo_title"> 申请单号: </view>
      <view class="accessories_nfo_info">
        <view>
          {{ item.id }}
        </view>
      </view>
      <view class="accessories_nfo_title colorts">
        {{ item.stateName }}
      </view>
    </view>
    <view class="accessories_nfo_ac">
      <view class="accessories_nfo_title"> 申请时间: </view>
      <view class="accessories_nfo_info">
        <view>
          {{ item.createTime }}
        </view>
      </view>
    </view>
    <view class="accessories_nfo_ac">
      <view class="accessories_nfo_title"> 总金额: </view>
      <view class="accessories_nfo_info">
        <view>
          {{ item.totalAmount }}
        </view>
      </view>
    </view>
    <view class="accessories_nfo_ac">
      <view class="accessories_nfo_title"> 网点: </view>
      <view class="accessories_nfo_info">
        <view> {{ item.websitName }}({{ item.websitId }}) </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    type: {
      type: String,
      default: ''
    },
    item: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {}
  },
  methods: {
    toUrl() {
      var { id, pushFlag, identity, applyCategory } = this.item
      if (this.type === 'entryStock') {
        this.$navToPage({
          url: `/packageAttachment/pages/applyReturnOfNewPiece/index?salesId=${id}&pushFlag=${
            pushFlag || ''
          }&identity=${identity}&applyCategory=${applyCategory}`
        })
      } else {
        this.$navToPage({
          url: `/packageAttachment/pages/orderOfSales/details?salesId=${id}&pushFlag=${
            pushFlag || ''
          }&identity=${identity}`
        })
      }
    }
  }
}
</script>

<style scoped lang="scss">
@import '@/static/style/accessories_nfo_card.scss';
</style>
