resume.js 57 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167
  1. var domain = $_CONFIG.domain;
  2. $(document).ready(function () {
  3. var c = $("#yearfrom").val(),
  4. a = $("#monthfrom").val(),
  5. b = $("#yearto").val(),
  6. d = $("#monthto").val();
  7. if (b == "") {
  8. $("#graduationmonth").hide();
  9. $("#leavemonth").hide();
  10. $("#projectmonthto").hide()
  11. } else {
  12. $("#graduationmonth").show();
  13. $("#leavemonth").show();
  14. $("#projectmonthto").show()
  15. }
  16. $("#sex span.rdo").click(function () {
  17. if ($(this).hasClass("on")) {
  18. return false
  19. } else {
  20. $(this).toggleClass("on");
  21. $(this).siblings().removeClass("on")
  22. }
  23. });
  24. $("#mobilecountry span.rdo").click(function () {
  25. if ($(this).hasClass("on")) {
  26. return false
  27. } else {
  28. $(this).toggleClass("on");
  29. $(this).siblings().removeClass("on")
  30. }
  31. });
  32. $("#isoversea span.rdo").click(function () {
  33. if ($(this).hasClass("on")) {
  34. return false
  35. } else {
  36. $(this).toggleClass("on");
  37. $(this).siblings().removeClass("on")
  38. }
  39. });
  40. $("#isfulltime").click(function () {
  41. $(this).toggleClass("on")
  42. });
  43. $("#majorname").click(function () {
  44. $("#err_majorname").hide();
  45. return false
  46. });
  47. $("#overseawork span.rdo").click(function () {
  48. if ($(this).hasClass("on")) {
  49. return false
  50. } else {
  51. $(this).toggleClass("on");
  52. $(this).siblings().removeClass("on")
  53. }
  54. });
  55. $("#worktype span.rdo").click(function () {
  56. if ($(this).hasClass("on")) {
  57. return false
  58. } else {
  59. $(this).toggleClass("on");
  60. $(this).siblings().removeClass("on")
  61. }
  62. });
  63. // $("#workzwld span.rdo").click(function () {
  64. // if ($(this).hasClass("on")) {
  65. // return false
  66. // } else {
  67. // $(this).toggleClass("on");
  68. // //$(this).siblings().removeClass("on")
  69. // }
  70. // });
  71. $("#funtypename").click(function () {
  72. $("#err_funtypedesc").hide();
  73. return false
  74. });
  75. $("#areaname").click(function () {
  76. $("#err_areaname").hide();
  77. return false
  78. });
  79. $("#salarytype").change(function () {
  80. var e = $(this).val();
  81. $(".xx").hide();
  82. $("#sal" + e).show()
  83. });
  84. $("#salarytype").find("option").each(function () {
  85. if ($(this).attr("selected") == true) {
  86. v = $(this).val();
  87. $("#sal" + v).show()
  88. }
  89. });
  90. $("#yearsal,#monthsal").change(function () {
  91. if ($(this).val() == "") {
  92. $(this).prev().addClass("c_tdefault")
  93. }
  94. });
  95. $(".refreshrsm").click(function () {
  96. var e = $(this).attr("value");
  97. refreshRsm(e);
  98. return false
  99. });
  100. $(".fast").click(function () {
  101. var e = $(this).attr("value");
  102. setFastRsm(e, this);
  103. return false
  104. });
  105. $(".delrsm").click(function () {
  106. var e = $(this).parent().attr("value");
  107. $(".aname").each(function () {
  108. if ($(this).attr("value") == e) {
  109. var f = $(this).html();
  110. delResume(e, f)
  111. }
  112. //var e = $(this).parent().attr("value");
  113. });
  114. return false
  115. });
  116. $(".showOpen").click(function () {
  117. var f = $(this).attr("value");
  118. var e = $(this).parent().attr("value");
  119. $(".aname").each(function () {
  120. if ($(this).attr("value") == e) {
  121. var g = $(this).html();
  122. showOpen(e, g, f);
  123. return false
  124. }
  125. });
  126. return false
  127. });
  128. $(".copyrsm").click(function () {
  129. $("#pageWp").hide();
  130. $("#copyrsm").show();
  131. var e = $(this).parent().attr("value");
  132. $("#copyUserid").val(e);
  133. return false
  134. });
  135. $("#copyback").click(function () {
  136. $("#copyrsm").hide();
  137. $("#pageWp").show();
  138. return false
  139. });
  140. $("#confirmCopy").click(function () {
  141. confirmCopyResume()
  142. });
  143. $("#copyinfo .e").click(function () {
  144. if (!$(this).hasClass("off")) {
  145. $(this).toggleClass("on");
  146. return false
  147. }
  148. });
  149. $("#editrsmname,#srsmname").click(function () {
  150. $("#changersmname").show().addClass("changeName");
  151. shadow.show();
  152. $("body").addClass("resumeShow");
  153. return false
  154. });
  155. $("#backtomyrsm").click(function () {
  156. location.href = domain + "resume/myresume.php"
  157. });
  158. $("#bday").blur(function () {
  159. var e = $("#bday").val();
  160. $("#bday").siblings().html(e);
  161. return false
  162. });
  163. $("#jsfbrq").blur(function () {
  164. var e = $("#jsfbrq").val();
  165. $("#jsfbrq").siblings().html(e);
  166. return false
  167. });
  168. $(".changeinfo .back").click(function () {
  169. $(".changeinfo").hide();
  170. $(".phone,.email,.pwd").hide();
  171. $("#pageContent").show();
  172. return false
  173. });
  174. $("#saveresumeone").click(function () {
  175. saveResumeOne()
  176. });
  177. $("#entrancetime").blur(function () {
  178. var e = $("#entrancetime").val();
  179. $("#entrancetime").siblings().html(e);
  180. return false
  181. });
  182. $("#graduationtime").blur(function () {
  183. var e = $("#graduationtime").val();
  184. $("#graduationtime").siblings().html(e);
  185. return false
  186. });
  187. $("#saveresumetwo").click(function () {
  188. if ($_CONFIG.template == "resume/eduexp" && $("#eduid").val()) {
  189. var e = $("#isverify").val();
  190. if (e == "1") {
  191. pop.ini(["该学历为“已认证学历”,保存后将失去认证标识。确定要保存么?", "保存教育经历"], [
  192. ["取消", "确认"],
  193. ["pop.close()", "pop.close();saveResumeTwo();"]
  194. ])
  195. } else {
  196. saveResumeTwo()
  197. }
  198. } else {
  199. saveResumeTwo()
  200. }
  201. return false
  202. });
  203. $("#saveresumefour").click(function () {
  204. saveResumeFour()
  205. });
  206. $("#addwork").click(function () {
  207. location.href = $_CONFIG.domain + "resume/workexp.php?userid=" + $(this).attr("value")
  208. });
  209. $("#addedu").click(function () {
  210. location.href = $_CONFIG.domain + "resume/eduexp.php?userid=" + $(this).attr("value")
  211. });
  212. $("#addpro").click(function () {
  213. location.href = $_CONFIG.domain + "resume/proexpedit.php?userid=" + $(this).attr("value")
  214. })
  215. });
  216. function showReginfo(c) {
  217. if ($(".calendar ").css("display") == "block") {
  218. $(".calendar ").hide()
  219. }
  220. $("#pageContent").hide();
  221. $(".changeinfo").show();
  222. $("." + c).show();
  223. if (c == "email") {
  224. if (!$("#ioldemail")[0]) {
  225. var b = $("#baseinfoemail").attr("value");
  226. var a = '<div class="i" id="ioldemail"><div class="txt"><input type="text" placeholder="' + b + '" class="old_email" disabled/></div></div>';
  227. $("#emailcontent").prepend(a)
  228. }
  229. }
  230. return false
  231. }
  232. function saveResumeOne() {
  233. var redirect = $("#redirect").attr("value");
  234. if (redirect) {
  235. storage.json_set("redirect", {
  236. ret_url: redirect
  237. })
  238. }
  239. $("#saveresumeone").attr("disabled", "disabled");
  240. var cname = filterTitle($("#cname")),
  241. sex = $("#sex span.on").attr("value"),
  242. bday = $("#bday").text(),
  243. mobilephone = filterTitle($("#mobilephone")),
  244. mpcountry = $("#mpverifystatus").val(),
  245. situation = $("#situation")[0] ? $("#situation").val() : "0",
  246. area = $("#jobarea").val(),
  247. workyear = $("#workyear")[0] ? $("#workyear").val() : "",
  248. idtype = $("#idtype")[0] ? $("#idtype").val() : "",
  249. idcard = $("#idcard")[0] ? filterTitle($("#idcard")) : "",
  250. yearsalary = filterTitle($("#yearsalary"));
  251. basesalary = filterTitle($("#basesalary"));
  252. allowance = filterTitle($("#allowance"));
  253. bonus = filterTitle($("#bonus"));
  254. stock = filterTitle($("#stock"));
  255. hukou = $("#hukou")[0] ? $("#hukou").val() : "", marriage = $("#marriage")[0] ? $("#marriage").val() : "", rsmid = $("#rsmid").val(), stature = $("#stature")[0] ? $("#stature").val() : "", address = $("#address")[0] ? $("#address").val() : "";
  256. var error = false;
  257. if (filterTitle($("#is_verify")) == 1) {
  258. mobilephone = filterTitle($("#inputphone"))
  259. }
  260. if (!/^1[3456789]{1,1}[0-9]{9,9}$/.test(mobilephone) && filterTitle($(this)).length <= 11) {
  261. var mpcountry = "000"
  262. } else {
  263. var mpcountry = "086"
  264. }
  265. if (typeof (mpcountry) == "undefined") {
  266. mpcountry = "086"
  267. }
  268. if ($("#baseinfoemail").attr("type") == "text") {
  269. var email = filterTitle($("#baseinfoemail"))
  270. } else {
  271. var email = ""
  272. }
  273. if (yearsalary != "" && !checkSalary(yearsalary)) {
  274. pop.ini([
  275. ["精确到小数点后两位,不超过999.99", "warn"]
  276. ], ["确定", "focusElement($('#yearsalary'))"]);
  277. inputPrompt($("#yearsalary"), "精确到小数点后两位,不超过999.99");
  278. error = true
  279. }
  280. if (basesalary != "" && !checkSalary(basesalary)) {
  281. pop.ini([
  282. ["精确到小数点后两位,不超过999.99", "warn"]
  283. ], ["确定", "focusElement($('#basesalary'))"]);
  284. inputPrompt($("#basesalary"), "精确到小数点后两位,不超过999.99");
  285. error = true
  286. }
  287. if (allowance != "" && !checkSalary(allowance)) {
  288. pop.ini([
  289. ["精确到小数点后两位,不超过999.99", "warn"]
  290. ], ["确定", "focusElement($('#allowance'))"]);
  291. inputPrompt($("#allowance"), "精确到小数点后两位,不超过999.99");
  292. error = true
  293. }
  294. if (bonus != "" && !checkSalary(bonus)) {
  295. pop.ini([
  296. ["精确到小数点后两位,不超过999.99", "warn"]
  297. ], ["确定", "focusElement($('#bonus'))"]);
  298. inputPrompt($("#bonus"), "精确到小数点后两位,不超过999.99");
  299. error = true
  300. }
  301. if (stock != "" && !checkSalary(stock)) {
  302. pop.ini([
  303. ["精确到小数点后两位,不超过999.99", "warn"]
  304. ], ["确定", "focusElement($('#stock'))"]);
  305. inputPrompt($("#stock"), "精确到小数点后两位,不超过999.99");
  306. error = true
  307. }
  308. if (error == true) {
  309. $("#saveresumeone").removeAttr("disabled");
  310. return false
  311. }
  312. var param = {
  313. cname: cname,
  314. sex: sex,
  315. bday: bday,
  316. mobilephone: mobilephone,
  317. mpcountry: mpcountry,
  318. situation: situation,
  319. area: area,
  320. workyear: workyear,
  321. idtype: idtype,
  322. idcard: idcard,
  323. email: email,
  324. yearsalary: yearsalary,
  325. basesalary: basesalary,
  326. allowance: allowance,
  327. bonus: bonus,
  328. stock: stock,
  329. hukou: hukou,
  330. marriage: marriage,
  331. rsmid: rsmid,
  332. stature: stature,
  333. address: address
  334. };
  335. var url = $_CONFIG.domain + "ajax/resume/baseinfo.ajax.php";
  336. var result = ajaxRequest(url, param, "post", "json");
  337. if (result.url && result.status == 0) {
  338. if ($_CONFIG.template == "resume/guid1") {
  339. _History.unbind()
  340. }
  341. location.href = result.url;
  342. return false
  343. }
  344. if (result.status == 1) {
  345. if ($_CONFIG.template == "resume/baseinfo") {
  346. location.href = $_CONFIG.domain + "resume/detail.php?userid=" + rsmid;
  347. return false
  348. } else {
  349. _History.unbind();
  350. location.href = $_CONFIG.domain + "resume/guide2.php?userid=" + result.userid;
  351. return false
  352. }
  353. }
  354. var i = 1;
  355. for (var key in result) {
  356. if (key == "result" || key == "status") {
  357. continue
  358. }
  359. var errid = eval('$("#err_' + key + '")');
  360. var erridspan = eval('$("#err_' + key + ' span")');
  361. var objid = '$("#' + key + '")';
  362. if (i == 1) {
  363. if (objid.length > 0) {
  364. if (result[key] == "请认证手机号,认证后可使用手机号登录") {
  365. pop.ini([
  366. ["您还未认证手机号,认证成功后可直接使用手机号码进行登录,请认证!", "warn"]
  367. ], ["确定", "focusElement($('#" + key + "'))"])
  368. } else {
  369. pop.ini([
  370. [result[key], "warn"]
  371. ], ["确定", "focusElement($('#" + key + "'))"])
  372. }
  373. } else {
  374. pop.ini([
  375. [result[key], "warn"]
  376. ], ["确定", "focusElement($('#" + key + "'))"])
  377. }
  378. }
  379. errid.show();
  380. erridspan.html(result[key]);
  381. i++;
  382. errid = "";
  383. objid = ""
  384. }
  385. $("#saveresumeone").removeAttr("disabled")
  386. }
  387. function showMajor() {
  388. degree = $("#degree").val();
  389. if (degree > 2 || degree == -1) {
  390. $(".zhuanye").show()
  391. } else {
  392. $(".zhuanye").hide()
  393. }
  394. }
  395. var saveResumeTwo = function () {
  396. $(".but").attr("disabled", "disabled");
  397. var schoolname = filterTitle($("#schoolname")),
  398. entrancetime = $("#entrancetime").text(),
  399. graduationtime = $("#graduationtime").text() == "至今" ? "" : $("#graduationtime").text(),
  400. degree = $("#degree").val(),
  401. isfulltime = $("#isfulltime").hasClass("on") ? "1" : "0",
  402. majordesc = filterTitle($("#majordesc")),
  403. major = $("#major")[0] ? $("#major").val() : "",
  404. oversea = $("#isoversea .rdo").first().hasClass("on") ? "1" : "0",
  405. describe = $("#describe")[0] ? filterTitle($("#describe")) : "",
  406. userid = $("#userid").val(),
  407. eduid = $("#eduid").val();
  408. var url = $_CONFIG.domain + "ajax/resume/eduinfo.ajax.php";
  409. var param = {
  410. schoolname: schoolname,
  411. entrancetime: entrancetime,
  412. graduationtime: graduationtime,
  413. isfulltime: isfulltime,
  414. majordesc: majordesc,
  415. major: major,
  416. oversea: oversea,
  417. degree: degree,
  418. describe: describe,
  419. userid: userid,
  420. eduid: eduid
  421. };
  422. console.log(param);
  423. var result = ajaxRequest(url, param, "post", "json");
  424. if (result.url && result.status == 0) {
  425. if ($_CONFIG.template == "resume/guid2") {
  426. _History.unbind()
  427. }
  428. location.href = result.url;
  429. return false
  430. }
  431. if (result.status == 1) {
  432. if ($_CONFIG.template == "resume/eduexp") {
  433. location.href = $_CONFIG.domain + "resume/eduexpedit.php?userid=" + userid
  434. } else {
  435. _History.unbind();
  436. location.href = $_CONFIG.domain + "resume/guide3.php?userid=" + userid
  437. }
  438. }
  439. var i = 1;
  440. for (var key in result.desc) {
  441. var errid = eval('$("#err_' + key + '")');
  442. var erridspan = eval('$("#err_' + key + ' span")');
  443. var objid = '$("#' + key + '")';
  444. if (i == 1) {
  445. if (objid.length > 0) {
  446. if (key != "majorname") {
  447. pop.ini([
  448. [result.desc[key], "warn"]
  449. ], ["确定", "focusElement($('#" + key + "'))"])
  450. } else {
  451. pop.ini([
  452. [result.desc[key], "warn"]
  453. ], ["确定", "focusElement($('#" + key + "'))"])
  454. }
  455. $(".but").removeAttr("disabled")
  456. } else {
  457. pop.ini([
  458. [result.desc[key], "warn"]
  459. ], ["确定"]);
  460. $(".but").removeAttr("disabled")
  461. }
  462. }
  463. errid.show();
  464. erridspan.html(result.desc[key]);
  465. i++;
  466. errid = "";
  467. objid = ""
  468. }
  469. };
  470. var saveResumeThree = function (add) {
  471. $(".but").attr("disabled", "disabled");
  472. var coname = filterTitle($("#coname")),
  473. entrytime = $("#entrytime").text(),
  474. leavetime = $("#leavetime").text() == "至今" ? "" : $("#leavetime").text(),
  475. funtype = $("#funtype").val(),
  476. position = filterTitle($("#position")),
  477. indtype = $("#indtype").val(),
  478. worktype = $("#worktype span.on").first().attr("value"),
  479. cosize = $("#cosize")[0] ? $("#cosize").val() : "",
  480. cotype = $("#cotype")[0] ? $("#cotype").val() : "",
  481. department = filterTitle($("#department")),
  482. workdesc = filterTitle($("#workdesc")),
  483. reportboss = $("#reportboss")[0] ? filterTitle($("#reportboss")) : "",
  484. reportperson = $("#reportperson")[0] ? filterTitle($("#reportperson")) : "",
  485. isoversea = $("#overseawork span.on").attr("value"),
  486. leavereason = $("#leavereason")[0] ? filterTitle($("#leavereason")) : "",
  487. score = $("#score")[0] ? filterTitle($("#score")) : "",
  488. userid = $("#userid").val(),
  489. workid = $("#workid").val(),
  490. isedit = $("#isedit").val();
  491. var url = $_CONFIG.domain + "ajax/resume/workinfo.ajax.php";
  492. var param = {
  493. coname: coname,
  494. entrytime: entrytime,
  495. leavetime: leavetime,
  496. funtype: funtype,
  497. position: position,
  498. indtype: indtype,
  499. worktype: worktype,
  500. department: department,
  501. workdesc: workdesc,
  502. cosize: cosize,
  503. cotype: cotype,
  504. reportboss: reportboss,
  505. reportperson: reportperson,
  506. isoversea: isoversea,
  507. leavereason: leavereason,
  508. score: score,
  509. workid: workid,
  510. userid: userid
  511. };
  512. var result = ajaxRequest(url, param, "post", "json");
  513. if (result.url && result.status == 0) {
  514. if ($_CONFIG.template == "resume/guid3") {
  515. _History.unbind()
  516. }
  517. location.href = result.url;
  518. return false
  519. }
  520. if (result.status == 1) {
  521. if ($_CONFIG.template == "resume/workexp") {
  522. location.href = $_CONFIG.domain + "resume/workexpedit.php?userid=" + userid
  523. } else {
  524. jianli = $("#jianli").val();
  525. _History.unbind();
  526. if (add == 0) {
  527. location.href = $_CONFIG.domain + "resume/guide4.php?userid=" + userid
  528. } else {
  529. location.href = $_CONFIG.domain + "resume/guide3.php?userid=" + userid + "&jianli=" + jianli
  530. }
  531. }
  532. }
  533. var i = 1;
  534. for (var key in result.desc) {
  535. var errid = eval('$("#err_' + key + '")');
  536. var erridspan = eval('$("#err_' + key + ' span")');
  537. var objid = '$("#' + key + '")';
  538. if (i == 1) {
  539. if (objid.length > 0) {
  540. if (key != "funtypename") {
  541. pop.ini([
  542. [result.desc[key], "warn"]
  543. ], ["确定", "focusElement($('#" + key + "'))"])
  544. } else {
  545. pop.ini([
  546. [result.desc[key], "warn"]
  547. ], ["确定"])
  548. }
  549. $(".but").removeAttr("disabled")
  550. } else {
  551. pop.ini([
  552. [result.desc[key], "warn"]
  553. ], ["确定"]);
  554. $(".but").removeAttr("disabled")
  555. }
  556. }
  557. errid.show();
  558. erridspan.html(result.desc[key]);
  559. i++;
  560. errid = "";
  561. objid = ""
  562. }
  563. };
  564. var saveResumeFour = function () {
  565. var jobterm = $("#jobterm").val(),
  566. area = $("#area").val(),
  567. indtype = $("#indtype").val(),
  568. funtype = $("#funtype").val(),
  569. entrytime = $("#entrytime").val(),
  570. intro = filterTitle($("#intro")),
  571. resumekey = filterTitle($("#resumekey")),
  572. userid = $("#userid").val();
  573. isedit = $("#isedit").val();
  574. var position = $("#position").val();
  575. if (area == "") {
  576. pop.ini([
  577. ["请选择期望地点", "warn"]
  578. ], ["确定"]);
  579. return false
  580. }
  581. if (funtype == "") {
  582. pop.ini([
  583. ["请选择期望职能", "warn"]
  584. ], ["确定"]);
  585. return false
  586. }
  587. if (position == "") {
  588. pop.ini([
  589. ["请输入职位名称", "warn"]
  590. ], ["确定"]);
  591. return false
  592. }
  593. if (position.length > 25) {
  594. pop.ini([
  595. ["职位请控制在25个中文字以内", "warn"]
  596. ], ["确定"]);
  597. return false
  598. }
  599. var salarytype = $("#salarytype").val();
  600. var inputsalary = "";
  601. if (salarytype == "4") {
  602. inputsalary = $("#yearsal")[0] ? $("#yearsal").val() : ""
  603. } else {
  604. if (salarytype == "1") {
  605. inputsalary = $("#monthsal")[0] ? $("#monthsal").val() : ""
  606. } else {
  607. if (salarytype == "3") {
  608. inputsalary = filterTitle($("#sal3"));
  609. if (!checkNumber(inputsalary, "int")) {
  610. pop.ini([
  611. ["请输入整数", "warn"]
  612. ], ["确定"]);
  613. inputPrompt($("#sal"), "请输入整数");
  614. return false
  615. }
  616. } else {
  617. if (salarytype == "2") {
  618. inputsalary = filterTitle($("#sal2"));
  619. if (!checkNumber(inputsalary, "int")) {
  620. pop.ini([
  621. ["请输入整数", "warn"]
  622. ], ["确定"]);
  623. inputPrompt($("#sal"), "请输入整数");
  624. return false
  625. }
  626. }
  627. }
  628. }
  629. }
  630. var is_customize = false;
  631. if (inputsalary == "customize") {
  632. is_customize = true;
  633. var min = filterTitle($("#sal_min"));
  634. var max = filterTitle($("#sal_max"));
  635. if (!checkNumber(min, "int") || !checkNumber(max, "int")) {
  636. pop.ini([
  637. ["请输入整数", "warn"]
  638. ], ["确定"]);
  639. inputPrompt($("#customizesalary"), "请输入整数");
  640. return false
  641. } else {
  642. if (min > 10000000 || max > 10000000) {
  643. pop.ini([
  644. ["最多七位整数", "warn"]
  645. ], ["确定"]);
  646. inputPrompt($("#customizesalary"), "最多七位整数");
  647. return false
  648. }
  649. }
  650. inputsalary = min + "-" + max
  651. }
  652. var url = $_CONFIG.domain + "ajax/resume/jobintent.ajax.php";
  653. var param = {
  654. jobterm: jobterm,
  655. area: area,
  656. indtype: indtype,
  657. funtype: funtype,
  658. salarytype: salarytype,
  659. inputsalary: inputsalary,
  660. entrytime: entrytime,
  661. intro: intro,
  662. resumekey: resumekey,
  663. position: position,
  664. is_customize: is_customize,
  665. userid: userid
  666. };
  667. var result = ajaxRequest(url, param, "post", "json");
  668. if (result.url && result.status == 0) {
  669. if ($_CONFIG.template == "resume/guid3") {
  670. _History.unbind()
  671. }
  672. location.href = result.url;
  673. return false
  674. }
  675. if (result.status == 1) {
  676. if ($_CONFIG.template == "resume/jobintent") {
  677. location.href = $_CONFIG.domain + "resume/detail.php?userid=" + userid
  678. } else {
  679. var redirect = storage.json_get("redirect");
  680. var ret_url = redirect.ret_url;
  681. if (ret_url) {
  682. storage.del("redirect");
  683. location.href = ret_url;
  684. return false
  685. } else {
  686. var config1 = "简历已创建成功!完善简历可以获得更多工作机会哦。";
  687. var config5 = [
  688. ["完善简历", "查看简历"],
  689. ["improveRsm()", "lookRsm()"]
  690. ];
  691. pop.ini(config1, config5)
  692. }
  693. }
  694. }
  695. var i = 1;
  696. for (var key in result.desc) {
  697. var errid = eval('$("#err_' + key + '")');
  698. var erridspan = eval('$("#err_' + key + ' span")');
  699. var objid = '$("#' + key + '")';
  700. var objeval = eval('$("#' + key + '")');
  701. if (i == 1) {
  702. if (objid.length > 0 && objeval.is("input") && key != "reportperson" && key != "reportboss" && key != "reference") {
  703. pop.ini([
  704. [result.desc[key], "warn"]
  705. ], ["确定", "focusElement($('#" + key + "'))"]);
  706. $(".but").removeAttr("disabled")
  707. } else {
  708. pop.ini([
  709. [result.desc[key], "warn"]
  710. ], ["确定"]);
  711. $(".but").removeAttr("disabled")
  712. }
  713. }
  714. errid.show();
  715. erridspan.html(result.desc[key]);
  716. i++;
  717. errid = "";
  718. objid = ""
  719. }
  720. };
  721. var skipResumeThree = function () {
  722. var j = filterTitle($("#coname")),
  723. i = $("#entrytime").val(),
  724. f = $("#leavetime").val(),
  725. p = $("#funtype").val(),
  726. s = filterTitle($("#position")),
  727. c = $("#indtype").val(),
  728. d = $("#cosize")[0] ? $("#cosize").val() : "",
  729. l = $("#cotype")[0] ? $("#cotype").val() : "",
  730. o = filterTitle($("#department")),
  731. b = filterTitle($("#workdesc")),
  732. e = $("#reportboss")[0] ? filterTitle($("#reportboss")) : "",
  733. m = $("#reportperson")[0] ? filterTitle($("#reportperson")) : "",
  734. g = $("#reference")[0] ? filterTitle($("#reference")) : "",
  735. t = $("#overseawork span.on").attr("value"),
  736. h = $("#leavereason")[0] ? filterTitle($("#leavereason")) : "",
  737. n = $("#score")[0] ? filterTitle($("#score")) : "",
  738. a = $("#userid").val(),
  739. r = $("#workid").val();
  740. var k = false;
  741. if (j != "" || i != "" || f != "" || p != "" || c != "" || o != "" || b != "" || s != "") {
  742. k = true
  743. }
  744. if (k == false) {
  745. var q = "完善的工作经验将增加投递成功率,确定跳过么?";
  746. config5 = [
  747. ["继续填写", "跳过"],
  748. ["continueRsm()", "skipResume()"]
  749. ];
  750. pop.ini(q, config5)
  751. } else {
  752. var q = "你的信息尚未保存,确定跳过么?";
  753. config5 = [
  754. ["继续填写", "跳过"],
  755. ["continueRsm()", "skipResume()"]
  756. ];
  757. pop.ini(q, config5)
  758. }
  759. };
  760. var continueRsm = function () {
  761. pop.close()
  762. };
  763. var improveRsm = function () {
  764. _History.unbind();
  765. var a = $("#userid").val();
  766. location.href = domain + "resume/detail.php?userid=" + a
  767. };
  768. var skipResume = function () {
  769. _History.unbind();
  770. var a = $("#userid").val();
  771. location.href = $_CONFIG.domain + "resume/guide4.php?userid=" + a
  772. };
  773. var lookRsm = function () {
  774. _History.unbind();
  775. var a = $("#userid").val();
  776. location.href = $_CONFIG.domain + "resume/resumepreview.php?userid=" + a
  777. };
  778. var editWorkExp = function (a, b) {
  779. location.href = $_CONFIG.domain + "resume/workexp.php?userid=" + a + "&workid=" + b
  780. };
  781. var delWorkExp = function (a, f, e) {
  782. var b = $(e).parents().find("strong").text(),
  783. d = $(e).parents().find("i").text();
  784. var c = b + '<br><br><span class="c_orange">' + d + "</span>";
  785. $("#delworkpop .cn").html(c);
  786. $("#delworkid").attr("attr-userid", a);
  787. $("#delworkid").attr("attr-workid", f);
  788. $("#delworkpop,#shadow").show()
  789. };
  790. var delProjectExp = function (b, a, f) {
  791. var c = $(f).parents().find("strong").text(),
  792. e = $(f).parents().find("i").text();
  793. var d = c + '<br><br><span class="c_orange">' + e + "</span>";
  794. $("#delpropop .cn").html(d);
  795. $("#delproid").attr("attr-userid", b);
  796. $("#delproid").attr("attr-proid", a);
  797. $("#delpropop,#shadow").show()
  798. };
  799. var confirmDelWorkExp = function (h) {
  800. $("#delworkpop,#shadow").hide();
  801. var b = $(h).attr("attr-userid");
  802. var g = $(h).attr("attr-workid");
  803. var c = $_CONFIG.domain + "ajax/resume/delworkexp.ajax.php";
  804. var f = {
  805. userid: b,
  806. workid: g
  807. };
  808. var a = ajaxRequest(c, f, "post", "json");
  809. if (a.status == 1) {
  810. pop.ini(a.desc, ["确定"]);
  811. $("#workexp_" + g).remove();
  812. if (!$("#addwork")[0]) {
  813. $("#pageContent").append("<div onclick=\"location.href ='" + $_CONFIG.domain + "resume/workexp.php?userid=" + b + '\'" value="' + b + '" class="btn_add" >+ 添加工作经验</div>')
  814. }
  815. return false
  816. } else {
  817. if (a.url) {
  818. location.href = a.url;
  819. return false
  820. }
  821. var e = [
  822. [a.desc, "warn"]
  823. ];
  824. var d = ["确定"];
  825. pop.ini(e, d);
  826. return false
  827. }
  828. };
  829. var editEduExp = function (a, b) {
  830. location.href = $_CONFIG.domain + "resume/eduexp.php?userid=" + a + "&eduid=" + b
  831. };
  832. var delEduExp = function (b, a, f) {
  833. var c = $(f).parents().find("strong").text(),
  834. e = $(f).parents().find("i").text();
  835. var d = c + '<br><br><span class="c_orange">' + e + "</span>";
  836. $("#deledupop .cn").html(d);
  837. $("#deleduid").attr("attr-userid", b);
  838. $("#deleduid").attr("attr-eduid", a);
  839. $("#deledupop,#shadow").show()
  840. };
  841. var confirmDelEduExp = function (h) {
  842. $("#deledupop,#shadow").hide();
  843. var c = $(h).attr("attr-userid");
  844. var b = $(h).attr("attr-eduid");
  845. var d = $_CONFIG.domain + "ajax/resume/deleduexp.ajax.php";
  846. var g = {
  847. userid: c,
  848. eduid: b
  849. };
  850. var a = ajaxRequest(d, g, "post", "json");
  851. if (a.status == 1) {
  852. pop.ini(a.desc, ["确定"]);
  853. $("#eduexp_" + b).remove();
  854. if (!$("#addedu")[0]) {
  855. $("#pageContent").append("<div onclick=\"location.href ='" + $_CONFIG.domain + "resume/eduexp.php?userid=" + c + '\'" value="' + c + '" value="' + c + '" class="btn_add" >+ 添加教育经历</div>')
  856. }
  857. return false
  858. } else {
  859. if (a.url) {
  860. location.href = a.url;
  861. return false
  862. }
  863. var f = [
  864. [a.desc, "warn"]
  865. ];
  866. var e = ["确定"];
  867. pop.ini(f, e);
  868. return false
  869. }
  870. };
  871. var editProExp = function (b, a) {
  872. location.href = $_CONFIG.domain + "resume/proexpedit.php?userid=" + b + "&projectid=" + a
  873. };
  874. var saveProject = function () {
  875. var url = $_CONFIG.domain + "ajax/resume/saveproject.ajax.php";
  876. var param = {
  877. projectname: filterTitle($("#projectname")),
  878. timefrom: $("#timefrom").text(),
  879. timeto: $("#timeto").text() == "至今" ? "" : $("#timeto").text(),
  880. ifunction: filterTitle($("#function")),
  881. workcompname: $("#workcompname").val(),
  882. describe: filterTitle($("#prodescribe")),
  883. userid: $("#userid").val(),
  884. projectid: $("#projectid").val()
  885. };
  886. var result = ajaxRequest(url, param, "post", "json");
  887. if (result.url && result.status == 0) {
  888. location.href = result.url;
  889. return false
  890. }
  891. if (result.status == 1) {
  892. location.href = $_CONFIG.domain + "resume/proexplist.php?userid=" + $("#userid").val()
  893. }
  894. var i = 1;
  895. for (var key in result.desc) {
  896. var errid = eval('$("#err_' + key + '")');
  897. var erridspan = eval('$("#err_' + key + ' span")');
  898. var objid = '$("#' + key + '")';
  899. var objeval = eval('$("#' + key + '")');
  900. if (i == 1) {
  901. if (objid.length > 0 && objeval.is("input") && key != "reportperson" && key != "reportboss" && key != "reference") {
  902. pop.ini([
  903. [result.desc[key], "warn"]
  904. ], ["确定", "focusElement($('#" + key + "'))"]);
  905. $(".but").removeAttr("disabled")
  906. } else {
  907. pop.ini([
  908. [result.desc[key], "warn"]
  909. ], ["确定"]);
  910. $(".but").removeAttr("disabled")
  911. }
  912. }
  913. errid.show();
  914. erridspan.html(result.desc[key]);
  915. i++;
  916. errid = "";
  917. objid = ""
  918. }
  919. };
  920. var confirmDelProjectExp = function (e) {
  921. $("#delpropop,#shadow").hide();
  922. var c = $(e).attr("attr-userid");
  923. var b = $(e).attr("attr-proid");
  924. var d = $_CONFIG.domain + "ajax/resume/delproject.ajax.php?projectid=" + b + "&userid=" + c;
  925. var a = ajaxRequest(d);
  926. if (a.status == 1) {
  927. $("#projectexp_" + b).remove();
  928. if (!$("#addpro")[0]) {
  929. $("#pageContent").append("<div onclick=\"location.href ='" + $_CONFIG.domain + "resume/proexpedit.php?userid=" + c + '\'" value="' + c + '" value="' + c + '" class="btn_add" >+ 添加项目经验</div>')
  930. }
  931. return false
  932. } else {
  933. if (a.url) {
  934. location.href = a.url
  935. }
  936. pop.ini([
  937. [a.message, "warn"]
  938. ], ["确定"])
  939. }
  940. };
  941. var savePasteBaseInfo = function () {
  942. var cname = filterTitle($("#cname")),
  943. sex = $("#sex span.on").attr("value"),
  944. bday = $("#bday").text(),
  945. mpcountry = $("#mobilecountry span.on").attr("value"),
  946. mobilephone = filterTitle($("#mobilephone")),
  947. area = $("#jobarea").val(),
  948. workyear = $("#workyear").val(),
  949. idtype = $("#idtype").val(),
  950. idcard = filterTitle($("#idcard")),
  951. major = $("#major").val(),
  952. degree = $("#degree").val(),
  953. situation = $("#situation").val(),
  954. funtype = $("#funtype").val(),
  955. indtype = $("#indtype").val(),
  956. keyword = $("#resumekey").val(),
  957. isfulltime = $("#isfulltime").hasClass("on") ? "1" : "0",
  958. yearsalary = filterTitle($("#yearsalary"));
  959. if (yearsalary != "" && !checkSalary(yearsalary)) {
  960. pop.ini([
  961. ["精确到小数点后两位,不超过999.99", "warn"]
  962. ], ["确定"]);
  963. inputPrompt($("#yearsalary"), "精确到小数点后两位,不超过999.99");
  964. return false
  965. }
  966. if ($("#email")[0] && $("#email").parent().hasClass("ipt")) {
  967. var email = $("#email").val()
  968. } else {
  969. var email = ""
  970. }
  971. if (typeof (mpcountry) == "undefined") {
  972. mpcountry = "086"
  973. }
  974. var url = $_CONFIG.domain + "ajax/resume/pastebaseinfo.ajax.php";
  975. var param = {
  976. cname: cname,
  977. sex: sex,
  978. bday: bday,
  979. mpcountry: mpcountry,
  980. mobilephone: mobilephone,
  981. area: area,
  982. workyear: workyear,
  983. idtype: idtype,
  984. idcard: idcard,
  985. email: email,
  986. major: major,
  987. degree: degree,
  988. situation: situation,
  989. funtype: funtype,
  990. indtype: indtype,
  991. isfulltime: isfulltime,
  992. keyword: keyword,
  993. yearsalary: yearsalary
  994. };
  995. var result = ajaxRequest(url, param, "post", "json");
  996. if (result.url && result.status == 0) {
  997. location.href = result.url;
  998. return false
  999. }
  1000. if (result.status == 1) {
  1001. location.href = $_CONFIG.domain + "resume/pastedetail.php";
  1002. return false
  1003. }
  1004. var i = 1;
  1005. for (var key in result.desc) {
  1006. var errid = eval('$("#err_' + key + '")');
  1007. var erridspan = eval('$("#err_' + key + ' span")');
  1008. var objid = '$("#' + key + '")';
  1009. if (i == 1) {
  1010. if (objid.length > 0) {
  1011. if (result.desc[key] == "请认证手机号,认证后可使用手机号登录") {
  1012. pop.ini([
  1013. ["您还未认证手机号,认证成功后可直接使用手机号码进行登录,请认证!", "warn"]
  1014. ], ["确定", "focusElement($('#" + key + "'))"])
  1015. } else {
  1016. pop.ini([
  1017. [result.desc[key], "warn"]
  1018. ], ["确定", "focusElement($('#" + key + "'))"])
  1019. }
  1020. } else {
  1021. pop.ini([
  1022. [result.message, "warn"]
  1023. ], ["确定"])
  1024. }
  1025. }
  1026. errid.show();
  1027. erridspan.html(result.desc[key]);
  1028. i++;
  1029. errid = "";
  1030. objid = ""
  1031. }
  1032. };
  1033. var savePasteOtherinfo = function () {
  1034. var d = filterTitle($("#otherinfo"));
  1035. if (d == "") {
  1036. pop.ini([
  1037. ["其他信息不能为空", "warn"]
  1038. ], ["确定"]);
  1039. return false
  1040. }
  1041. var b = $_CONFIG.domain + "ajax/resume/pasteotherinfo.ajax.php";
  1042. var c = {
  1043. otherinfo: d
  1044. };
  1045. var a = ajaxRequest(b, c, "post", "json");
  1046. if (a.status == 1) {
  1047. location.href = $_CONFIG.domain + "resume/pastedetail.php"
  1048. } else {
  1049. if (a.url) {
  1050. location.href = a.url;
  1051. return false
  1052. }
  1053. pop.ini([
  1054. [a.desc, "warn"]
  1055. ], ["确定"]);
  1056. inputPrompt($("#otherinfo"), a.desc);
  1057. return false
  1058. }
  1059. };
  1060. var showRsmDetail = function (a) {
  1061. obj = $(a).parent();
  1062. if (!obj.hasClass("mk")) {
  1063. obj.addClass("mk")
  1064. } else {
  1065. obj.removeClass("mk")
  1066. }
  1067. };
  1068. function abc() {
  1069. pop("成功", 2, "", "", "", "", "", "", 1)
  1070. }
  1071. var refreshRsm = function (b) {
  1072. var c = $_CONFIG.domain + "ajax/resume/refreshresume.ajax.php";
  1073. var g = {
  1074. userid: b
  1075. };
  1076. var a = ajaxRequest(c, g, "post", "json");
  1077. if (a.status == 1) {
  1078. $(".finishtime").each(function () {
  1079. if ($(this).attr("value") == b) {
  1080. var h = "创建于" + $(this).attr("data-value") + "&nbsp;&nbsp;&nbsp;&nbsp;更新于" + a.update;
  1081. $(this).html(h)
  1082. }
  1083. });
  1084. var f = "简历刷新成功";
  1085. pop.msg(f);
  1086. return false
  1087. } else {
  1088. if (a.url) {
  1089. location.href = a.url;
  1090. return false
  1091. }
  1092. var e = [
  1093. [a.desc, "warn"]
  1094. ];
  1095. var d = ["确定"];
  1096. pop.ini(e, d);
  1097. return false
  1098. }
  1099. };
  1100. var setFastRsm = function (c, h) {
  1101. var b = $(h).hasClass("on") ? "0" : "1";
  1102. var d = $_CONFIG.domain + "ajax/resume/quickrsm.ajax.php?rsmid=" + c + "&status=" + b;
  1103. var g = {
  1104. userid: c,
  1105. status: b
  1106. };
  1107. var a = ajaxRequest(d, g, "post", "json");
  1108. if (a.status == 1) {
  1109. $(".fast").each(function () {
  1110. if ($(this).attr("value") == c) {
  1111. $(this).toggleClass("on")
  1112. } else {
  1113. $(this).removeClass("on")
  1114. }
  1115. });
  1116. pop.ini(a.desc, ["确定"]);
  1117. return false
  1118. } else {
  1119. if (a.url) {
  1120. location.href = a.url;
  1121. return false
  1122. }
  1123. var f = [
  1124. [a.desc, "warn"]
  1125. ];
  1126. var e = ["确定"];
  1127. pop.ini(f, e);
  1128. return false
  1129. }
  1130. };
  1131. var showOpen = function (b, c, a) {
  1132. openuserid = b;
  1133. $("#openstatus .rsmname").html(c);
  1134. $("#openstatus .e").each(function () {
  1135. if ($(this).attr("value") == a) {
  1136. $(this).addClass("on")
  1137. } else {
  1138. $(this).removeClass("on")
  1139. }
  1140. });
  1141. $(".popOther").hide();
  1142. shadow.show();
  1143. $("#openstatus").show();
  1144. $(".popE .e").click(function () {
  1145. if (!$(this).hasClass("on")) {
  1146. $(this).addClass("on");
  1147. $(this).siblings().removeClass("on")
  1148. }
  1149. });
  1150. return false
  1151. };
  1152. $("#confirmOpen").click(function () {
  1153. $(".popE .e").each(function () {
  1154. if ($(this).hasClass("on")) {
  1155. ostatus = $(this).attr("value");
  1156. return false
  1157. }
  1158. });
  1159. confirmOpen(openuserid, ostatus);
  1160. return false
  1161. });
  1162. var confirmOpen = function (c, b) {
  1163. var d = $_CONFIG.domain + "ajax/resume/openresume.ajax.php";
  1164. var g = {
  1165. userid: c,
  1166. status: b
  1167. };
  1168. var a = ajaxRequest(d, g, "post", "json");
  1169. pop.close();
  1170. if (a.status == 1) {
  1171. $(".showOpen").each(function () {
  1172. if ($(this).parent().attr("value") == c) {
  1173. $(this).removeAttr("value");
  1174. $(this).attr("value", b)
  1175. }
  1176. if ($(this).attr("value") == "0" && $(this).parent().attr("value") != c) {
  1177. $(this).removeAttr("value");
  1178. $(this).attr("value", "2")
  1179. }
  1180. });
  1181. if (b == 0) {
  1182. $(".openchange").each(function () {
  1183. if ($(this).text() == "对所有公开") {
  1184. $(this).text("对无忧公开")
  1185. }
  1186. });
  1187. $("#rsm_" + c + " .openchange").text("对所有公开")
  1188. } else {
  1189. if (b == 2) {
  1190. $("#rsm_" + c + " .openchange").text("对无忧公开")
  1191. } else {
  1192. if (b == 3) {
  1193. $("#rsm_" + c + " .openchange").text("完全保密")
  1194. }
  1195. }
  1196. }
  1197. pop.ini(a.desc, ["确定"]);
  1198. return false
  1199. } else {
  1200. if (a.url) {
  1201. location.href = a.url;
  1202. return false
  1203. }
  1204. var f = [
  1205. [a.desc, "warn"]
  1206. ];
  1207. var e = ["确定"];
  1208. pop.ini(f, e);
  1209. return false
  1210. }
  1211. };
  1212. var copyResume = function (a) {
  1213. pageshow("copyrsm")
  1214. };
  1215. var chooseResumePart = function (a) {
  1216. if ($(a).hasClass("mk")) {
  1217. $(a).removeClass("mk")
  1218. } else {
  1219. $(a).addClass("mk")
  1220. }
  1221. };
  1222. var confirmCopyResume = function () {
  1223. var f = $("#copyUserid").val(),
  1224. h = $("#copyname").val();
  1225. if (h == "") {
  1226. var e = [
  1227. ["请填写简历名称", "warn"]
  1228. ],
  1229. d = ["确定"];
  1230. pop.ini(e, d);
  1231. return false
  1232. }
  1233. var g = h.replace(/[^\x00-\xff]/g, "**");
  1234. if (g.length > 50) {
  1235. var e = [
  1236. ["简历名称太长", "warn"]
  1237. ],
  1238. d = ["确定"];
  1239. pop.ini(e, d);
  1240. return false
  1241. }
  1242. var b = new Array();
  1243. $("#copyinfo, .e").each(function () {
  1244. if ($(this).hasClass("on")) {
  1245. b.push($(this).attr("name"))
  1246. }
  1247. });
  1248. var a = domain + "ajax/resume/copyresume.ajax.php";
  1249. var c = {
  1250. userid: f,
  1251. rsmname: h,
  1252. part: b
  1253. };
  1254. var i = ajaxRequest(a, c, "post", "json");
  1255. if (i.status == 1) {
  1256. location.reload();
  1257. return false
  1258. } else {
  1259. if (i.url) {
  1260. location.href = i.url;
  1261. return false
  1262. }
  1263. var e = [
  1264. [i.desc, "warn"]
  1265. ];
  1266. var d = ["确定"];
  1267. pop.ini(e, d);
  1268. return false
  1269. }
  1270. };
  1271. var delResume = function (a, d) {
  1272. console.log(a);
  1273. console.log(d);
  1274. var c = "确定删除" + d + "么?";
  1275. var b = [
  1276. ["取消", "确定"],
  1277. ["", "confirmDelResume('" + a + "')"]
  1278. ];
  1279. pop.ini(c, b)
  1280. };
  1281. var confirmDelResume = function (b) {
  1282. var c = "delresume.ajax.php";
  1283. var f = {
  1284. userid: b
  1285. };
  1286. var a = ajaxRequest(c, f, "post", "json");
  1287. if (a.status == 1) {
  1288. pop.close();
  1289. $("#rsm_" + b).remove();
  1290. if (!$("#addrsm")[0] && a.addtype == 0) {
  1291. $("#pageContent").append('<div id="addrsm" class="btn_add" onclick="createResume();">+ 创建简历</div>')
  1292. }
  1293. return false
  1294. } else {
  1295. if (a.url) {
  1296. location.href = a.url;
  1297. return false
  1298. }
  1299. var e = [
  1300. [a.desc, "warn"]
  1301. ];
  1302. var d = ["确定"];
  1303. pop.ini(e, d);
  1304. return false
  1305. }
  1306. };
  1307. var saveRsmName = function (b) {
  1308. var d = $("#rsmname").val();
  1309. if (d == "") {
  1310. $("#err_rsmname").show();
  1311. $("#err_rsmname").find(".error").html("请输入简历名");
  1312. return false
  1313. }
  1314. var f = d.replace(/[^\x00-\xff]/g, "**");
  1315. if (f.length > 50) {
  1316. $("#err_rsmname").show();
  1317. $("#err_rsmname").find(".error").html("简历名称太长");
  1318. return false
  1319. }
  1320. var c = domain + "ajax/resume/editresumename.ajax.php";
  1321. var e = {
  1322. userid: b,
  1323. rsmname: d
  1324. };
  1325. var a = ajaxRequest(c, e, "post", "json");
  1326. if (a.status == 1) {
  1327. $("#srsmname").html(a.rsmname);
  1328. $("#rsmname").val(d);
  1329. $("#changersmname,#shadow").hide();
  1330. $("body").removeClass("resumeShow");
  1331. return false
  1332. } else {
  1333. if (a.url) {
  1334. location.href = a.url;
  1335. return false
  1336. }
  1337. $("#err_rsmname").show();
  1338. $("#err_rsmname").find(".error").html(a.desc);
  1339. return false
  1340. }
  1341. };
  1342. var showSenior = function (a) {
  1343. if ($(a).hasClass("on")) {
  1344. $(a).removeClass("on");
  1345. $("#highworkinfo").hide()
  1346. } else {
  1347. $(a).addClass("on");
  1348. $("#highworkinfo").show()
  1349. }
  1350. };
  1351. var createResume = function () {
  1352. var b = "是否需要创建一份新简历";
  1353. var a = [
  1354. ["取消", "确定"],
  1355. ["", "cResume()"]
  1356. ];
  1357. pop.ini(b, a)
  1358. };
  1359. var cResume = function () {
  1360. var b = domain + "ajax/resume/createresume.ajax.php";
  1361. var e = {};
  1362. var a = ajaxRequest(b, e, "post", "json");
  1363. if (a.status == 1) {
  1364. location.href = domain + "resume/detail.php?userid=" + a.rsmid
  1365. } else {
  1366. if (a.url) {
  1367. location.href = a.url;
  1368. return false
  1369. }
  1370. var d = [
  1371. [a.desc, "warn"]
  1372. ];
  1373. var c = ["确定"];
  1374. pop.ini(d, c);
  1375. return false
  1376. }
  1377. };
  1378. if ("oninput" in document) {
  1379. $(".inputblur").bind("input", function () {
  1380. var a = $(this).attr("id");
  1381. if (a == "inputphone") {
  1382. a = "mobilephone"
  1383. }
  1384. $(this).next().show();
  1385. $("#err_" + a).hide();
  1386. if ($(this).attr("id") == "hoursal") {
  1387. $("#err_daysal").hide()
  1388. }
  1389. if ($(this).attr("id") == "daysal") {
  1390. $("#err_hoursal").hide()
  1391. }
  1392. })
  1393. } else {
  1394. $(".inputblur").keydown(function () {
  1395. var a = $(this).attr("id");
  1396. if (a == "inputphone") {
  1397. a = "mobilephone"
  1398. }
  1399. $(this).next().show();
  1400. $("#err_" + a).hide();
  1401. if ($(this).attr("id") == "hoursal") {
  1402. $("#err_daysal").hide()
  1403. }
  1404. if ($(this).attr("id") == "daysal") {
  1405. $("#err_hoursal").hide()
  1406. }
  1407. })
  1408. }
  1409. $(".inputblur").click(function () {
  1410. if ($(".calendar ").css("display") == "block") {
  1411. $(".calendar ").hide()
  1412. }
  1413. });
  1414. function clearPrompt(a) {
  1415. if (a != undefined) {
  1416. var b = a.attr("id");
  1417. $("#err_" + b).hide()
  1418. }
  1419. }
  1420. function inputPrompt(b, d, a) {
  1421. if (a) {
  1422. b.focus()
  1423. }
  1424. clearPrompt(b);
  1425. var c = b.attr("id");
  1426. $("#err_" + c).show();
  1427. $("#err_" + c).children().html(d)
  1428. }
  1429. function focusElement(a) {
  1430. pop.close();
  1431. a.focus()
  1432. }
  1433. $("#jobareaname").click(function () {
  1434. clearPrompt($("#jobareaname"))
  1435. });
  1436. $(".inputblur").blur(function () {
  1437. if ($(this).attr("id") == "cname") {
  1438. var c = filterTitle($("#cname"));
  1439. if (filterTitle($(this)) == "") {
  1440. inputPrompt($("#cname"), "请输入姓名");
  1441. return false
  1442. } else {
  1443. var u = c.replace(/[^\x00-\xff]/g, "**");
  1444. if (u.length > 20) {
  1445. inputPrompt($("#cname"), "姓名限10个中文字内");
  1446. return false
  1447. }
  1448. }
  1449. }
  1450. if ($(this).attr("id") == "mobilephone") {
  1451. var r = filterTitle($("#mobilephone"));
  1452. var b = $("#mobilecountry span.on").attr("value");
  1453. if (typeof (b) == "undefined") {
  1454. b = "086"
  1455. }
  1456. if (filterTitle($(this)) == "") {
  1457. inputPrompt($("#mobilephone"), "请输入手机号");
  1458. return
  1459. }
  1460. if (b == "086") {
  1461. if (!/^[0-9]{1,20}$/.test(r)) {
  1462. inputPrompt($("#mobilephone"), "你输入的手机号码有误");
  1463. return false
  1464. } else {
  1465. if (filterTitle($(this)).length > 11) {
  1466. inputPrompt($("#mobilephone"), "仅支持11位大陆手机号");
  1467. return false
  1468. }
  1469. }
  1470. } else {
  1471. if (b == "000") {
  1472. if (!/^[0-9]{1,20}$/.test(r)) {
  1473. inputPrompt($("#mobilephone"), "你输入的手机号码有误");
  1474. return false
  1475. }
  1476. }
  1477. }
  1478. }
  1479. if ($(this).attr("id") == "daysal" || $(this).attr("id") == "hoursal") {
  1480. if (filterTitle($(this)) == "") {
  1481. inputPrompt($("#sal"), "请输入期望薪资");
  1482. return false
  1483. } else {
  1484. clearPrompt($("#sal"))
  1485. }
  1486. }
  1487. if ($(this).attr("id") == "intro") {
  1488. var A = $("#intro")[0] ? filterTitle($("#intro")) : "";
  1489. var u = A.replace(/[^\x00-\xff]/g, "**");
  1490. if (u.length > 2000) {
  1491. inputPrompt($("#intro"), "自我介绍限1000个中文字内");
  1492. return false
  1493. }
  1494. }
  1495. if ($(this).attr("id") == "qy_zwms") {
  1496. var A = $("#qy_zwms")[0] ? filterTitle($("#qy_zwms")) : "";
  1497. var u = A.replace(/[^\x00-\xff]/g, "**");
  1498. if (u.length > 2000) {
  1499. inputPrompt($("#qy_zwms"), "职位描述限1000个中文字内");
  1500. return false
  1501. }
  1502. }
  1503. if ($(this).attr("id") == "qy_qyjl") {
  1504. var A = $("#qy_qyjl")[0] ? filterTitle($("#qy_qyjl")) : "";
  1505. var u = A.replace(/[^\x00-\xff]/g, "**");
  1506. if (u.length > 2000) {
  1507. inputPrompt($("#qy_qyjl"), "企业简历限1000个中文字内");
  1508. return false
  1509. }
  1510. }
  1511. if ($(this).attr("id") == "resumekey") {
  1512. if (filterTitle($(this)) != "") {
  1513. var G = $("#resumekey")[0] ? $("#resumekey").val() : "";
  1514. var n = G.split(" ");
  1515. n = $.grep(n, function (H) {
  1516. return $.trim(H).length > 0
  1517. });
  1518. if (n.length > 10) {
  1519. inputPrompt($("#resumekey"), "个人标签格式错误,请重新输入!");
  1520. return false
  1521. }
  1522. var E = false;
  1523. for (var m in n) {
  1524. var u = n[m].replace(/[^\x00-\xff]/g, "**");
  1525. if (u.length > 24) {
  1526. E = true
  1527. }
  1528. }
  1529. if (E) {
  1530. inputPrompt($("#resumekey"), "个人标签格式错误,请重新输入!");
  1531. return false
  1532. } else {
  1533. clearPrompt($("#resumekey"));
  1534. return false
  1535. }
  1536. }
  1537. }
  1538. if ($(this).attr("id") == "email") {
  1539. if (filterTitle($(this)) != "") {
  1540. if ($("#email")[0] && $("#email").attr("disabled") != "disabled") {
  1541. var t = filterTitle($("#email"))
  1542. } else {
  1543. var t = ""
  1544. }
  1545. } else {
  1546. clearPrompt($("#email"));
  1547. return false
  1548. }
  1549. }
  1550. if ($(this).attr("id") == "baseinfoemail") {
  1551. if (filterTitle($(this)) != "") {
  1552. if ($("#baseinfoemail")[0] && $("#baseinfoemail").attr("disabled") != "disabled") {
  1553. var t = filterTitle($("#baseinfoemail"))
  1554. } else {
  1555. var t = ""
  1556. }
  1557. } else {
  1558. clearPrompt($("#baseinfoemail"));
  1559. return false
  1560. }
  1561. }
  1562. if ($(this).attr("id") == "schoolname") {
  1563. var f = filterTitle($("#schoolname"));
  1564. if (filterTitle($(this)) == "") {
  1565. inputPrompt($("#schoolname"), "请输入学校名称");
  1566. return false
  1567. } else {
  1568. var u = f.replace(/[^\x00-\xff]/g, "**");
  1569. if (u.length > 50) {
  1570. inputPrompt($("#schoolname"), "学校名称限25个中文字内");
  1571. return false
  1572. }
  1573. }
  1574. }
  1575. if ($(this).attr("id") == "majordesc") {
  1576. var w = $("#major")[0] ? $("#major").val() : "",
  1577. e = $("#degree").val(),
  1578. h = filterTitle($("#majordesc"));
  1579. if ((e > 2 && e != 9) || e == "-1") {
  1580. var u = h.replace(/[^\x00-\xff]/g, "**");
  1581. if (u.length > 100) {
  1582. inputPrompt($("#majordesc"), "专业名称限50个中文字内");
  1583. return false
  1584. }
  1585. }
  1586. }
  1587. if ($(this).attr("id") == "describe") {
  1588. var i = $("#describe")[0] ? filterTitle($("#describe")) : "";
  1589. if (i != "") {
  1590. var u = i.replace(/[^\x00-\xff]/g, "**");
  1591. if (u.length > 2000) {
  1592. inputPrompt($("#describe"), "专业描述限1000个中文字内");
  1593. return false
  1594. } else {
  1595. clearPrompt($("#describe"));
  1596. return false
  1597. }
  1598. }
  1599. }
  1600. if ($(this).attr("id") == "prodescribe") {
  1601. var k = filterTitle($("#prodescribe"));
  1602. var u = k.replace(/[^\x00-\xff]/g, "**");
  1603. if (k == "") {
  1604. inputPrompt($("#prodescribe"), "请输入项目描述");
  1605. return false
  1606. } else {
  1607. if (u.length > 2000) {
  1608. inputPrompt($("#prodescribe"), "请填写正确的项目描述,限1000个汉字");
  1609. return false
  1610. }
  1611. }
  1612. }
  1613. if ($(this).attr("id") == "function") {
  1614. var d = $("#function")[0] ? filterTitle($("#function")) : "";
  1615. if (i != "") {
  1616. var u = d.replace(/[^\x00-\xff]/g, "**");
  1617. if (u.length > 2000) {
  1618. inputPrompt($("#function"), "请填写正确的责任描述,限1000个汉字");
  1619. return false
  1620. } else {
  1621. clearPrompt($("#function"));
  1622. return false
  1623. }
  1624. }
  1625. }
  1626. if ($(this).attr("id") == "coname") {
  1627. var q = filterTitle($("#coname"));
  1628. if (filterTitle($(this)) == "") {
  1629. inputPrompt($("#coname"), "请输入公司名称");
  1630. return false
  1631. }
  1632. }
  1633. if ($(this).attr("id") == "czprs") {
  1634. var q = filterTitle($("#czprs"));
  1635. if (filterTitle($(this)) == "") {
  1636. inputPrompt($("#czprs"), "请输入招聘人数");
  1637. return false
  1638. }
  1639. }
  1640. if ($(this).attr("id") == "cjnyq") {
  1641. var q = filterTitle($("#cjnyq"));
  1642. if (filterTitle($(this)) == "") {
  1643. inputPrompt($("#cjnyq"), "请输入技能要求");
  1644. return false
  1645. }
  1646. }
  1647. if ($(this).attr("id") == "zw_ssbm") {
  1648. var q = filterTitle($("#zw_ssbm"));
  1649. if (filterTitle($(this)) == "") {
  1650. inputPrompt($("#zw_ssbm"), "请输入所属部门");
  1651. return false
  1652. }
  1653. }
  1654. if ($(this).attr("id") == "qy_lxr") {
  1655. var q = filterTitle($("#qy_lxr"));
  1656. if (filterTitle($(this)) == "") {
  1657. inputPrompt($("#qy_lxr"), "请输入企业联系人");
  1658. return false
  1659. }
  1660. }
  1661. if ($(this).attr("id") == "qy_yx") {
  1662. var q = filterTitle($("#qy_yx"));
  1663. if (filterTitle($(this)) == "") {
  1664. inputPrompt($("#qy_yx"), "请输入企业邮箱");
  1665. return false
  1666. }
  1667. }
  1668. if ($(this).attr("id") == "qy_xxdz") {
  1669. var q = filterTitle($("#qy_xxdz"));
  1670. if (filterTitle($(this)) == "") {
  1671. inputPrompt($("#qy_xxdz"), "请输入企业详细地址");
  1672. return false
  1673. }
  1674. }
  1675. if ($(this).attr("id") == "cqymc") {
  1676. var q = filterTitle($("#cqymc"));
  1677. if (filterTitle($(this)) == "") {
  1678. inputPrompt($("#cqymc"), "请输入企业名称");
  1679. return false
  1680. }
  1681. }
  1682. if ($(this).attr("id") == "position") {
  1683. var F = filterTitle($("#position"));
  1684. var u = F.replace(/[^\x00-\xff]/g, "**");
  1685. if (F == "") {
  1686. inputPrompt($("#position"), "请输入职位名称");
  1687. return false
  1688. } else {
  1689. if (u.length > 70) {
  1690. inputPrompt($("#position"), "职位名称限35个中文字内");
  1691. return false
  1692. }
  1693. }
  1694. }
  1695. if ($(this).attr("id") == "workdesc") {
  1696. var a = filterTitle($("#workdesc"));
  1697. if (a == "") {
  1698. inputPrompt($("#workdesc"), "请输入工作描述");
  1699. return false
  1700. }
  1701. var u = a.replace(/[^\x00-\xff]/g, "**");
  1702. if (u.length > 2000) {
  1703. inputPrompt($("#workdesc"), "工作描述限1000个中文字内");
  1704. return false
  1705. }
  1706. }
  1707. if ($(this).attr("id") == "department") {
  1708. var B = filterTitle($("#department"));
  1709. if (B != "") {
  1710. var u = B.replace(/[^\x00-\xff]/g, "**");
  1711. if (u.length > 50) {
  1712. inputPrompt($("#department"), "部门名称限25个中文字内");
  1713. return false
  1714. }
  1715. }
  1716. }
  1717. if ($(this).attr("id") == "reportboss") {
  1718. var g = $("#reportboss")[0] ? filterTitle($("#reportboss")) : "";
  1719. if (g != "") {
  1720. var u = g.replace(/[^\x00-\xff]/g, "**");
  1721. if (u.length > 50) {
  1722. inputPrompt($("#reportboss"), "汇报对象超长,请重新输入");
  1723. return false
  1724. }
  1725. }
  1726. }
  1727. if ($(this).attr("id") == "reportperson") {
  1728. var z = $("#reportperson")[0] ? filterTitle($("#reportperson")) : "";
  1729. if (z != "") {
  1730. if (!/^[0-9]*$/.test(z)) {
  1731. inputPrompt($("#reportperson"), "请正确输入下属人数");
  1732. return false
  1733. } else {
  1734. if (z.length > 5) {
  1735. inputPrompt($("#reportperson"), "下属人数限5位数字");
  1736. return false
  1737. }
  1738. }
  1739. }
  1740. if (z.substr(0, 1) == "0") {
  1741. inputPrompt($("#reportperson"), "请正确输入下属人数");
  1742. return false
  1743. }
  1744. }
  1745. if ($(this).attr("id") == "leavereason") {
  1746. var l = $("#leavereason")[0] ? filterTitle($("#leavereason")) : "";
  1747. if (l != "") {
  1748. var u = l.replace(/[^\x00-\xff]/g, "**");
  1749. if (u.length > 200) {
  1750. inputPrompt($("#leavereason"), "离职原因限100个中文字内");
  1751. return false
  1752. }
  1753. }
  1754. }
  1755. if ($(this).attr("id") == "score") {
  1756. var y = $("#score")[0] ? filterTitle($("#score")) : "";
  1757. if (y != "") {
  1758. var u = y.replace(/[^\x00-\xff]/g, "**");
  1759. if (u.length > 2000) {
  1760. inputPrompt($("#score"), "主要业绩限1000个中文字内");
  1761. return false
  1762. }
  1763. }
  1764. }
  1765. if ($(this).attr("id") == "keyword") {
  1766. var D = $("#keyword").val();
  1767. if (D != "") {
  1768. var o = D.split(" ");
  1769. if (o.length > 10) {
  1770. inputPrompt($("#keyword"), "个人标签格式错误,请重新输入!");
  1771. return false
  1772. }
  1773. for (var m in o) {
  1774. var u = o[m].replace(/[^\x00-\xff]/g, "**");
  1775. if (u.length > 12) {
  1776. inputPrompt($("#keyword"), "个人标签格式错误,请重新输入!");
  1777. return false
  1778. }
  1779. }
  1780. }
  1781. }
  1782. if ($(this).attr("id") == "otherinfo") {
  1783. var s = filterTitle($("#otherinfo"));
  1784. var u = s.replace(/[^\x00-\xff]/g, "**");
  1785. if (s == "") {} else {
  1786. if (u.length > 20000) {
  1787. inputPrompt($("#otherinfo"), "输入限10000个中文字内");
  1788. return false
  1789. }
  1790. }
  1791. }
  1792. if ($(this).attr("id") == "hoursal") {
  1793. var C = $("#hoursal")[0] ? filterTitle($("#hoursal")) : "";
  1794. if (C != "") {
  1795. if (!/^[0-9]{0,7}$/.test(C)) {
  1796. clearPrompt($("#daysal"));
  1797. inputPrompt($("#hoursal"), "目前薪资限7位数字内");
  1798. return false
  1799. } else {
  1800. if (C.length > 7) {
  1801. clearPrompt($("#daysal"));
  1802. inputPrompt($("#hoursal"), "目前薪资限7位数字内");
  1803. return false
  1804. }
  1805. }
  1806. }
  1807. }
  1808. if ($(this).attr("id") == "daysal") {
  1809. var j = $("#daysal")[0] ? filterTitle($("#daysal")) : "";
  1810. if (j != "") {
  1811. if (!/^[0-9]{0,7}$/.test(j)) {
  1812. clearPrompt($("#hoursal"));
  1813. inputPrompt($("#daysal"), "目前薪资限7位数字内");
  1814. return false
  1815. } else {
  1816. if (j.length > 7) {
  1817. clearPrompt($("#hoursal"));
  1818. inputPrompt($("#daysal"), "目前薪资限7位数字内");
  1819. return false
  1820. }
  1821. }
  1822. }
  1823. }
  1824. if ($(this).attr("id") == "projectname") {
  1825. if ($.trim(filterTitle($(this))) == "") {
  1826. inputPrompt($("#projectname"), "请输入项目名称")
  1827. } else {
  1828. clearPrompt($("#projectname"))
  1829. }
  1830. }
  1831. if ($(this).attr("id") == "areaname") {
  1832. var x = filterTitle($("#areaname"));
  1833. if (filterTitle($(this)) == "") {
  1834. clearPrompt($("#areaname"));
  1835. return false
  1836. } else {
  1837. clearPrompt($("#areaname"));
  1838. return false
  1839. }
  1840. }
  1841. if ($(this).attr("id") == "funtypename") {
  1842. var p = filterTitle($("#funtypename"));
  1843. if (filterTitle($(this)) == "") {
  1844. clearPrompt($("#funtype"));
  1845. inputPrompt($("#funtype"), "选择职能");
  1846. return false
  1847. } else {
  1848. clearPrompt($("#funtype"));
  1849. return false
  1850. }
  1851. }
  1852. if ($(this).attr("id") == "majordesc") {
  1853. var h = filterTitle($("#majordesc"));
  1854. var w = $("#major").val();
  1855. var e = $("#degree").val();
  1856. degrevalue = e > 2 || e == -1;
  1857. if (w && w.substr(2) == "00" && h == "" && degrevalue) {
  1858. inputPrompt($("#majordesc"), "请选择具体专业或自定义专业名称");
  1859. return false
  1860. } else {
  1861. clearPrompt($("#majordesc"));
  1862. return false
  1863. }
  1864. }
  1865. });
  1866. $(".selectchange").change(function () {
  1867. if ($(this).attr("id") == "workyear") {
  1868. if (filterTitle($(this)) == "") {
  1869. inputPrompt($("#workyear"), "请选择工作年限");
  1870. return false
  1871. } else {
  1872. clearPrompt($("#workyear"));
  1873. return false
  1874. }
  1875. }
  1876. if ($(this).attr("id") == "yearsal") {
  1877. if (filterTitle($(this)) == "") {
  1878. clearPrompt($("#sal"))
  1879. } else {
  1880. clearPrompt($("#sal"))
  1881. }
  1882. if (filterTitle($(this)) == "") {
  1883. inputPrompt($("#sal"), "请选择期望薪资")
  1884. }
  1885. if (filterTitle($(this)) == "customize") {
  1886. $("#customizesalary").show()
  1887. } else {
  1888. $("#customizesalary").hide()
  1889. }
  1890. return false
  1891. }
  1892. if ($(this).attr("id") == "monthsal") {
  1893. if (filterTitle($(this)) == "") {
  1894. clearPrompt($("#sal"))
  1895. } else {
  1896. clearPrompt($("#sal"))
  1897. }
  1898. if (filterTitle($(this)) == "customize") {
  1899. $("#customizesalary").show()
  1900. } else {
  1901. $("#customizesalary").hide()
  1902. }
  1903. return false
  1904. }
  1905. if ($(this).attr("id") == "yearfrom" || $(this).attr("id") == "monthfrom") {
  1906. var c = $("#yearfrom").val(),
  1907. a = $("#monthfrom").val();
  1908. if (c == "" || a == "") {
  1909. inputPrompt($("#entrancetime"), "请选择开始时间");
  1910. inputPrompt($("#timefrom"), "请选择开始时间");
  1911. inputPrompt($("#entrytime"), "请选择入职时间");
  1912. return false
  1913. } else {
  1914. if (c != "" && a != "") {
  1915. clearPrompt($("#entrancetime"));
  1916. clearPrompt($("#timefrom"));
  1917. clearPrompt($("#entrytime"));
  1918. a = (a < 10 ? "0" + a : a);
  1919. var g = (c.toString() + a.toString());
  1920. nowdate = getYM();
  1921. if (g > nowdate) {
  1922. inputPrompt($("#entrancetime"), "入学时间不能选择未来时间");
  1923. inputPrompt($("#timefrom"), "开始时间不能选择未来时间");
  1924. inputPrompt($("#entrytime"), "入职时间不能选择未来时间");
  1925. return false
  1926. }
  1927. } else {
  1928. clearPrompt($("#entrancetime"));
  1929. clearPrompt($("#timefrom"));
  1930. clearPrompt($("#entrytime"));
  1931. return false
  1932. }
  1933. }
  1934. }
  1935. if ($(this).attr("id") == "yearto" || $(this).attr("id") == "monthto") {
  1936. var c = $("#yearfrom").val(),
  1937. a = $("#monthfrom").val(),
  1938. b = $("#yearto").val(),
  1939. f = $("#monthto").val();
  1940. if (b == "") {
  1941. $("#graduationmonth").hide();
  1942. $("#leavemonth").hide();
  1943. $("#projectmonthto").hide()
  1944. } else {
  1945. $("#graduationmonth").show();
  1946. $("#leavemonth").show();
  1947. $("#projectmonthto").show()
  1948. }
  1949. if (((b == "") ^ (f == "")) && b != "") {
  1950. inputPrompt($("#graduationtime"), "请正确选择结束时间");
  1951. inputPrompt($("#leavetime"), "请选择正确离职时间");
  1952. inputPrompt($("#timeto"), "请选择正确项目结束时间");
  1953. return false
  1954. }
  1955. if (b != "" && f != "") {
  1956. var e = a.length == 1 ? c + "0" + a : c + a;
  1957. var d = f.length == 1 ? b + "0" + f : b + f;
  1958. nowdate = getYM();
  1959. if (d > nowdate) {
  1960. inputPrompt($("#leavetime"), "离职时间不能选择未来时间");
  1961. inputPrompt($("#timeto"), "结束时间不能选择未来时间");
  1962. clearPrompt($("#graduationtime"));
  1963. return false
  1964. }
  1965. if (d < e) {
  1966. inputPrompt($("#graduationtime"), "结束时间不能小于开始时间");
  1967. inputPrompt($("#leavetime"), "离职时间不能小于入职时间");
  1968. inputPrompt($("#timeto"), "项目结束时间不能小于入职时间");
  1969. return false
  1970. }
  1971. }
  1972. clearPrompt($("#graduationtime"));
  1973. clearPrompt($("#leavetime"));
  1974. clearPrompt($("#timeto"));
  1975. return false
  1976. }
  1977. if ($(this).attr("id") == "salarytype") {
  1978. clearPrompt($("#sal"));
  1979. $("#customizesalary").css("display", "none");
  1980. switch ($(this).val()) {
  1981. case "1":
  1982. if ($("#monthsal").val() == "" || ($("#monthsal").val() == "customize" && ($("#sal_min").val() == "" || $("#sal_max").val() == ""))) {
  1983. inputPrompt($("#sal"), "请选择期望薪资")
  1984. }
  1985. if ($("#monthsal").val() == "customize") {
  1986. $("#customizesalary").css("display", "block")
  1987. }
  1988. break;
  1989. case "2":
  1990. break;
  1991. case "3":
  1992. break;
  1993. case "4":
  1994. if ($("#yearsal").val() == "" || ($("#yearsal").val() == "customize" && ($("#sal_min").val() == "" || $("#sal_max").val() == ""))) {
  1995. inputPrompt($("#sal"), "请选择期望薪资")
  1996. }
  1997. if ($("#yearsal").val() == "customize") {
  1998. $("#customizesalary").css("display", "block")
  1999. }
  2000. break
  2001. }
  2002. }
  2003. });
  2004. var simpleAssociation = function (a) {
  2005. $(".asslist").find("div").html("");
  2006. var c = $('input[name="' + a + '"]').attr("value");
  2007. var b = 0;
  2008. var d = "";
  2009. if (c) {
  2010. $.ajax({
  2011. url: "//kwdsrv.51job.com/KwdSrvByKey/default.aspx",
  2012. data: {
  2013. kwd: c,
  2014. src: a,
  2015. rand: Math.random()
  2016. },
  2017. dataType: "jsonp",
  2018. cache: false,
  2019. async: false,
  2020. timeout: 1000,
  2021. success: function (f, g, e) {
  2022. if ("1" == f.message) {
  2023. if ("" != f.content) {
  2024. $.each(unescape(f.content).split("\t"), function (h, j) {
  2025. if (b < 4) {
  2026. d += '<span class="ae at ' + a + '" onclick ="subvalue(this)" value ="' + j + '">' + j + "</span>";
  2027. b++
  2028. }
  2029. });
  2030. $("." + a + ".cn").parent().show();
  2031. $("." + a + ".cn").append(d)
  2032. } else {
  2033. $("." + a + ".cn").parent().hide()
  2034. }
  2035. }
  2036. }
  2037. })
  2038. } else {
  2039. $("." + a + ".cn").parent().hide()
  2040. }
  2041. };
  2042. var simpleAssociationforintent = function (a) {
  2043. $(".job_ass").empty();
  2044. var c = $('input[name="' + a + '"]').attr("value");
  2045. var b = 0;
  2046. var d = "";
  2047. if (c) {
  2048. $.ajax({
  2049. url: "//kwdsrv.51job.com/KwdSrvByKey/default.aspx",
  2050. data: {
  2051. kwd: c,
  2052. src: a,
  2053. rand: Math.random()
  2054. },
  2055. dataType: "jsonp",
  2056. cache: false,
  2057. async: false,
  2058. timeout: 1000,
  2059. success: function (f, g, e) {
  2060. if ("1" == f.message) {
  2061. if ("" != f.content) {
  2062. d += "<ul>";
  2063. $.each(unescape(f.content).split("\t"), function (h, j) {
  2064. if (b < 4) {
  2065. d += '<li class="' + a + '" onclick ="subvalue(this)" value ="' + j + '">' + j + "</li>";
  2066. b++
  2067. }
  2068. });
  2069. d += "</ul>";
  2070. $(".job_ass").show();
  2071. $(".job_ass").append(d)
  2072. }
  2073. }
  2074. }
  2075. })
  2076. } else {
  2077. $(".job_ass").hide()
  2078. }
  2079. };
  2080. $("html").click(function () {
  2081. $(".asslist").find("div").html("");
  2082. $(".asslist").hide();
  2083. if ($_CONFIG.template == "resume/jobintent" || $_CONFIG.template == "resume/guide4") {
  2084. $(".job_ass").hide()
  2085. }
  2086. });
  2087. var subvalue = function (a) {
  2088. if ($(a).hasClass("School")) {
  2089. $("input[name='School']").val($(a).attr("value"));
  2090. $("input[name='School']").focus()
  2091. } else {
  2092. if ($(a).hasClass("Major")) {
  2093. $("input[name='Major']").val($(a).attr("value"));
  2094. $("input[name='Major']").focus()
  2095. } else {
  2096. if ($(a).hasClass("Company")) {
  2097. $("input[name='Company']").val($(a).attr("value"));
  2098. $("input[name='Company']").focus()
  2099. } else {
  2100. if ($(a).hasClass("Job")) {
  2101. $("input[name='Job']").val($(a).attr("value"));
  2102. $("input[name='Job']").focus()
  2103. }
  2104. }
  2105. }
  2106. }
  2107. $(".cn").html("");
  2108. if ($_CONFIG.template == "resume/jobintent" || $_CONFIG.template == "resume/guide4") {
  2109. $(".job_ass").empty()
  2110. }
  2111. };
  2112. var showdetail = function (a) {
  2113. if (!$("#showdetail").hasClass("on")) {
  2114. $("#showdetail").addClass("on");
  2115. $(".custom").show()
  2116. } else {
  2117. $("#showdetail").removeClass("on");
  2118. $(".custom").hide()
  2119. }
  2120. };
  2121. var getYM = function () {
  2122. var a = new Date;
  2123. var b = a.getFullYear(),
  2124. d = a.getMonth() + 1;
  2125. d = (d < 10 ? "0" + d : d);
  2126. var c = (b.toString() + d.toString());
  2127. return c
  2128. };
  2129. var checkSalary = function (a) {
  2130. 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) == "+") {
  2131. return false
  2132. }
  2133. return true
  2134. };
  2135. function checkNumber(c) {
  2136. var b = arguments[1] || "";
  2137. if (isNaN(c)) {
  2138. return false
  2139. }
  2140. if (b == "int") {
  2141. var a = /^[1-9][0-9]*$/;
  2142. if (!c.match(a)) {
  2143. return false
  2144. }
  2145. }
  2146. if (b == "numberchar") {
  2147. var a = /^[0-9][0-9]*$/;
  2148. if (!c.match(a)) {
  2149. return false
  2150. }
  2151. }
  2152. return true
  2153. }
  2154. $(".pclear").click(function () {
  2155. if ($(this).parent().siblings().hasClass("asslist")) {
  2156. $(".cn").html("")
  2157. }
  2158. });