<template>
    <global-page title="工具详情">
        <view class="mocp-cell">
            <up-cell-group v-if="getToolsDetails">
                <up-cell title="件号" :value="getToolsDetails.pn"></up-cell>
                <up-cell title="名称" :value="getToolsDetails.name"></up-cell>
                <up-cell title="类型" :value="getParamNameByValue('MaterialType', getToolsDetails.aviationAttribute)"></up-cell>
                <up-cell title="需求数量" :value="getToolsDetails.quantity"></up-cell>
                <up-cell title="是否有效">
                    <template #value>
                        <global-text-status :value="getToolsDetails.isValid" dictkey="mocMaterial_isValid"></global-text-status>
                    </template>
                </up-cell>
                <up-cell title="备注" :value="getToolsDetails.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 { getToolsDetails } = storeToRefs(mcoStore)
</script>
<style lang="scss" scoped>
.mocp-cell {
    background: #fff;
}
</style>
