function messagehtml(title, content) { var d = dialog({ title: title, content: content }); d.showmodal(); } function setgender() { $("#gender").val($('#selgender option:selected').val()); } function setismarried() { $("#ismarried").val($('#selismarried option:selected').val()); } function setnation() { $("#nation").val($('#selnation option:selected').val()); } function setworkstatus(value) { if (value == "在职") { if ($("#workstatus1").prop('checked')) { $("#workstatus2").attr("checked", false); $("#workstatus").val(value); } else { $("#workstatus").val(""); } } else { if ($("#workstatus2").prop('checked')) { $("#workstatus1").attr("checked", false); $("#workstatus").val(value); } else { $("#workstatus").val(""); } } } function setdoublegegree(value) { if (value == "1") { if ($("#isdoublegegree1").prop('checked')) { $("#isdoublegegree2").attr("checked", false); $("#isdoublegegree").val("1"); $("#div_school2").css("display", ""); $("#div_major2").css("display", ""); } else { $("#isdoublegegree").val("0"); $("#div_school2").css("display", "none"); $("#div_major2").css("display", "none"); } } else { if ($("#isdoublegegree2").prop('checked')) { $("#isdoublegegree1").attr("checked", false); } $("#isdoublegegree").val("0"); $("#div_school2").css("display", "none"); $("#div_major2").css("display", "none"); } } /*选择公司联动绑定岗位*/ function setcompanyid(type) { var companyid = $('#selcompanyid option:selected').val(); var positionname = $("#positionname").val(); $("#companyid").val(companyid); var site = $("#site").val(); $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getcompanypositionlist", //查询招聘岗位列表 data: { "site": site, "companyid": companyid }, datatype: "json", success: function (data, textstatus) { var strrow = "''"; if (data.status == 0) { /*开始*/ for (var i = 0; i < data.data.length; i++) { var pname = data.data[i].positionname; if (type == 1 && pname == positionname) { strrow += ""; } else { strrow += ""; } } /*结束*/ } else { //messagehtml(" ", data.msg); } $("#selpositionname").html(strrow); }, error: function (xmlhttprequest, textstatus, errorthrown) { //messagehtml("状态:" + textstatus + ";出错提示1:" + errorthrown); }, timeout: 20000 }); } function setsource() { $("#source").val($('#selsource option:selected').val()); var source = $("#source").val(); if (source == "公司内部人员推荐" || source == "公司外部人员推荐" || source == "其它渠道") { $("#div_otherchannel").css("display", ""); if (source == "其它渠道") { $("#span_othername").html("其它渠道"); } else { $("#span_othername").html("姓名"); } } else { $("#div_otherchannel").css("display", "none"); } } function setworkplace() { var values = ""; if ($("#checkbox1").prop('checked')) { $("#workplace1").val($("#checkbox1").val()); values += "," + $("#checkbox1").val(); } else { $("#workplace1").val(""); } if ($("#checkbox2").prop('checked')) { $("#workplace2").val($("#checkbox2").val()); values += "," + $("#checkbox2").val(); } else { $("#workplace2").val(""); } if ($("#checkbox3").prop('checked')) { $("#workplace3").val($("#checkbox3").val()); values += "," + $("#checkbox3").val(); } else { $("#workplace3").val(""); } if ($("#checkbox4").prop('checked')) { $("#workplace4").val($("#checkbox4").val()); values += "," + $("#checkbox4").val(); } else { $("#workplace4").val(""); } if (values.length > 0) { $("#workplace").val(values.substring(1, values.length)); } else { $("#workplace").val(""); } } function sureidentno() { if ($("#identno1").val() != $("#identno2").val()) { messagehtml(" ", "两次输入的身份证号码不一致,请重新输入"); $("#identno1").val(''); $("#identno2").val(''); } else { if (checkidentno($("#identno1").val())) { $("#identno").val($("#identno1").val()); $("#identno1").val(''); $("#identno2").val(''); $(".fixedid").fadeout("slow"); $("#mask").css({ display: 'none' }); } else { $("#identno1").val(''); $("#identno2").val(''); } } } function cancelidentno() { $("#identno1").val(''); $("#identno2").val(''); } function setdegree() { $("#degree").val($('#seldegree option:selected').val()); var degree = $("#degree").val(); if (degree == "硕士" || degree == "博士") { $("#table_school2").css("display", ""); } else { $("#table_school2").css("display", "none"); } } /*同一候选人一年内不能提交简历超过2次*/ function showresumeovertwo() { $("body").append("
"); $("#mask").addclass("mask").fadein("fast"); $(".resumeovertwo").fadein("fast"); var type = $("#hiddensocietytype").val(); getjoblistby(type); } function closeresumeovertwo() { $(".resumeovertwo").fadeout("fast"); $("#mask").css({ display: 'none' }); } function getresumejobcount(resumeid) { var site = $("#site").val(); $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getresumejobcount", data: { "site": site, "resumeid": resumeid }, datatype: "json", success: function (data, textstatus) { if (data.status == 0) { $("#myjobcount").val(data.data); //alert($("#myjobcount").val()); } }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示2:" + errorthrown); }, timeout: 20000 }); } /*社会招聘提交(新增、修改):submittype=0暂存,submittype=1提交*/ function submitsociety(submittype, isedit) { setworkplace(); var resumeid = $("#resumeid").val(); if (resumeid == "") { resumeid = "0"; } else { if (submittype == 1) { var resumejobcount = $("#myjobcount").val(); if (resumejobcount >= 2) { showresumeovertwo(); return; } } } var headhunterid = $("#hiddenheadhunterid").val(); /*headhunterid>0表示猎头提交,headhunterid=0表示候选人提交*/ var companyid = $("#companyid").val(); var deptname = $("#deptname").val(); var positionname = $("#selpositionname").val(); var workplace = $("#workplace").val(); var site = $("#site").val(); /*基本信息*/ var username = $("#username").val(); var gender = $("#gender").val(); var nation = $("#nation").val(); var identno = $("#identno").val(); var age = $("#age").val(); var height = $("#height").val(); var weight = $("#weight").val(); var ismarried = $("#ismarried").val(); var state = $("#state").val(); var address = $("#address").val(); var nowplace = $("#nowplace").val(); var workyear = $("#workyear").val(); var workstatus = $("#workstatus").val(); /*联系方式*/ var mobile = $("#mobile").val(); var email = $("#email").val(); var qqno = $("#qqno").val(); /*教育信息*/ var degree = $("#degree").val(); var universityname = $("#universityname").val(); var majorname = $("#majorname").val(); var universityundergraduate = $("#universityundergraduate").val(); var majorundergraduate = $("#majorundergraduate").val(); var isdoublegegree = $("#isdoublegegree").val(); var doublegegreeschool = $("#doublegegreeschool").val(); var doublegegreemajor = $("#doublegegreemajor").val(); /*简历*/ var resumename = $("#resumename-d").val(); var resumeurl = $("#resumeurl-d").val(); /*其它*/ var source = $("#source").val(); var sourcedescription = ""; var skillcertificate = $("#skillcertificate").val(); if (degree != "博士" && degree != "硕士") { universityundergraduate = ""; majorundergraduate = ""; } if (isdoublegegree == "否") { doublegegreeschool = ""; doublegegreemajor = ""; } if (source == "公司内部人员推荐" || source == "公司外部人员推荐" || source == "其它渠道") { sourcedescription = $("#sourcedescription").val(); } /*开始检验必填项*/ if (companyid == null || companyid == "") { messagehtml(" ", "请选择应聘公司."); return false; } if (positionname == null || positionname == "") { messagehtml(" ", "请选择应聘岗位."); return false; } /*基本信息*/ if (username == null || username == "") { messagehtml(" ", "姓名未填写,不能提交"); return false; } if (gender == null || gender == "") { messagehtml(" ", "性别未填写,不能提交"); return false; } if (age == null || age == "") { messagehtml(" ", "年龄未填写,不能提交"); return false; } if (workyear == null || workyear == "") { messagehtml(" ", "工作年限未填写,不能提交"); return false; } if (headhunterid == 0 && (state == null || state == "")) { messagehtml(" ", "籍贯未填写,不能提交"); return false; } if (nowplace == null || nowplace == "") { messagehtml(" ", "现居住地未填写,不能提交"); return false; } if (headhunterid == 0 && (source == null || source == "")) { messagehtml(" ", "了解招聘渠道未填写,不能提交"); return false; } /*联系方式*/ if (headhunterid == 0 && (mobile == null || mobile == "")) { messagehtml(" ", "手机号未填写,不能提交"); return false; } if (headhunterid == 0 && (mobile.length != 11)) { messagehtml(" ", "手机号不是11位,不能提交"); return false; } if (headhunterid == 0 && (email == null || email == "")) { messagehtml(" ", "邮箱未填写,不能提交"); return false; } /*教育信息*/ if (headhunterid == 0 && (degree == null || degree == "")) { messagehtml(" ", "最高统招学历未选择,不能提交"); return false; } if (headhunterid == 0 && (universityname == null || universityname == "")) { messagehtml(" ", "毕业院校未填写,不能提交"); return false; } if (headhunterid == 0 && (majorname == null || majorname == "")) { messagehtml(" ", "专业未填写,不能提交"); return false; } if (headhunterid == 0 && (isdoublegegree == null || isdoublegegree == "")) { messagehtml(" ", "是否双学位未填写,不能提交"); return false; } /*简历*/ if (isedit==0 && (resumeurl == null || resumeurl == "")) { messagehtml(" ", "简历未上传,不能提交"); return false; } //正式提交简历(社会招聘) $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=submitsociety", data: { "site": site, "submittype": submittype, "isedit": isedit, "resumeid":resumeid, "headhunterid": headhunterid, "companyid": companyid, "deptname": deptname, "positionname": positionname, "workplace": workplace, "username": username, "gender": gender, "nation": nation, "identno": identno, "age": age, "height": height, "weight": weight, "ismarried": ismarried, "state": state, "address": address, "nowplace": nowplace, "mobile": mobile, "email": email, "qqno": qqno, "workyear": workyear, "workstatus": workstatus, "degree": degree, "universityname": universityname, "majorname": majorname, "universityundergraduate": universityundergraduate, "majorundergraduate": majorundergraduate, "isdoublegegree": isdoublegegree, "doublegegreeschool": doublegegreeschool, "doublegegreemajor": doublegegreemajor, "resumename": resumename, "resumeurl": resumeurl, "source": source, "sourcedescription": sourcedescription, "skillcertificate": skillcertificate, }, datatype: "json", beforesend: function (xmlhttprequest) { //alert('111'); }, success: function (data, textstatus) { $("#resumeid").val(data.fid); messagehtml(" ", data.msg); //if (data.status == 0) { // //messagehtml("", data.msg); //} //else { // //messagenewlink(data.msg, data.url); //} }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示3:" + errorthrown); }, complete: function (xmlhttprequest, textstatus) { }, timeout: 20000 }); } /*编辑简历:查询一条记录。参数type说明:type=1(resumeid为简历id),type=0(resumeid为简历手机号)*/ function editrow(type,resumeid) { if (type == null || type == "") { messagehtml(" ", "t参数不能为空."); return false; } if (resumeid == null || resumeid == "") { messagehtml(" ", "r参数不能为空."); return false; } var site = $("#site").val(); //alert("resumeid=" + resumeid); $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getsocietyresume", //获取一份简历编辑 data: { "type": type, "resumeid": resumeid, "site": site }, datatype: "json", success: function (data, textstatus) { if (data.status == 0) { if (data.data != null) { showdata(data.data); } else if (type == 0) { $("#mobile").val(resumeid); } //messagehtml(" ", data.msg); } else { if (type == 0) { $("#mobile").val(resumeid); } } }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示4:" + errorthrown); }, timeout: 20000 }); } /*编辑简历:显示资料*/ function showdata(obj) { /*可能猎头上一条记录还有值,先清空*/ addnewreset(); /*开始填充数据*/ $("#resumeid").val(obj.fid); $("#hiddenheadhunterid").val(obj.headhunterid); $("#selcompanyid").val(obj.companyid); $("#companyid").val(obj.companyid); $("#positionname").val(obj.positionname); setcompanyid(1); $("#deptname").val(obj.deptname); if (obj.workplace != null && obj.workplace != "") { var arr = obj.workplace.split(','); for (j = 0; j < arr.length; j++) { if (arr[j] == "广西南宁") { $("#checkbox1").prop("checked", true); $("#workplace1").val(arr[j]); } else if (arr[j] == "广西崇左") { $("#checkbox2").prop("checked", true); $("#workplace2").val(arr[j]); } else if (arr[j] == "上海") { $("#checkbox3").prop("checked", true); $("#workplace3").val(arr[j]); } else if (arr[j] == "江西赣州") { $("#checkbox4").prop("checked", true); $("#workplace4").val(arr[j]); } } } $("#workplace").val(obj.workplace); /*基本信息*/ $("#username").val(obj.username); $("#selgender").val(obj.gender); $("#gender").val(obj.gender); $("#selnation").val(obj.nation); $("#nation").val(obj.nation); $("#selismarried").val(obj.ismarried); $("#ismarried").val(obj.ismarried); $("#identno").val(obj.identno); $("#age").val(obj.age); $("#height").val(obj.height); $("#weight").val(obj.weight); $("#state").val(obj.state); $("#address").val(obj.address); $("#nowplace").val(obj.nowplace); $("#mobile").val(obj.mobile); $("#email").val(obj.email); $("#qqno").val(obj.qqno); $("#workyear").val(obj.workyear); if (obj.workstatus == "在职") { $("#workstatus1").prop("checked", true); $("#workstatus2").prop("checked", false); } else if (obj.workstatus == "离职") { $("#workstatus1").prop("checked", false); $("#workstatus2").prop("checked", true); } $("#workstatus").val(obj.workstatus); /*教育信息*/ $("#seldegree").val(obj.degree); $("#degree").val(obj.degree); $("#universityname").val(obj.universityname); $("#majorname").val(obj.majorname); $("#universityundergraduate").val(obj.universityundergraduate); $("#majorundergraduate").val(obj.majorundergraduate); if (obj.isdoublegegree == "1") { $("#isdoublegegree1").prop("checked", true); $("#isdoublegegree2").prop("checked", false); $("#div_school2").css("display", ""); $("#div_major2").css("display", ""); } else if (obj.isdoublegegree == "0") { $("#isdoublegegree1").prop("checked", false); $("#isdoublegegree2").prop("checked", true); $("#div_school2").css("display", "none"); $("#div_major2").css("display", "none"); } else { $("#div_school2").css("display", "none"); $("#div_major2").css("display", "none"); } $("#isdoublegegree").val(obj.isdoublegegree); $("#doublegegreeschool").val(obj.doublegegreeschool); $("#doublegegreemajor").val(obj.doublegegreemajor); /*简历*/ $("#resumename-d").val(obj.resumename); $("#resumeurl-d").val(obj.resumeurl); /*其它*/ $("#selsource").val(obj.source); $("#source").val(obj.source); //alert(obj.source); $("#sourcedescription").val(obj.sourcedescription); $("#skillcertificate").val(obj.skillcertificate); if (obj.source == "公司内部人员推荐" || obj.source == "公司外部人员推荐" || obj.source == "其它渠道") { $("#div_otherchannel").css("display", ""); if (source == "其它渠道") { $("#span_othername").html("其它渠道"); } else { $("#span_othername").html("姓名"); } } else { $("#div_otherchannel").css("display", "none"); } getresumejobcount(obj.fid); closehuntnotcommitlist(); } /*猎头点击新增清空*/ function addnewreset() { $("#selcompanyid").val(""); $("#companyid").val(""); $("#deptname").val(""); $("#selpositionname").val(""); $("#checkbox1").prop("checked", false); $("#checkbox2").prop("checked", false); $("#checkbox3").prop("checked", false); $("#checkbox4").prop("checked", false); $("#workplace1").val(""); $("#workplace2").val(""); $("#workplace3").val(""); $("#workplace4").val(""); /*基本信息*/ $("#username").val(""); $("#selgender").val(""); $("#gender").val(""); $("#nation").val(""); $("#identno").val(""); $("#age").val(""); $("#height").val(""); $("#weight").val(""); $("#selismarried").val(""); $("#ismarried").val(""); $("#state").val(""); $("#address").val(""); $("#nowplace").val(""); $("#mobile").val(""); $("#email").val(""); $("#qqno").val(""); $("#workyear").val(""); $("#workstatus1").prop("checked", false); $("#workstatus2").prop("checked", false); $("#workstatus").val(""); /*教育信息*/ $("#seldegree").val(""); $("#degree").val(""); $("#universityname").val(""); $("#majorname").val(""); $("#universityundergraduate").val(""); $("#majorundergraduate").val(""); $("#isdoublegegree1").prop("checked", false); $("#isdoublegegree2").prop("checked", false); $("#div_school2").css("display", "none"); $("#div_major2").css("display", "none"); $("#isdoublegegree").val(""); $("#doublegegreeschool").val(""); $("#doublegegreemajor").val(""); /*简历*/ $("#resumename-d").val(""); $("#resumeurl-d").val(""); /*其它*/ $("#selsource").val(""); $("#source").val(""); $("#sourcedescription").val(""); $("#skillcertificate").val(""); $("#div_otherchannel").css("display", "none"); } /*显示招聘职位*/ function showpositionlist() { $("body").append("
"); $("#mask").addclass("mask").fadein("fast"); $(".fixedpositionlist").fadein("fast"); } function closepositionlist() { $(".fixedpositionlist").fadeout("fast"); $("#mask").css({ display: 'none' }); } /*我的投递记录*/ function showmycommitlist() { $("body").append("
"); $("#mask").addclass("mask").fadein("fast"); $(".fixedmycommitlist").fadein("fast"); var type = $("#hiddensocietytype").val(); getjoblistby(type); } function closemycommitlist() { $(".fixedmycommitlist").fadeout("fast"); $("#mask").css({ display: 'none' }); } /*猎头未完成投递*/ function showhuntnotcommitlist() { $("body").append("
"); $("#mask").addclass("mask").fadein("fast"); $(".huntnotcommitlist").fadein("fast"); getsojoblistbyhunter(); } function closehuntnotcommitlist() { $(".huntnotcommitlist").fadeout("fast"); $("#mask").css({ display: 'none' }); } /*社会招聘岗位信息:绑定公司*/ function bindcompany(pagetype){ var site = $("#site").val(); var typename = "company"; $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getdictdatalistby", //查询数据字典 data: { "site": site, "typename": typename }, datatype: "json", success: function (data, textstatus) { var strrow = "''"; if (data.status == 0) { for (var i = 0; i < data.data.length; i++) { var itemno = data.data[i].itemno; var itemname = data.data[i].itemname; strrow += ""; } } $("#selcompanyid").html(strrow); }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示5:" + errorthrown); }, timeout: 20000 }); } /*社会招聘岗位信息:绑定岗位类型*/ function bindcategory() { var site = $("#site").val(); var typename = "category"; $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getdictdatalistby", //查询数据字典 data: { "site": site, "typename": typename }, datatype: "json", success: function (data, textstatus) { var strrow = "''"; if (data.status == 0) { for (var i = 0; i < data.data.length; i++) { var itemname = data.data[i].itemname; strrow += ""; } } $("#selcategory").html(strrow); }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示6:" + errorthrown); }, timeout: 20000 }); } /*简历:绑定民族*/ function bindnation() { var site = $("#site").val(); var typename = "nation"; $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getdictdatalistby", //查询数据字典 data: { "site": site, "typename": typename }, datatype: "json", success: function (data, textstatus) { var strrow = "''"; var value = $("#nation").val(); if (data.status == 0) { for (var i = 0; i < data.data.length; i++) { var itemname = data.data[i].itemname; if (value != "" && itemname == value) { strrow += ""; } else { strrow += ""; } } } $("#selnation").html(strrow); }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示6:" + errorthrown); }, timeout: 20000 }); } /*家庭所在地、现居住地(address、nowplace、nation)*/ function bindaddress(type) { var site = $("#site").val(); var parentid = 0; if (type == 1) { parentid = $("#select_provice").val(); } else if (type == 2) { parentid = $("#select_city").val(); } $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getarealistby", data: { "site": site, "parentid": parentid }, datatype: "json", success: function (data, textstatus) { var strrow = ""; if (data.status == 0) { for (var i = 0; i < data.data.length; i++) { strrow += ""; } } if (type == 0) { $("#select_provice").html(strrow); $("#select_city").html(""); $("#select_county").html(""); } else if (type == 1) { strrow = "" + strrow; $("#select_city").html(strrow); $("#select_county").html(""); } else if (type == 2) { strrow = "" + strrow; $("#select_county").html(strrow); } }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示a:" + errorthrown); }, timeout: 20000 }); } /*显示家庭所在地、现居住地弹出窗口*/ function showaddress(addr) { $("body").append("
"); $("#mask").addclass("mask").fadein("fast"); $(".fixedaddress").fadein("fast"); if (addr == "address") { $("#h3_address").html("家庭所在地"); } else if (addr == "nowplace") { $("#h3_address").html("现居住地"); } else { $("#h3_address").html("籍贯"); } } /*关闭家庭所在地、现居住地弹出窗口*/ function closeaddress() { $(".fixedaddress").fadeout("fast"); $("#mask").css({ display: 'none' }); var address = ""; if ($("#select_provice option:selected").text() != "请选择"){ address = $("#select_provice option:selected").text(); } if ($("#select_city option:selected").text() != "请选择") { address =address+ $("#select_city option:selected").text(); } if ($("#select_county option:selected").text() != "请选择") { address = address + $("#select_county option:selected").text(); } if ($("#h3_address").text() == "家庭所在地") { $("#address").val(address); } else if ($("#h3_address").text() == "现居住地") { $("#nowplace").val(address); } else { $("#state").val(address); } } /*登入选择:猎头登入societytype=1、我要应聘societytype=2*/ function selectsocietylogin(societytype,sopositionid) { if (societytype == null || societytype == "") { messagehtml(" ", "请选择猎头用户推荐或候选人主动应聘."); return false; } var site = $("#site").val(); $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=selectsocietylogin", //社会招聘:猎头登入、个人登入 data: { "societytype": societytype, "sopositionid": sopositionid, "site": site }, datatype: "json", success: function (data, textstatus) { if (data.status == 0) { messagehtml(" ", data.msg); } else { location.href = data.url; } }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示7:" + errorthrown); }, timeout: 20000 }); } /*猎头登入验证*/ function hunterlogin() { var userid = $("#txt_userid").val(); var password = $("#txt_userpsw").val(); var site = $("#site").val(); if (userid == "" || password == "") { messagehtml(" ", "猎头账号、密码不能为空."); return false; } $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=hunterlogin", //猎头登入 data: { "username": userid, "password": password, "site": site }, datatype: "json", success: function (data, textstatus) { if (data.status == 0) { messagehtml(" ", data.msg); } else { location.href = data.url; } }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示8:" + errorthrown); }, timeout: 20000 }); } /*获取验证码*/ function mobilecheckcode() { var phone = $("#phone").val(); var site = $("#site").val(); if (phone == "") { messagehtml(" ", "手机号不能为空."); return false; } $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=shortmsgcheck", //短信验证 data: { "phone": phone, "site": site }, datatype: "json", success: function (data, textstatus) { //$("#text_code").val(data.checkcode); //alert(data.checkcode); if (parseint(data.status) == 0) { messagehtml(" ", data.msg); } else { //location.href = data.url; messagehtml(" ", "m异常:" + data.msg); } }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";m出错提示:" + errorthrown); }, timeout: 20000 }); } /*候选人登入验证*/ function phonelogin() { var phone = $("#phone").val(); var sopositionid = $("#sopositionid").val(); var checkcode = $("#txt_checkcode").val(); var site = $("#site").val(); $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=phonelogin", //猎头登入 data: { "phone": phone, "sopositionid": sopositionid, "checkcode": checkcode, "site": site }, datatype: "json", success: function (data, textstatus) { if (data.status == 444) { alert(data.msg); } else if (data.status == 0) { //alert("aaa=" + data.url); location.href = data.url; /*跳转进入简历界面*/ } else { location.href = data.url; } }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示10:" + errorthrown); }, timeout: 20000 }); } /*查询已投递的简历。type=1猎头,type=2候选人*/ function getjoblistby(type) { var resumeid = $("#resumeid").val(); var headhunterid = $("#hiddenheadhunterid").val(); if (type == 2) { headhunterid = 0; } else if (type == 1) { resumeid = 0; } var site = $("#site").val(); $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getsojoblistby", //已投递简历列表 data: { "type": type, "resumeid": resumeid, "headhunterid": headhunterid, "site": site }, datatype: "json", success: function (data, textstatus) { if (type == 1) { $("#h3_title").html("已完成投递"); } else { $("#h3_title").html("我的投递记录"); } var strhtml = ''; var strtablerow = ''; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; if (data.status == 0) { for (var i = 0; i < data.data.length; i++) { var strdate = data.data[i].resumedate; //2021-04-02t17:32 var resumedate = strdate.substring(0, 16); resumedate = resumedate.replace("t"," "); strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; } if (strtablerow == '') { strhtml += ""; } else { strhtml += strtablerow; } } else { strhtml += ""; //messagehtml(" ", data.msg); } strhtml += "
序号应聘公司岗位名称姓名完成投递日期
" + (parseint(i) + 1) + "" + data.data[i].companyname + "" + data.data[i].positionname + "" + data.data[i].username + "" + resumedate + "
没有投递记录.
没有投递记录。
"; $("#div_mycommitlist").html(strhtml); jquery(".slidemen").slide({ titcell: "h4", targetcell: "ul", trigger: "click", effect: "slidedown" }); $('.fixedbox li').click(function () { $(this).addclass('on'); $(this).siblings().removeclass(); }); }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示11:" + errorthrown); }, timeout: 20000 }); } /*查询猎头未完成投递简历*/ function getsojoblistbyhunter() { var headhunterid = $("#hiddenheadhunterid").val(); var site = $("#site").val(); //alert("xsfasdfasdf:"+headhunterid); $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getsoresumelistbyheadhunterid", //猎头未完成投递简历 data: { "headhunterid": headhunterid, "site": site }, datatype: "json", success: function (data, textstatus) { var strhtml = ''; var strtablerow = ''; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; if (data.status == 0) { /*开始*/ for (var i = 0; i < data.data.length; i++) { var strdate = data.data[i].createddate; //2021-04-02t17:32 var resumedate = strdate.substring(0, 16); resumedate = resumedate.replace("t", " "); strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; } if (strtablerow == '') { strhtml += ""; } else { strhtml += strtablerow; } strhtml += "
序号岗位名称候选人姓名完成投递日期编辑删除
" + (parseint(i) + 1) + "" + data.data[i].positionname + "" + data.data[i].username + "" + resumedate + "编辑删除
没有未投递简历。
"; $("#div_notcommitlist").html(strhtml); jquery(".slidemen").slide({ titcell: "h4", targetcell: "ul", trigger: "click", effect: "slidedown" }); $('.fixedbox li').click(function () { $(this).addclass('on'); $(this).siblings().removeclass(); }); /*结束*/ } else { messagehtml(" ", data.msg); } }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示12:" + errorthrown); }, timeout: 20000 }); } /*删除一份简历*/ function delresume(resumeid) { var site = $("#site").val(); alert(resumeid); $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=deleteresume", //已投递简历列表 data: { "resumeid": resumeid, "site": site }, datatype: "json", success: function (data, textstatus) { if (data.status == 0) { messagehtml(" ", data.msg); } else { messagehtml(" ", data.msg); } closehuntnotcommitlist(); }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示13:" + errorthrown); }, timeout: 20000 }); } /*查询招聘岗位列表*/ function getsopositionlist(pindex) { var site = $("#site").val(); var companyid = $("#selcompanyid").val(); var category = $("#selcategory").val(); var workplace = $("#selworkplace").val(); if (companyid == "") { companyid = 0; } var pagesize = $("#txt_pagesize").val(); var pageindex = 0; if (pindex == -1) { pageindex = $("#txt_pageindex").val(); } else { pageindex = pindex; } $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getsopositionlist", //查询招聘岗位列表 data: { "site": site, "companyid": companyid, "category": category, "workplace": workplace, "pagesize": pagesize, "pageindex": pageindex }, datatype: "json", success: function (data, textstatus) { var strhtml = ''; var strtablerow = ''; var totalcount = 0; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; //strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; if (data.status == 0) { /*开始*/ for (var i = 0; i < data.data.length; i++) { var strdate = data.data[i].lastupdatedate; var lastupdatedate = strdate.substring(0, 10); strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; //strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; strtablerow += ""; totalcount++; } strhtml += strtablerow; strhtml += "
序号公司名称岗位类型岗位名称年薪
(万元)
工作地点招聘
人数
岗位职责及
任职要求
应聘报名
" + (parseint(i) + 1) + "" + data.data[i].companyname + "" + data.data[i].category + "" + data.data[i].positionname + "" + data.data[i].yearsalary + "" + data.data[i].workplace + "" + data.data[i].num + "点击查阅我要应聘
"; /*结束*/ } else { strhtml += "没有资料显示。"; strhtml += ""; //messagehtml(" ", data.msg); } $("#div_positionlist").html(strhtml); $("#pageindex").val(0); $("#pagecontent").html(data.pager); //alert(data.pager); jquery(".slidemen").slide({ titcell: "h4", targetcell: "ul", trigger: "click", effect: "slidedown" }); $('.fixedbox li').click(function () { $(this).addclass('on'); $(this).siblings().removeclass(); }); }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示14:" + errorthrown); }, timeout: 20000 }); } /*显示岗位职责及任职要求*/ function jobrequireinfo(sopositionid) { var site = $("#site").val(); //alert("type=" + type); $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=getsopositionbyfid", data: { "sopositionid": sopositionid, "site": site }, datatype: "json", success: function (data, textstatus) { if (data.status == 0) { $("#h3_jobrequire").html(data.data.positionname + ":岗位职责及任职要求"); $("#div_age").html(data.data.age); $("#div_degree").html(data.data.degree); $("#div_workyear").html(data.data.workyear); $("#div_gender").html(data.data.gender); $("#div_major").html(data.data.major); $("#div_workplace").html(data.data.workplace); $("#div_ismarried").html(data.data.ismarried); $("#div_historywork").html(data.data.historywork); $("#div_specrequire").html(data.data.specrequire); $("#div_skillcertificate").html(data.data.skillcertificate); $("#div_jobrequire").html(data.data.jobrequire); $("#div_otherrequire").html(data.data.otherrequire); } else { messagehtml(" ", data.msg); } }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示15:" + errorthrown); }, timeout: 20000 }); } function deleteresumefile(dirname, type) { $.ajax({ type: "post", url: "/tools/submit_ajax.ashx?action=deleteresumefile", //删除文件 data: { "dirname": dirname, "type": type }, datatype: "json", beforesend: function (xmlhttprequest) { }, success: function (data, textstatus) { if (data.status == 1) { messagehtml(" ", data.msg); } else { messagehtml(" ", data.msg); } }, error: function (xmlhttprequest, textstatus, errorthrown) { messagehtml("状态:" + textstatus + ";出错提示:" + errorthrown); }, complete: function (xmlhttprequest, textstatus) { }, timeout: 20000 }); } var wait = 60; function time321(o, ismessage) { var phone = $("#txt_phone").val(); if (phone == "" || phone == "点击输入您的手机号") { alert("请输入您的手机号."); return false; } var pattern = /^1[3456789]\d{9}$/; //判断手机号格式是否正确 if (!(pattern.test(phone))) { alert("手机号格式有误,请重新输入."); o.value = "获取验证码"; return false; } else { if (ismessage == "1") { $("#phone").val(phone); mobilecheckcode(); /*获取验证码*/ } if (wait == 0) { o.removeattribute("disabled"); o.value = "获取验证码"; wait = 60; } else { o.setattribute("disabled", true); o.value = "重新发送(" + wait + ")"; $("#btn_send").css("background", "#c2c2c2"); ismessage = "0"; wait--; settimeout(function () { $("#btn_send").css("background", "#f39801"); time321(o, ismessage) }, 1000) } } } function checkmobile(mobile) { //对手机号码的验证 var reg = /^0?1[3|4|5|6|7|8|9][0-9]\d{8}$/; if (!reg.test(mobile)) { messagehtml(" ", "请输入正确的手机号码"); return false; }; return true; } function checkemail(email) { var mailreg = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; if (!mailreg.test(email)) { messagehtml(" ", "输入的邮箱格式有误"); return false; } return true; } function isnum(obj) { //得到第一个字符是否为负号 var t = obj.value.charat(0); //先把非数字的都替换掉,除了数字和. obj.value = obj.value.replace(/[^\d.]/g, ""); //必须保证第一个为数字而不是. obj.value = obj.value.replace(/^\./g, ""); //保证只有出现一个.而没有多个. obj.value = obj.value.replace(/\.{2,}/g, "."); //保证.只出现一次,而不能出现两次以上 obj.value = obj.value.replace(".", "$#{1}quot;").replace(/\./g, "").replace("$#{1}quot;", "."); //如果第一位是负号,则允许添加 if (t == '-') { obj.value = '-' + obj.value; } }