Personal.js 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243
  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. const submitData = {
  536. tenant_id: 1,
  537. user_id: JSON.parse(common_vendor.index.getStorageSync("userInfo")).id,
  538. // 从存储中获取用户ID
  539. personal_info: {
  540. name: this.formData.name,
  541. gender: this.formData.gender,
  542. birth_date: this.formData.birthDate,
  543. phone: this.formData.phone,
  544. id_card: this.formData.idCard,
  545. email: this.formData.email,
  546. address: this.formData.currentAddress,
  547. professional_skills: this.formData.skills ? this.formData.skills.split(",") : []
  548. },
  549. profile: {
  550. // 女性特殊状态映射
  551. female_status: this.formData.gender === "女" ? this.formData.threePeriod === "孕期" ? 1 : this.formData.threePeriod === "产期" ? 2 : this.formData.threePeriod === "哺乳期" ? 3 : 0 : 0,
  552. // 婚姻状况映射
  553. marital_status: this.formData.marriage === "未婚" ? 0 : this.formData.marriage === "已婚" ? 1 : this.formData.marriage === "离异" ? 2 : this.formData.marriage === "丧偶" ? 3 : 0,
  554. height: parseFloat(this.formData.height) || 0,
  555. weight: parseFloat(this.formData.weight) || 0,
  556. political_status: this.formData.political,
  557. ethnicity: this.formData.ethnic,
  558. native_place: this.formData.nativePlace,
  559. household_location: this.formData.residence,
  560. current_address: this.formData.currentAddress,
  561. expected_salary: parseFloat(this.formData.expectedSalary) || 0,
  562. emergency_contact: this.formData.emergencyContact,
  563. emergency_phone: this.formData.emergencyPhone,
  564. specialties: this.formData.hobby,
  565. life_motto: this.formData.motto,
  566. // 应聘来源映射
  567. recruitment_source: this.formData.sourceType === "social" ? this.formData.socialSource === "BOSS" ? 2 : this.formData.socialSource === "zhilian" ? 3 : this.formData.socialSource === "liepin" ? 4 : 5 : 1,
  568. 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
  569. },
  570. // 教育经历映射
  571. education: this.educationList.map((edu, index) => ({
  572. education_type: index === 0 ? 1 : 2,
  573. // 第一个为第一学历,第二个为最高学历
  574. degree: this.mapDegreeToNumber(edu.degree),
  575. start_date: edu.startTime,
  576. end_date: edu.endTime,
  577. school_name: edu.schoolName,
  578. major: edu.major
  579. })),
  580. // 家庭成员映射
  581. family_members: this.familyMembers.map((member) => ({
  582. relation: member.relation,
  583. name: member.name,
  584. workplace: member.workplaceOrAddress,
  585. position: member.position,
  586. phone: member.phone
  587. })),
  588. // 工作经历映射
  589. work_experiences: this.workList.map((work) => ({
  590. start_date: work.startTime,
  591. end_date: work.endTime,
  592. company_name: work.companyName,
  593. //单位名称
  594. department: work.department,
  595. //任职部门
  596. company_size: work.employeeCount,
  597. //员工人数
  598. position: work.position,
  599. //担任职务
  600. monthly_salary: work.monthlySalary,
  601. //月薪
  602. supervisor_name: work.supervisor,
  603. //直属上级
  604. supervisor_phone: work.supervisorPhone
  605. //直属上级电话
  606. }))
  607. // 培训经历可以从技能和培训文本框中提取
  608. /* trainings: this.formData.training ? [{
  609. training_name: "培训经历",
  610. description: this.formData.training
  611. }] : [] */
  612. };
  613. console.log("提交的表单数据:", submitData);
  614. common_vendor.index.showLoading({
  615. title: "提交中..."
  616. });
  617. common_vendor.index.request({
  618. url: `${common_config.apiBaseUrl}/wechat/user/profile/update`,
  619. // 根据实际API路径调整
  620. method: "POST",
  621. data: submitData,
  622. success: (res) => {
  623. common_vendor.index.hideLoading();
  624. this.formErrors = {
  625. name: "",
  626. idCard: "",
  627. phone: ""
  628. };
  629. if (res.data.code === 2e3) {
  630. this.currentStep++;
  631. common_vendor.index.navigateTo({
  632. url: "/pages/interview-notice/interview-notice"
  633. });
  634. } else {
  635. let errorMsg = res.data.msg || "身份验证失败";
  636. common_vendor.index.showToast({
  637. title: errorMsg,
  638. icon: "none",
  639. duration: 2e3
  640. });
  641. }
  642. },
  643. fail: (err) => {
  644. common_vendor.index.hideLoading();
  645. common_vendor.index.showToast({
  646. title: "网络错误,请检查网络连接",
  647. icon: "none"
  648. });
  649. console.error("提交失败:", err);
  650. }
  651. });
  652. },
  653. // 学历映射辅助方法
  654. mapDegreeToNumber(degreeText) {
  655. const degreeMap = {
  656. "高中": 1,
  657. "中专": 1,
  658. "大专": 2,
  659. "本科": 3,
  660. "硕士": 4,
  661. "博士": 5
  662. };
  663. return degreeMap[degreeText] || 6;
  664. },
  665. prevStep() {
  666. if (this.currentStep > 1) {
  667. this.currentStep--;
  668. common_vendor.index.pageScrollTo({
  669. scrollTop: 0,
  670. duration: 300
  671. });
  672. }
  673. },
  674. nextStep() {
  675. if (!this.validateCurrentStep()) {
  676. return;
  677. }
  678. if (this.currentStep === 1) {
  679. this.formErrors = {
  680. name: "",
  681. idCard: "",
  682. phone: ""
  683. };
  684. common_vendor.index.showLoading({
  685. title: "身份验证中..."
  686. });
  687. common_vendor.index.request({
  688. url: `${common_config.apiBaseUrl}/wechat/identity/verify`,
  689. method: "POST",
  690. data: {
  691. name: this.formData.name,
  692. id_number: this.formData.idCard,
  693. mobile: this.formData.phone
  694. },
  695. header: {
  696. "content-type": "application/x-www-form-urlencoded"
  697. },
  698. success: (res) => {
  699. common_vendor.index.hideLoading();
  700. if (res.data.code === 200) {
  701. this.currentStep++;
  702. common_vendor.index.pageScrollTo({
  703. scrollTop: 0,
  704. duration: 300
  705. });
  706. } else {
  707. res.data.msg || "身份验证失败";
  708. this.formErrors.name = "姓名验证失败,请检查姓名是否正确";
  709. this.formErrors.idCard = "身份证号验证失败,请检查身份证号是否正确";
  710. this.formErrors.phone = "手机号验证失败,请检查手机号是否正确";
  711. }
  712. },
  713. fail: (err) => {
  714. common_vendor.index.hideLoading();
  715. common_vendor.index.showToast({
  716. title: "网络错误,请检查网络连接",
  717. icon: "none",
  718. duration: 2e3
  719. });
  720. console.error("身份验证请求失败:", err);
  721. }
  722. });
  723. } else {
  724. if (this.currentStep < this.steps.length) {
  725. this.currentStep++;
  726. common_vendor.index.pageScrollTo({
  727. scrollTop: 0,
  728. duration: 300
  729. });
  730. }
  731. }
  732. },
  733. // 验证当前步骤的必填项
  734. validateCurrentStep() {
  735. switch (this.currentStep) {
  736. case 1:
  737. if (!this.formData.name) {
  738. common_vendor.index.showToast({
  739. title: "请输入姓名",
  740. icon: "none"
  741. });
  742. return false;
  743. }
  744. if (this.genderIndex === -1) {
  745. common_vendor.index.showToast({
  746. title: "请选择性别",
  747. icon: "none"
  748. });
  749. return false;
  750. }
  751. if (this.formData.gender === "女" && this.threePeriodIndex === -1) {
  752. common_vendor.index.showToast({
  753. title: "请选择是否为三期",
  754. icon: "none"
  755. });
  756. return false;
  757. }
  758. return true;
  759. case 2:
  760. if (!this.formData.emergencyContact) {
  761. common_vendor.index.showToast({
  762. title: "请输入紧急联系人",
  763. icon: "none"
  764. });
  765. return false;
  766. }
  767. if (!this.formData.emergencyPhone) {
  768. common_vendor.index.showToast({
  769. title: "请输入紧急联系人电话",
  770. icon: "none"
  771. });
  772. return false;
  773. }
  774. return true;
  775. case 3:
  776. if (this.familyMembers.length === 0) {
  777. common_vendor.index.showToast({
  778. title: "请至少添加一位家庭成员",
  779. icon: "none"
  780. });
  781. return false;
  782. }
  783. return true;
  784. case 4:
  785. if (this.formData.sourceType === "school" && !this.formData.otherSchoolSource) {
  786. common_vendor.index.showToast({
  787. title: "请填写学校来源",
  788. icon: "none"
  789. });
  790. return false;
  791. }
  792. if (this.formData.sourceType === "social") {
  793. if (!this.formData.socialSource) {
  794. common_vendor.index.showToast({
  795. title: "请选择社招来源",
  796. icon: "none"
  797. });
  798. return false;
  799. }
  800. if (this.formData.socialSource === "other" && !this.formData.otherSocialSource) {
  801. common_vendor.index.showToast({
  802. title: "请填写其他社招来源",
  803. icon: "none"
  804. });
  805. return false;
  806. }
  807. }
  808. return true;
  809. case 5:
  810. if (this.educationList.length === 0) {
  811. common_vendor.index.showToast({
  812. title: "请至少添加一项教育经历",
  813. icon: "none"
  814. });
  815. return false;
  816. }
  817. return true;
  818. case 6:
  819. return true;
  820. case 7:
  821. return true;
  822. case 8:
  823. if (this.workList.length === 0) {
  824. common_vendor.index.showToast({
  825. title: "请至少添加一项工作经历",
  826. icon: "none"
  827. });
  828. return false;
  829. }
  830. return true;
  831. default:
  832. return true;
  833. }
  834. },
  835. // Add method to fetch user data
  836. fetchUserData() {
  837. this.isLoading = true;
  838. const userInfo = common_vendor.index.getStorageSync("userInfo") ? JSON.parse(common_vendor.index.getStorageSync("userInfo")) : {};
  839. const openid = userInfo.openid;
  840. if (!openid) {
  841. common_vendor.index.showToast({
  842. title: "用户信息获取失败,请重新登录",
  843. icon: "none"
  844. });
  845. this.isLoading = false;
  846. return;
  847. }
  848. common_vendor.index.request({
  849. url: `${common_config.apiBaseUrl}/api/wechat/user/get_full_info?tenant_id=1&openid=${openid}`,
  850. method: "GET",
  851. success: (res) => {
  852. this.populateFormData(res.data.data);
  853. },
  854. fail: (err) => {
  855. },
  856. complete: () => {
  857. this.isLoading = false;
  858. }
  859. });
  860. },
  861. // Add method to populate form data with fetched data
  862. populateFormData(data) {
  863. const { user_info, profile, educations, work_experiences, family_members } = data;
  864. if (user_info) {
  865. this.formData.name = user_info.name || "";
  866. this.formData.gender = user_info.gender_text || "";
  867. this.genderIndex = this.genderOptions.findIndex((item) => item === this.formData.gender);
  868. this.formData.idCard = user_info.id_card || "";
  869. this.formData.phone = user_info.phone || "";
  870. this.formData.email = user_info.email || "";
  871. }
  872. if (profile) {
  873. this.formData.political = profile.political_status || "";
  874. this.politicalIndex = this.politicalOptions.findIndex((item) => item === this.formData.political);
  875. this.formData.ethnic = profile.ethnicity || "";
  876. this.ethnicIndex = this.ethnicOptions.findIndex((item) => item === this.formData.ethnic);
  877. this.formData.height = profile.height || "";
  878. this.formData.weight = profile.weight || "";
  879. this.formData.nativePlace = profile.native_place || "";
  880. this.formData.residence = profile.household_location || "";
  881. this.formData.currentAddress = profile.current_address || "";
  882. this.formData.marriage = profile.marital_status_text || "";
  883. this.marriageIndex = this.marriageOptions.findIndex((item) => item === this.formData.marriage);
  884. if (this.formData.gender === "女" && profile.female_status !== void 0) {
  885. const femaleStatusMap = { 0: "无", 1: "孕期", 2: "产期", 3: "哺乳期" };
  886. this.formData.threePeriod = femaleStatusMap[profile.female_status] || "无";
  887. this.threePeriodIndex = this.threePeriodOptions.findIndex((item) => item === this.formData.threePeriod);
  888. }
  889. this.formData.expectedSalary = profile.expected_salary || "";
  890. this.formData.emergencyContact = profile.emergency_contact || "";
  891. this.formData.emergencyPhone = profile.emergency_phone || "";
  892. this.formData.hobby = profile.specialties || "";
  893. this.formData.motto = profile.life_motto || "";
  894. const sourceTypeMap = {
  895. 1: "school",
  896. 2: "social",
  897. 3: "social",
  898. 4: "social",
  899. 5: "social"
  900. };
  901. const socialSourceMap = {
  902. 2: "BOSS",
  903. 3: "zhilian",
  904. 4: "liepin",
  905. 5: "other"
  906. };
  907. this.formData.sourceType = sourceTypeMap[profile.recruitment_source] || "social";
  908. if (this.formData.sourceType === "social") {
  909. this.formData.socialSource = socialSourceMap[profile.recruitment_source] || "";
  910. if (this.formData.socialSource === "other") {
  911. this.formData.otherSocialSource = profile.recruitment_source_detail || "";
  912. }
  913. } else if (this.formData.sourceType === "school") {
  914. this.formData.otherSchoolSource = profile.recruitment_source_detail || "";
  915. }
  916. }
  917. if (educations && educations.length > 0) {
  918. this.educationList = educations.map((edu) => {
  919. const degreeMap = {
  920. 1: "高中",
  921. 2: "大专",
  922. 3: "本科",
  923. 4: "硕士",
  924. 5: "博士"
  925. };
  926. return {
  927. startTime: edu.start_date || "",
  928. endTime: edu.end_date || "",
  929. schoolName: edu.school_name || "",
  930. major: edu.major || "",
  931. degree: degreeMap[edu.degree] || ""
  932. };
  933. });
  934. }
  935. if (work_experiences && work_experiences.length > 0) {
  936. this.workList = work_experiences.map((work) => {
  937. return {
  938. startTime: work.start_date || "",
  939. endTime: work.end_date || "",
  940. companyName: work.company_name || "",
  941. department: work.department || "",
  942. employeeCount: work.company_size || "",
  943. position: work.position || "",
  944. monthlySalary: work.monthly_salary || "",
  945. supervisor: work.supervisor_name || "",
  946. supervisorPhone: work.supervisor_phone || ""
  947. };
  948. });
  949. }
  950. if (family_members && family_members.length > 0) {
  951. this.familyMembers = family_members.map((member) => {
  952. return {
  953. relation: member.relation || "",
  954. name: member.name || "",
  955. workplaceOrAddress: member.workplace || "",
  956. position: member.position || "",
  957. phone: member.phone || ""
  958. };
  959. });
  960. }
  961. if (user_info && user_info.is_profile_complete) {
  962. this.showPromiseModal = false;
  963. }
  964. }
  965. },
  966. // 添加监听器来清除错误信息
  967. watch: {
  968. "formData.name": function(newVal) {
  969. if (newVal && this.formErrors.name) {
  970. this.formErrors.name = "";
  971. }
  972. },
  973. "formData.idCard": function(newVal) {
  974. if (newVal && this.formErrors.idCard) {
  975. this.formErrors.idCard = "";
  976. }
  977. },
  978. "formData.phone": function(newVal) {
  979. if (newVal && this.formErrors.phone) {
  980. this.formErrors.phone = "";
  981. }
  982. }
  983. }
  984. };
  985. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  986. return common_vendor.e({
  987. a: $data.isLoading
  988. }, $data.isLoading ? {} : {}, {
  989. b: $data.showPromiseModal
  990. }, $data.showPromiseModal ? {
  991. c: $data.promiseChecked,
  992. d: common_vendor.o((...args) => $options.togglePromiseChecked && $options.togglePromiseChecked(...args)),
  993. e: !$data.promiseChecked,
  994. f: common_vendor.o((...args) => $options.confirmPromise && $options.confirmPromise(...args))
  995. } : {}, {
  996. g: $data.currentStep === 1
  997. }, $data.currentStep === 1 ? common_vendor.e({
  998. h: $data.formErrors.name ? 1 : "",
  999. i: $data.formData.name,
  1000. j: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
  1001. k: $data.formErrors.name
  1002. }, $data.formErrors.name ? {
  1003. l: common_vendor.t($data.formErrors.name)
  1004. } : {}, {
  1005. m: common_vendor.t($data.genderOptions[$data.genderIndex] || "请选择性别"),
  1006. n: common_vendor.o((...args) => $options.bindGenderChange && $options.bindGenderChange(...args)),
  1007. o: $data.genderIndex,
  1008. p: $data.genderOptions,
  1009. q: $data.formData.gender === "女"
  1010. }, $data.formData.gender === "女" ? {
  1011. r: common_vendor.t($data.threePeriodOptions[$data.threePeriodIndex] || "请选择"),
  1012. s: common_vendor.o((...args) => $options.bindThreePeriodChange && $options.bindThreePeriodChange(...args)),
  1013. t: $data.threePeriodIndex,
  1014. v: $data.threePeriodOptions
  1015. } : {}, {
  1016. w: $data.formErrors.phone ? 1 : "",
  1017. x: $data.formData.phone,
  1018. y: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
  1019. z: $data.formErrors.phone
  1020. }, $data.formErrors.phone ? {
  1021. A: common_vendor.t($data.formErrors.phone)
  1022. } : {}, {
  1023. B: $data.formErrors.idCard ? 1 : "",
  1024. C: $data.formData.idCard,
  1025. D: common_vendor.o(($event) => $data.formData.idCard = $event.detail.value),
  1026. E: $data.formErrors.idCard
  1027. }, $data.formErrors.idCard ? {
  1028. F: common_vendor.t($data.formErrors.idCard)
  1029. } : {}, {
  1030. G: common_vendor.t($data.politicalOptions[$data.politicalIndex] || "请选择政治面貌"),
  1031. H: common_vendor.o((...args) => $options.bindPoliticalChange && $options.bindPoliticalChange(...args)),
  1032. I: $data.politicalIndex,
  1033. J: $data.politicalOptions,
  1034. K: common_vendor.t($data.ethnicOptions[$data.ethnicIndex] || "请选择民族"),
  1035. L: common_vendor.o((...args) => $options.bindEthnicChange && $options.bindEthnicChange(...args)),
  1036. M: $data.ethnicIndex,
  1037. N: $data.ethnicOptions,
  1038. O: $data.formData.height,
  1039. P: common_vendor.o(($event) => $data.formData.height = $event.detail.value),
  1040. Q: $data.formData.weight,
  1041. R: common_vendor.o(($event) => $data.formData.weight = $event.detail.value),
  1042. S: $data.formData.nativePlace,
  1043. T: common_vendor.o(($event) => $data.formData.nativePlace = $event.detail.value),
  1044. U: $data.formData.residence,
  1045. V: common_vendor.o(($event) => $data.formData.residence = $event.detail.value),
  1046. W: common_vendor.t($data.marriageOptions[$data.marriageIndex] || "请选择婚育状况"),
  1047. X: common_vendor.o((...args) => $options.bindMarriageChange && $options.bindMarriageChange(...args)),
  1048. Y: $data.marriageIndex,
  1049. Z: $data.marriageOptions,
  1050. aa: $data.formData.expectedSalary,
  1051. ab: common_vendor.o(($event) => $data.formData.expectedSalary = $event.detail.value)
  1052. }) : {}, {
  1053. ac: $data.currentStep === 2
  1054. }, $data.currentStep === 2 ? {
  1055. ad: $data.formData.email,
  1056. ae: common_vendor.o(($event) => $data.formData.email = $event.detail.value),
  1057. af: $data.formData.currentAddress,
  1058. ag: common_vendor.o(($event) => $data.formData.currentAddress = $event.detail.value),
  1059. ah: $data.formData.emergencyContact,
  1060. ai: common_vendor.o(($event) => $data.formData.emergencyContact = $event.detail.value),
  1061. aj: $data.formData.emergencyPhone,
  1062. ak: common_vendor.o(($event) => $data.formData.emergencyPhone = $event.detail.value),
  1063. al: $data.formData.hobby,
  1064. am: common_vendor.o(($event) => $data.formData.hobby = $event.detail.value),
  1065. an: $data.formData.motto,
  1066. ao: common_vendor.o(($event) => $data.formData.motto = $event.detail.value)
  1067. } : {}, {
  1068. ap: $data.currentStep === 3
  1069. }, $data.currentStep === 3 ? common_vendor.e({
  1070. aq: $data.familyMembers.length > 0
  1071. }, $data.familyMembers.length > 0 ? {
  1072. ar: common_vendor.f($data.familyMembers, (member, index, i0) => {
  1073. return {
  1074. a: common_vendor.t(index + 1),
  1075. b: common_vendor.o(($event) => $options.editFamilyMember(index), index),
  1076. c: common_vendor.o(($event) => $options.deleteFamilyMember(index), index),
  1077. d: common_vendor.t(member.relation),
  1078. e: common_vendor.t(member.name),
  1079. f: common_vendor.t(member.workplaceOrAddress),
  1080. g: common_vendor.t(member.position),
  1081. h: common_vendor.t(member.phone),
  1082. i: index
  1083. };
  1084. })
  1085. } : {}, {
  1086. as: common_vendor.t($data.isEditing ? "编辑家庭成员" : "添加家庭成员"),
  1087. at: $data.isEditing
  1088. }, $data.isEditing ? {
  1089. av: common_vendor.o((...args) => $options.cancelEdit && $options.cancelEdit(...args))
  1090. } : {}, {
  1091. aw: $data.familyMemberForm.relation,
  1092. ax: common_vendor.o(($event) => $data.familyMemberForm.relation = $event.detail.value),
  1093. ay: $data.familyMemberForm.name,
  1094. az: common_vendor.o(($event) => $data.familyMemberForm.name = $event.detail.value),
  1095. aA: $data.familyMemberForm.workplaceOrAddress,
  1096. aB: common_vendor.o(($event) => $data.familyMemberForm.workplaceOrAddress = $event.detail.value),
  1097. aC: $data.familyMemberForm.position,
  1098. aD: common_vendor.o(($event) => $data.familyMemberForm.position = $event.detail.value),
  1099. aE: $data.familyMemberForm.phone,
  1100. aF: common_vendor.o(($event) => $data.familyMemberForm.phone = $event.detail.value),
  1101. aG: common_vendor.t($data.isEditing ? "✓" : "+"),
  1102. aH: common_vendor.o((...args) => $options.saveFamilyMember && $options.saveFamilyMember(...args)),
  1103. aI: common_vendor.t($data.isEditing ? "保存修改" : "添加成员")
  1104. }) : {}, {
  1105. aJ: $data.currentStep === 4
  1106. }, $data.currentStep === 4 ? {
  1107. aK: $data.formData.sourceType === "social" && $data.formData.socialSource === "BOSS",
  1108. aL: common_vendor.o(($event) => $options.selectSocialSource("BOSS")),
  1109. aM: $data.formData.sourceType === "social" && $data.formData.socialSource === "zhilian",
  1110. aN: common_vendor.o(($event) => $options.selectSocialSource("zhilian")),
  1111. aO: $data.formData.sourceType === "social" && $data.formData.socialSource === "liepin",
  1112. aP: common_vendor.o(($event) => $options.selectSocialSource("liepin")),
  1113. aQ: $data.formData.sourceType !== "social" || $data.formData.socialSource !== "other",
  1114. aR: common_vendor.o(($event) => $options.selectSocialSource("other")),
  1115. aS: $data.formData.otherSocialSource,
  1116. aT: common_vendor.o(($event) => $data.formData.otherSocialSource = $event.detail.value)
  1117. } : {}, {
  1118. aU: $data.currentStep === 5
  1119. }, $data.currentStep === 5 ? common_vendor.e({
  1120. aV: $data.educationList.length > 0
  1121. }, $data.educationList.length > 0 ? {
  1122. aW: common_vendor.f($data.educationList, (edu, index, i0) => {
  1123. return {
  1124. a: common_vendor.t(index === 0 ? "第一学历" : "最高学历"),
  1125. b: common_vendor.o(($event) => $options.editEducation(index), index),
  1126. c: common_vendor.o(($event) => $options.deleteEducation(index), index),
  1127. d: common_vendor.t(edu.startTime),
  1128. e: common_vendor.t(edu.endTime),
  1129. f: common_vendor.t(edu.schoolName),
  1130. g: common_vendor.t(edu.major),
  1131. h: common_vendor.t(edu.degree),
  1132. i: index
  1133. };
  1134. })
  1135. } : {}, {
  1136. aX: $data.educationList.length < 2 || $data.isEditingEducation
  1137. }, $data.educationList.length < 2 || $data.isEditingEducation ? common_vendor.e({
  1138. aY: common_vendor.t($data.isEditingEducation ? "编辑教育经历" : $data.educationList.length === 0 ? "添加第一学历" : "添加最高学历"),
  1139. aZ: $data.isEditingEducation
  1140. }, $data.isEditingEducation ? {
  1141. ba: common_vendor.o((...args) => $options.cancelEditEducation && $options.cancelEditEducation(...args))
  1142. } : {}, {
  1143. bb: common_vendor.t($data.educationForm.startTime || "开始时间"),
  1144. bc: $data.educationForm.startTime,
  1145. bd: common_vendor.o((...args) => $options.bindStartTimeChange && $options.bindStartTimeChange(...args)),
  1146. be: common_vendor.t($data.educationForm.endTime || "结束时间"),
  1147. bf: $data.educationForm.endTime,
  1148. bg: common_vendor.o((...args) => $options.bindEndTimeChange && $options.bindEndTimeChange(...args)),
  1149. bh: $data.educationForm.schoolName,
  1150. bi: common_vendor.o(($event) => $data.educationForm.schoolName = $event.detail.value),
  1151. bj: $data.educationForm.major,
  1152. bk: common_vendor.o(($event) => $data.educationForm.major = $event.detail.value),
  1153. bl: common_vendor.t($data.degreeOptions[$data.degreeIndex] || "请选择学历"),
  1154. bm: common_vendor.o((...args) => $options.bindDegreeChange && $options.bindDegreeChange(...args)),
  1155. bn: $data.degreeIndex,
  1156. bo: $data.degreeOptions,
  1157. bp: common_vendor.t($data.isEditingEducation ? "✓" : "+"),
  1158. bq: common_vendor.o((...args) => $options.saveEducation && $options.saveEducation(...args)),
  1159. br: common_vendor.t($data.isEditingEducation ? "保存修改" : "添加学历")
  1160. }) : {}) : {}, {
  1161. bs: $data.currentStep === 6
  1162. }, $data.currentStep === 6 ? {
  1163. bt: $data.formData.skills,
  1164. bv: common_vendor.o(($event) => $data.formData.skills = $event.detail.value)
  1165. } : {}, {
  1166. bw: $data.currentStep === 7
  1167. }, $data.currentStep === 7 ? {
  1168. bx: $data.formData.training,
  1169. by: common_vendor.o(($event) => $data.formData.training = $event.detail.value)
  1170. } : {}, {
  1171. bz: $data.currentStep === 8
  1172. }, $data.currentStep === 8 ? common_vendor.e({
  1173. bA: $data.workList.length > 0
  1174. }, $data.workList.length > 0 ? {
  1175. bB: common_vendor.f($data.workList, (work, index, i0) => {
  1176. return {
  1177. a: common_vendor.t(index + 1),
  1178. b: common_vendor.o(($event) => $options.editWork(index), index),
  1179. c: common_vendor.o(($event) => $options.deleteWork(index), index),
  1180. d: common_vendor.t(work.startTime),
  1181. e: common_vendor.t(work.endTime),
  1182. f: common_vendor.t(work.companyName),
  1183. g: common_vendor.t(work.department),
  1184. h: common_vendor.t(work.employeeCount),
  1185. i: common_vendor.t(work.position),
  1186. j: common_vendor.t(work.monthlySalary),
  1187. k: common_vendor.t(work.supervisor),
  1188. l: common_vendor.t(work.supervisorPhone),
  1189. m: index
  1190. };
  1191. })
  1192. } : {}, {
  1193. bC: $data.workList.length < 2 || $data.isEditingWork
  1194. }, $data.workList.length < 2 || $data.isEditingWork ? common_vendor.e({
  1195. bD: common_vendor.t($data.isEditingWork ? "编辑工作经历" : "添加工作经历"),
  1196. bE: $data.isEditingWork
  1197. }, $data.isEditingWork ? {
  1198. bF: common_vendor.o((...args) => $options.cancelEditWork && $options.cancelEditWork(...args))
  1199. } : {}, {
  1200. bG: common_vendor.t($data.workForm.startTime || "开始时间"),
  1201. bH: $data.workForm.startTime,
  1202. bI: common_vendor.o((...args) => $options.bindWorkStartTimeChange && $options.bindWorkStartTimeChange(...args)),
  1203. bJ: common_vendor.t($data.workForm.endTime || "结束时间"),
  1204. bK: $data.workForm.endTime,
  1205. bL: common_vendor.o((...args) => $options.bindWorkEndTimeChange && $options.bindWorkEndTimeChange(...args)),
  1206. bM: $data.workForm.companyName,
  1207. bN: common_vendor.o(($event) => $data.workForm.companyName = $event.detail.value),
  1208. bO: $data.workForm.employeeCount,
  1209. bP: common_vendor.o(($event) => $data.workForm.employeeCount = $event.detail.value),
  1210. bQ: $data.workForm.department,
  1211. bR: common_vendor.o(($event) => $data.workForm.department = $event.detail.value),
  1212. bS: $data.workForm.position,
  1213. bT: common_vendor.o(($event) => $data.workForm.position = $event.detail.value),
  1214. bU: $data.workForm.monthlySalary,
  1215. bV: common_vendor.o(($event) => $data.workForm.monthlySalary = $event.detail.value),
  1216. bW: $data.workForm.supervisor,
  1217. bX: common_vendor.o(($event) => $data.workForm.supervisor = $event.detail.value),
  1218. bY: $data.workForm.supervisorPhone,
  1219. bZ: common_vendor.o(($event) => $data.workForm.supervisorPhone = $event.detail.value),
  1220. ca: common_vendor.t($data.isEditingWork ? "✓" : "+"),
  1221. cb: common_vendor.o((...args) => $options.saveWork && $options.saveWork(...args)),
  1222. cc: common_vendor.t($data.isEditingWork ? "保存修改" : "添加工作经历")
  1223. }) : {}) : {}, {
  1224. cd: $data.currentStep === 9
  1225. }, $data.currentStep === 9 ? {
  1226. ce: common_vendor.t($data.formData.name),
  1227. cf: common_vendor.t($data.formData.gender)
  1228. } : {}, {
  1229. cg: $data.currentStep > 1
  1230. }, $data.currentStep > 1 ? {
  1231. ch: common_vendor.o((...args) => $options.prevStep && $options.prevStep(...args))
  1232. } : {}, {
  1233. ci: $data.currentStep < $data.steps.length
  1234. }, $data.currentStep < $data.steps.length ? {
  1235. cj: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
  1236. } : {}, {
  1237. ck: $data.currentStep === $data.steps.length
  1238. }, $data.currentStep === $data.steps.length ? {
  1239. cl: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args))
  1240. } : {});
  1241. }
  1242. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  1243. wx.createPage(MiniProgramPage);