<template>
    <view class="withdrawal-record" v-for="(item, index) in withdrawApplyLists" :key="index">
        <view class="withdrawal-record-item" @click="toDetail(item.id)">
            <view class="flex">
                <view class="flex-1 withdrawal-record-item-text">提现至{{ item.type_desc }}</view>
                <view class="withdrawal-record-item-amount">+{{ item.money }}</view>
            </view>

            <view class="flex justify-between mt-[10rpx]">
                <view class="withdrawal-record-item-time"> {{ item.create_time }} </view>

                <template v-if="item.status == 1">
                    <view class="text-xs" style="color: #0cc267">{{ item.status_desc }}</view>
                </template>

                <template v-if="item.status == 2">
                    <view class="text-xs" style="color: #ff2c3c">{{ item.status_desc }}</view>
                </template>

                <template v-if="item.status == 3">
                    <view class="text-xs" style="color: #666">{{ item.status_desc }}</view>
                </template>

                <template v-if="item.status == 4">
                    <view class="text-xs" style="color: #ff2c3c">{{ item.status_desc }}</view>
                </template>
            </view>

            <template v-if="item.verify_remark != null">
                <template v-if="item.verify_remark != ''">
                    <view class="review-tips">审核提示：{{ item.verify_remark }}</view>
                </template>
            </template>
        </view>
    </view>
</template>

<script lang="ts" setup>
const props = withDefaults(
    defineProps<{
        withdrawApplyLists: any
    }>(),
    {
        withdrawApplyLists: []
    }
)

const toDetail = (id: any) => {
    uni.navigateTo({
        url: `/bundle/pages/withdrawal_details/withdrawal_details?id=${id}`
    })
}
</script>

<style lang="scss" scoped>
.withdrawal-record {
    padding-top: 10rpx;

    .withdrawal-record-item {
        background-color: #fff;
        padding: 20rpx 30rpx;
        border-bottom: 1rpx solid #ebebeb;

        .withdrawal-record-item-text {
            font-size: 30rpx;
            font-weight: 400;
        }

        .withdrawal-record-item-amount {
            font-size: 34rpx;
            font-weight: 400;
        }

        .withdrawal-record-item-time {
            font-size: 24rpx;
            font-weight: 400;
            color: #999;
            margin-top: 10rpx;
        }

        .review-tips {
            font-size: 24rpx;
            color: #ff2c3c;
            margin-top: 10rpx;
        }

        .success {
            font-size: 24rpx;
            color: #0cc267;
        }

        .fail {
            font-size: 24rpx;
            color: #ff2c3c;
        }
    }
}
</style>
