<template>
    <global-page title="航材详情">
        <view class="mocp-cell">
            <up-cell-group v-if="getMaterialsDetails">
                <up-cell title="件号" :value="getMaterialsDetails.pn"></up-cell>
                <up-cell title="名称" :value="getMaterialsDetails.name"></up-cell>
                <up-cell title="属性" :value="getParamNameByValue('MaterialType', getMaterialsDetails.aviationAttribute)"></up-cell>
                <up-cell title="需求数量" :value="getMaterialsDetails.quantity"></up-cell>
                <up-cell title="是否有效">
                    <template #value>
                        <global-text-status :value="getMaterialsDetails.isValid" dictkey="mocMaterial_isValid"></global-text-status>
                    </template>
                </up-cell>
                <up-cell title="备注" :value="getMaterialsDetails.remarks"></up-cell>
            </up-cell-group>
        </view>
    </global-page>
</template>

<script setup>
import { storeToRefs } from 'pinia'
import useMcoStore from 'mocp/store/mco'
import { getParamNameByValue } from 'mocp/hooks/use-params/useParams'

const mcoStore = useMcoStore()
const { getMaterialsDetails } = storeToRefs(mcoStore)
</script>
<style lang="scss" scoped>
.mocp-cell {
    background: #fff;
}
</style>
