1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167 |
- var domain = $_CONFIG.domain;
- $(document).ready(function () {
- var c = $("#yearfrom").val(),
- a = $("#monthfrom").val(),
- b = $("#yearto").val(),
- d = $("#monthto").val();
- if (b == "") {
- $("#graduationmonth").hide();
- $("#leavemonth").hide();
- $("#projectmonthto").hide()
- } else {
- $("#graduationmonth").show();
- $("#leavemonth").show();
- $("#projectmonthto").show()
- }
- $("#sex span.rdo").click(function () {
- if ($(this).hasClass("on")) {
- return false
- } else {
- $(this).toggleClass("on");
- $(this).siblings().removeClass("on")
- }
- });
- $("#mobilecountry span.rdo").click(function () {
- if ($(this).hasClass("on")) {
- return false
- } else {
- $(this).toggleClass("on");
- $(this).siblings().removeClass("on")
- }
- });
- $("#isoversea span.rdo").click(function () {
- if ($(this).hasClass("on")) {
- return false
- } else {
- $(this).toggleClass("on");
- $(this).siblings().removeClass("on")
- }
- });
- $("#isfulltime").click(function () {
- $(this).toggleClass("on")
- });
- $("#majorname").click(function () {
- $("#err_majorname").hide();
- return false
- });
- $("#overseawork span.rdo").click(function () {
- if ($(this).hasClass("on")) {
- return false
- } else {
- $(this).toggleClass("on");
- $(this).siblings().removeClass("on")
- }
- });
- $("#worktype span.rdo").click(function () {
- if ($(this).hasClass("on")) {
- return false
- } else {
- $(this).toggleClass("on");
- $(this).siblings().removeClass("on")
- }
- });
- // $("#workzwld span.rdo").click(function () {
- // if ($(this).hasClass("on")) {
- // return false
- // } else {
- // $(this).toggleClass("on");
- // //$(this).siblings().removeClass("on")
- // }
- // });
- $("#funtypename").click(function () {
- $("#err_funtypedesc").hide();
- return false
- });
- $("#areaname").click(function () {
- $("#err_areaname").hide();
- return false
- });
- $("#salarytype").change(function () {
- var e = $(this).val();
- $(".xx").hide();
- $("#sal" + e).show()
- });
- $("#salarytype").find("option").each(function () {
- if ($(this).attr("selected") == true) {
- v = $(this).val();
- $("#sal" + v).show()
- }
- });
- $("#yearsal,#monthsal").change(function () {
- if ($(this).val() == "") {
- $(this).prev().addClass("c_tdefault")
- }
- });
- $(".refreshrsm").click(function () {
- var e = $(this).attr("value");
- refreshRsm(e);
- return false
- });
- $(".fast").click(function () {
- var e = $(this).attr("value");
- setFastRsm(e, this);
- return false
- });
- $(".delrsm").click(function () {
- var e = $(this).parent().attr("value");
- $(".aname").each(function () {
- if ($(this).attr("value") == e) {
- var f = $(this).html();
- delResume(e, f)
- }
- //var e = $(this).parent().attr("value");
-
- });
- return false
- });
- $(".showOpen").click(function () {
- var f = $(this).attr("value");
- var e = $(this).parent().attr("value");
- $(".aname").each(function () {
- if ($(this).attr("value") == e) {
- var g = $(this).html();
- showOpen(e, g, f);
- return false
- }
- });
- return false
- });
- $(".copyrsm").click(function () {
- $("#pageWp").hide();
- $("#copyrsm").show();
- var e = $(this).parent().attr("value");
- $("#copyUserid").val(e);
- return false
- });
- $("#copyback").click(function () {
- $("#copyrsm").hide();
- $("#pageWp").show();
- return false
- });
- $("#confirmCopy").click(function () {
- confirmCopyResume()
- });
- $("#copyinfo .e").click(function () {
- if (!$(this).hasClass("off")) {
- $(this).toggleClass("on");
- return false
- }
- });
- $("#editrsmname,#srsmname").click(function () {
- $("#changersmname").show().addClass("changeName");
- shadow.show();
- $("body").addClass("resumeShow");
- return false
- });
- $("#backtomyrsm").click(function () {
- location.href = domain + "resume/myresume.php"
- });
- $("#bday").blur(function () {
- var e = $("#bday").val();
- $("#bday").siblings().html(e);
- return false
- });
- $("#jsfbrq").blur(function () {
- var e = $("#jsfbrq").val();
- $("#jsfbrq").siblings().html(e);
- return false
- });
- $(".changeinfo .back").click(function () {
- $(".changeinfo").hide();
- $(".phone,.email,.pwd").hide();
- $("#pageContent").show();
- return false
- });
- $("#saveresumeone").click(function () {
- saveResumeOne()
- });
- $("#entrancetime").blur(function () {
- var e = $("#entrancetime").val();
- $("#entrancetime").siblings().html(e);
- return false
- });
- $("#graduationtime").blur(function () {
- var e = $("#graduationtime").val();
- $("#graduationtime").siblings().html(e);
- return false
- });
- $("#saveresumetwo").click(function () {
- if ($_CONFIG.template == "resume/eduexp" && $("#eduid").val()) {
- var e = $("#isverify").val();
- if (e == "1") {
- pop.ini(["该学历为“已认证学历”,保存后将失去认证标识。确定要保存么?", "保存教育经历"], [
- ["取消", "确认"],
- ["pop.close()", "pop.close();saveResumeTwo();"]
- ])
- } else {
- saveResumeTwo()
- }
- } else {
- saveResumeTwo()
- }
- return false
- });
- $("#saveresumefour").click(function () {
- saveResumeFour()
- });
- $("#addwork").click(function () {
- location.href = $_CONFIG.domain + "resume/workexp.php?userid=" + $(this).attr("value")
- });
- $("#addedu").click(function () {
- location.href = $_CONFIG.domain + "resume/eduexp.php?userid=" + $(this).attr("value")
- });
- $("#addpro").click(function () {
- location.href = $_CONFIG.domain + "resume/proexpedit.php?userid=" + $(this).attr("value")
- })
- });
- function showReginfo(c) {
- if ($(".calendar ").css("display") == "block") {
- $(".calendar ").hide()
- }
- $("#pageContent").hide();
- $(".changeinfo").show();
- $("." + c).show();
- if (c == "email") {
- if (!$("#ioldemail")[0]) {
- var b = $("#baseinfoemail").attr("value");
- var a = '<div class="i" id="ioldemail"><div class="txt"><input type="text" placeholder="' + b + '" class="old_email" disabled/></div></div>';
- $("#emailcontent").prepend(a)
- }
- }
- return false
- }
- function saveResumeOne() {
- var redirect = $("#redirect").attr("value");
- if (redirect) {
- storage.json_set("redirect", {
- ret_url: redirect
- })
- }
- $("#saveresumeone").attr("disabled", "disabled");
- var cname = filterTitle($("#cname")),
- sex = $("#sex span.on").attr("value"),
- bday = $("#bday").text(),
- mobilephone = filterTitle($("#mobilephone")),
- mpcountry = $("#mpverifystatus").val(),
- situation = $("#situation")[0] ? $("#situation").val() : "0",
- area = $("#jobarea").val(),
- workyear = $("#workyear")[0] ? $("#workyear").val() : "",
- idtype = $("#idtype")[0] ? $("#idtype").val() : "",
- idcard = $("#idcard")[0] ? filterTitle($("#idcard")) : "",
- yearsalary = filterTitle($("#yearsalary"));
- basesalary = filterTitle($("#basesalary"));
- allowance = filterTitle($("#allowance"));
- bonus = filterTitle($("#bonus"));
- stock = filterTitle($("#stock"));
- hukou = $("#hukou")[0] ? $("#hukou").val() : "", marriage = $("#marriage")[0] ? $("#marriage").val() : "", rsmid = $("#rsmid").val(), stature = $("#stature")[0] ? $("#stature").val() : "", address = $("#address")[0] ? $("#address").val() : "";
- var error = false;
- if (filterTitle($("#is_verify")) == 1) {
- mobilephone = filterTitle($("#inputphone"))
- }
- if (!/^1[3456789]{1,1}[0-9]{9,9}$/.test(mobilephone) && filterTitle($(this)).length <= 11) {
- var mpcountry = "000"
- } else {
- var mpcountry = "086"
- }
- if (typeof (mpcountry) == "undefined") {
- mpcountry = "086"
- }
- if ($("#baseinfoemail").attr("type") == "text") {
- var email = filterTitle($("#baseinfoemail"))
- } else {
- var email = ""
- }
- if (yearsalary != "" && !checkSalary(yearsalary)) {
- pop.ini([
- ["精确到小数点后两位,不超过999.99", "warn"]
- ], ["确定", "focusElement($('#yearsalary'))"]);
- inputPrompt($("#yearsalary"), "精确到小数点后两位,不超过999.99");
- error = true
- }
- if (basesalary != "" && !checkSalary(basesalary)) {
- pop.ini([
- ["精确到小数点后两位,不超过999.99", "warn"]
- ], ["确定", "focusElement($('#basesalary'))"]);
- inputPrompt($("#basesalary"), "精确到小数点后两位,不超过999.99");
- error = true
- }
- if (allowance != "" && !checkSalary(allowance)) {
- pop.ini([
- ["精确到小数点后两位,不超过999.99", "warn"]
- ], ["确定", "focusElement($('#allowance'))"]);
- inputPrompt($("#allowance"), "精确到小数点后两位,不超过999.99");
- error = true
- }
- if (bonus != "" && !checkSalary(bonus)) {
- pop.ini([
- ["精确到小数点后两位,不超过999.99", "warn"]
- ], ["确定", "focusElement($('#bonus'))"]);
- inputPrompt($("#bonus"), "精确到小数点后两位,不超过999.99");
- error = true
- }
- if (stock != "" && !checkSalary(stock)) {
- pop.ini([
- ["精确到小数点后两位,不超过999.99", "warn"]
- ], ["确定", "focusElement($('#stock'))"]);
- inputPrompt($("#stock"), "精确到小数点后两位,不超过999.99");
- error = true
- }
- if (error == true) {
- $("#saveresumeone").removeAttr("disabled");
- return false
- }
- var param = {
- cname: cname,
- sex: sex,
- bday: bday,
- mobilephone: mobilephone,
- mpcountry: mpcountry,
- situation: situation,
- area: area,
- workyear: workyear,
- idtype: idtype,
- idcard: idcard,
- email: email,
- yearsalary: yearsalary,
- basesalary: basesalary,
- allowance: allowance,
- bonus: bonus,
- stock: stock,
- hukou: hukou,
- marriage: marriage,
- rsmid: rsmid,
- stature: stature,
- address: address
- };
- var url = $_CONFIG.domain + "ajax/resume/baseinfo.ajax.php";
- var result = ajaxRequest(url, param, "post", "json");
- if (result.url && result.status == 0) {
- if ($_CONFIG.template == "resume/guid1") {
- _History.unbind()
- }
- location.href = result.url;
- return false
- }
- if (result.status == 1) {
- if ($_CONFIG.template == "resume/baseinfo") {
- location.href = $_CONFIG.domain + "resume/detail.php?userid=" + rsmid;
- return false
- } else {
- _History.unbind();
- location.href = $_CONFIG.domain + "resume/guide2.php?userid=" + result.userid;
- return false
- }
- }
- var i = 1;
- for (var key in result) {
- if (key == "result" || key == "status") {
- continue
- }
- var errid = eval('$("#err_' + key + '")');
- var erridspan = eval('$("#err_' + key + ' span")');
- var objid = '$("#' + key + '")';
- if (i == 1) {
- if (objid.length > 0) {
- if (result[key] == "请认证手机号,认证后可使用手机号登录") {
- pop.ini([
- ["您还未认证手机号,认证成功后可直接使用手机号码进行登录,请认证!", "warn"]
- ], ["确定", "focusElement($('#" + key + "'))"])
- } else {
- pop.ini([
- [result[key], "warn"]
- ], ["确定", "focusElement($('#" + key + "'))"])
- }
- } else {
- pop.ini([
- [result[key], "warn"]
- ], ["确定", "focusElement($('#" + key + "'))"])
- }
- }
- errid.show();
- erridspan.html(result[key]);
- i++;
- errid = "";
- objid = ""
- }
- $("#saveresumeone").removeAttr("disabled")
- }
- function showMajor() {
- degree = $("#degree").val();
- if (degree > 2 || degree == -1) {
- $(".zhuanye").show()
- } else {
- $(".zhuanye").hide()
- }
- }
- var saveResumeTwo = function () {
- $(".but").attr("disabled", "disabled");
- var schoolname = filterTitle($("#schoolname")),
- entrancetime = $("#entrancetime").text(),
- graduationtime = $("#graduationtime").text() == "至今" ? "" : $("#graduationtime").text(),
- degree = $("#degree").val(),
- isfulltime = $("#isfulltime").hasClass("on") ? "1" : "0",
- majordesc = filterTitle($("#majordesc")),
- major = $("#major")[0] ? $("#major").val() : "",
- oversea = $("#isoversea .rdo").first().hasClass("on") ? "1" : "0",
- describe = $("#describe")[0] ? filterTitle($("#describe")) : "",
- userid = $("#userid").val(),
- eduid = $("#eduid").val();
- var url = $_CONFIG.domain + "ajax/resume/eduinfo.ajax.php";
- var param = {
- schoolname: schoolname,
- entrancetime: entrancetime,
- graduationtime: graduationtime,
- isfulltime: isfulltime,
- majordesc: majordesc,
- major: major,
- oversea: oversea,
- degree: degree,
- describe: describe,
- userid: userid,
- eduid: eduid
- };
- console.log(param);
- var result = ajaxRequest(url, param, "post", "json");
- if (result.url && result.status == 0) {
- if ($_CONFIG.template == "resume/guid2") {
- _History.unbind()
- }
- location.href = result.url;
- return false
- }
- if (result.status == 1) {
- if ($_CONFIG.template == "resume/eduexp") {
- location.href = $_CONFIG.domain + "resume/eduexpedit.php?userid=" + userid
- } else {
- _History.unbind();
- location.href = $_CONFIG.domain + "resume/guide3.php?userid=" + userid
- }
- }
- var i = 1;
- for (var key in result.desc) {
- var errid = eval('$("#err_' + key + '")');
- var erridspan = eval('$("#err_' + key + ' span")');
- var objid = '$("#' + key + '")';
- if (i == 1) {
- if (objid.length > 0) {
- if (key != "majorname") {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定", "focusElement($('#" + key + "'))"])
- } else {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定", "focusElement($('#" + key + "'))"])
- }
- $(".but").removeAttr("disabled")
- } else {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定"]);
- $(".but").removeAttr("disabled")
- }
- }
- errid.show();
- erridspan.html(result.desc[key]);
- i++;
- errid = "";
- objid = ""
- }
- };
- var saveResumeThree = function (add) {
- $(".but").attr("disabled", "disabled");
- var coname = filterTitle($("#coname")),
- entrytime = $("#entrytime").text(),
- leavetime = $("#leavetime").text() == "至今" ? "" : $("#leavetime").text(),
- funtype = $("#funtype").val(),
- position = filterTitle($("#position")),
- indtype = $("#indtype").val(),
- worktype = $("#worktype span.on").first().attr("value"),
- cosize = $("#cosize")[0] ? $("#cosize").val() : "",
- cotype = $("#cotype")[0] ? $("#cotype").val() : "",
- department = filterTitle($("#department")),
- workdesc = filterTitle($("#workdesc")),
- reportboss = $("#reportboss")[0] ? filterTitle($("#reportboss")) : "",
- reportperson = $("#reportperson")[0] ? filterTitle($("#reportperson")) : "",
- isoversea = $("#overseawork span.on").attr("value"),
- leavereason = $("#leavereason")[0] ? filterTitle($("#leavereason")) : "",
- score = $("#score")[0] ? filterTitle($("#score")) : "",
- userid = $("#userid").val(),
- workid = $("#workid").val(),
- isedit = $("#isedit").val();
- var url = $_CONFIG.domain + "ajax/resume/workinfo.ajax.php";
- var param = {
- coname: coname,
- entrytime: entrytime,
- leavetime: leavetime,
- funtype: funtype,
- position: position,
- indtype: indtype,
- worktype: worktype,
- department: department,
- workdesc: workdesc,
- cosize: cosize,
- cotype: cotype,
- reportboss: reportboss,
- reportperson: reportperson,
- isoversea: isoversea,
- leavereason: leavereason,
- score: score,
- workid: workid,
- userid: userid
- };
- var result = ajaxRequest(url, param, "post", "json");
- if (result.url && result.status == 0) {
- if ($_CONFIG.template == "resume/guid3") {
- _History.unbind()
- }
- location.href = result.url;
- return false
- }
- if (result.status == 1) {
- if ($_CONFIG.template == "resume/workexp") {
- location.href = $_CONFIG.domain + "resume/workexpedit.php?userid=" + userid
- } else {
- jianli = $("#jianli").val();
- _History.unbind();
- if (add == 0) {
- location.href = $_CONFIG.domain + "resume/guide4.php?userid=" + userid
- } else {
- location.href = $_CONFIG.domain + "resume/guide3.php?userid=" + userid + "&jianli=" + jianli
- }
- }
- }
- var i = 1;
- for (var key in result.desc) {
- var errid = eval('$("#err_' + key + '")');
- var erridspan = eval('$("#err_' + key + ' span")');
- var objid = '$("#' + key + '")';
- if (i == 1) {
- if (objid.length > 0) {
- if (key != "funtypename") {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定", "focusElement($('#" + key + "'))"])
- } else {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定"])
- }
- $(".but").removeAttr("disabled")
- } else {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定"]);
- $(".but").removeAttr("disabled")
- }
- }
- errid.show();
- erridspan.html(result.desc[key]);
- i++;
- errid = "";
- objid = ""
- }
- };
- var saveResumeFour = function () {
- var jobterm = $("#jobterm").val(),
- area = $("#area").val(),
- indtype = $("#indtype").val(),
- funtype = $("#funtype").val(),
- entrytime = $("#entrytime").val(),
- intro = filterTitle($("#intro")),
- resumekey = filterTitle($("#resumekey")),
- userid = $("#userid").val();
- isedit = $("#isedit").val();
- var position = $("#position").val();
- if (area == "") {
- pop.ini([
- ["请选择期望地点", "warn"]
- ], ["确定"]);
- return false
- }
- if (funtype == "") {
- pop.ini([
- ["请选择期望职能", "warn"]
- ], ["确定"]);
- return false
- }
- if (position == "") {
- pop.ini([
- ["请输入职位名称", "warn"]
- ], ["确定"]);
- return false
- }
- if (position.length > 25) {
- pop.ini([
- ["职位请控制在25个中文字以内", "warn"]
- ], ["确定"]);
- return false
- }
- var salarytype = $("#salarytype").val();
- var inputsalary = "";
- if (salarytype == "4") {
- inputsalary = $("#yearsal")[0] ? $("#yearsal").val() : ""
- } else {
- if (salarytype == "1") {
- inputsalary = $("#monthsal")[0] ? $("#monthsal").val() : ""
- } else {
- if (salarytype == "3") {
- inputsalary = filterTitle($("#sal3"));
- if (!checkNumber(inputsalary, "int")) {
- pop.ini([
- ["请输入整数", "warn"]
- ], ["确定"]);
- inputPrompt($("#sal"), "请输入整数");
- return false
- }
- } else {
- if (salarytype == "2") {
- inputsalary = filterTitle($("#sal2"));
- if (!checkNumber(inputsalary, "int")) {
- pop.ini([
- ["请输入整数", "warn"]
- ], ["确定"]);
- inputPrompt($("#sal"), "请输入整数");
- return false
- }
- }
- }
- }
- }
- var is_customize = false;
- if (inputsalary == "customize") {
- is_customize = true;
- var min = filterTitle($("#sal_min"));
- var max = filterTitle($("#sal_max"));
- if (!checkNumber(min, "int") || !checkNumber(max, "int")) {
- pop.ini([
- ["请输入整数", "warn"]
- ], ["确定"]);
- inputPrompt($("#customizesalary"), "请输入整数");
- return false
- } else {
- if (min > 10000000 || max > 10000000) {
- pop.ini([
- ["最多七位整数", "warn"]
- ], ["确定"]);
- inputPrompt($("#customizesalary"), "最多七位整数");
- return false
- }
- }
- inputsalary = min + "-" + max
- }
- var url = $_CONFIG.domain + "ajax/resume/jobintent.ajax.php";
- var param = {
- jobterm: jobterm,
- area: area,
- indtype: indtype,
- funtype: funtype,
- salarytype: salarytype,
- inputsalary: inputsalary,
- entrytime: entrytime,
- intro: intro,
- resumekey: resumekey,
- position: position,
- is_customize: is_customize,
- userid: userid
- };
- var result = ajaxRequest(url, param, "post", "json");
- if (result.url && result.status == 0) {
- if ($_CONFIG.template == "resume/guid3") {
- _History.unbind()
- }
- location.href = result.url;
- return false
- }
- if (result.status == 1) {
- if ($_CONFIG.template == "resume/jobintent") {
- location.href = $_CONFIG.domain + "resume/detail.php?userid=" + userid
- } else {
- var redirect = storage.json_get("redirect");
- var ret_url = redirect.ret_url;
- if (ret_url) {
- storage.del("redirect");
- location.href = ret_url;
- return false
- } else {
- var config1 = "简历已创建成功!完善简历可以获得更多工作机会哦。";
- var config5 = [
- ["完善简历", "查看简历"],
- ["improveRsm()", "lookRsm()"]
- ];
- pop.ini(config1, config5)
- }
- }
- }
- var i = 1;
- for (var key in result.desc) {
- var errid = eval('$("#err_' + key + '")');
- var erridspan = eval('$("#err_' + key + ' span")');
- var objid = '$("#' + key + '")';
- var objeval = eval('$("#' + key + '")');
- if (i == 1) {
- if (objid.length > 0 && objeval.is("input") && key != "reportperson" && key != "reportboss" && key != "reference") {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定", "focusElement($('#" + key + "'))"]);
- $(".but").removeAttr("disabled")
- } else {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定"]);
- $(".but").removeAttr("disabled")
- }
- }
- errid.show();
- erridspan.html(result.desc[key]);
- i++;
- errid = "";
- objid = ""
- }
- };
- var skipResumeThree = function () {
- var j = filterTitle($("#coname")),
- i = $("#entrytime").val(),
- f = $("#leavetime").val(),
- p = $("#funtype").val(),
- s = filterTitle($("#position")),
- c = $("#indtype").val(),
- d = $("#cosize")[0] ? $("#cosize").val() : "",
- l = $("#cotype")[0] ? $("#cotype").val() : "",
- o = filterTitle($("#department")),
- b = filterTitle($("#workdesc")),
- e = $("#reportboss")[0] ? filterTitle($("#reportboss")) : "",
- m = $("#reportperson")[0] ? filterTitle($("#reportperson")) : "",
- g = $("#reference")[0] ? filterTitle($("#reference")) : "",
- t = $("#overseawork span.on").attr("value"),
- h = $("#leavereason")[0] ? filterTitle($("#leavereason")) : "",
- n = $("#score")[0] ? filterTitle($("#score")) : "",
- a = $("#userid").val(),
- r = $("#workid").val();
- var k = false;
- if (j != "" || i != "" || f != "" || p != "" || c != "" || o != "" || b != "" || s != "") {
- k = true
- }
- if (k == false) {
- var q = "完善的工作经验将增加投递成功率,确定跳过么?";
- config5 = [
- ["继续填写", "跳过"],
- ["continueRsm()", "skipResume()"]
- ];
- pop.ini(q, config5)
- } else {
- var q = "你的信息尚未保存,确定跳过么?";
- config5 = [
- ["继续填写", "跳过"],
- ["continueRsm()", "skipResume()"]
- ];
- pop.ini(q, config5)
- }
- };
- var continueRsm = function () {
- pop.close()
- };
- var improveRsm = function () {
- _History.unbind();
- var a = $("#userid").val();
- location.href = domain + "resume/detail.php?userid=" + a
- };
- var skipResume = function () {
- _History.unbind();
- var a = $("#userid").val();
- location.href = $_CONFIG.domain + "resume/guide4.php?userid=" + a
- };
- var lookRsm = function () {
- _History.unbind();
- var a = $("#userid").val();
- location.href = $_CONFIG.domain + "resume/resumepreview.php?userid=" + a
- };
- var editWorkExp = function (a, b) {
- location.href = $_CONFIG.domain + "resume/workexp.php?userid=" + a + "&workid=" + b
- };
- var delWorkExp = function (a, f, e) {
- var b = $(e).parents().find("strong").text(),
- d = $(e).parents().find("i").text();
- var c = b + '<br><br><span class="c_orange">' + d + "</span>";
- $("#delworkpop .cn").html(c);
- $("#delworkid").attr("attr-userid", a);
- $("#delworkid").attr("attr-workid", f);
- $("#delworkpop,#shadow").show()
- };
- var delProjectExp = function (b, a, f) {
- var c = $(f).parents().find("strong").text(),
- e = $(f).parents().find("i").text();
- var d = c + '<br><br><span class="c_orange">' + e + "</span>";
- $("#delpropop .cn").html(d);
- $("#delproid").attr("attr-userid", b);
- $("#delproid").attr("attr-proid", a);
- $("#delpropop,#shadow").show()
- };
- var confirmDelWorkExp = function (h) {
- $("#delworkpop,#shadow").hide();
- var b = $(h).attr("attr-userid");
- var g = $(h).attr("attr-workid");
- var c = $_CONFIG.domain + "ajax/resume/delworkexp.ajax.php";
- var f = {
- userid: b,
- workid: g
- };
- var a = ajaxRequest(c, f, "post", "json");
- if (a.status == 1) {
- pop.ini(a.desc, ["确定"]);
- $("#workexp_" + g).remove();
- if (!$("#addwork")[0]) {
- $("#pageContent").append("<div onclick=\"location.href ='" + $_CONFIG.domain + "resume/workexp.php?userid=" + b + '\'" value="' + b + '" class="btn_add" >+ 添加工作经验</div>')
- }
- return false
- } else {
- if (a.url) {
- location.href = a.url;
- return false
- }
- var e = [
- [a.desc, "warn"]
- ];
- var d = ["确定"];
- pop.ini(e, d);
- return false
- }
- };
- var editEduExp = function (a, b) {
- location.href = $_CONFIG.domain + "resume/eduexp.php?userid=" + a + "&eduid=" + b
- };
- var delEduExp = function (b, a, f) {
- var c = $(f).parents().find("strong").text(),
- e = $(f).parents().find("i").text();
- var d = c + '<br><br><span class="c_orange">' + e + "</span>";
- $("#deledupop .cn").html(d);
- $("#deleduid").attr("attr-userid", b);
- $("#deleduid").attr("attr-eduid", a);
- $("#deledupop,#shadow").show()
- };
- var confirmDelEduExp = function (h) {
- $("#deledupop,#shadow").hide();
- var c = $(h).attr("attr-userid");
- var b = $(h).attr("attr-eduid");
- var d = $_CONFIG.domain + "ajax/resume/deleduexp.ajax.php";
- var g = {
- userid: c,
- eduid: b
- };
- var a = ajaxRequest(d, g, "post", "json");
- if (a.status == 1) {
- pop.ini(a.desc, ["确定"]);
- $("#eduexp_" + b).remove();
- if (!$("#addedu")[0]) {
- $("#pageContent").append("<div onclick=\"location.href ='" + $_CONFIG.domain + "resume/eduexp.php?userid=" + c + '\'" value="' + c + '" value="' + c + '" class="btn_add" >+ 添加教育经历</div>')
- }
- return false
- } else {
- if (a.url) {
- location.href = a.url;
- return false
- }
- var f = [
- [a.desc, "warn"]
- ];
- var e = ["确定"];
- pop.ini(f, e);
- return false
- }
- };
- var editProExp = function (b, a) {
- location.href = $_CONFIG.domain + "resume/proexpedit.php?userid=" + b + "&projectid=" + a
- };
- var saveProject = function () {
- var url = $_CONFIG.domain + "ajax/resume/saveproject.ajax.php";
- var param = {
- projectname: filterTitle($("#projectname")),
- timefrom: $("#timefrom").text(),
- timeto: $("#timeto").text() == "至今" ? "" : $("#timeto").text(),
- ifunction: filterTitle($("#function")),
- workcompname: $("#workcompname").val(),
- describe: filterTitle($("#prodescribe")),
- userid: $("#userid").val(),
- projectid: $("#projectid").val()
- };
- var result = ajaxRequest(url, param, "post", "json");
- if (result.url && result.status == 0) {
- location.href = result.url;
- return false
- }
- if (result.status == 1) {
- location.href = $_CONFIG.domain + "resume/proexplist.php?userid=" + $("#userid").val()
- }
- var i = 1;
- for (var key in result.desc) {
- var errid = eval('$("#err_' + key + '")');
- var erridspan = eval('$("#err_' + key + ' span")');
- var objid = '$("#' + key + '")';
- var objeval = eval('$("#' + key + '")');
- if (i == 1) {
- if (objid.length > 0 && objeval.is("input") && key != "reportperson" && key != "reportboss" && key != "reference") {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定", "focusElement($('#" + key + "'))"]);
- $(".but").removeAttr("disabled")
- } else {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定"]);
- $(".but").removeAttr("disabled")
- }
- }
- errid.show();
- erridspan.html(result.desc[key]);
- i++;
- errid = "";
- objid = ""
- }
- };
- var confirmDelProjectExp = function (e) {
- $("#delpropop,#shadow").hide();
- var c = $(e).attr("attr-userid");
- var b = $(e).attr("attr-proid");
- var d = $_CONFIG.domain + "ajax/resume/delproject.ajax.php?projectid=" + b + "&userid=" + c;
- var a = ajaxRequest(d);
- if (a.status == 1) {
- $("#projectexp_" + b).remove();
- if (!$("#addpro")[0]) {
- $("#pageContent").append("<div onclick=\"location.href ='" + $_CONFIG.domain + "resume/proexpedit.php?userid=" + c + '\'" value="' + c + '" value="' + c + '" class="btn_add" >+ 添加项目经验</div>')
- }
- return false
- } else {
- if (a.url) {
- location.href = a.url
- }
- pop.ini([
- [a.message, "warn"]
- ], ["确定"])
- }
- };
- var savePasteBaseInfo = function () {
- var cname = filterTitle($("#cname")),
- sex = $("#sex span.on").attr("value"),
- bday = $("#bday").text(),
- mpcountry = $("#mobilecountry span.on").attr("value"),
- mobilephone = filterTitle($("#mobilephone")),
- area = $("#jobarea").val(),
- workyear = $("#workyear").val(),
- idtype = $("#idtype").val(),
- idcard = filterTitle($("#idcard")),
- major = $("#major").val(),
- degree = $("#degree").val(),
- situation = $("#situation").val(),
- funtype = $("#funtype").val(),
- indtype = $("#indtype").val(),
- keyword = $("#resumekey").val(),
- isfulltime = $("#isfulltime").hasClass("on") ? "1" : "0",
- yearsalary = filterTitle($("#yearsalary"));
- if (yearsalary != "" && !checkSalary(yearsalary)) {
- pop.ini([
- ["精确到小数点后两位,不超过999.99", "warn"]
- ], ["确定"]);
- inputPrompt($("#yearsalary"), "精确到小数点后两位,不超过999.99");
- return false
- }
- if ($("#email")[0] && $("#email").parent().hasClass("ipt")) {
- var email = $("#email").val()
- } else {
- var email = ""
- }
- if (typeof (mpcountry) == "undefined") {
- mpcountry = "086"
- }
- var url = $_CONFIG.domain + "ajax/resume/pastebaseinfo.ajax.php";
- var param = {
- cname: cname,
- sex: sex,
- bday: bday,
- mpcountry: mpcountry,
- mobilephone: mobilephone,
- area: area,
- workyear: workyear,
- idtype: idtype,
- idcard: idcard,
- email: email,
- major: major,
- degree: degree,
- situation: situation,
- funtype: funtype,
- indtype: indtype,
- isfulltime: isfulltime,
- keyword: keyword,
- yearsalary: yearsalary
- };
- var result = ajaxRequest(url, param, "post", "json");
- if (result.url && result.status == 0) {
- location.href = result.url;
- return false
- }
- if (result.status == 1) {
- location.href = $_CONFIG.domain + "resume/pastedetail.php";
- return false
- }
- var i = 1;
- for (var key in result.desc) {
- var errid = eval('$("#err_' + key + '")');
- var erridspan = eval('$("#err_' + key + ' span")');
- var objid = '$("#' + key + '")';
- if (i == 1) {
- if (objid.length > 0) {
- if (result.desc[key] == "请认证手机号,认证后可使用手机号登录") {
- pop.ini([
- ["您还未认证手机号,认证成功后可直接使用手机号码进行登录,请认证!", "warn"]
- ], ["确定", "focusElement($('#" + key + "'))"])
- } else {
- pop.ini([
- [result.desc[key], "warn"]
- ], ["确定", "focusElement($('#" + key + "'))"])
- }
- } else {
- pop.ini([
- [result.message, "warn"]
- ], ["确定"])
- }
- }
- errid.show();
- erridspan.html(result.desc[key]);
- i++;
- errid = "";
- objid = ""
- }
- };
- var savePasteOtherinfo = function () {
- var d = filterTitle($("#otherinfo"));
- if (d == "") {
- pop.ini([
- ["其他信息不能为空", "warn"]
- ], ["确定"]);
- return false
- }
- var b = $_CONFIG.domain + "ajax/resume/pasteotherinfo.ajax.php";
- var c = {
- otherinfo: d
- };
- var a = ajaxRequest(b, c, "post", "json");
- if (a.status == 1) {
- location.href = $_CONFIG.domain + "resume/pastedetail.php"
- } else {
- if (a.url) {
- location.href = a.url;
- return false
- }
- pop.ini([
- [a.desc, "warn"]
- ], ["确定"]);
- inputPrompt($("#otherinfo"), a.desc);
- return false
- }
- };
- var showRsmDetail = function (a) {
- obj = $(a).parent();
- if (!obj.hasClass("mk")) {
- obj.addClass("mk")
- } else {
- obj.removeClass("mk")
- }
- };
- function abc() {
- pop("成功", 2, "", "", "", "", "", "", 1)
- }
- var refreshRsm = function (b) {
- var c = $_CONFIG.domain + "ajax/resume/refreshresume.ajax.php";
- var g = {
- userid: b
- };
- var a = ajaxRequest(c, g, "post", "json");
- if (a.status == 1) {
- $(".finishtime").each(function () {
- if ($(this).attr("value") == b) {
- var h = "创建于" + $(this).attr("data-value") + " 更新于" + a.update;
- $(this).html(h)
- }
- });
- var f = "简历刷新成功";
- pop.msg(f);
- return false
- } else {
- if (a.url) {
- location.href = a.url;
- return false
- }
- var e = [
- [a.desc, "warn"]
- ];
- var d = ["确定"];
- pop.ini(e, d);
- return false
- }
- };
- var setFastRsm = function (c, h) {
- var b = $(h).hasClass("on") ? "0" : "1";
- var d = $_CONFIG.domain + "ajax/resume/quickrsm.ajax.php?rsmid=" + c + "&status=" + b;
- var g = {
- userid: c,
- status: b
- };
- var a = ajaxRequest(d, g, "post", "json");
- if (a.status == 1) {
- $(".fast").each(function () {
- if ($(this).attr("value") == c) {
- $(this).toggleClass("on")
- } else {
- $(this).removeClass("on")
- }
- });
- pop.ini(a.desc, ["确定"]);
- return false
- } else {
- if (a.url) {
- location.href = a.url;
- return false
- }
- var f = [
- [a.desc, "warn"]
- ];
- var e = ["确定"];
- pop.ini(f, e);
- return false
- }
- };
- var showOpen = function (b, c, a) {
- openuserid = b;
- $("#openstatus .rsmname").html(c);
- $("#openstatus .e").each(function () {
- if ($(this).attr("value") == a) {
- $(this).addClass("on")
- } else {
- $(this).removeClass("on")
- }
- });
- $(".popOther").hide();
- shadow.show();
- $("#openstatus").show();
- $(".popE .e").click(function () {
- if (!$(this).hasClass("on")) {
- $(this).addClass("on");
- $(this).siblings().removeClass("on")
- }
- });
- return false
- };
- $("#confirmOpen").click(function () {
- $(".popE .e").each(function () {
- if ($(this).hasClass("on")) {
- ostatus = $(this).attr("value");
- return false
- }
- });
- confirmOpen(openuserid, ostatus);
- return false
- });
- var confirmOpen = function (c, b) {
- var d = $_CONFIG.domain + "ajax/resume/openresume.ajax.php";
- var g = {
- userid: c,
- status: b
- };
- var a = ajaxRequest(d, g, "post", "json");
- pop.close();
- if (a.status == 1) {
- $(".showOpen").each(function () {
- if ($(this).parent().attr("value") == c) {
- $(this).removeAttr("value");
- $(this).attr("value", b)
- }
- if ($(this).attr("value") == "0" && $(this).parent().attr("value") != c) {
- $(this).removeAttr("value");
- $(this).attr("value", "2")
- }
- });
- if (b == 0) {
- $(".openchange").each(function () {
- if ($(this).text() == "对所有公开") {
- $(this).text("对无忧公开")
- }
- });
- $("#rsm_" + c + " .openchange").text("对所有公开")
- } else {
- if (b == 2) {
- $("#rsm_" + c + " .openchange").text("对无忧公开")
- } else {
- if (b == 3) {
- $("#rsm_" + c + " .openchange").text("完全保密")
- }
- }
- }
- pop.ini(a.desc, ["确定"]);
- return false
- } else {
- if (a.url) {
- location.href = a.url;
- return false
- }
- var f = [
- [a.desc, "warn"]
- ];
- var e = ["确定"];
- pop.ini(f, e);
- return false
- }
- };
- var copyResume = function (a) {
- pageshow("copyrsm")
- };
- var chooseResumePart = function (a) {
- if ($(a).hasClass("mk")) {
- $(a).removeClass("mk")
- } else {
- $(a).addClass("mk")
- }
- };
- var confirmCopyResume = function () {
- var f = $("#copyUserid").val(),
- h = $("#copyname").val();
- if (h == "") {
- var e = [
- ["请填写简历名称", "warn"]
- ],
- d = ["确定"];
- pop.ini(e, d);
- return false
- }
- var g = h.replace(/[^\x00-\xff]/g, "**");
- if (g.length > 50) {
- var e = [
- ["简历名称太长", "warn"]
- ],
- d = ["确定"];
- pop.ini(e, d);
- return false
- }
- var b = new Array();
- $("#copyinfo, .e").each(function () {
- if ($(this).hasClass("on")) {
- b.push($(this).attr("name"))
- }
- });
- var a = domain + "ajax/resume/copyresume.ajax.php";
- var c = {
- userid: f,
- rsmname: h,
- part: b
- };
- var i = ajaxRequest(a, c, "post", "json");
- if (i.status == 1) {
- location.reload();
- return false
- } else {
- if (i.url) {
- location.href = i.url;
- return false
- }
- var e = [
- [i.desc, "warn"]
- ];
- var d = ["确定"];
- pop.ini(e, d);
- return false
- }
- };
- var delResume = function (a, d) {
- console.log(a);
- console.log(d);
- var c = "确定删除" + d + "么?";
- var b = [
- ["取消", "确定"],
- ["", "confirmDelResume('" + a + "')"]
- ];
- pop.ini(c, b)
- };
- var confirmDelResume = function (b) {
- var c = "delresume.ajax.php";
- var f = {
- userid: b
- };
- var a = ajaxRequest(c, f, "post", "json");
- if (a.status == 1) {
- pop.close();
- $("#rsm_" + b).remove();
- if (!$("#addrsm")[0] && a.addtype == 0) {
- $("#pageContent").append('<div id="addrsm" class="btn_add" onclick="createResume();">+ 创建简历</div>')
- }
- return false
- } else {
- if (a.url) {
- location.href = a.url;
- return false
- }
- var e = [
- [a.desc, "warn"]
- ];
- var d = ["确定"];
- pop.ini(e, d);
- return false
- }
- };
- var saveRsmName = function (b) {
- var d = $("#rsmname").val();
- if (d == "") {
- $("#err_rsmname").show();
- $("#err_rsmname").find(".error").html("请输入简历名");
- return false
- }
- var f = d.replace(/[^\x00-\xff]/g, "**");
- if (f.length > 50) {
- $("#err_rsmname").show();
- $("#err_rsmname").find(".error").html("简历名称太长");
- return false
- }
- var c = domain + "ajax/resume/editresumename.ajax.php";
- var e = {
- userid: b,
- rsmname: d
- };
- var a = ajaxRequest(c, e, "post", "json");
- if (a.status == 1) {
- $("#srsmname").html(a.rsmname);
- $("#rsmname").val(d);
- $("#changersmname,#shadow").hide();
- $("body").removeClass("resumeShow");
- return false
- } else {
- if (a.url) {
- location.href = a.url;
- return false
- }
- $("#err_rsmname").show();
- $("#err_rsmname").find(".error").html(a.desc);
- return false
- }
- };
- var showSenior = function (a) {
- if ($(a).hasClass("on")) {
- $(a).removeClass("on");
- $("#highworkinfo").hide()
- } else {
- $(a).addClass("on");
- $("#highworkinfo").show()
- }
- };
- var createResume = function () {
- var b = "是否需要创建一份新简历";
- var a = [
- ["取消", "确定"],
- ["", "cResume()"]
- ];
- pop.ini(b, a)
- };
- var cResume = function () {
- var b = domain + "ajax/resume/createresume.ajax.php";
- var e = {};
- var a = ajaxRequest(b, e, "post", "json");
- if (a.status == 1) {
- location.href = domain + "resume/detail.php?userid=" + a.rsmid
- } else {
- if (a.url) {
- location.href = a.url;
- return false
- }
- var d = [
- [a.desc, "warn"]
- ];
- var c = ["确定"];
- pop.ini(d, c);
- return false
- }
- };
- if ("oninput" in document) {
- $(".inputblur").bind("input", function () {
- var a = $(this).attr("id");
- if (a == "inputphone") {
- a = "mobilephone"
- }
- $(this).next().show();
- $("#err_" + a).hide();
- if ($(this).attr("id") == "hoursal") {
- $("#err_daysal").hide()
- }
- if ($(this).attr("id") == "daysal") {
- $("#err_hoursal").hide()
- }
- })
- } else {
- $(".inputblur").keydown(function () {
- var a = $(this).attr("id");
- if (a == "inputphone") {
- a = "mobilephone"
- }
- $(this).next().show();
- $("#err_" + a).hide();
- if ($(this).attr("id") == "hoursal") {
- $("#err_daysal").hide()
- }
- if ($(this).attr("id") == "daysal") {
- $("#err_hoursal").hide()
- }
- })
- }
- $(".inputblur").click(function () {
- if ($(".calendar ").css("display") == "block") {
- $(".calendar ").hide()
- }
- });
- function clearPrompt(a) {
- if (a != undefined) {
- var b = a.attr("id");
- $("#err_" + b).hide()
- }
- }
- function inputPrompt(b, d, a) {
- if (a) {
- b.focus()
- }
- clearPrompt(b);
- var c = b.attr("id");
- $("#err_" + c).show();
- $("#err_" + c).children().html(d)
- }
- function focusElement(a) {
- pop.close();
- a.focus()
- }
- $("#jobareaname").click(function () {
- clearPrompt($("#jobareaname"))
- });
- $(".inputblur").blur(function () {
- if ($(this).attr("id") == "cname") {
- var c = filterTitle($("#cname"));
- if (filterTitle($(this)) == "") {
- inputPrompt($("#cname"), "请输入姓名");
- return false
- } else {
- var u = c.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 20) {
- inputPrompt($("#cname"), "姓名限10个中文字内");
- return false
- }
- }
- }
- if ($(this).attr("id") == "mobilephone") {
- var r = filterTitle($("#mobilephone"));
- var b = $("#mobilecountry span.on").attr("value");
- if (typeof (b) == "undefined") {
- b = "086"
- }
- if (filterTitle($(this)) == "") {
- inputPrompt($("#mobilephone"), "请输入手机号");
- return
- }
- if (b == "086") {
- if (!/^[0-9]{1,20}$/.test(r)) {
- inputPrompt($("#mobilephone"), "你输入的手机号码有误");
- return false
- } else {
- if (filterTitle($(this)).length > 11) {
- inputPrompt($("#mobilephone"), "仅支持11位大陆手机号");
- return false
- }
- }
- } else {
- if (b == "000") {
- if (!/^[0-9]{1,20}$/.test(r)) {
- inputPrompt($("#mobilephone"), "你输入的手机号码有误");
- return false
- }
- }
- }
- }
- if ($(this).attr("id") == "daysal" || $(this).attr("id") == "hoursal") {
- if (filterTitle($(this)) == "") {
- inputPrompt($("#sal"), "请输入期望薪资");
- return false
- } else {
- clearPrompt($("#sal"))
- }
- }
- if ($(this).attr("id") == "intro") {
- var A = $("#intro")[0] ? filterTitle($("#intro")) : "";
- var u = A.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 2000) {
- inputPrompt($("#intro"), "自我介绍限1000个中文字内");
- return false
- }
- }
- if ($(this).attr("id") == "qy_zwms") {
- var A = $("#qy_zwms")[0] ? filterTitle($("#qy_zwms")) : "";
- var u = A.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 2000) {
- inputPrompt($("#qy_zwms"), "职位描述限1000个中文字内");
- return false
- }
- }
- if ($(this).attr("id") == "qy_qyjl") {
- var A = $("#qy_qyjl")[0] ? filterTitle($("#qy_qyjl")) : "";
- var u = A.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 2000) {
- inputPrompt($("#qy_qyjl"), "企业简历限1000个中文字内");
- return false
- }
- }
- if ($(this).attr("id") == "resumekey") {
- if (filterTitle($(this)) != "") {
- var G = $("#resumekey")[0] ? $("#resumekey").val() : "";
- var n = G.split(" ");
- n = $.grep(n, function (H) {
- return $.trim(H).length > 0
- });
- if (n.length > 10) {
- inputPrompt($("#resumekey"), "个人标签格式错误,请重新输入!");
- return false
- }
- var E = false;
- for (var m in n) {
- var u = n[m].replace(/[^\x00-\xff]/g, "**");
- if (u.length > 24) {
- E = true
- }
- }
- if (E) {
- inputPrompt($("#resumekey"), "个人标签格式错误,请重新输入!");
- return false
- } else {
- clearPrompt($("#resumekey"));
- return false
- }
- }
- }
- if ($(this).attr("id") == "email") {
- if (filterTitle($(this)) != "") {
- if ($("#email")[0] && $("#email").attr("disabled") != "disabled") {
- var t = filterTitle($("#email"))
- } else {
- var t = ""
- }
- } else {
- clearPrompt($("#email"));
- return false
- }
- }
- if ($(this).attr("id") == "baseinfoemail") {
- if (filterTitle($(this)) != "") {
- if ($("#baseinfoemail")[0] && $("#baseinfoemail").attr("disabled") != "disabled") {
- var t = filterTitle($("#baseinfoemail"))
- } else {
- var t = ""
- }
- } else {
- clearPrompt($("#baseinfoemail"));
- return false
- }
- }
- if ($(this).attr("id") == "schoolname") {
- var f = filterTitle($("#schoolname"));
- if (filterTitle($(this)) == "") {
- inputPrompt($("#schoolname"), "请输入学校名称");
- return false
- } else {
- var u = f.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 50) {
- inputPrompt($("#schoolname"), "学校名称限25个中文字内");
- return false
- }
- }
- }
- if ($(this).attr("id") == "majordesc") {
- var w = $("#major")[0] ? $("#major").val() : "",
- e = $("#degree").val(),
- h = filterTitle($("#majordesc"));
- if ((e > 2 && e != 9) || e == "-1") {
- var u = h.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 100) {
- inputPrompt($("#majordesc"), "专业名称限50个中文字内");
- return false
- }
- }
- }
- if ($(this).attr("id") == "describe") {
- var i = $("#describe")[0] ? filterTitle($("#describe")) : "";
- if (i != "") {
- var u = i.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 2000) {
- inputPrompt($("#describe"), "专业描述限1000个中文字内");
- return false
- } else {
- clearPrompt($("#describe"));
- return false
- }
- }
- }
- if ($(this).attr("id") == "prodescribe") {
- var k = filterTitle($("#prodescribe"));
- var u = k.replace(/[^\x00-\xff]/g, "**");
- if (k == "") {
- inputPrompt($("#prodescribe"), "请输入项目描述");
- return false
- } else {
- if (u.length > 2000) {
- inputPrompt($("#prodescribe"), "请填写正确的项目描述,限1000个汉字");
- return false
- }
- }
- }
- if ($(this).attr("id") == "function") {
- var d = $("#function")[0] ? filterTitle($("#function")) : "";
- if (i != "") {
- var u = d.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 2000) {
- inputPrompt($("#function"), "请填写正确的责任描述,限1000个汉字");
- return false
- } else {
- clearPrompt($("#function"));
- return false
- }
- }
- }
- if ($(this).attr("id") == "coname") {
- var q = filterTitle($("#coname"));
- if (filterTitle($(this)) == "") {
- inputPrompt($("#coname"), "请输入公司名称");
- return false
- }
- }
- if ($(this).attr("id") == "czprs") {
- var q = filterTitle($("#czprs"));
- if (filterTitle($(this)) == "") {
- inputPrompt($("#czprs"), "请输入招聘人数");
- return false
- }
- }
- if ($(this).attr("id") == "cjnyq") {
- var q = filterTitle($("#cjnyq"));
- if (filterTitle($(this)) == "") {
- inputPrompt($("#cjnyq"), "请输入技能要求");
- return false
- }
- }
- if ($(this).attr("id") == "zw_ssbm") {
- var q = filterTitle($("#zw_ssbm"));
- if (filterTitle($(this)) == "") {
- inputPrompt($("#zw_ssbm"), "请输入所属部门");
- return false
- }
- }
- if ($(this).attr("id") == "qy_lxr") {
- var q = filterTitle($("#qy_lxr"));
- if (filterTitle($(this)) == "") {
- inputPrompt($("#qy_lxr"), "请输入企业联系人");
- return false
- }
- }
- if ($(this).attr("id") == "qy_yx") {
- var q = filterTitle($("#qy_yx"));
- if (filterTitle($(this)) == "") {
- inputPrompt($("#qy_yx"), "请输入企业邮箱");
- return false
- }
- }
- if ($(this).attr("id") == "qy_xxdz") {
- var q = filterTitle($("#qy_xxdz"));
- if (filterTitle($(this)) == "") {
- inputPrompt($("#qy_xxdz"), "请输入企业详细地址");
- return false
- }
- }
- if ($(this).attr("id") == "cqymc") {
- var q = filterTitle($("#cqymc"));
- if (filterTitle($(this)) == "") {
- inputPrompt($("#cqymc"), "请输入企业名称");
- return false
- }
- }
- if ($(this).attr("id") == "position") {
- var F = filterTitle($("#position"));
- var u = F.replace(/[^\x00-\xff]/g, "**");
- if (F == "") {
- inputPrompt($("#position"), "请输入职位名称");
- return false
- } else {
- if (u.length > 70) {
- inputPrompt($("#position"), "职位名称限35个中文字内");
- return false
- }
- }
- }
- if ($(this).attr("id") == "workdesc") {
- var a = filterTitle($("#workdesc"));
- if (a == "") {
- inputPrompt($("#workdesc"), "请输入工作描述");
- return false
- }
- var u = a.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 2000) {
- inputPrompt($("#workdesc"), "工作描述限1000个中文字内");
- return false
- }
- }
- if ($(this).attr("id") == "department") {
- var B = filterTitle($("#department"));
- if (B != "") {
- var u = B.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 50) {
- inputPrompt($("#department"), "部门名称限25个中文字内");
- return false
- }
- }
- }
- if ($(this).attr("id") == "reportboss") {
- var g = $("#reportboss")[0] ? filterTitle($("#reportboss")) : "";
- if (g != "") {
- var u = g.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 50) {
- inputPrompt($("#reportboss"), "汇报对象超长,请重新输入");
- return false
- }
- }
- }
- if ($(this).attr("id") == "reportperson") {
- var z = $("#reportperson")[0] ? filterTitle($("#reportperson")) : "";
- if (z != "") {
- if (!/^[0-9]*$/.test(z)) {
- inputPrompt($("#reportperson"), "请正确输入下属人数");
- return false
- } else {
- if (z.length > 5) {
- inputPrompt($("#reportperson"), "下属人数限5位数字");
- return false
- }
- }
- }
- if (z.substr(0, 1) == "0") {
- inputPrompt($("#reportperson"), "请正确输入下属人数");
- return false
- }
- }
- if ($(this).attr("id") == "leavereason") {
- var l = $("#leavereason")[0] ? filterTitle($("#leavereason")) : "";
- if (l != "") {
- var u = l.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 200) {
- inputPrompt($("#leavereason"), "离职原因限100个中文字内");
- return false
- }
- }
- }
- if ($(this).attr("id") == "score") {
- var y = $("#score")[0] ? filterTitle($("#score")) : "";
- if (y != "") {
- var u = y.replace(/[^\x00-\xff]/g, "**");
- if (u.length > 2000) {
- inputPrompt($("#score"), "主要业绩限1000个中文字内");
- return false
- }
- }
- }
- if ($(this).attr("id") == "keyword") {
- var D = $("#keyword").val();
- if (D != "") {
- var o = D.split(" ");
- if (o.length > 10) {
- inputPrompt($("#keyword"), "个人标签格式错误,请重新输入!");
- return false
- }
- for (var m in o) {
- var u = o[m].replace(/[^\x00-\xff]/g, "**");
- if (u.length > 12) {
- inputPrompt($("#keyword"), "个人标签格式错误,请重新输入!");
- return false
- }
- }
- }
- }
- if ($(this).attr("id") == "otherinfo") {
- var s = filterTitle($("#otherinfo"));
- var u = s.replace(/[^\x00-\xff]/g, "**");
- if (s == "") {} else {
- if (u.length > 20000) {
- inputPrompt($("#otherinfo"), "输入限10000个中文字内");
- return false
- }
- }
- }
- if ($(this).attr("id") == "hoursal") {
- var C = $("#hoursal")[0] ? filterTitle($("#hoursal")) : "";
- if (C != "") {
- if (!/^[0-9]{0,7}$/.test(C)) {
- clearPrompt($("#daysal"));
- inputPrompt($("#hoursal"), "目前薪资限7位数字内");
- return false
- } else {
- if (C.length > 7) {
- clearPrompt($("#daysal"));
- inputPrompt($("#hoursal"), "目前薪资限7位数字内");
- return false
- }
- }
- }
- }
- if ($(this).attr("id") == "daysal") {
- var j = $("#daysal")[0] ? filterTitle($("#daysal")) : "";
- if (j != "") {
- if (!/^[0-9]{0,7}$/.test(j)) {
- clearPrompt($("#hoursal"));
- inputPrompt($("#daysal"), "目前薪资限7位数字内");
- return false
- } else {
- if (j.length > 7) {
- clearPrompt($("#hoursal"));
- inputPrompt($("#daysal"), "目前薪资限7位数字内");
- return false
- }
- }
- }
- }
- if ($(this).attr("id") == "projectname") {
- if ($.trim(filterTitle($(this))) == "") {
- inputPrompt($("#projectname"), "请输入项目名称")
- } else {
- clearPrompt($("#projectname"))
- }
- }
- if ($(this).attr("id") == "areaname") {
- var x = filterTitle($("#areaname"));
- if (filterTitle($(this)) == "") {
- clearPrompt($("#areaname"));
- return false
- } else {
- clearPrompt($("#areaname"));
- return false
- }
- }
- if ($(this).attr("id") == "funtypename") {
- var p = filterTitle($("#funtypename"));
- if (filterTitle($(this)) == "") {
- clearPrompt($("#funtype"));
- inputPrompt($("#funtype"), "选择职能");
- return false
- } else {
- clearPrompt($("#funtype"));
- return false
- }
- }
- if ($(this).attr("id") == "majordesc") {
- var h = filterTitle($("#majordesc"));
- var w = $("#major").val();
- var e = $("#degree").val();
- degrevalue = e > 2 || e == -1;
- if (w && w.substr(2) == "00" && h == "" && degrevalue) {
- inputPrompt($("#majordesc"), "请选择具体专业或自定义专业名称");
- return false
- } else {
- clearPrompt($("#majordesc"));
- return false
- }
- }
- });
- $(".selectchange").change(function () {
- if ($(this).attr("id") == "workyear") {
- if (filterTitle($(this)) == "") {
- inputPrompt($("#workyear"), "请选择工作年限");
- return false
- } else {
- clearPrompt($("#workyear"));
- return false
- }
- }
- if ($(this).attr("id") == "yearsal") {
- if (filterTitle($(this)) == "") {
- clearPrompt($("#sal"))
- } else {
- clearPrompt($("#sal"))
- }
- if (filterTitle($(this)) == "") {
- inputPrompt($("#sal"), "请选择期望薪资")
- }
- if (filterTitle($(this)) == "customize") {
- $("#customizesalary").show()
- } else {
- $("#customizesalary").hide()
- }
- return false
- }
- if ($(this).attr("id") == "monthsal") {
- if (filterTitle($(this)) == "") {
- clearPrompt($("#sal"))
- } else {
- clearPrompt($("#sal"))
- }
- if (filterTitle($(this)) == "customize") {
- $("#customizesalary").show()
- } else {
- $("#customizesalary").hide()
- }
- return false
- }
- if ($(this).attr("id") == "yearfrom" || $(this).attr("id") == "monthfrom") {
- var c = $("#yearfrom").val(),
- a = $("#monthfrom").val();
- if (c == "" || a == "") {
- inputPrompt($("#entrancetime"), "请选择开始时间");
- inputPrompt($("#timefrom"), "请选择开始时间");
- inputPrompt($("#entrytime"), "请选择入职时间");
- return false
- } else {
- if (c != "" && a != "") {
- clearPrompt($("#entrancetime"));
- clearPrompt($("#timefrom"));
- clearPrompt($("#entrytime"));
- a = (a < 10 ? "0" + a : a);
- var g = (c.toString() + a.toString());
- nowdate = getYM();
- if (g > nowdate) {
- inputPrompt($("#entrancetime"), "入学时间不能选择未来时间");
- inputPrompt($("#timefrom"), "开始时间不能选择未来时间");
- inputPrompt($("#entrytime"), "入职时间不能选择未来时间");
- return false
- }
- } else {
- clearPrompt($("#entrancetime"));
- clearPrompt($("#timefrom"));
- clearPrompt($("#entrytime"));
- return false
- }
- }
- }
- if ($(this).attr("id") == "yearto" || $(this).attr("id") == "monthto") {
- var c = $("#yearfrom").val(),
- a = $("#monthfrom").val(),
- b = $("#yearto").val(),
- f = $("#monthto").val();
- if (b == "") {
- $("#graduationmonth").hide();
- $("#leavemonth").hide();
- $("#projectmonthto").hide()
- } else {
- $("#graduationmonth").show();
- $("#leavemonth").show();
- $("#projectmonthto").show()
- }
- if (((b == "") ^ (f == "")) && b != "") {
- inputPrompt($("#graduationtime"), "请正确选择结束时间");
- inputPrompt($("#leavetime"), "请选择正确离职时间");
- inputPrompt($("#timeto"), "请选择正确项目结束时间");
- return false
- }
- if (b != "" && f != "") {
- var e = a.length == 1 ? c + "0" + a : c + a;
- var d = f.length == 1 ? b + "0" + f : b + f;
- nowdate = getYM();
- if (d > nowdate) {
- inputPrompt($("#leavetime"), "离职时间不能选择未来时间");
- inputPrompt($("#timeto"), "结束时间不能选择未来时间");
- clearPrompt($("#graduationtime"));
- return false
- }
- if (d < e) {
- inputPrompt($("#graduationtime"), "结束时间不能小于开始时间");
- inputPrompt($("#leavetime"), "离职时间不能小于入职时间");
- inputPrompt($("#timeto"), "项目结束时间不能小于入职时间");
- return false
- }
- }
- clearPrompt($("#graduationtime"));
- clearPrompt($("#leavetime"));
- clearPrompt($("#timeto"));
- return false
- }
- if ($(this).attr("id") == "salarytype") {
- clearPrompt($("#sal"));
- $("#customizesalary").css("display", "none");
- switch ($(this).val()) {
- case "1":
- if ($("#monthsal").val() == "" || ($("#monthsal").val() == "customize" && ($("#sal_min").val() == "" || $("#sal_max").val() == ""))) {
- inputPrompt($("#sal"), "请选择期望薪资")
- }
- if ($("#monthsal").val() == "customize") {
- $("#customizesalary").css("display", "block")
- }
- break;
- case "2":
- break;
- case "3":
- break;
- case "4":
- if ($("#yearsal").val() == "" || ($("#yearsal").val() == "customize" && ($("#sal_min").val() == "" || $("#sal_max").val() == ""))) {
- inputPrompt($("#sal"), "请选择期望薪资")
- }
- if ($("#yearsal").val() == "customize") {
- $("#customizesalary").css("display", "block")
- }
- break
- }
- }
- });
- var simpleAssociation = function (a) {
- $(".asslist").find("div").html("");
- var c = $('input[name="' + a + '"]').attr("value");
- var b = 0;
- var d = "";
- if (c) {
- $.ajax({
- url: "//kwdsrv.51job.com/KwdSrvByKey/default.aspx",
- data: {
- kwd: c,
- src: a,
- rand: Math.random()
- },
- dataType: "jsonp",
- cache: false,
- async: false,
- timeout: 1000,
- success: function (f, g, e) {
- if ("1" == f.message) {
- if ("" != f.content) {
- $.each(unescape(f.content).split("\t"), function (h, j) {
- if (b < 4) {
- d += '<span class="ae at ' + a + '" onclick ="subvalue(this)" value ="' + j + '">' + j + "</span>";
- b++
- }
- });
- $("." + a + ".cn").parent().show();
- $("." + a + ".cn").append(d)
- } else {
- $("." + a + ".cn").parent().hide()
- }
- }
- }
- })
- } else {
- $("." + a + ".cn").parent().hide()
- }
- };
- var simpleAssociationforintent = function (a) {
- $(".job_ass").empty();
- var c = $('input[name="' + a + '"]').attr("value");
- var b = 0;
- var d = "";
- if (c) {
- $.ajax({
- url: "//kwdsrv.51job.com/KwdSrvByKey/default.aspx",
- data: {
- kwd: c,
- src: a,
- rand: Math.random()
- },
- dataType: "jsonp",
- cache: false,
- async: false,
- timeout: 1000,
- success: function (f, g, e) {
- if ("1" == f.message) {
- if ("" != f.content) {
- d += "<ul>";
- $.each(unescape(f.content).split("\t"), function (h, j) {
- if (b < 4) {
- d += '<li class="' + a + '" onclick ="subvalue(this)" value ="' + j + '">' + j + "</li>";
- b++
- }
- });
- d += "</ul>";
- $(".job_ass").show();
- $(".job_ass").append(d)
- }
- }
- }
- })
- } else {
- $(".job_ass").hide()
- }
- };
- $("html").click(function () {
- $(".asslist").find("div").html("");
- $(".asslist").hide();
- if ($_CONFIG.template == "resume/jobintent" || $_CONFIG.template == "resume/guide4") {
- $(".job_ass").hide()
- }
- });
- var subvalue = function (a) {
- if ($(a).hasClass("School")) {
- $("input[name='School']").val($(a).attr("value"));
- $("input[name='School']").focus()
- } else {
- if ($(a).hasClass("Major")) {
- $("input[name='Major']").val($(a).attr("value"));
- $("input[name='Major']").focus()
- } else {
- if ($(a).hasClass("Company")) {
- $("input[name='Company']").val($(a).attr("value"));
- $("input[name='Company']").focus()
- } else {
- if ($(a).hasClass("Job")) {
- $("input[name='Job']").val($(a).attr("value"));
- $("input[name='Job']").focus()
- }
- }
- }
- }
- $(".cn").html("");
- if ($_CONFIG.template == "resume/jobintent" || $_CONFIG.template == "resume/guide4") {
- $(".job_ass").empty()
- }
- };
- var showdetail = function (a) {
- if (!$("#showdetail").hasClass("on")) {
- $("#showdetail").addClass("on");
- $(".custom").show()
- } else {
- $("#showdetail").removeClass("on");
- $(".custom").hide()
- }
- };
- var getYM = function () {
- var a = new Date;
- var b = a.getFullYear(),
- d = a.getMonth() + 1;
- d = (d < 10 ? "0" + d : d);
- var c = (b.toString() + d.toString());
- return c
- };
- var checkSalary = function (a) {
- if ((!checkNumber(a)) || (a.indexOf(".") > 1 && a.substr(0, 1) == "0") || $.trim(a).length > 6 || Number(a) > 999.99 || (a.indexOf(".") > -1 && a.indexOf(".") < $.trim(a).length - 3) || a.indexOf(".") == -1 && a.substr(0, 1) == "0" || Number(a) < 0 || a.substr(0, 1) == "+") {
- return false
- }
- return true
- };
- function checkNumber(c) {
- var b = arguments[1] || "";
- if (isNaN(c)) {
- return false
- }
- if (b == "int") {
- var a = /^[1-9][0-9]*$/;
- if (!c.match(a)) {
- return false
- }
- }
- if (b == "numberchar") {
- var a = /^[0-9][0-9]*$/;
- if (!c.match(a)) {
- return false
- }
- }
- return true
- }
- $(".pclear").click(function () {
- if ($(this).parent().siblings().hasClass("asslist")) {
- $(".cn").html("")
- }
- });
|