<template>
  <div class="li" @click="popShow">
    <div class="top flex">
      <div class="tag">
        <!-- 取款通知 -->
        {{ $t('inform.l45') }}
      </div>
      <div class="title" v-if="item.content.status == 3">
        <!-- 您的提款申请已驳回 -->
        {{ $t('inform.l46') }}
      </div>
      <div class="title" v-if="item.content.status == 2">
        <!-- 您的提款申请已提交 -->
        {{ $t('inform.l52') }}
      </div>
      <div class="title" v-if="item.content.status == 100">
        <!-- 您的提款申请已处理，请注意查收资金。 -->
        {{ $t('inform.l47') }}
      </div>
    </div>
    <div class="row">
      <div class="label">
        <!-- 取款账户 -->
        {{ $t('inform.l48') }}
      </div>
      <div class="text">{{ $t('account.l1') }}</div>
    </div>
    <div class="row">
      <div class="label">
        <!-- 取款数量 -->
        {{ $t('inform.l49') }}
      </div>
      <div class="text">{{$numToThousand(item.content.amount)}} USD</div>
    </div>
    <div class="row" v-if="item.content.fee">
      <div class="label">
        <!-- 取款费用 -->
        {{ $t('inform.l50') }}
      </div>
      <div class="text">{{$numToThousand(item.content.fee)}} USD</div>
    </div>
    <div class="row">
      <div class="label">
        <!-- 取款状态 -->
        {{ $t('inform.l51') }}
      </div>
      <div class="text">{{ statusText[item.content.status] }}</div>
    </div>
    <van-popup get-container="body" v-model="popup" round :style="{ width: '324px' }" @close="cancel">
      <withdrawPop :item="item" @cancel="cancel"/>
    </van-popup>
  </div>
</template>
<script>
import withdrawPop from "./pop/withdrawPop.vue";
export default {
  props: ['item'],
  components: {
    withdrawPop
  },
  data () {
    return {
      popup: false,
      statusText: {
        // '1': '未支付',
        // '2': '待审核',
        // '3': '已驳回',
        // '4': '处理中',
        // '5': '已撤销',
        // '100': '已完成',
        '1': this.$t('ajax.201'),
        '2': this.$t('ajax.350'),
        '3': this.$t('ajax.408'),
        '4': this.$t('ajax.401'),
        '5': this.$t('ajax.404'),
        '100': this.$t('ajax.403'),
      },
    }
  },
  methods: {
    popShow() {
      if (this.item.content.status != 100) {
        return
      }
      this.popup = true
    },
    cancel(){
      this.popup = false
    }
  }
}
</script>
<style lang="less" scoped>
.tag {
  border: 1px solid rgba(181, 34, 229, 0.25);
  color: #B522E5;
}
</style>