<template>
	<a-c-form :createForm="createForm">
		<a-form-item required label="是否至今" name="是否至今">
			<a-radio-group v-model:value="createForm.end_today" button-style="solid">
				<a-radio-button value="1">非至今</a-radio-button>
				<a-radio-button value="2">至今</a-radio-button>
			</a-radio-group>
		</a-form-item>
		<a-form-item label="公司名称" name="company_name">
			<a-input v-model:value="createForm.company_name" placeholder="请输入公司名称" />
		</a-form-item>
		<a-form-item required label="职位" name="position">
			<a-input v-model:value="createForm.position" placeholder="请输入职位" />
		</a-form-item>
		<a-form-item label="离职原因" name="reason_for_leaving">
			<a-input v-model:value="createForm.reason_for_leaving" placeholder="请输入离职原因" />
		</a-form-item>
		
		<a-form-item :wrapper-col="{ span: 14, offset: 4 }">
			<a-button type="primary" @click="onSubmit">保存</a-button>
			<a-button style="margin-left: 10px">重置</a-button>
		</a-form-item>
	</a-c-form>
</template>

<script lang="ts" setup>
	import { ref, onMounted, watch, computed } from 'vue';
	let createForm = ref({
		  start_year: 0,
		      start_month: 0,
		      end_year: 0,
		      end_month: 0,
		      end_today: 0,
		      company_name: '',
		      position: '',
		      reason_for_leaving: ''
	})
	
	const resetForm = () => {
		createForm.value = {
			  start_year: 0,
			      start_month: 0,
			      end_year: 0,
			      end_month: 0,
			      end_today: 0,
			      company_name: '',
			      position: '',
			      reason_for_leaving: ''
		}
	}
</script>

<style>
</style>