Personal.js 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436
  1. "use strict";
  2. const common_vendor = require("../../common/vendor.js");
  3. const common_config = require("../../common/config.js");
  4. const _sfc_main = {
  5. data() {
  6. return {
  7. // 添加承诺书相关数据
  8. showPromiseModal: true,
  9. promiseChecked: false,
  10. formData: {
  11. name: "",
  12. gender: "",
  13. threePeriod: "",
  14. birthDate: "",
  15. idCard: "",
  16. political: "",
  17. ethnic: "",
  18. height: "",
  19. weight: "",
  20. nativePlace: "",
  21. residence: "",
  22. marriage: "",
  23. expectedSalary: "",
  24. phone: "",
  25. email: "",
  26. currentAddress: "",
  27. emergencyContact: "",
  28. emergencyPhone: "",
  29. hobby: "",
  30. motto: "",
  31. // 添加应聘来源相关字段
  32. sourceType: "social",
  33. // 默认为社招
  34. socialSource: "",
  35. // 社招来源
  36. otherSocialSource: "",
  37. // 其他社招来源
  38. otherSchoolSource: "",
  39. // 其他学校来源
  40. // 添加技能和培训字段
  41. skills: "",
  42. training: ""
  43. },
  44. genderOptions: ["男", "女"],
  45. genderIndex: -1,
  46. threePeriodOptions: ["无", "孕期", "产期", "哺乳期"],
  47. threePeriodIndex: -1,
  48. politicalOptions: ["群众", "共青团员", "中共党员", "民主党派"],
  49. politicalIndex: -1,
  50. ethnicOptions: ["汉族", "蒙古族", "回族", "藏族", "维吾尔族", "其他"],
  51. ethnicIndex: -1,
  52. marriageOptions: ["未婚", "已婚", "离异", "丧偶"],
  53. marriageIndex: -1,
  54. familyMembers: [],
  55. familyMemberForm: {
  56. relation: "",
  57. name: "",
  58. workplaceOrAddress: "",
  59. position: "",
  60. phone: ""
  61. },
  62. isEditing: false,
  63. editingIndex: -1,
  64. // 添加教育经历相关数据
  65. educationList: [],
  66. educationForm: {
  67. startTime: "",
  68. endTime: "",
  69. schoolName: "",
  70. major: "",
  71. degree: ""
  72. },
  73. isEditingEducation: false,
  74. editingEducationIndex: -1,
  75. degreeOptions: ["高中", "中专", "大专", "本科", "硕士", "博士"],
  76. degreeIndex: -1,
  77. // 添加工作经历相关数据
  78. workList: [],
  79. workForm: {
  80. startTime: "",
  81. endTime: "",
  82. companyName: "",
  83. department: "",
  84. employeeCount: "",
  85. position: "",
  86. monthlySalary: "",
  87. supervisor: "",
  88. supervisorPhone: ""
  89. },
  90. isEditingWork: false,
  91. editingWorkIndex: -1,
  92. // 添加步骤控制
  93. currentStep: 1,
  94. steps: [
  95. { id: 1, name: "个人基本信息" },
  96. { id: 2, name: "紧急联系人信息" },
  97. { id: 3, name: "家庭成员信息" },
  98. { id: 4, name: "应聘来源" },
  99. { id: 5, name: "教育经历" },
  100. { id: 6, name: "专业技能" },
  101. { id: 7, name: "培训经历" },
  102. { id: 8, name: "工作经历" },
  103. { id: 9, name: "确认提交" }
  104. ],
  105. formErrors: {
  106. name: "",
  107. idCard: "",
  108. phone: ""
  109. },
  110. // Add loading state
  111. isLoading: true
  112. };
  113. },
  114. onLoad() {
  115. this.fetchUserData();
  116. },
  117. methods: {
  118. // 添加承诺书相关方法
  119. togglePromiseChecked() {
  120. this.promiseChecked = !this.promiseChecked;
  121. },
  122. confirmPromise() {
  123. if (this.promiseChecked) {
  124. this.showPromiseModal = false;
  125. } else {
  126. common_vendor.index.showToast({
  127. title: "请先阅读并同意承诺书内容",
  128. icon: "none"
  129. });
  130. }
  131. },
  132. bindGenderChange(e) {
  133. this.genderIndex = e.detail.value;
  134. this.formData.gender = this.genderOptions[this.genderIndex];
  135. if (this.formData.gender !== "女") {
  136. this.formData.threePeriod = "";
  137. this.threePeriodIndex = -1;
  138. }
  139. },
  140. bindThreePeriodChange(e) {
  141. this.threePeriodIndex = e.detail.value;
  142. this.formData.threePeriod = this.threePeriodOptions[this.threePeriodIndex];
  143. },
  144. bindPoliticalChange(e) {
  145. this.politicalIndex = e.detail.value;
  146. this.formData.political = this.politicalOptions[this.politicalIndex];
  147. },
  148. bindEthnicChange(e) {
  149. this.ethnicIndex = e.detail.value;
  150. this.formData.ethnic = this.ethnicOptions[this.ethnicIndex];
  151. },
  152. bindMarriageChange(e) {
  153. this.marriageIndex = e.detail.value;
  154. this.formData.marriage = this.marriageOptions[this.marriageIndex];
  155. },
  156. bindDateChange(e) {
  157. this.formData.birthDate = e.detail.value;
  158. },
  159. saveFamilyMember() {
  160. if (!this.familyMemberForm.relation) {
  161. common_vendor.index.showToast({
  162. title: "请输入称谓",
  163. icon: "none"
  164. });
  165. return;
  166. }
  167. if (!this.familyMemberForm.name) {
  168. common_vendor.index.showToast({
  169. title: "请输入姓名",
  170. icon: "none"
  171. });
  172. return;
  173. }
  174. if (!this.familyMemberForm.phone) {
  175. common_vendor.index.showToast({
  176. title: "请输入联系电话",
  177. icon: "none"
  178. });
  179. return;
  180. }
  181. if (this.isEditing) {
  182. this.familyMembers[this.editingIndex] = { ...this.familyMemberForm };
  183. common_vendor.index.showToast({
  184. title: "修改成功",
  185. icon: "success"
  186. });
  187. this.isEditing = false;
  188. this.editingIndex = -1;
  189. } else {
  190. this.familyMembers.push({ ...this.familyMemberForm });
  191. common_vendor.index.showToast({
  192. title: "添加成功",
  193. icon: "success"
  194. });
  195. }
  196. this.familyMemberForm = {
  197. relation: "",
  198. name: "",
  199. workplaceOrAddress: "",
  200. position: "",
  201. phone: ""
  202. };
  203. },
  204. editFamilyMember(index) {
  205. this.isEditing = true;
  206. this.editingIndex = index;
  207. this.familyMemberForm = { ...this.familyMembers[index] };
  208. common_vendor.index.pageScrollTo({
  209. selector: ".family-member-form",
  210. duration: 300
  211. });
  212. },
  213. cancelEdit() {
  214. this.isEditing = false;
  215. this.editingIndex = -1;
  216. this.familyMemberForm = {
  217. relation: "",
  218. name: "",
  219. workplaceOrAddress: "",
  220. position: "",
  221. phone: ""
  222. };
  223. },
  224. deleteFamilyMember(index) {
  225. if (this.isEditing && this.editingIndex === index) {
  226. this.cancelEdit();
  227. }
  228. this.familyMembers.splice(index, 1);
  229. common_vendor.index.showToast({
  230. title: "已删除",
  231. icon: "none"
  232. });
  233. },
  234. // 选择应聘来源类型
  235. selectSourceType(type) {
  236. this.formData.sourceType = type;
  237. if (type === "social") {
  238. this.formData.socialSource = "BOSS";
  239. } else {
  240. this.formData.socialSource = "";
  241. }
  242. },
  243. // 选择社招来源
  244. selectSocialSource(source) {
  245. this.formData.sourceType = "social";
  246. this.formData.socialSource = source;
  247. },
  248. // 教育经历相关方法
  249. bindStartTimeChange(e) {
  250. this.educationForm.startTime = e.detail.value;
  251. },
  252. bindEndTimeChange(e) {
  253. this.educationForm.endTime = e.detail.value;
  254. },
  255. bindDegreeChange(e) {
  256. this.degreeIndex = e.detail.value;
  257. this.educationForm.degree = this.degreeOptions[this.degreeIndex];
  258. },
  259. saveEducation() {
  260. if (!this.educationForm.startTime) {
  261. common_vendor.index.showToast({
  262. title: "请选择开始时间",
  263. icon: "none"
  264. });
  265. return;
  266. }
  267. if (!this.educationForm.endTime) {
  268. common_vendor.index.showToast({
  269. title: "请选择结束时间",
  270. icon: "none"
  271. });
  272. return;
  273. }
  274. if (!this.educationForm.schoolName) {
  275. common_vendor.index.showToast({
  276. title: "请输入学校名称",
  277. icon: "none"
  278. });
  279. return;
  280. }
  281. if (!this.educationForm.major) {
  282. common_vendor.index.showToast({
  283. title: "请输入专业",
  284. icon: "none"
  285. });
  286. return;
  287. }
  288. if (!this.educationForm.degree) {
  289. common_vendor.index.showToast({
  290. title: "请选择学历",
  291. icon: "none"
  292. });
  293. return;
  294. }
  295. if (this.isEditingEducation) {
  296. this.educationList[this.editingEducationIndex] = { ...this.educationForm };
  297. common_vendor.index.showToast({
  298. title: "修改成功",
  299. icon: "success"
  300. });
  301. this.isEditingEducation = false;
  302. this.editingEducationIndex = -1;
  303. } else {
  304. this.educationList.push({ ...this.educationForm });
  305. common_vendor.index.showToast({
  306. title: "添加成功",
  307. icon: "success"
  308. });
  309. }
  310. this.educationForm = {
  311. startTime: "",
  312. endTime: "",
  313. schoolName: "",
  314. major: "",
  315. degree: ""
  316. };
  317. this.degreeIndex = -1;
  318. },
  319. editEducation(index) {
  320. this.isEditingEducation = true;
  321. this.editingEducationIndex = index;
  322. this.educationForm = { ...this.educationList[index] };
  323. this.degreeIndex = this.degreeOptions.findIndex((item) => item === this.educationForm.degree);
  324. common_vendor.index.pageScrollTo({
  325. selector: ".education-form",
  326. duration: 300
  327. });
  328. },
  329. cancelEditEducation() {
  330. this.isEditingEducation = false;
  331. this.editingEducationIndex = -1;
  332. this.educationForm = {
  333. startTime: "",
  334. endTime: "",
  335. schoolName: "",
  336. major: "",
  337. degree: ""
  338. };
  339. this.degreeIndex = -1;
  340. },
  341. deleteEducation(index) {
  342. if (this.isEditingEducation && this.editingEducationIndex === index) {
  343. this.cancelEditEducation();
  344. }
  345. this.educationList.splice(index, 1);
  346. common_vendor.index.showToast({
  347. title: "已删除",
  348. icon: "none"
  349. });
  350. },
  351. // 工作经历相关方法
  352. bindWorkStartTimeChange(e) {
  353. this.workForm.startTime = e.detail.value;
  354. },
  355. bindWorkEndTimeChange(e) {
  356. this.workForm.endTime = e.detail.value;
  357. },
  358. saveWork() {
  359. if (!this.workForm.startTime) {
  360. common_vendor.index.showToast({
  361. title: "请选择开始时间",
  362. icon: "none"
  363. });
  364. return;
  365. }
  366. if (!this.workForm.endTime) {
  367. common_vendor.index.showToast({
  368. title: "请选择结束时间",
  369. icon: "none"
  370. });
  371. return;
  372. }
  373. if (!this.workForm.companyName) {
  374. common_vendor.index.showToast({
  375. title: "请输入单位名称",
  376. icon: "none"
  377. });
  378. return;
  379. }
  380. if (!this.workForm.department) {
  381. common_vendor.index.showToast({
  382. title: "请输入任职部门",
  383. icon: "none"
  384. });
  385. return;
  386. }
  387. if (!this.workForm.position) {
  388. common_vendor.index.showToast({
  389. title: "请输入担任职务",
  390. icon: "none"
  391. });
  392. return;
  393. }
  394. if (this.isEditingWork) {
  395. this.workList[this.editingWorkIndex] = { ...this.workForm };
  396. common_vendor.index.showToast({
  397. title: "修改成功",
  398. icon: "success"
  399. });
  400. this.isEditingWork = false;
  401. this.editingWorkIndex = -1;
  402. } else {
  403. this.workList.push({ ...this.workForm });
  404. common_vendor.index.showToast({
  405. title: "添加成功",
  406. icon: "success"
  407. });
  408. }
  409. this.workForm = {
  410. startTime: "",
  411. endTime: "",
  412. companyName: "",
  413. department: "",
  414. employeeCount: "",
  415. position: "",
  416. monthlySalary: "",
  417. supervisor: "",
  418. supervisorPhone: ""
  419. };
  420. },
  421. editWork(index) {
  422. this.isEditingWork = true;
  423. this.editingWorkIndex = index;
  424. this.workForm = { ...this.workList[index] };
  425. common_vendor.index.pageScrollTo({
  426. selector: ".work-form",
  427. duration: 300
  428. });
  429. },
  430. cancelEditWork() {
  431. this.isEditingWork = false;
  432. this.editingWorkIndex = -1;
  433. this.workForm = {
  434. startTime: "",
  435. endTime: "",
  436. companyName: "",
  437. department: "",
  438. employeeCount: "",
  439. position: "",
  440. monthlySalary: "",
  441. supervisor: "",
  442. supervisorPhone: ""
  443. };
  444. },
  445. deleteWork(index) {
  446. if (this.isEditingWork && this.editingWorkIndex === index) {
  447. this.cancelEditWork();
  448. }
  449. this.workList.splice(index, 1);
  450. common_vendor.index.showToast({
  451. title: "已删除",
  452. icon: "none"
  453. });
  454. },
  455. submitForm() {
  456. if (!this.formData.name) {
  457. common_vendor.index.showToast({
  458. title: "请输入姓名",
  459. icon: "none"
  460. });
  461. return;
  462. }
  463. if (this.genderIndex === -1) {
  464. common_vendor.index.showToast({
  465. title: "请选择性别",
  466. icon: "none"
  467. });
  468. return;
  469. }
  470. if (this.formData.gender === "女" && this.threePeriodIndex === -1) {
  471. common_vendor.index.showToast({
  472. title: "请选择是否为三期",
  473. icon: "none"
  474. });
  475. return;
  476. }
  477. if (!this.formData.emergencyContact) {
  478. common_vendor.index.showToast({
  479. title: "请输入紧急联系人",
  480. icon: "none"
  481. });
  482. return;
  483. }
  484. if (!this.formData.emergencyPhone) {
  485. common_vendor.index.showToast({
  486. title: "请输入紧急联系人电话",
  487. icon: "none"
  488. });
  489. return;
  490. }
  491. if (this.familyMembers.length === 0) {
  492. common_vendor.index.showToast({
  493. title: "请至少添加一位家庭成员",
  494. icon: "none"
  495. });
  496. return;
  497. }
  498. if (this.formData.sourceType === "school" && !this.formData.otherSchoolSource) {
  499. common_vendor.index.showToast({
  500. title: "请填写学校来源",
  501. icon: "none"
  502. });
  503. return;
  504. }
  505. if (this.formData.sourceType === "social") {
  506. if (!this.formData.socialSource) {
  507. common_vendor.index.showToast({
  508. title: "请选择社招来源",
  509. icon: "none"
  510. });
  511. return;
  512. }
  513. if (this.formData.socialSource === "other" && !this.formData.otherSocialSource) {
  514. common_vendor.index.showToast({
  515. title: "请填写其他社招来源",
  516. icon: "none"
  517. });
  518. return;
  519. }
  520. }
  521. if (this.educationList.length === 0) {
  522. common_vendor.index.showToast({
  523. title: "请至少添加一项教育经历",
  524. icon: "none"
  525. });
  526. return;
  527. }
  528. if (this.workList.length === 0) {
  529. common_vendor.index.showToast({
  530. title: "请至少添加一项工作经历",
  531. icon: "none"
  532. });
  533. return;
  534. }
  535. for (let i = 0; i < this.workList.length; i++) {
  536. const work = this.workList[i];
  537. if (!work.startTime) {
  538. common_vendor.index.showToast({
  539. title: `单位${i + 1}:请选择开始时间`,
  540. icon: "none"
  541. });
  542. return false;
  543. }
  544. if (!work.endTime) {
  545. common_vendor.index.showToast({
  546. title: `单位${i + 1}:请选择结束时间`,
  547. icon: "none"
  548. });
  549. return false;
  550. }
  551. if (!work.companyName) {
  552. common_vendor.index.showToast({
  553. title: `单位${i + 1}:请输入单位名称`,
  554. icon: "none"
  555. });
  556. return false;
  557. }
  558. if (!work.department) {
  559. common_vendor.index.showToast({
  560. title: `单位${i + 1}:请输入任职部门`,
  561. icon: "none"
  562. });
  563. return false;
  564. }
  565. if (!work.employeeCount) {
  566. common_vendor.index.showToast({
  567. title: `单位${i + 1}:请输入单位人数`,
  568. icon: "none"
  569. });
  570. return false;
  571. }
  572. if (!work.position) {
  573. common_vendor.index.showToast({
  574. title: `单位${i + 1}:请输入担任职务`,
  575. icon: "none"
  576. });
  577. return false;
  578. }
  579. if (!work.monthlySalary) {
  580. common_vendor.index.showToast({
  581. title: `单位${i + 1}:请输入月总收入`,
  582. icon: "none"
  583. });
  584. return false;
  585. }
  586. if (!work.supervisor) {
  587. common_vendor.index.showToast({
  588. title: `单位${i + 1}:请输入直接领导姓名`,
  589. icon: "none"
  590. });
  591. return false;
  592. }
  593. if (!work.supervisorPhone) {
  594. common_vendor.index.showToast({
  595. title: `单位${i + 1}:请输入领导电话`,
  596. icon: "none"
  597. });
  598. return false;
  599. }
  600. }
  601. const submitData = {
  602. tenant_id: 1,
  603. user_id: JSON.parse(common_vendor.index.getStorageSync("userInfo")).id,
  604. // 从存储中获取用户ID
  605. personal_info: {
  606. name: this.formData.name,
  607. gender: this.formData.gender,
  608. birth_date: this.formData.birthDate,
  609. phone: this.formData.phone,
  610. id_card: this.formData.idCard,
  611. email: this.formData.email,
  612. address: this.formData.currentAddress,
  613. professional_skills: this.formData.skills ? this.formData.skills.split(",") : []
  614. },
  615. profile: {
  616. // 女性特殊状态映射
  617. female_status: this.formData.gender === "女" ? this.formData.threePeriod === "孕期" ? 1 : this.formData.threePeriod === "产期" ? 2 : this.formData.threePeriod === "哺乳期" ? 3 : 0 : 0,
  618. // 婚姻状况映射
  619. marital_status: this.formData.marriage === "未婚" ? 0 : this.formData.marriage === "已婚" ? 1 : this.formData.marriage === "离异" ? 2 : this.formData.marriage === "丧偶" ? 3 : 0,
  620. height: parseFloat(this.formData.height) || 0,
  621. weight: parseFloat(this.formData.weight) || 0,
  622. political_status: this.formData.political,
  623. ethnicity: this.formData.ethnic,
  624. native_place: this.formData.nativePlace,
  625. household_location: this.formData.residence,
  626. current_address: this.formData.currentAddress,
  627. expected_salary: parseFloat(this.formData.expectedSalary) || 0,
  628. emergency_contact: this.formData.emergencyContact,
  629. emergency_phone: this.formData.emergencyPhone,
  630. specialties: this.formData.hobby,
  631. life_motto: this.formData.motto,
  632. // 应聘来源映射
  633. recruitment_source: this.formData.sourceType === "social" ? this.formData.socialSource === "BOSS" ? 2 : this.formData.socialSource === "zhilian" ? 3 : this.formData.socialSource === "liepin" ? 4 : 5 : 1,
  634. recruitment_source_detail: this.formData.sourceType === "social" ? this.formData.socialSource === "other" ? this.formData.otherSocialSource : this.formData.socialSource === "BOSS" ? "BOSS直聘" : this.formData.socialSource === "zhilian" ? "智联招聘" : this.formData.socialSource === "liepin" ? "猎聘" : "" : this.formData.otherSchoolSource
  635. },
  636. // 教育经历映射
  637. educations: this.educationList.map((edu, index) => ({
  638. education_type: index === 0 ? 1 : 2,
  639. // 第一个为第一学历,第二个为最高学历
  640. degree: this.mapDegreeToNumber(edu.degree),
  641. start_date: edu.startTime,
  642. end_date: edu.endTime,
  643. school_name: edu.schoolName,
  644. major: edu.major
  645. })),
  646. // 家庭成员映射
  647. family_members: this.familyMembers.map((member) => ({
  648. relation: member.relation,
  649. name: member.name,
  650. workplace: member.workplaceOrAddress,
  651. position: member.position,
  652. phone: member.phone
  653. })),
  654. // 工作经历映射
  655. work_experiences: this.workList.map((work) => ({
  656. start_date: work.startTime,
  657. end_date: work.endTime,
  658. company_name: work.companyName,
  659. //单位名称
  660. department: work.department,
  661. //任职部门
  662. company_size: work.employeeCount,
  663. //员工人数
  664. position: work.position,
  665. //担任职务
  666. monthly_salary: work.monthlySalary,
  667. //月薪
  668. supervisor_name: work.supervisor,
  669. //直属上级
  670. supervisor_phone: work.supervisorPhone
  671. //直属上级电话
  672. }))
  673. // 培训经历可以从技能和培训文本框中提取
  674. /* trainings: this.formData.training ? [{
  675. training_name: "培训经历",
  676. description: this.formData.training
  677. }] : [] */
  678. };
  679. console.log("提交的表单数据:", submitData);
  680. common_vendor.index.showLoading({
  681. title: "提交中..."
  682. });
  683. common_vendor.index.request({
  684. url: `${common_config.apiBaseUrl}/wechat/user/profile/update`,
  685. // 根据实际API路径调整
  686. method: "POST",
  687. data: submitData,
  688. success: (res) => {
  689. common_vendor.index.hideLoading();
  690. this.formErrors = {
  691. name: "",
  692. idCard: "",
  693. phone: ""
  694. };
  695. if (res.data.code === 2e3) {
  696. this.currentStep++;
  697. common_vendor.index.navigateTo({
  698. url: "/pages/interview-notice/interview-notice"
  699. });
  700. } else {
  701. let errorMsg = res.data.msg || "身份验证失败";
  702. common_vendor.index.showToast({
  703. title: errorMsg,
  704. icon: "none",
  705. duration: 2e3
  706. });
  707. }
  708. },
  709. fail: (err) => {
  710. common_vendor.index.hideLoading();
  711. common_vendor.index.showToast({
  712. title: "网络错误,请检查网络连接",
  713. icon: "none"
  714. });
  715. console.error("提交失败:", err);
  716. }
  717. });
  718. },
  719. // 学历映射辅助方法
  720. mapDegreeToNumber(degreeText) {
  721. const degreeMap = {
  722. "高中": 1,
  723. "中专": 1,
  724. "大专": 2,
  725. "本科": 3,
  726. "硕士": 4,
  727. "博士": 5
  728. };
  729. return degreeMap[degreeText] || 6;
  730. },
  731. prevStep() {
  732. if (this.currentStep > 1) {
  733. this.currentStep--;
  734. common_vendor.index.pageScrollTo({
  735. scrollTop: 0,
  736. duration: 300
  737. });
  738. }
  739. },
  740. nextStep() {
  741. if (!this.validateCurrentStep()) {
  742. return;
  743. }
  744. if (this.currentStep === 1) {
  745. this.formErrors = {
  746. name: "",
  747. idCard: "",
  748. phone: ""
  749. };
  750. common_vendor.index.showLoading({
  751. title: "身份验证中..."
  752. });
  753. common_vendor.index.request({
  754. url: `${common_config.apiBaseUrl}/wechat/identity/verify`,
  755. method: "POST",
  756. data: {
  757. name: this.formData.name,
  758. id_number: this.formData.idCard,
  759. mobile: this.formData.phone
  760. },
  761. header: {
  762. "content-type": "application/x-www-form-urlencoded"
  763. },
  764. success: (res) => {
  765. common_vendor.index.hideLoading();
  766. if (res.data.code === 200) {
  767. this.currentStep++;
  768. common_vendor.index.pageScrollTo({
  769. scrollTop: 0,
  770. duration: 300
  771. });
  772. } else {
  773. res.data.msg || "身份验证失败";
  774. this.formErrors.name = "姓名验证失败,请检查姓名是否正确";
  775. this.formErrors.idCard = "身份证号验证失败,请检查身份证号是否正确";
  776. this.formErrors.phone = "手机号验证失败,请检查手机号是否正确";
  777. }
  778. },
  779. fail: (err) => {
  780. common_vendor.index.hideLoading();
  781. common_vendor.index.showToast({
  782. title: "网络错误,请检查网络连接",
  783. icon: "none",
  784. duration: 2e3
  785. });
  786. console.error("身份验证请求失败:", err);
  787. }
  788. });
  789. } else {
  790. if (this.currentStep < this.steps.length) {
  791. this.currentStep++;
  792. common_vendor.index.pageScrollTo({
  793. scrollTop: 0,
  794. duration: 300
  795. });
  796. }
  797. }
  798. },
  799. // 验证当前步骤的必填项
  800. validateCurrentStep() {
  801. switch (this.currentStep) {
  802. case 1:
  803. if (!this.formData.name) {
  804. common_vendor.index.showToast({
  805. title: "请输入姓名",
  806. icon: "none"
  807. });
  808. return false;
  809. }
  810. if (this.genderIndex === -1) {
  811. common_vendor.index.showToast({
  812. title: "请选择性别",
  813. icon: "none"
  814. });
  815. return false;
  816. }
  817. if (this.formData.gender === "女" && this.threePeriodIndex === -1) {
  818. common_vendor.index.showToast({
  819. title: "请选择是否为三期",
  820. icon: "none"
  821. });
  822. return false;
  823. }
  824. if (!this.formData.phone) {
  825. common_vendor.index.showToast({
  826. title: "请输入手机号",
  827. icon: "none"
  828. });
  829. return false;
  830. }
  831. if (!this.formData.idCard) {
  832. common_vendor.index.showToast({
  833. title: "请输入身份证号",
  834. icon: "none"
  835. });
  836. return false;
  837. }
  838. if (this.politicalIndex === -1) {
  839. common_vendor.index.showToast({
  840. title: "请选择政治面貌",
  841. icon: "none"
  842. });
  843. return false;
  844. }
  845. if (this.ethnicIndex === -1) {
  846. common_vendor.index.showToast({
  847. title: "请选择民族",
  848. icon: "none"
  849. });
  850. return false;
  851. }
  852. if (this.marriageIndex === -1) {
  853. common_vendor.index.showToast({
  854. title: "请选择婚育状况",
  855. icon: "none"
  856. });
  857. return false;
  858. }
  859. return true;
  860. case 2:
  861. if (!this.formData.email) {
  862. common_vendor.index.showToast({
  863. title: "请输入电子邮箱",
  864. icon: "none"
  865. });
  866. return false;
  867. }
  868. if (!this.formData.currentAddress) {
  869. common_vendor.index.showToast({
  870. title: "请输入现居住地址",
  871. icon: "none"
  872. });
  873. return false;
  874. }
  875. if (!this.formData.emergencyContact) {
  876. common_vendor.index.showToast({
  877. title: "请输入紧急联系人",
  878. icon: "none"
  879. });
  880. return false;
  881. }
  882. if (!this.formData.emergencyPhone) {
  883. common_vendor.index.showToast({
  884. title: "请输入紧急联系人电话",
  885. icon: "none"
  886. });
  887. return false;
  888. }
  889. return true;
  890. case 3:
  891. if (this.familyMembers.length === 0) {
  892. common_vendor.index.showToast({
  893. title: "请至少添加一位家庭成员",
  894. icon: "none"
  895. });
  896. return false;
  897. }
  898. return true;
  899. case 4:
  900. if (this.formData.sourceType === "school" && !this.formData.otherSchoolSource) {
  901. common_vendor.index.showToast({
  902. title: "请填写学校来源",
  903. icon: "none"
  904. });
  905. return false;
  906. }
  907. if (this.formData.sourceType === "social") {
  908. if (!this.formData.socialSource) {
  909. common_vendor.index.showToast({
  910. title: "请选择社招来源",
  911. icon: "none"
  912. });
  913. return false;
  914. }
  915. if (this.formData.socialSource === "other" && !this.formData.otherSocialSource) {
  916. common_vendor.index.showToast({
  917. title: "请填写其他社招来源",
  918. icon: "none"
  919. });
  920. return false;
  921. }
  922. }
  923. return true;
  924. case 5:
  925. if (this.educationList.length === 0) {
  926. common_vendor.index.showToast({
  927. title: "请至少添加一项教育经历",
  928. icon: "none"
  929. });
  930. return false;
  931. }
  932. return true;
  933. case 6:
  934. if (!this.formData.skills) {
  935. common_vendor.index.showToast({
  936. title: "请描述您的专业技能",
  937. icon: "none"
  938. });
  939. return false;
  940. }
  941. return true;
  942. case 7:
  943. if (!this.formData.training) {
  944. common_vendor.index.showToast({
  945. title: "请描述您接受过的培训经历",
  946. icon: "none"
  947. });
  948. return false;
  949. }
  950. return true;
  951. case 8:
  952. if (this.workList.length === 0) {
  953. common_vendor.index.showToast({
  954. title: "请至少添加一项工作经历",
  955. icon: "none"
  956. });
  957. return false;
  958. }
  959. for (let i = 0; i < this.workList.length; i++) {
  960. const work = this.workList[i];
  961. if (!work.startTime) {
  962. common_vendor.index.showToast({
  963. title: `单位${i + 1}:请选择开始时间`,
  964. icon: "none"
  965. });
  966. return false;
  967. }
  968. if (!work.endTime) {
  969. common_vendor.index.showToast({
  970. title: `单位${i + 1}:请选择结束时间`,
  971. icon: "none"
  972. });
  973. return false;
  974. }
  975. if (!work.companyName) {
  976. common_vendor.index.showToast({
  977. title: `单位${i + 1}:请输入单位名称`,
  978. icon: "none"
  979. });
  980. return false;
  981. }
  982. if (!work.department) {
  983. common_vendor.index.showToast({
  984. title: `单位${i + 1}:请输入任职部门`,
  985. icon: "none"
  986. });
  987. return false;
  988. }
  989. if (!work.employeeCount) {
  990. common_vendor.index.showToast({
  991. title: `单位${i + 1}:请输入单位人数`,
  992. icon: "none"
  993. });
  994. return false;
  995. }
  996. if (!work.position) {
  997. common_vendor.index.showToast({
  998. title: `单位${i + 1}:请输入担任职务`,
  999. icon: "none"
  1000. });
  1001. return false;
  1002. }
  1003. if (!work.monthlySalary) {
  1004. common_vendor.index.showToast({
  1005. title: `单位${i + 1}:请输入月总收入`,
  1006. icon: "none"
  1007. });
  1008. return false;
  1009. }
  1010. if (!work.supervisor) {
  1011. common_vendor.index.showToast({
  1012. title: `单位${i + 1}:请输入直接领导姓名`,
  1013. icon: "none"
  1014. });
  1015. return false;
  1016. }
  1017. if (!work.supervisorPhone) {
  1018. common_vendor.index.showToast({
  1019. title: `单位${i + 1}:请输入领导电话`,
  1020. icon: "none"
  1021. });
  1022. return false;
  1023. }
  1024. }
  1025. return true;
  1026. default:
  1027. return true;
  1028. }
  1029. },
  1030. // Add method to fetch user data
  1031. fetchUserData() {
  1032. this.isLoading = true;
  1033. const userInfo = common_vendor.index.getStorageSync("userInfo") ? JSON.parse(common_vendor.index.getStorageSync("userInfo")) : {};
  1034. const openid = userInfo.openid;
  1035. if (!openid) {
  1036. common_vendor.index.showToast({
  1037. title: "用户信息获取失败,请重新登录",
  1038. icon: "none"
  1039. });
  1040. this.isLoading = false;
  1041. return;
  1042. }
  1043. common_vendor.index.request({
  1044. url: `${common_config.apiBaseUrl}/api/wechat/user/get_full_info?tenant_id=1&openid=${openid}`,
  1045. method: "GET",
  1046. success: (res) => {
  1047. this.showPromiseModal = true;
  1048. this.populateFormData(res.data.data);
  1049. },
  1050. fail: (err) => {
  1051. },
  1052. complete: () => {
  1053. this.isLoading = false;
  1054. }
  1055. });
  1056. },
  1057. // Add method to populate form data with fetched data
  1058. populateFormData(data) {
  1059. const { user_info, profile, educations, work_experiences, family_members } = data;
  1060. if (user_info) {
  1061. this.formData.name = user_info.name || "";
  1062. this.formData.gender = user_info.gender_text || "";
  1063. this.genderIndex = this.genderOptions.findIndex((item) => item === this.formData.gender);
  1064. this.formData.idCard = user_info.id_card || "";
  1065. this.formData.phone = user_info.phone || "";
  1066. this.formData.email = user_info.email || "";
  1067. }
  1068. if (profile) {
  1069. this.formData.political = profile.political_status || "";
  1070. this.politicalIndex = this.politicalOptions.findIndex((item) => item === this.formData.political);
  1071. this.formData.ethnic = profile.ethnicity || "";
  1072. this.ethnicIndex = this.ethnicOptions.findIndex((item) => item === this.formData.ethnic);
  1073. this.formData.height = profile.height || "";
  1074. this.formData.weight = profile.weight || "";
  1075. this.formData.nativePlace = profile.native_place || "";
  1076. this.formData.residence = profile.household_location || "";
  1077. this.formData.currentAddress = profile.current_address || "";
  1078. this.formData.marriage = profile.marital_status_text || "";
  1079. this.marriageIndex = this.marriageOptions.findIndex((item) => item === this.formData.marriage);
  1080. if (this.formData.gender === "女" && profile.female_status !== void 0) {
  1081. const femaleStatusMap = { 0: "无", 1: "孕期", 2: "产期", 3: "哺乳期" };
  1082. this.formData.threePeriod = femaleStatusMap[profile.female_status] || "无";
  1083. this.threePeriodIndex = this.threePeriodOptions.findIndex((item) => item === this.formData.threePeriod);
  1084. }
  1085. this.formData.expectedSalary = profile.expected_salary || "";
  1086. this.formData.emergencyContact = profile.emergency_contact || "";
  1087. this.formData.emergencyPhone = profile.emergency_phone || "";
  1088. this.formData.hobby = profile.specialties || "";
  1089. this.formData.motto = profile.life_motto || "";
  1090. const sourceTypeMap = {
  1091. 1: "school",
  1092. 2: "social",
  1093. 3: "social",
  1094. 4: "social",
  1095. 5: "social"
  1096. };
  1097. const socialSourceMap = {
  1098. 2: "BOSS",
  1099. 3: "zhilian",
  1100. 4: "liepin",
  1101. 5: "other"
  1102. };
  1103. this.formData.sourceType = sourceTypeMap[profile.recruitment_source] || "social";
  1104. if (this.formData.sourceType === "social") {
  1105. this.formData.socialSource = socialSourceMap[profile.recruitment_source] || "";
  1106. if (this.formData.socialSource === "other") {
  1107. this.formData.otherSocialSource = profile.recruitment_source_detail || "";
  1108. }
  1109. } else if (this.formData.sourceType === "school") {
  1110. this.formData.otherSchoolSource = profile.recruitment_source_detail || "";
  1111. }
  1112. }
  1113. if (educations && educations.length > 0) {
  1114. this.educationList = educations.map((edu) => {
  1115. const degreeMap = {
  1116. 1: "高中",
  1117. 2: "大专",
  1118. 3: "本科",
  1119. 4: "硕士",
  1120. 5: "博士"
  1121. };
  1122. return {
  1123. startTime: edu.start_date || "",
  1124. endTime: edu.end_date || "",
  1125. schoolName: edu.school_name || "",
  1126. major: edu.major || "",
  1127. degree: degreeMap[edu.degree] || ""
  1128. };
  1129. });
  1130. }
  1131. if (work_experiences && work_experiences.length > 0) {
  1132. this.workList = work_experiences.map((work) => {
  1133. return {
  1134. startTime: work.start_date || "",
  1135. endTime: work.end_date || "",
  1136. companyName: work.company_name || "",
  1137. department: work.department || "",
  1138. employeeCount: work.company_size || "",
  1139. position: work.position || "",
  1140. monthlySalary: work.monthly_salary || "",
  1141. supervisor: work.supervisor_name || "",
  1142. supervisorPhone: work.supervisor_phone || ""
  1143. };
  1144. });
  1145. }
  1146. if (family_members && family_members.length > 0) {
  1147. this.familyMembers = family_members.map((member) => {
  1148. return {
  1149. relation: member.relation || "",
  1150. name: member.name || "",
  1151. workplaceOrAddress: member.workplace || "",
  1152. position: member.position || "",
  1153. phone: member.phone || ""
  1154. };
  1155. });
  1156. }
  1157. }
  1158. },
  1159. // 添加监听器来清除错误信息
  1160. watch: {
  1161. "formData.name": function(newVal) {
  1162. if (newVal && this.formErrors.name) {
  1163. this.formErrors.name = "";
  1164. }
  1165. },
  1166. "formData.idCard": function(newVal) {
  1167. if (newVal && this.formErrors.idCard) {
  1168. this.formErrors.idCard = "";
  1169. }
  1170. },
  1171. "formData.phone": function(newVal) {
  1172. if (newVal && this.formErrors.phone) {
  1173. this.formErrors.phone = "";
  1174. }
  1175. }
  1176. }
  1177. };
  1178. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  1179. return common_vendor.e({
  1180. a: $data.isLoading
  1181. }, $data.isLoading ? {} : {}, {
  1182. b: $data.showPromiseModal
  1183. }, $data.showPromiseModal ? {
  1184. c: $data.promiseChecked,
  1185. d: common_vendor.o((...args) => $options.togglePromiseChecked && $options.togglePromiseChecked(...args)),
  1186. e: !$data.promiseChecked,
  1187. f: common_vendor.o((...args) => $options.confirmPromise && $options.confirmPromise(...args))
  1188. } : {}, {
  1189. g: $data.currentStep === 1
  1190. }, $data.currentStep === 1 ? common_vendor.e({
  1191. h: $data.formErrors.name ? 1 : "",
  1192. i: $data.formData.name,
  1193. j: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
  1194. k: $data.formErrors.name
  1195. }, $data.formErrors.name ? {
  1196. l: common_vendor.t($data.formErrors.name)
  1197. } : {}, {
  1198. m: common_vendor.t($data.genderOptions[$data.genderIndex] || "请选择性别"),
  1199. n: common_vendor.o((...args) => $options.bindGenderChange && $options.bindGenderChange(...args)),
  1200. o: $data.genderIndex,
  1201. p: $data.genderOptions,
  1202. q: $data.formData.gender === "女"
  1203. }, $data.formData.gender === "女" ? {
  1204. r: common_vendor.t($data.threePeriodOptions[$data.threePeriodIndex] || "请选择"),
  1205. s: common_vendor.o((...args) => $options.bindThreePeriodChange && $options.bindThreePeriodChange(...args)),
  1206. t: $data.threePeriodIndex,
  1207. v: $data.threePeriodOptions
  1208. } : {}, {
  1209. w: $data.formErrors.phone ? 1 : "",
  1210. x: $data.formData.phone,
  1211. y: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
  1212. z: $data.formErrors.phone
  1213. }, $data.formErrors.phone ? {
  1214. A: common_vendor.t($data.formErrors.phone)
  1215. } : {}, {
  1216. B: $data.formErrors.idCard ? 1 : "",
  1217. C: $data.formData.idCard,
  1218. D: common_vendor.o(($event) => $data.formData.idCard = $event.detail.value),
  1219. E: $data.formErrors.idCard
  1220. }, $data.formErrors.idCard ? {
  1221. F: common_vendor.t($data.formErrors.idCard)
  1222. } : {}, {
  1223. G: common_vendor.t($data.politicalOptions[$data.politicalIndex] || "请选择政治面貌"),
  1224. H: common_vendor.o((...args) => $options.bindPoliticalChange && $options.bindPoliticalChange(...args)),
  1225. I: $data.politicalIndex,
  1226. J: $data.politicalOptions,
  1227. K: common_vendor.t($data.ethnicOptions[$data.ethnicIndex] || "请选择民族"),
  1228. L: common_vendor.o((...args) => $options.bindEthnicChange && $options.bindEthnicChange(...args)),
  1229. M: $data.ethnicIndex,
  1230. N: $data.ethnicOptions,
  1231. O: $data.formData.height,
  1232. P: common_vendor.o(($event) => $data.formData.height = $event.detail.value),
  1233. Q: $data.formData.weight,
  1234. R: common_vendor.o(($event) => $data.formData.weight = $event.detail.value),
  1235. S: $data.formData.nativePlace,
  1236. T: common_vendor.o(($event) => $data.formData.nativePlace = $event.detail.value),
  1237. U: $data.formData.residence,
  1238. V: common_vendor.o(($event) => $data.formData.residence = $event.detail.value),
  1239. W: common_vendor.t($data.marriageOptions[$data.marriageIndex] || "请选择婚育状况"),
  1240. X: common_vendor.o((...args) => $options.bindMarriageChange && $options.bindMarriageChange(...args)),
  1241. Y: $data.marriageIndex,
  1242. Z: $data.marriageOptions,
  1243. aa: $data.formData.expectedSalary,
  1244. ab: common_vendor.o(($event) => $data.formData.expectedSalary = $event.detail.value)
  1245. }) : {}, {
  1246. ac: $data.currentStep === 2
  1247. }, $data.currentStep === 2 ? {
  1248. ad: $data.formData.email,
  1249. ae: common_vendor.o(($event) => $data.formData.email = $event.detail.value),
  1250. af: $data.formData.currentAddress,
  1251. ag: common_vendor.o(($event) => $data.formData.currentAddress = $event.detail.value),
  1252. ah: $data.formData.emergencyContact,
  1253. ai: common_vendor.o(($event) => $data.formData.emergencyContact = $event.detail.value),
  1254. aj: $data.formData.emergencyPhone,
  1255. ak: common_vendor.o(($event) => $data.formData.emergencyPhone = $event.detail.value),
  1256. al: $data.formData.hobby,
  1257. am: common_vendor.o(($event) => $data.formData.hobby = $event.detail.value),
  1258. an: $data.formData.motto,
  1259. ao: common_vendor.o(($event) => $data.formData.motto = $event.detail.value)
  1260. } : {}, {
  1261. ap: $data.currentStep === 3
  1262. }, $data.currentStep === 3 ? common_vendor.e({
  1263. aq: $data.familyMembers.length > 0
  1264. }, $data.familyMembers.length > 0 ? {
  1265. ar: common_vendor.f($data.familyMembers, (member, index, i0) => {
  1266. return {
  1267. a: common_vendor.t(index + 1),
  1268. b: common_vendor.o(($event) => $options.editFamilyMember(index), index),
  1269. c: common_vendor.o(($event) => $options.deleteFamilyMember(index), index),
  1270. d: common_vendor.t(member.relation),
  1271. e: common_vendor.t(member.name),
  1272. f: common_vendor.t(member.workplaceOrAddress),
  1273. g: common_vendor.t(member.position),
  1274. h: common_vendor.t(member.phone),
  1275. i: index
  1276. };
  1277. })
  1278. } : {}, {
  1279. as: common_vendor.t($data.isEditing ? "编辑家庭成员" : "添加家庭成员"),
  1280. at: $data.isEditing
  1281. }, $data.isEditing ? {
  1282. av: common_vendor.o((...args) => $options.cancelEdit && $options.cancelEdit(...args))
  1283. } : {}, {
  1284. aw: $data.familyMemberForm.relation,
  1285. ax: common_vendor.o(($event) => $data.familyMemberForm.relation = $event.detail.value),
  1286. ay: $data.familyMemberForm.name,
  1287. az: common_vendor.o(($event) => $data.familyMemberForm.name = $event.detail.value),
  1288. aA: $data.familyMemberForm.workplaceOrAddress,
  1289. aB: common_vendor.o(($event) => $data.familyMemberForm.workplaceOrAddress = $event.detail.value),
  1290. aC: $data.familyMemberForm.position,
  1291. aD: common_vendor.o(($event) => $data.familyMemberForm.position = $event.detail.value),
  1292. aE: $data.familyMemberForm.phone,
  1293. aF: common_vendor.o(($event) => $data.familyMemberForm.phone = $event.detail.value),
  1294. aG: common_vendor.t($data.isEditing ? "✓" : "+"),
  1295. aH: common_vendor.o((...args) => $options.saveFamilyMember && $options.saveFamilyMember(...args)),
  1296. aI: common_vendor.t($data.isEditing ? "保存修改" : "添加成员")
  1297. }) : {}, {
  1298. aJ: $data.currentStep === 4
  1299. }, $data.currentStep === 4 ? {
  1300. aK: $data.formData.sourceType === "social" && $data.formData.socialSource === "BOSS",
  1301. aL: common_vendor.o(($event) => $options.selectSocialSource("BOSS")),
  1302. aM: $data.formData.sourceType === "social" && $data.formData.socialSource === "zhilian",
  1303. aN: common_vendor.o(($event) => $options.selectSocialSource("zhilian")),
  1304. aO: $data.formData.sourceType === "social" && $data.formData.socialSource === "liepin",
  1305. aP: common_vendor.o(($event) => $options.selectSocialSource("liepin")),
  1306. aQ: $data.formData.sourceType !== "social" || $data.formData.socialSource !== "other",
  1307. aR: common_vendor.o(($event) => $options.selectSocialSource("other")),
  1308. aS: $data.formData.otherSocialSource,
  1309. aT: common_vendor.o(($event) => $data.formData.otherSocialSource = $event.detail.value)
  1310. } : {}, {
  1311. aU: $data.currentStep === 5
  1312. }, $data.currentStep === 5 ? common_vendor.e({
  1313. aV: $data.educationList.length > 0
  1314. }, $data.educationList.length > 0 ? {
  1315. aW: common_vendor.f($data.educationList, (edu, index, i0) => {
  1316. return {
  1317. a: common_vendor.t(index === 0 ? "第一学历" : "最高学历"),
  1318. b: common_vendor.o(($event) => $options.editEducation(index), index),
  1319. c: common_vendor.o(($event) => $options.deleteEducation(index), index),
  1320. d: common_vendor.t(edu.startTime),
  1321. e: common_vendor.t(edu.endTime),
  1322. f: common_vendor.t(edu.schoolName),
  1323. g: common_vendor.t(edu.major),
  1324. h: common_vendor.t(edu.degree),
  1325. i: index
  1326. };
  1327. })
  1328. } : {}, {
  1329. aX: $data.educationList.length < 2 || $data.isEditingEducation
  1330. }, $data.educationList.length < 2 || $data.isEditingEducation ? common_vendor.e({
  1331. aY: common_vendor.t($data.isEditingEducation ? "编辑教育经历" : $data.educationList.length === 0 ? "添加第一学历" : "添加最高学历"),
  1332. aZ: $data.isEditingEducation
  1333. }, $data.isEditingEducation ? {
  1334. ba: common_vendor.o((...args) => $options.cancelEditEducation && $options.cancelEditEducation(...args))
  1335. } : {}, {
  1336. bb: common_vendor.t($data.educationForm.startTime || "开始时间"),
  1337. bc: $data.educationForm.startTime,
  1338. bd: common_vendor.o((...args) => $options.bindStartTimeChange && $options.bindStartTimeChange(...args)),
  1339. be: common_vendor.t($data.educationForm.endTime || "结束时间"),
  1340. bf: $data.educationForm.endTime,
  1341. bg: common_vendor.o((...args) => $options.bindEndTimeChange && $options.bindEndTimeChange(...args)),
  1342. bh: $data.educationForm.schoolName,
  1343. bi: common_vendor.o(($event) => $data.educationForm.schoolName = $event.detail.value),
  1344. bj: $data.educationForm.major,
  1345. bk: common_vendor.o(($event) => $data.educationForm.major = $event.detail.value),
  1346. bl: common_vendor.t($data.degreeOptions[$data.degreeIndex] || "请选择学历"),
  1347. bm: common_vendor.o((...args) => $options.bindDegreeChange && $options.bindDegreeChange(...args)),
  1348. bn: $data.degreeIndex,
  1349. bo: $data.degreeOptions,
  1350. bp: common_vendor.t($data.isEditingEducation ? "✓" : "+"),
  1351. bq: common_vendor.o((...args) => $options.saveEducation && $options.saveEducation(...args)),
  1352. br: common_vendor.t($data.isEditingEducation ? "保存修改" : "添加学历")
  1353. }) : {}) : {}, {
  1354. bs: $data.currentStep === 6
  1355. }, $data.currentStep === 6 ? {
  1356. bt: $data.formData.skills,
  1357. bv: common_vendor.o(($event) => $data.formData.skills = $event.detail.value)
  1358. } : {}, {
  1359. bw: $data.currentStep === 7
  1360. }, $data.currentStep === 7 ? {
  1361. bx: $data.formData.training,
  1362. by: common_vendor.o(($event) => $data.formData.training = $event.detail.value)
  1363. } : {}, {
  1364. bz: $data.currentStep === 8
  1365. }, $data.currentStep === 8 ? common_vendor.e({
  1366. bA: $data.workList.length > 0
  1367. }, $data.workList.length > 0 ? {
  1368. bB: common_vendor.f($data.workList, (work, index, i0) => {
  1369. return {
  1370. a: common_vendor.t(index + 1),
  1371. b: common_vendor.o(($event) => $options.editWork(index), index),
  1372. c: common_vendor.o(($event) => $options.deleteWork(index), index),
  1373. d: common_vendor.t(work.startTime),
  1374. e: common_vendor.t(work.endTime),
  1375. f: common_vendor.t(work.companyName),
  1376. g: common_vendor.t(work.department),
  1377. h: common_vendor.t(work.employeeCount),
  1378. i: common_vendor.t(work.position),
  1379. j: common_vendor.t(work.monthlySalary),
  1380. k: common_vendor.t(work.supervisor),
  1381. l: common_vendor.t(work.supervisorPhone),
  1382. m: index
  1383. };
  1384. })
  1385. } : {}, {
  1386. bC: $data.workList.length < 2 || $data.isEditingWork
  1387. }, $data.workList.length < 2 || $data.isEditingWork ? common_vendor.e({
  1388. bD: common_vendor.t($data.isEditingWork ? "编辑工作经历" : "添加工作经历"),
  1389. bE: $data.isEditingWork
  1390. }, $data.isEditingWork ? {
  1391. bF: common_vendor.o((...args) => $options.cancelEditWork && $options.cancelEditWork(...args))
  1392. } : {}, {
  1393. bG: common_vendor.t($data.workForm.startTime || "开始时间"),
  1394. bH: $data.workForm.startTime,
  1395. bI: common_vendor.o((...args) => $options.bindWorkStartTimeChange && $options.bindWorkStartTimeChange(...args)),
  1396. bJ: common_vendor.t($data.workForm.endTime || "结束时间"),
  1397. bK: $data.workForm.endTime,
  1398. bL: common_vendor.o((...args) => $options.bindWorkEndTimeChange && $options.bindWorkEndTimeChange(...args)),
  1399. bM: $data.workForm.companyName,
  1400. bN: common_vendor.o(($event) => $data.workForm.companyName = $event.detail.value),
  1401. bO: $data.workForm.employeeCount,
  1402. bP: common_vendor.o(($event) => $data.workForm.employeeCount = $event.detail.value),
  1403. bQ: $data.workForm.department,
  1404. bR: common_vendor.o(($event) => $data.workForm.department = $event.detail.value),
  1405. bS: $data.workForm.position,
  1406. bT: common_vendor.o(($event) => $data.workForm.position = $event.detail.value),
  1407. bU: $data.workForm.monthlySalary,
  1408. bV: common_vendor.o(($event) => $data.workForm.monthlySalary = $event.detail.value),
  1409. bW: $data.workForm.supervisor,
  1410. bX: common_vendor.o(($event) => $data.workForm.supervisor = $event.detail.value),
  1411. bY: $data.workForm.supervisorPhone,
  1412. bZ: common_vendor.o(($event) => $data.workForm.supervisorPhone = $event.detail.value),
  1413. ca: common_vendor.t($data.isEditingWork ? "✓" : "+"),
  1414. cb: common_vendor.o((...args) => $options.saveWork && $options.saveWork(...args)),
  1415. cc: common_vendor.t($data.isEditingWork ? "保存修改" : "添加工作经历")
  1416. }) : {}) : {}, {
  1417. cd: $data.currentStep === 9
  1418. }, $data.currentStep === 9 ? {
  1419. ce: common_vendor.t($data.formData.name),
  1420. cf: common_vendor.t($data.formData.gender)
  1421. } : {}, {
  1422. cg: $data.currentStep > 1
  1423. }, $data.currentStep > 1 ? {
  1424. ch: common_vendor.o((...args) => $options.prevStep && $options.prevStep(...args))
  1425. } : {}, {
  1426. ci: $data.currentStep < $data.steps.length
  1427. }, $data.currentStep < $data.steps.length ? {
  1428. cj: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
  1429. } : {}, {
  1430. ck: $data.currentStep === $data.steps.length
  1431. }, $data.currentStep === $data.steps.length ? {
  1432. cl: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args))
  1433. } : {});
  1434. }
  1435. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  1436. wx.createPage(MiniProgramPage);