<template>
    <global-page title="考核记录登记">
        <view class="content">
            <view class="form">
                <uni-forms>
                    <global-form-item label="事件来源">
                        <input type="text" placeholder="请输入" />
                    </global-form-item>
                    <global-form-item label="基地/职能部门">
                        <global-picker></global-picker>
                    </global-form-item>
                    <global-form-item label="考核对象">
                        <global-picker></global-picker>
                    </global-form-item>
                    <global-form-item label="机号">
                        <global-picker></global-picker>
                    </global-form-item>
                    <global-form-item label="客户">
                        <global-picker></global-picker>
                    </global-form-item>
                    <global-form-item label="机型">
                        <global-picker></global-picker>
                    </global-form-item>
                    <global-form-item label="日期">
                        <global-picker></global-picker>
                    </global-form-item>
                    <global-form-item label="事件描述" label-position="top">
                        <textarea placeholder="请输入" />
                    </global-form-item>
                    <global-form-item label="事件类别">
                        <global-picker></global-picker>
                    </global-form-item>
                    <global-form-item label="考核类型">
                        <global-picker></global-picker>
                    </global-form-item>
                    <global-form-item label="考核依据" label-position="top">
                        <textarea placeholder="请输入" />
                    </global-form-item>
                    <global-form-item label="分值">
                        <input type="text" placeholder="请输入" />
                    </global-form-item>
                    <global-form-item label="当班人员">
                        <input type="text" placeholder="请输入" />
                    </global-form-item>
                </uni-forms>
            </view>
            <card-details type="company" edit @handleAdd="handleAdd"></card-details>
            <card-details type="quality" edit @handleAdd="handleAdd"></card-details>
            <view class="appeal">
                <view class="appeal-title">
                    <text>申诉情况</text>
                    <global-picker></global-picker>
                </view>
                <view class="appeal-content">
                    <global-upload-image></global-upload-image>
                </view>
            </view>
        </view>
        <template #bottom>
            <view class="submit-btn">
                <global-button type="primary" size="large">保存</global-button>
            </view>
        </template>
    </global-page>
</template>

<script setup>
import { ref } from 'vue'
import CardDetails from './components/card-details.vue'

const handleAdd = () => {
    uni.navigateTo({ url: 'add' })
}
</script>
<style lang="scss" scoped>
.content {
    padding-bottom: 140rpx;
    .form {
        background: #fff;
    }
    .appeal {
        margin-top: 16rpx;
        background: #fff;
        &-title {
            padding: 28rpx 32rpx;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 2rpx solid #f4f4f4;
            text {
                color: #1d2129;
            }
        }
        &-content {
            padding: 28rpx 32rpx;
        }
    }
}
.submit-btn {
    padding: 24rpx 32rpx;
    background-color: #fff;
}
</style>
