<template>
  <div>
    <Des :list="desList" />
  </div>

</template>

<script lang="ts">
import { defineComponent, PropType, watchEffect } from 'vue';
import { formatValue } from '@/common/methods';
import { Des, handleDesList } from '@/common/components/commonDes';
import { QhjAccountOutInApply } from '@/services/go/ermcp/qhj/interface';

export default defineComponent({
    name: 'custom-detail-desc',
    components: { Des },
    props: {
        selectedRow: {
            type: Object as PropType<QhjAccountOutInApply>,
            default: {},
        },
    },
    setup(props) {
        const { desList, getDesList } = handleDesList();
        // 预览附件

        watchEffect(() => {
            if (props.selectedRow.exchticket) {
                const data = props.selectedRow;
                const list = [
                    { label: '账号', value: formatValue(data.accountcode) },
                    { label: '名称', value: formatValue(data.accountname) },
                    { label: '账户类型', value: data.userinfotype === 1 ? '个人' : '企业' },
                    { label: '提现金额', value: formatValue(data.amount) },
                    { label: '提现银行', value: formatValue(data.bankaccountname) },
                    { label: '银行卡号', value: formatValue(data.bankaccountno) },
                    { label: '支行名称', value: formatValue(data.branchbankname) },
                    { label: '姓名', value: formatValue(data.bankaccountname) },
                    { label: '申请时间', value: formatValue(data.updatetime) },
                ];
                getDesList(list);
            }
        });
        return {
            desList,
        };
    },
});
</script>

<style lang="less">
.custom-detail {
    .ant-form.inlineForm {
        margin-top: 20px;
    }
    .upload {
        .look {
            margin-left: 0;
        }
    }
}
</style>;
