<template>
    <div class="recycle-order-number">
        <div class="common-text">
            <el-text>建单：</el-text>
            <el-text>{{ row.createTime }}</el-text>
        </div>
        <div class="common-text">
            <el-text>提交：</el-text>
            <el-text>{{ row.orderTime || '-' }}</el-text>
        </div>
        <div class="common-text">
            <el-text>预约：</el-text>
            <el-text>{{ formatTime }}</el-text>
        </div>
    </div>
</template>

<script setup>
    const props = defineProps({
        row: {
            type: Object,
            default: () => {}
        }
    });

    const formatTime = computed(() => {
        if (!props.row.schedulePickupStartTime) return '-';
        let endTime = props.row.schedulePickupEndTime?.split(' ')[1] || '';
        return props.row.schedulePickupStartTime + '-' + endTime;
    });
</script>
