<!-- 退役军人职业教育码申请 -->
<template>
	<view class="apply-code">
		<u-form :model="form" ref="uForm" label-width="160" label-align="left">
			<u-form-item label="姓名：" prop="name">
				<u-input v-model="form.name" placeholder="请输入真实姓名"/>
			</u-form-item>
			<u-form-item label="身份证号：" prop="idNumber">
				<u-input v-model="form.idNumber" placeholder="请输入身份证号"/>
			</u-form-item>
			<u-form-item label="性别：" prop="sex">
				<u-input v-model="form.sex" placeholder="请输入您的性别"/>
			</u-form-item>
			<u-form-item label="民族：" prop="national">
				<u-input v-model="form.national" placeholder="请选择您的民族" type="select"/>
			</u-form-item>
			<u-form-item label="联系电话：" prop="phoneNumber">
				<u-input v-model="form.phoneNumber" placeholder="请输入您的联系电话" maxlength="11"/>
			</u-form-item>
			<u-form-item label="QQ：" prop="qqNumber">
				<u-input v-model="form.qqNumber" placeholder="请输入您的QQ"/>
			</u-form-item>
			<u-form-item label="微信：" prop="wxNumber">
				<u-input v-model="form.wxNumber" placeholder="请输入您的微信"/>
			</u-form-item>
			<u-form-item label="文化程度：" prop="national">
				<u-input v-model="form.national" placeholder="请选择您的文化程度" type="select"/>
			</u-form-item>
			<u-form-item label="政治面貌：" prop="national">
				<u-input v-model="form.national" placeholder="请选择您的政治面貌" type="select"/>
			</u-form-item>
			<u-form-item label="户籍地：" prop="national">
				<u-input v-model="form.national" placeholder="请选择您的户籍地" type="select"/>
			</u-form-item>
			<u-form-item label="现家庭详细地址：" label-position="top" label-width="200" label-align="left" prop="national">
				<u-input v-model="form.national" placeholder="请输入您的现家庭详细地址"/>
			</u-form-item>
			<u-form-item label="近期1寸免冠照片：" label-position="top" label-width="200" label-align="left" prop="national">
				<view class="pic">
					<u-upload
						ref="uUpload"
						action="action"
						:auto-upload="false"
						:custom-btn="true"
						:limitType="['png', 'jpg']"
					>
						<view class="pic-upload-box" slot="addBtn">
							<view class="pic-upload">
								<image src="../../static/img/upload-add.png" mode=""></image>
								<view class="font">上传照片</view>
							</view>
							<view class="tips">支持jpg.png格式</view>
						</view>
					</u-upload>
					<view class="pic-photograph" @click="photograph">
						<image src="../../static/img/paizhao.png" mode=""></image>
						<view class="font">立即拍照</view>
					</view>
				</view>
			</u-form-item>
			<u-form-item>
				<u-button type="primary" class="submit" @click="submit">提交简历</u-button>
			</u-form-item>
		</u-form>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form: {
					name: '',
					idNumber: '',
					sex: '',
					national: '',
					phoneNumber: '',
					qqNumber: '',
					wxNumber: ''
				}
			}
		},
		methods: {
			/**
			 * 拍照
			 */
			photograph() {
				uni.chooseImage({
					count: 1,
					sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
					sourceType: ['camera'], //从相册选择
					success: (res) => {
							console.log(res);
					}
				})
			},
			submit() {
				this.$u.route('/pages/applyEducationCode/applyEducationSuccess')
			}
		}
	}
</script>

<style lang="scss" scoped>
@import './applyEducationCode.scss';
</style>
