|
|
|
@ -29,14 +29,14 @@
|
|
|
|
|
<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" name="taskName"
|
|
|
|
|
placeholder="请输入身份证号" class="layui-input" style="width: 500px;">
|
|
|
|
|
<input type="text" autocomplete="off" lay-verify="required|identity" lay-filter="idcard" id="idcard"
|
|
|
|
|
name="idcard" 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;">
|
|
|
|
|
<button type="button" class="layui-btn layui-btn-radius">输入身份证号后自动识别</button>
|
|
|
|
|
<button type="button" class="layui-btn layui-btn-radius" id="stageTag">输入身份证号后自动识别</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin: 5px 0 25px 0">
|
|
|
|
@ -97,23 +97,79 @@
|
|
|
|
|
, layer = layui.layer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var stageId = -1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//拖拽上传
|
|
|
|
|
upload.render({
|
|
|
|
|
elem: '#uploadImg'
|
|
|
|
|
, url: 'https://httpbin.org/post' //此处用的是第三方的 http 请求演示,实际使用时改成您自己的上传接口即可。
|
|
|
|
|
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);
|
|
|
|
|
layui.$('#uploadView').removeClass('layui-hide').find('img').attr('src', res.files.file);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
form.on('submit(save-apply)', function (data) {
|
|
|
|
|
|
|
|
|
|
window.location="./success.html";
|
|
|
|
|
if (stageId == -1) {
|
|
|
|
|
layer.msg("身份证输入有误,请重新输入!", {
|
|
|
|
|
icon: 2,
|
|
|
|
|
time: 2500
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// window.location = "./success.html";
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#idcard').blur(function () {
|
|
|
|
|
if (stageId != -1) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
dataType: "json",
|
|
|
|
|
url: "/FengHuang/yp/evalBx?sfzh=" + $('#idcard').val(),
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.bx_id > 0) {
|
|
|
|
|
$("#stageTag").html(res.bx_name);
|
|
|
|
|
stageId = res.bx_id;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
stageId = -1;
|
|
|
|
|
layer.msg(res.bx_name);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('#idcard').bind('input propertychange', function () {
|
|
|
|
|
if ($(this).val().length == 18) {
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "GET",
|
|
|
|
|
dataType: "json",
|
|
|
|
|
url: "/FengHuang/yp/evalBx?sfzh=" + $(this).val(),
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.bx_id > 0) {
|
|
|
|
|
$("#stageTag").html(res.bx_name);
|
|
|
|
|
stageId = res.bx_id;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
stageId = -1;
|
|
|
|
|
layer.msg(res.bx_name);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if ($(this).val().length == 0) {
|
|
|
|
|
stageId = -1;
|
|
|
|
|
$("#stageTag").html("输入身份证号后自动识别");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|