|
|
@@ -278,363 +278,144 @@ |
|
|
|
<script src="~/Content/layui/layui.all.js"></script> |
|
|
|
<script src="~/Content/vue/vue.js"></script> |
|
|
|
<script src="~/PhonePage/server.js"></script> |
|
|
|
<script> |
|
|
|
var today = formatDateTimesM(); |
|
|
|
//var CardId = request('IDCARD'); //'XCMY1002'; |
|
|
|
layui.use(['form', 'laydate', 'upload'], function () { |
|
|
|
var form = layui.form; |
|
|
|
//登录按钮点击 |
|
|
|
form.on('submit(*)', function (data) { |
|
|
|
//if (!$('#IdCardPto1').val() || !$('#IdCardPto2').val()) { |
|
|
|
// alert('请上传身份证照片!'); |
|
|
|
// return; |
|
|
|
//} |
|
|
|
//if (!$('#MidDiplomaPto').val()) { |
|
|
|
// alert('请上传初中毕业证照片!'); |
|
|
|
// return; |
|
|
|
//} |
|
|
|
//if (!$('#MidAchievementPto').val()) { |
|
|
|
// alert('请上传中考成绩截图!'); |
|
|
|
// return; |
|
|
|
//} |
|
|
|
|
|
|
|
var strEntity = JSON.stringify(data.field); |
|
|
|
//strEntity.CardNo = CardNo; |
|
|
|
$.ajax({ |
|
|
|
url: '/EducationalAdministration/StuVolunteerPhone/DraftForm', |
|
|
|
data: { strEntity: strEntity }, |
|
|
|
type: "POST", |
|
|
|
dataType: "json", |
|
|
|
async: true, |
|
|
|
cache: false, |
|
|
|
success: function (data) { |
|
|
|
if (data.code == 200) { |
|
|
|
alert('报名成功,请等待考试通知'); |
|
|
|
location.href = '/EducationalAdministration/StuVolunteer/Link?CardNo=' + CardNo; |
|
|
|
} else { |
|
|
|
return alert(data.data); |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function (XMLHttpRequest, textStatus, errorThrown) { |
|
|
|
}, |
|
|
|
beforeSend: function () { |
|
|
|
}, |
|
|
|
complete: function () { |
|
|
|
<script> |
|
|
|
var keyValue = |
|
|
|
var today = formatDateTimesM(); |
|
|
|
layui.use(['form', 'laydate', 'upload'], function () { |
|
|
|
var form = layui.form; |
|
|
|
//登录按钮点击 |
|
|
|
form.on('submit(*)', function (data) { |
|
|
|
var strEntity = JSON.stringify(data.field); |
|
|
|
console.log(strEntity,123) |
|
|
|
//strEntity.keyValue = keyValue; |
|
|
|
$.ajax({ |
|
|
|
url: '/EducationalAdministration/StuVolunteerPhone/DraftForm', |
|
|
|
data: { strEntity: strEntity }, |
|
|
|
type: "POST", |
|
|
|
dataType: "json", |
|
|
|
async: true, |
|
|
|
cache: false, |
|
|
|
success: function (data) { |
|
|
|
if (data.code == 200) { |
|
|
|
alert('报名成功,请等待考试通知'); |
|
|
|
location.href = '/EducationalAdministration/StuVolunteer/Link?CardNo=' + CardNo; |
|
|
|
} else { |
|
|
|
return alert(data.data); |
|
|
|
} |
|
|
|
}); |
|
|
|
//保存并提交 |
|
|
|
//$.ajax({ |
|
|
|
// url: '/EducationalAdministration/StuVolunteer/SubmitForm?keyValue=&IDCARD=' + CardId, |
|
|
|
// data: { strEntity: strEntity }, |
|
|
|
// type: "POST", |
|
|
|
// dataType: "json", |
|
|
|
// async: true, |
|
|
|
// cache: false, |
|
|
|
// success: function (data) { |
|
|
|
// if (data.code == 200) { |
|
|
|
// alert('报名成功,请等待考试通知'); |
|
|
|
// location.href = '/EducationalAdministration/StuVolunteer/Link?CardId=' + CardId; |
|
|
|
// } else { |
|
|
|
// return alert(data.data); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// error: function (XMLHttpRequest, textStatus, errorThrown) { |
|
|
|
// }, |
|
|
|
// beforeSend: function () { |
|
|
|
// }, |
|
|
|
// complete: function () { |
|
|
|
// } |
|
|
|
//}); |
|
|
|
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
var laydate = layui.laydate; |
|
|
|
|
|
|
|
//时间选择 |
|
|
|
laydate.render({ |
|
|
|
elem: '#Birthday', |
|
|
|
min: today.y + '-' + today.m + '-' + today.d |
|
|
|
}, |
|
|
|
error: function (XMLHttpRequest, textStatus, errorThrown) { |
|
|
|
}, |
|
|
|
beforeSend: function () { |
|
|
|
}, |
|
|
|
complete: function () { |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
var upload = layui.upload; |
|
|
|
|
|
|
|
////初中毕业证 |
|
|
|
//var uploadInst = upload.render({ |
|
|
|
// elem: '#chickUpload', |
|
|
|
// url: '/EducationalAdministration/EmpInfoEnternal/UploadImg', |
|
|
|
// exts: 'jpg|png|gif|', |
|
|
|
// multiple: false, |
|
|
|
// before: function (obj) { |
|
|
|
// //预读本地文件示例,不支持ie8 |
|
|
|
// obj.preview(function (index, file, result) { |
|
|
|
// $('#chickUpload').html('<img src="' + result + '" alt="">') //图片链接(base64) |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
// done: function (res) { |
|
|
|
// //如果上传失败 |
|
|
|
// if (res.code != 200) { |
|
|
|
// return layer.msg('上传失败'); |
|
|
|
// } else { |
|
|
|
// $("#MidDiplomaPto").val(res.data.folderId) |
|
|
|
// } |
|
|
|
// //上传成功 |
|
|
|
// }, |
|
|
|
// error: function () { |
|
|
|
// //演示失败状态,并实现重传 |
|
|
|
// var demoText = $('#demoText'); |
|
|
|
// demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>'); |
|
|
|
// demoText.find('.demo-reload').on('click', function () { |
|
|
|
// uploadInst.upload(); |
|
|
|
// }); |
|
|
|
// } |
|
|
|
//}); |
|
|
|
|
|
|
|
////身份证正面照片 |
|
|
|
//var uploadIdCard = upload.render({ |
|
|
|
// elem: '#IdCardPtoUpload1', |
|
|
|
// url: '/EducationalAdministration/EmpInfoEnternal/UploadImg', |
|
|
|
// exts: 'jpg|png|gif|', |
|
|
|
// multiple: true, |
|
|
|
// before: function (obj) { |
|
|
|
// //预读本地文件示例,不支持ie8 |
|
|
|
// obj.preview(function (index, file, result) { |
|
|
|
// $('#IdCardPtoUpload1').html('<img src="' + result + '" alt="">') //图片链接(base64) |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
// done: function (res) { |
|
|
|
// //如果上传失败 |
|
|
|
// if (res.code != 200) { |
|
|
|
// return layer.msg('上传失败'); |
|
|
|
// } else { |
|
|
|
// $("#IdCardPto1").val(res.data.folderId) |
|
|
|
// } |
|
|
|
// //上传成功 |
|
|
|
// }, |
|
|
|
// error: function () { |
|
|
|
// //演示失败状态,并实现重传 |
|
|
|
// var demoText = $('#demoText'); |
|
|
|
// demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>'); |
|
|
|
// demoText.find('.demo-reload').on('click', function () { |
|
|
|
// uploadIdCard.upload(); |
|
|
|
// }); |
|
|
|
// } |
|
|
|
//}); |
|
|
|
|
|
|
|
////身份证反面照片 |
|
|
|
//var uploadIdCard = upload.render({ |
|
|
|
// elem: '#IdCardPtoUpload2', |
|
|
|
// url: '/EducationalAdministration/EmpInfoEnternal/UploadImg', |
|
|
|
// exts: 'jpg|png|gif|', |
|
|
|
// multiple: true, |
|
|
|
// before: function (obj) { |
|
|
|
// //预读本地文件示例,不支持ie8 |
|
|
|
// obj.preview(function (index, file, result) { |
|
|
|
// $('#IdCardPtoUpload2').html('<img src="' + result + '" alt="">') //图片链接(base64) |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
// done: function (res) { |
|
|
|
// //如果上传失败 |
|
|
|
// if (res.code != 200) { |
|
|
|
// return layer.msg('上传失败'); |
|
|
|
//保存并提交 |
|
|
|
//$.ajax({ |
|
|
|
// url: '/EducationalAdministration/StuVolunteer/SubmitForm?keyValue=&IDCARD=' + CardId, |
|
|
|
// data: { strEntity: strEntity }, |
|
|
|
// type: "POST", |
|
|
|
// dataType: "json", |
|
|
|
// async: true, |
|
|
|
// cache: false, |
|
|
|
// success: function (data) { |
|
|
|
// if (data.code == 200) { |
|
|
|
// alert('报名成功,请等待考试通知'); |
|
|
|
// location.href = '/EducationalAdministration/StuVolunteer/Link?CardId=' + CardId; |
|
|
|
// } else { |
|
|
|
// $("#IdCardPto2").val(res.data.folderId) |
|
|
|
// return alert(data.data); |
|
|
|
// } |
|
|
|
// //上传成功 |
|
|
|
// }, |
|
|
|
// error: function () { |
|
|
|
// //演示失败状态,并实现重传 |
|
|
|
// var demoText = $('#demoText'); |
|
|
|
// demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>'); |
|
|
|
// demoText.find('.demo-reload').on('click', function () { |
|
|
|
// uploadIdCard.upload(); |
|
|
|
// }); |
|
|
|
// } |
|
|
|
//}); |
|
|
|
//中考成绩截图 |
|
|
|
//var uploadMidAchieve = upload.render({ |
|
|
|
// elem: '#MidAchievementUpload', |
|
|
|
// url: '/EducationalAdministration/EmpInfoEnternal/UploadImg', |
|
|
|
// before: function (obj) { |
|
|
|
// //预读本地文件示例,不支持ie8 |
|
|
|
// obj.preview(function (index, file, result) { |
|
|
|
// $('#MidAchievementUpload').html('<img src="' + result + '" alt="">') //图片链接(base64) |
|
|
|
// }); |
|
|
|
// error: function (XMLHttpRequest, textStatus, errorThrown) { |
|
|
|
// }, |
|
|
|
// done: function (res) { |
|
|
|
// //如果上传失败 |
|
|
|
// if (res.code != 200) { |
|
|
|
// return layer.msg('上传失败'); |
|
|
|
// } else { |
|
|
|
// $("#MidAchievementPto").val(res.data.folderId); |
|
|
|
// } |
|
|
|
// //上传成功 |
|
|
|
// beforeSend: function () { |
|
|
|
// }, |
|
|
|
// error: function () { |
|
|
|
// //演示失败状态,并实现重传 |
|
|
|
// var demoText = $('#demoText'); |
|
|
|
// demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>'); |
|
|
|
// demoText.find('.demo-reload').on('click', function () { |
|
|
|
// uploadMidAchieve.upload(); |
|
|
|
// }); |
|
|
|
// complete: function () { |
|
|
|
// } |
|
|
|
//}); |
|
|
|
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 |
|
|
|
|
|
|
|
////监听地市 |
|
|
|
//form.on('select(City)', function (data) { |
|
|
|
// //绑定县区 |
|
|
|
// $.ajax({ |
|
|
|
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "DIC_AREA" + "&where=" + "aparent='" + data.value + "'", |
|
|
|
// async: false, |
|
|
|
// success: function (msg) { |
|
|
|
// var companys = $.parseJSON(msg).data.data; |
|
|
|
// var str = '<option value="">请选择</option>'; |
|
|
|
// $.each(companys, |
|
|
|
// function (i, item) { |
|
|
|
// str += '<option value="' + item.acode + '">' + item.aname + '</option>'; |
|
|
|
// }); |
|
|
|
// $("#County").html(str); |
|
|
|
// }, |
|
|
|
// }); |
|
|
|
// //绑定专业 |
|
|
|
|
|
|
|
|
|
|
|
// form.render(); |
|
|
|
//}); |
|
|
|
////监听县区 |
|
|
|
//form.on('select(County)', function (data) { |
|
|
|
// //绑定专业 |
|
|
|
// $.ajax({ |
|
|
|
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo" + "&where=" + "Area='" + data.value + "'", |
|
|
|
// async: false, |
|
|
|
// success: function (msg) { |
|
|
|
// var companys = $.parseJSON(msg).data.data; |
|
|
|
// var str = '<option value="">请选择</option>'; |
|
|
|
// $.each(companys, |
|
|
|
// function (i, item) { |
|
|
|
// str += '<option value="' + item.id + '">' + item.majorname + '</option>' |
|
|
|
// }) |
|
|
|
// $("#MajorNo").html(str); |
|
|
|
// }, |
|
|
|
// }); |
|
|
|
}); |
|
|
|
|
|
|
|
var laydate = layui.laydate; |
|
|
|
|
|
|
|
// form.render(); |
|
|
|
//}); |
|
|
|
//时间选择 |
|
|
|
laydate.render({ |
|
|
|
elem: '#Birthday', |
|
|
|
min: today.y + '-' + today.m + '-' + today.d |
|
|
|
}); |
|
|
|
$(window).load(function () { |
|
|
|
//$('.chickInputBoxs input').attr('lay-verify', 'required'); |
|
|
|
//专业 |
|
|
|
$.ajax({ |
|
|
|
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo", |
|
|
|
async: false, |
|
|
|
success: function (msg) { |
|
|
|
var companys = $.parseJSON(msg).data.data; |
|
|
|
var str = '<option value="">请选择</option>'; |
|
|
|
$.each(companys, |
|
|
|
function (i, item) { |
|
|
|
str += '<option value="' + item.id + '">' + item.majorname + '</option>' |
|
|
|
}) |
|
|
|
$("#MajorOne").html(str); |
|
|
|
}, |
|
|
|
}); |
|
|
|
$.ajax({ |
|
|
|
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo", |
|
|
|
async: false, |
|
|
|
success: function (msg) { |
|
|
|
var companys = $.parseJSON(msg).data.data; |
|
|
|
var str = '<option value="">请选择</option>'; |
|
|
|
$.each(companys, |
|
|
|
function (i, item) { |
|
|
|
str += '<option value="' + item.id + '">' + item.majorname + '</option>' |
|
|
|
}) |
|
|
|
$("#MajorTwo").html(str); |
|
|
|
}, |
|
|
|
}); |
|
|
|
$.ajax({ |
|
|
|
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo", |
|
|
|
async: false, |
|
|
|
success: function (msg) { |
|
|
|
var companys = $.parseJSON(msg).data.data; |
|
|
|
var str = '<option value="">请选择</option>'; |
|
|
|
$.each(companys, |
|
|
|
function (i, item) { |
|
|
|
str += '<option value="' + item.id + '">' + item.majorname + '</option>' |
|
|
|
}) |
|
|
|
$("#MajorThree").html(str); |
|
|
|
}, |
|
|
|
}); |
|
|
|
|
|
|
|
////民族 |
|
|
|
//$.ajax({ |
|
|
|
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "BCdNationality", |
|
|
|
// async: false, |
|
|
|
// success: function (msg) { |
|
|
|
// var companys = $.parseJSON(msg).data.data; |
|
|
|
// var str = '<option value="">请选择</option>'; |
|
|
|
// $.each(companys, |
|
|
|
// function (i, item) { |
|
|
|
// str += '<option value="' + item.nationalityno + '">' + item.nationality + '</option>' |
|
|
|
// }) |
|
|
|
// $("#Nationals").html(str); |
|
|
|
// }, |
|
|
|
//}); |
|
|
|
////地市 |
|
|
|
//$.ajax({ |
|
|
|
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "DIC_CITY" + "&where=" + "cparent='650000'", |
|
|
|
// async: false, |
|
|
|
// success: function (msg) { |
|
|
|
// var companys = $.parseJSON(msg).data.data; |
|
|
|
// var str = '<option value="">请选择</option>'; |
|
|
|
// $.each(companys, |
|
|
|
// function (i, item) { |
|
|
|
// str += '<option value="' + item.ccode + '">' + item.cname + '</option>' |
|
|
|
// }) |
|
|
|
// $("#City").html(str); |
|
|
|
// }, |
|
|
|
//}); |
|
|
|
////县区 |
|
|
|
//$.ajax({ |
|
|
|
// url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "DIC_AREA", |
|
|
|
// async: false, |
|
|
|
// success: function (msg) { |
|
|
|
// var companys = $.parseJSON(msg).data.data; |
|
|
|
// var str = '<option value="">请选择</option>'; |
|
|
|
// $.each(companys, |
|
|
|
// function (i, item) { |
|
|
|
// str += '<option value="' + item.acode + '">' + item.aname + '</option>'; |
|
|
|
// }); |
|
|
|
// $("#County").html(str); |
|
|
|
// }, |
|
|
|
//}); |
|
|
|
renderForm(); |
|
|
|
|
|
|
|
var upload = layui.upload; |
|
|
|
}); |
|
|
|
$(window).load(function () { |
|
|
|
//$('.chickInputBoxs input').attr('lay-verify', 'required'); |
|
|
|
//专业 |
|
|
|
$.ajax({ |
|
|
|
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo", |
|
|
|
async: false, |
|
|
|
success: function (msg) { |
|
|
|
var companys = $.parseJSON(msg).data.data; |
|
|
|
var str = '<option value="">请选择</option>'; |
|
|
|
$.each(companys, |
|
|
|
function (i, item) { |
|
|
|
str += '<option value="' + item.id + '">' + item.majorname + '</option>' |
|
|
|
}) |
|
|
|
$("#MajorOne").html(str); |
|
|
|
}, |
|
|
|
}); |
|
|
|
$.ajax({ |
|
|
|
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo", |
|
|
|
async: false, |
|
|
|
success: function (msg) { |
|
|
|
var companys = $.parseJSON(msg).data.data; |
|
|
|
var str = '<option value="">请选择</option>'; |
|
|
|
$.each(companys, |
|
|
|
function (i, item) { |
|
|
|
str += '<option value="' + item.id + '">' + item.majorname + '</option>' |
|
|
|
}) |
|
|
|
$("#MajorTwo").html(str); |
|
|
|
}, |
|
|
|
}); |
|
|
|
$.ajax({ |
|
|
|
url: "/EducationalAdministration/EmpInfoEnternal/GetMap?code=" + "CdMajorInfo", |
|
|
|
async: false, |
|
|
|
success: function (msg) { |
|
|
|
var companys = $.parseJSON(msg).data.data; |
|
|
|
var str = '<option value="">请选择</option>'; |
|
|
|
$.each(companys, |
|
|
|
function (i, item) { |
|
|
|
str += '<option value="' + item.id + '">' + item.majorname + '</option>' |
|
|
|
}) |
|
|
|
$("#MajorThree").html(str); |
|
|
|
}, |
|
|
|
}); |
|
|
|
renderForm(); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
//重新渲染表单 |
|
|
|
function renderForm() { |
|
|
|
layui.use('form', function () { |
|
|
|
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加() |
|
|
|
form.render(); |
|
|
|
}); |
|
|
|
//重新渲染表单 |
|
|
|
function renderForm() { |
|
|
|
layui.use('form', function () { |
|
|
|
var form = layui.form//高版本建议把括号去掉,有的低版本,需要加() |
|
|
|
form.render(); |
|
|
|
}); |
|
|
|
} |
|
|
|
function formatDateTimesM() { |
|
|
|
var date = new Date(1960, 0, 0); |
|
|
|
var y = date.getFullYear(); |
|
|
|
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1; |
|
|
|
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); |
|
|
|
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); |
|
|
|
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); |
|
|
|
|
|
|
|
return { |
|
|
|
y: y, |
|
|
|
m: m, |
|
|
|
d: d, |
|
|
|
h: h, |
|
|
|
min: min |
|
|
|
} |
|
|
|
function formatDateTimesM() { |
|
|
|
var date = new Date(1960, 0, 0); |
|
|
|
var y = date.getFullYear(); |
|
|
|
var m = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1; |
|
|
|
var d = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); |
|
|
|
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(); |
|
|
|
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); |
|
|
|
|
|
|
|
return { |
|
|
|
y: y, |
|
|
|
m: m, |
|
|
|
d: d, |
|
|
|
h: h, |
|
|
|
min: min |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</html> |