You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

303 lines
14 KiB

2 years ago
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>报名申请表</title>
<link rel="stylesheet" href="../component/pear/css/pear.css" />
2 years ago
2 years ago
</head>
2 years ago
<body class="pear-container layui-form" style="display: flex;justify-content: center;align-items: center;">
2 years ago
<!-- <h1 class="title" style="text-align: center;margin-top: 10px;" id="title"></h1> -->
2 years ago
2 years ago
<!-- <div class="layui-card"
style="width: 700px;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);-webkit-transform: translate(-50%, -50%);-moz-transform: translate(-50%, -50%); "> -->
<div class="layui-card" style="width: 700px">
2 years ago
<h1 class="title" style="text-align: center;margin: 15px 0 10px 0;" id="title"></h1>
2 years ago
2 years ago
<div class="layui-card-body">
<div style="margin: 5px 0 25px 0">
2 years ago
<label class="layui-form-label" style="width: 85px;">
<font color="red" style="font-weight: bold;">*</font> 姓名:
</label>
2 years ago
<div class="layui-input-block" style="margin-right: 8px;">
2 years ago
<input type="text" autocomplete="off" lay-verify="required" name="name" placeholder="请输入姓名"
2 years ago
class="layui-input" style="width: 500px;">
</div>
</div>
<div style="margin: 5px 0 25px 0">
2 years ago
<label class="layui-form-label" style="width: 85px;">
<font color="red" style="font-weight: bold;">*</font> 性别:
</label>
2 years ago
<div class="layui-input-block" style="margin-right: 8px;">
2 years ago
<input type="radio" name="xb" value="男" title="男" checked>
<input type="radio" name="xb" value="女" title="女">
2 years ago
</div>
</div>
<div style="margin: 5px 0 25px 0">
2 years ago
<label class="layui-form-label" style="width: 85px;">
<font color="red" style="font-weight: bold;">*</font> 身份证号:
</label>
2 years ago
<div class="layui-input-block" style="margin-right: 8px;">
2 years ago
<input type="text" autocomplete="off" lay-verify="required|identity" lay-filter="idcard" id="idcard"
2 years ago
name="sfzh" placeholder="请输入身份证号" class="layui-input" style="width: 500px;">
2 years ago
</div>
</div>
2 years ago
<div style="margin: 5px 0 25px 0">
<label class="layui-form-label" style="width: 85px;">报名学段:</label>
<div class="layui-input-block" style="margin-right: 8px;">
2 years ago
<button type="button" class="layui-btn layui-btn-radius" id="stageTag"
style="font-weight: bold;">输入身份证号后自动识别</button>
2 years ago
</div>
</div>
2 years ago
<div style="margin: 5px 0 25px 0">
2 years ago
<label class="layui-form-label" style="width: 85px;">
<font color="red" style="font-weight: bold;">*</font> 家庭住址:
</label>
2 years ago
<div class="layui-input-block" style="margin-right: 8px;">
2 years ago
<input type="text" autocomplete="off" lay-verify="required" name="address" placeholder="请输入家庭住址"
2 years ago
class="layui-input" style="width: 500px;">
</div>
</div>
<div style="margin: 5px 0 25px 0">
2 years ago
<label class="layui-form-label" style="width: 85px;">
<font color="red" style="font-weight: bold;">*</font> 父亲姓名:
</label>
2 years ago
<div class="layui-input-block" style="margin-right: 8px;">
2 years ago
<input type="text" autocomplete="off" lay-verify="required" name="father_name" placeholder="请输入父亲姓名"
2 years ago
class="layui-input" style="width: 500px;">
</div>
</div>
<div style="margin: 5px 0 25px 0">
2 years ago
<label class="layui-form-label" style="width: 85px;">
<font color="red" style="font-weight: bold;">*</font> 母亲姓名:
</label>
2 years ago
<div class="layui-input-block" style="margin-right: 8px;">
2 years ago
<input type="text" autocomplete="off" lay-verify="required" name="mother_name" placeholder="请输入母亲姓名"
2 years ago
class="layui-input" style="width: 500px;">
</div>
</div>
<div style="margin: 5px 0 25px 0">
2 years ago
<label class="layui-form-label" style="width: 85px;">
<font color="red" style="font-weight: bold;">*</font> 联系电话:
</label>
2 years ago
<div class="layui-input-block" style="margin-right: 8px;">
2 years ago
<input type="text" autocomplete="off" lay-verify="required|phone" name="tel" placeholder="请输入联系电话"
class="layui-input" style="width: 500px;">
2 years ago
</div>
</div>
<div style="margin: 5px 0 25px 0">
2 years ago
<label class="layui-form-label" style="width: 85px;">
<font color="red" style="font-weight: bold;">*</font> 户口本照片(幼儿页)
</label>
2 years ago
<div class="layui-input-block" style="margin-right: 8px;">
<div class="layui-upload-drag" id="uploadImg">
<i class="layui-icon"></i>
<p>点击上传,或将文件拖拽到此处</p>
2 years ago
<p>文件小于20MB可用扩展名: jpg</p>
2 years ago
<div class="layui-hide" id="uploadView">
<hr>
<img src="" alt="上传成功后渲染" style="max-width: 196px">
</div>
2 years ago
2 years ago
</div>
2 years ago
2 years ago
</div>
</div>
<div class="action">
2 years ago
<div class="layui-inline" style="margin-left: 20px;">
<button type="submit" class="layui-btn" lay-submit="" lay-filter="save-apply">立即提交</button>
</div>
<div class="layui-inline">
<input type="text" name="vcode" hover placeholder="验证码" autocomplete="off" class="layui-input"
style="width: 80px;">
</div>
<div class="layui-inline">
<img id="userCaptchaImage" src="/FengHuang/yp/getYzm" title="点击图片刷新校验码" alt="点击图片刷新校验码"
style="cursor:pointer" onclick="javascript:refreshCaptcha()" />
</div>
2 years ago
2 years ago
</div>
2 years ago
<hr style="margin-top: 30px;">
2 years ago
<div style="margin-top: 20px; text-align:center;">教育部数字化学习支撑技术工程研究中心 &nbsp;&nbsp; 东北师大理想软件股份有限公司<br><a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=22010202000105" style="color: #9baec7;"><img src="./batb.png" alt="备案图标" style="margin-top:-2px;">&nbsp;吉公网安备 22010202000105号</a>&nbsp;&nbsp;<a target="_blank" href="https://beian.miit.gov.cn" style="color: #9baec7;">吉ICP备13001399号-2</a>&nbsp;&nbsp;增值电信业务经营许可证 吉B2-20150068</div>
2 years ago
</div>
</div>
2 years ago
2 years ago
<script src="../component/layui/layui.js"></script>
<script src="../component/pear/pear.js"></script>
<script>
layui.use(['upload', 'element', 'form', 'layer'], function () {
var form = layui.form
, $ = layui.jquery
, upload = layui.upload
, element = layui.element
, layer = layui.layer;
2 years ago
//学段
var stageId = 0;
//上传户口本照片ID
var imgId = "0";
//task_id
var taskId = 0;
//获取当前task_id
$.ajax({
type: "GET",
dataType: "json",
url: "/FengHuang/yp/getCurrentTaskInfo",
success: function (res) {
2 years ago
if (res.task_id > 0) {
taskId = res.task_id;
$("#title").html(res.task_name);
} else {
window.location = "./error.html";
}
2 years ago
}
});
2 years ago
//拖拽上传
upload.render({
2 years ago
elem: "#uploadImg"
2 years ago
, size: 20480
, exts: 'jpg'
2 years ago
, url: "/FengHuang/yp/uploadPic"
2 years ago
, done: function (res) {
2 years ago
layer.msg("上传成功!", {
icon: 1,
time: 1500
});
imgId = res.uuid;
layui.$('#uploadView').removeClass('layui-hide').find('img').attr('src', res.base64);
2 years ago
}
});
2 years ago
//提交
2 years ago
form.on('submit(save-apply)', function (data) {
2 years ago
if (stageId > 0) {
var fields = data.field;
2 years ago
2 years ago
if (imgId == "0") {
layer.msg("请上传户口本照片(幼儿页)", {
icon: 2,
time: 2500
});
return;
}
2 years ago
layer.confirm('您确定提交吗?提交后将无法进行修改,请确保所提交的内容准确无误!', {
icon: 3,
title: '提示'
}, function (index) {
$.ajax({
type: "POST",
url: "/FengHuang/yp/save",
data: { "code": fields.vcode, "task_id": taskId, "name": fields.name, "xb": fields.xb, "sfzh": fields.sfzh, "bx_id": stageId, "address": fields.address, "father_name": fields.father_name, "mother_name": fields.mother_name, "tel": fields.tel, "uuid": imgId },
success: function (data) {
if (data.success) {
window.location = "./success.html";
} else {
layer.msg(data.message, {
icon: 2,
time: 3000
});
}
2 years ago
}
2 years ago
});
2 years ago
});
2 years ago
}
2 years ago
else {
if (stageId == -1) {
layer.msg("身份证输入有误,请重新输入!", {
icon: 2,
time: 2500
});
2 years ago
} else if (stageId == -2) {
2 years ago
layer.msg("年龄不符合本次报名范围!", {
icon: 2,
time: 2500
});
2 years ago
} else {
layer.msg("报名学段的名额已满!", {
icon: 2,
time: 2500
});
2 years ago
}
return;
}
2 years ago
});
$('#idcard').blur(function () {
2 years ago
if (stageId > 0) {
2 years ago
$.ajax({
type: "GET",
dataType: "json",
2 years ago
url: "/FengHuang/yp/evalBx?sfzh=" + $('#idcard').val() + "&task_id=" + taskId,
2 years ago
success: function (res) {
if (res.bx_id > 0) {
$("#stageTag").html(res.bx_name);
stageId = res.bx_id;
}
else {
2 years ago
stageId = res.bx_id;
if (stageId == -1) {
$("#stageTag").html("身份证输入有误,请重新输入!");
2 years ago
} else if (stageId == -2) {
2 years ago
$("#stageTag").html("年龄不符合本次报名范围!");
2 years ago
} else {
$("#stageTag").html("报名学段的名额已满!");
2 years ago
}
2 years ago
}
}
});
}
2 years ago
});
2 years ago
$('#idcard').bind('input propertychange', function () {
if ($(this).val().length == 18) {
$.ajax({
type: "GET",
dataType: "json",
2 years ago
url: "/FengHuang/yp/evalBx?sfzh=" + $(this).val() + "&task_id=" + taskId,
2 years ago
success: function (res) {
if (res.bx_id > 0) {
$("#stageTag").html(res.bx_name);
stageId = res.bx_id;
}
else {
2 years ago
stageId = res.bx_id;
if (stageId == -1) {
$("#stageTag").html("身份证输入有误,请重新输入!");
2 years ago
} else if (stageId == -2) {
2 years ago
$("#stageTag").html("年龄不符合本次报名范围!");
2 years ago
} else {
$("#stageTag").html("报名学段的名额已满!");
2 years ago
}
2 years ago
}
}
});
}
if ($(this).val().length == 0) {
2 years ago
stageId = 0;
2 years ago
$("#stageTag").html("输入身份证号后自动识别");
}
});
2 years ago
//刷新验证码
2 years ago
window.refreshCaptcha = function () {
2 years ago
$("#userCaptchaImage").attr("src", "/FengHuang/yp/getYzm?id=" + new Date() + Math.floor(Math.random() * 24));
}
2 years ago
2 years ago
});
</script>
</body>
</html>