<template>
    <!-- 质量检查一级页面 -->
    <view class="quality-inspection">
        <NavBarModal
            :navBarTitle="`质量检查`"
            :uploadRecordUrl="uploadRecordUrl"
            :showUploadRecord="addAndEditFormType == 1 ? true : false"
        />

        <view class="container">
            <AddAndEditForm :addAndEditFormType="addAndEditFormType" />
        </view>
    </view>
</template>

<script setup>
import NavBarModal from '@/components/NavBarModal/index'
import AddAndEditForm from './components/addAndEditForm.vue'
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'

const addAndEditFormType = ref(1)
const uploadRecordUrl = ref('/pages/qualityInspection/upload-record/index')

onLoad((query) => {
    if (query.type) {
        addAndEditFormType.value = query.type
    }
})
</script>

<style lang="scss" scoped>
.quality-inspection {
    height: 100%;
    padding-top: 54px;
    box-sizing: border-box;
    .container {
        background-color: #f6f9ff;
        overflow-y: auto;
    }
}
</style>
