<template>
    <el-dialog title="新增任务" append-to-body :modelValue="openShow" width="40%" @close="closeDialog">

        <el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="auto">
            <el-row :gutter="24">
                <el-col :span="12">
                    <el-form-item label="零件号:" prop="partCode">
                        <el-select v-model="ruleForm.partCode" placeholder="请输入">
                            <el-option label="零件号1" value="1" />
                            <el-option label="零件号2" value="2" />
                            <el-option label="零件号3" value="3" />
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="任务类型:" prop="outTypeTitle">
                        维护任务
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="工艺版本号:" prop="PDMbanben">
                        <el-select v-model="ruleForm.PDMbanben" placeholder="请输入">
                            <el-option label="版本号1" value="1" />
                            <el-option label="版本号2" value="2" />
                            <el-option label="版本号3" value="3" />
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="工艺员:" prop="proMan">
                        <el-select v-model="ruleForm.proMan" placeholder="请输入">
                            <el-option label="工艺员1" value="1" />
                            <el-option label="工艺员2" value="2" />
                            <el-option label="工艺员3" value="3" />
                        </el-select>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="备注:" prop="mome">
                        <el-input v-model="ruleForm.mome" :rows="3" type="textarea"
                            placeholder="请输入" />
                    </el-form-item>
                </el-col>
            </el-row>

        </el-form>
        <template #footer>
            <span class="dialog-footer">
                <el-button @click="closeDialog">取 消</el-button>
                <el-button type="primary" @click="submit">确 定</el-button>
            </span>
        </template>
    </el-dialog>
</template>
<script>
export default {
    props: {
        showDialog: {
            type: Boolean,
            default: false
        },
    },
    data() {
        return {
            openShow: false,
            ruleForm: {
                partCode: '',

            },
            rules: {
                partCode: [
                    { required: true, message: '请选择', trigger: 'blur' },
                ],
                outTypeTitle: [
                    { required: true, message: '请输入', trigger: 'blur' },
                ],
                PDMbanben: [
                    { required: true, message: '请选择', trigger: 'blur' },
                ],
                proMan: [
                    { required: true, message: '请选择', trigger: 'blur' },
                ],

            },

        }
    },
    mounted() {
        this.openShow = this.showDialog
    },
    methods: {
        closeDialog() {
            this.openShow = false
            this.$emit('closeDialog');
        }
    }
}
</script>
<style lang="scss" scoped></style>