<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>
          {{ info.salesId }}
        </view>
      </view>
      <view class="accessories_nfo_title colorts">
        {{ item.flagName }}
      </view>
    </view>
    <view class="accessories_nfo_ac">
      <view class="accessories_nfo_title"> 配件编号: </view>
      <view class="accessories_nfo_info">
        <view>
          {{ info.partsNumber }}
        </view>
      </view>
    </view>
    <view class="accessories_nfo_ac">
      <view class="accessories_nfo_title"> 配件名称: </view>
      <view class="accessories_nfo_info">
        <view>
          {{ info.partsName }}
        </view>
      </view>
    </view>
    <view class="accessories_nfo_ac">
      <view class="accessories_nfo_title"> 配件数量: </view>
      <view class="accessories_nfo_info">
        <view>
          {{ info.qty }}
        </view>
      </view>
    </view>
    <view class="accessories_nfo_ac">
      <view class="accessories_nfo_title"> 网点: </view>
      <view class="accessories_nfo_info">
        <view> {{ item.receiveWebsitName }}({{ item.receiveWebsitId }}) </view>
      </view>
    </view>
    <view class="accessories_nfo_ac">
      <view class="accessories_nfo_title"> 备注: </view>
      <view class="accessories_nfo_info">
        <view>
          {{ item.remark }}
        </view>
      </view>
    </view>
    <view class="accessories_nfo_ac" v-if="item.expireDay">
      <view class="accessories_nfo_title"> 提示: </view>
      <view class="accessories_nfo_info">
        <view> {{ item.expireDay }}日内需返还 </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    item: {
      type: Object,
      default: () => ({})
    }
  },
  computed: {
    info() {
      return this.item?.newRefundManageItemBeanList?.[0] || {}
    }
  },
  methods: {
    toUrl() {
      this.$navToPage({
        url: `/packageAttachment/pages/returnOfNewParts/details?applyNo=${this.item.applyNo}`
      })
    }
  }
}
</script>

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