|
|
|
@ -15,22 +15,22 @@
|
|
|
|
|
<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;">
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required" name="taskName" placeholder="请输入姓名"
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required" name="name" placeholder="请输入姓名"
|
|
|
|
|
class="layui-input" style="width: 500px;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<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;">
|
|
|
|
|
<input type="radio" name="sex" value="1" title="男" checked>
|
|
|
|
|
<input type="radio" name="sex" value="2" title="女">
|
|
|
|
|
<input type="radio" name="xb" value="男" title="男" checked>
|
|
|
|
|
<input type="radio" name="xb" value="女" title="女">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<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;">
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required|identity" lay-filter="idcard" id="idcard"
|
|
|
|
|
name="idcard" placeholder="请输入身份证号" class="layui-input" style="width: 500px;">
|
|
|
|
|
name="sfzh" placeholder="请输入身份证号" class="layui-input" style="width: 500px;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin: 5px 0 25px 0">
|
|
|
|
@ -42,29 +42,29 @@
|
|
|
|
|
<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;">
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required" name="taskName" placeholder="请输入家庭住址"
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required" name="address" placeholder="请输入家庭住址"
|
|
|
|
|
class="layui-input" style="width: 500px;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<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;">
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required" name="taskName" placeholder="请输入父亲姓名"
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required" name="father_name" placeholder="请输入父亲姓名"
|
|
|
|
|
class="layui-input" style="width: 500px;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<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;">
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required" name="taskName" placeholder="请输入母亲姓名"
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required" name="mother_name" placeholder="请输入母亲姓名"
|
|
|
|
|
class="layui-input" style="width: 500px;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<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;">
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required|phone" name="taskName"
|
|
|
|
|
placeholder="请输入联系电话" class="layui-input" style="width: 500px;">
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required|phone" name="tel" placeholder="请输入联系电话"
|
|
|
|
|
class="layui-input" style="width: 500px;">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin: 5px 0 25px 0">
|
|
|
|
@ -97,7 +97,24 @@
|
|
|
|
|
, layer = layui.layer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var stageId = -1;
|
|
|
|
|
//学段
|
|
|
|
|
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) {
|
|
|
|
|
taskId = res.task_id;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//拖拽上传
|
|
|
|
@ -105,26 +122,52 @@
|
|
|
|
|
elem: "#uploadImg"
|
|
|
|
|
, url: "/FengHuang/yp/uploadPic"
|
|
|
|
|
, done: function (res) {
|
|
|
|
|
console.log(res);
|
|
|
|
|
layer.msg('上传成功');
|
|
|
|
|
layui.$('#uploadView').removeClass('layui-hide').find('img').attr('src', res.files.file);
|
|
|
|
|
layer.msg("上传成功!", {
|
|
|
|
|
icon: 1,
|
|
|
|
|
time: 1500
|
|
|
|
|
});
|
|
|
|
|
imgId = res.uuid;
|
|
|
|
|
layui.$('#uploadView').removeClass('layui-hide').find('img').attr('src', res.base64);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//提交
|
|
|
|
|
form.on('submit(save-apply)', function (data) {
|
|
|
|
|
if (stageId > 0) {
|
|
|
|
|
var fields = data.field;
|
|
|
|
|
|
|
|
|
|
if (stageId == -1) {
|
|
|
|
|
layer.msg("身份证输入有误,请重新输入!", {
|
|
|
|
|
icon: 2,
|
|
|
|
|
time: 2500
|
|
|
|
|
});
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "POST",
|
|
|
|
|
url: "/FengHuang/yp/save",
|
|
|
|
|
data: { "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) {
|
|
|
|
|
console.log(data)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (stageId == -1) {
|
|
|
|
|
layer.msg("身份证输入有误,请重新输入!", {
|
|
|
|
|
icon: 2,
|
|
|
|
|
time: 2500
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg("年龄不符合本次报名范围!", {
|
|
|
|
|
icon: 2,
|
|
|
|
|
time: 2500
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// window.location = "./success.html";
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#idcard').blur(function () {
|
|
|
|
|
if (stageId != -1) {
|
|
|
|
|
if (stageId > 0) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
dataType: "json",
|
|
|
|
@ -135,13 +178,16 @@
|
|
|
|
|
stageId = res.bx_id;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
stageId = -1;
|
|
|
|
|
layer.msg(res.bx_name);
|
|
|
|
|
stageId = res.bx_id;
|
|
|
|
|
if (stageId == -1) {
|
|
|
|
|
$("#stageTag").html("身份证输入有误,请重新输入!");
|
|
|
|
|
} else {
|
|
|
|
|
$("#stageTag").html("年龄不符合本次报名范围!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#idcard').bind('input propertychange', function () {
|
|
|
|
@ -156,14 +202,18 @@
|
|
|
|
|
stageId = res.bx_id;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
stageId = -1;
|
|
|
|
|
layer.msg(res.bx_name);
|
|
|
|
|
stageId = res.bx_id;
|
|
|
|
|
if (stageId == -1) {
|
|
|
|
|
$("#stageTag").html("身份证输入有误,请重新输入!");
|
|
|
|
|
} else {
|
|
|
|
|
$("#stageTag").html("年龄不符合本次报名范围!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if ($(this).val().length == 0) {
|
|
|
|
|
stageId = -1;
|
|
|
|
|
stageId = 0;
|
|
|
|
|
$("#stageTag").html("输入身份证号后自动识别");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|