<template>
    <hc-new-dialog widths="30rem" :show="isShow" title="新增结算支付证书" @save="addModalSave" @close="addModalClose">
        <el-form ref="formRef" class="p-2" label-position="top" :model="formModel" :rules="formRules" size="large">
            <el-form-item label="证书编号：" prop="key2">
                <el-input v-model="formModel.key2" />
            </el-form-item>
            <el-form-item label="打印日期：">
                <div class="form-item-div" />
            </el-form-item>
        </el-form>
    </hc-new-dialog>
</template>

<script setup>
import { ref, watch } from 'vue'

const props = defineProps({
    ids: {
        type: [String, Number],
        default: '',
    },
})

//事件
const emit = defineEmits(['finish', 'close'])

//双向绑定
// eslint-disable-next-line no-undef
const isShow = defineModel('modelValue', {
    default: false,
})

//监听
watch(() => [
    props.ids,
], ([ids]) => {
    console.log('ids', ids)
}, { immediate: true })

//监听
watch(isShow, (val) => {
    if (val) {
        console.log('处理数据')
    }
})

//表单数据
const formRef = ref(null)
const formModel = ref({})
const formRules = {}


const addModalSave = () => {
    emit('finish')
    addModalClose()
}

//关闭弹窗
const addModalClose = () => {
    isShow.value = false
    emit('close')
}
</script>

<style scoped lang="scss">

</style>
