<template>
    <global-page title="支援申请详情">
        <view class="mocp-cell">
            <up-cell-group v-if="details">
                <up-cell title="创建时间" :value="details.createTime"></up-cell>
                <up-cell title="发起人" :value="details.sponsor"></up-cell>
                <up-cell title="接收人" :value="details.recipient || '-'"></up-cell>
                <up-cell title="状态">
                    <template #value>
                        <custom-state :value="useGetDictByValue('sa_state', details.state)" :size="28"></custom-state>
                    </template>
                </up-cell>
                <up-cell title="机号" :value="details.machineNumber || '-'"></up-cell>
                <up-cell title="机型" :value="details.model || '-'"></up-cell>
                <up-cell title="相关席位" :value="details.relevantSeatsName || '-'"></up-cell>
                <up-cell title="航司" :value="useGetDictByValue('', details.aviation, { data: baseStore.getAirlineSelect }) || '-'"></up-cell>
                <up-cell title="航站" :value="details.terminal || '-'"></up-cell>
                <up-cell title="任务需求" :label="details.supportNeeds || '-'"></up-cell>
            </up-cell-group>
        </view>
    </global-page>
</template>

<script setup>
import { storeToRefs } from 'pinia'
import useSupportApplicationStore from 'mocp/store/support-application'
import { useGetDictByValue } from 'mocp/hooks/use-dict/useDict'
import useBaseStore from 'mocp/store/base'

const baseStore = useBaseStore()
const supportApplicationStore = useSupportApplicationStore()
const { details } = storeToRefs(supportApplicationStore)
</script>
<style lang="scss" scoped>
.mocp-cell {
    background: #fff;
}
</style>
