Personal.js 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241
  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. educations: 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.showPromiseModal = true;
  853. this.populateFormData(res.data.data);
  854. },
  855. fail: (err) => {
  856. },
  857. complete: () => {
  858. this.isLoading = false;
  859. }
  860. });
  861. },
  862. // Add method to populate form data with fetched data
  863. populateFormData(data) {
  864. const { user_info, profile, educations, work_experiences, family_members } = data;
  865. if (user_info) {
  866. this.formData.name = user_info.name || "";
  867. this.formData.gender = user_info.gender_text || "";
  868. this.genderIndex = this.genderOptions.findIndex((item) => item === this.formData.gender);
  869. this.formData.idCard = user_info.id_card || "";
  870. this.formData.phone = user_info.phone || "";
  871. this.formData.email = user_info.email || "";
  872. }
  873. if (profile) {
  874. this.formData.political = profile.political_status || "";
  875. this.politicalIndex = this.politicalOptions.findIndex((item) => item === this.formData.political);
  876. this.formData.ethnic = profile.ethnicity || "";
  877. this.ethnicIndex = this.ethnicOptions.findIndex((item) => item === this.formData.ethnic);
  878. this.formData.height = profile.height || "";
  879. this.formData.weight = profile.weight || "";
  880. this.formData.nativePlace = profile.native_place || "";
  881. this.formData.residence = profile.household_location || "";
  882. this.formData.currentAddress = profile.current_address || "";
  883. this.formData.marriage = profile.marital_status_text || "";
  884. this.marriageIndex = this.marriageOptions.findIndex((item) => item === this.formData.marriage);
  885. if (this.formData.gender === "女" && profile.female_status !== void 0) {
  886. const femaleStatusMap = { 0: "无", 1: "孕期", 2: "产期", 3: "哺乳期" };
  887. this.formData.threePeriod = femaleStatusMap[profile.female_status] || "无";
  888. this.threePeriodIndex = this.threePeriodOptions.findIndex((item) => item === this.formData.threePeriod);
  889. }
  890. this.formData.expectedSalary = profile.expected_salary || "";
  891. this.formData.emergencyContact = profile.emergency_contact || "";
  892. this.formData.emergencyPhone = profile.emergency_phone || "";
  893. this.formData.hobby = profile.specialties || "";
  894. this.formData.motto = profile.life_motto || "";
  895. const sourceTypeMap = {
  896. 1: "school",
  897. 2: "social",
  898. 3: "social",
  899. 4: "social",
  900. 5: "social"
  901. };
  902. const socialSourceMap = {
  903. 2: "BOSS",
  904. 3: "zhilian",
  905. 4: "liepin",
  906. 5: "other"
  907. };
  908. this.formData.sourceType = sourceTypeMap[profile.recruitment_source] || "social";
  909. if (this.formData.sourceType === "social") {
  910. this.formData.socialSource = socialSourceMap[profile.recruitment_source] || "";
  911. if (this.formData.socialSource === "other") {
  912. this.formData.otherSocialSource = profile.recruitment_source_detail || "";
  913. }
  914. } else if (this.formData.sourceType === "school") {
  915. this.formData.otherSchoolSource = profile.recruitment_source_detail || "";
  916. }
  917. }
  918. if (educations && educations.length > 0) {
  919. this.educationList = educations.map((edu) => {
  920. const degreeMap = {
  921. 1: "高中",
  922. 2: "大专",
  923. 3: "本科",
  924. 4: "硕士",
  925. 5: "博士"
  926. };
  927. return {
  928. startTime: edu.start_date || "",
  929. endTime: edu.end_date || "",
  930. schoolName: edu.school_name || "",
  931. major: edu.major || "",
  932. degree: degreeMap[edu.degree] || ""
  933. };
  934. });
  935. }
  936. if (work_experiences && work_experiences.length > 0) {
  937. this.workList = work_experiences.map((work) => {
  938. return {
  939. startTime: work.start_date || "",
  940. endTime: work.end_date || "",
  941. companyName: work.company_name || "",
  942. department: work.department || "",
  943. employeeCount: work.company_size || "",
  944. position: work.position || "",
  945. monthlySalary: work.monthly_salary || "",
  946. supervisor: work.supervisor_name || "",
  947. supervisorPhone: work.supervisor_phone || ""
  948. };
  949. });
  950. }
  951. if (family_members && family_members.length > 0) {
  952. this.familyMembers = family_members.map((member) => {
  953. return {
  954. relation: member.relation || "",
  955. name: member.name || "",
  956. workplaceOrAddress: member.workplace || "",
  957. position: member.position || "",
  958. phone: member.phone || ""
  959. };
  960. });
  961. }
  962. }
  963. },
  964. // 添加监听器来清除错误信息
  965. watch: {
  966. "formData.name": function(newVal) {
  967. if (newVal && this.formErrors.name) {
  968. this.formErrors.name = "";
  969. }
  970. },
  971. "formData.idCard": function(newVal) {
  972. if (newVal && this.formErrors.idCard) {
  973. this.formErrors.idCard = "";
  974. }
  975. },
  976. "formData.phone": function(newVal) {
  977. if (newVal && this.formErrors.phone) {
  978. this.formErrors.phone = "";
  979. }
  980. }
  981. }
  982. };
  983. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  984. return common_vendor.e({
  985. a: $data.isLoading
  986. }, $data.isLoading ? {} : {}, {
  987. b: $data.showPromiseModal
  988. }, $data.showPromiseModal ? {
  989. c: $data.promiseChecked,
  990. d: common_vendor.o((...args) => $options.togglePromiseChecked && $options.togglePromiseChecked(...args)),
  991. e: !$data.promiseChecked,
  992. f: common_vendor.o((...args) => $options.confirmPromise && $options.confirmPromise(...args))
  993. } : {}, {
  994. g: $data.currentStep === 1
  995. }, $data.currentStep === 1 ? common_vendor.e({
  996. h: $data.formErrors.name ? 1 : "",
  997. i: $data.formData.name,
  998. j: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
  999. k: $data.formErrors.name
  1000. }, $data.formErrors.name ? {
  1001. l: common_vendor.t($data.formErrors.name)
  1002. } : {}, {
  1003. m: common_vendor.t($data.genderOptions[$data.genderIndex] || "请选择性别"),
  1004. n: common_vendor.o((...args) => $options.bindGenderChange && $options.bindGenderChange(...args)),
  1005. o: $data.genderIndex,
  1006. p: $data.genderOptions,
  1007. q: $data.formData.gender === "女"
  1008. }, $data.formData.gender === "女" ? {
  1009. r: common_vendor.t($data.threePeriodOptions[$data.threePeriodIndex] || "请选择"),
  1010. s: common_vendor.o((...args) => $options.bindThreePeriodChange && $options.bindThreePeriodChange(...args)),
  1011. t: $data.threePeriodIndex,
  1012. v: $data.threePeriodOptions
  1013. } : {}, {
  1014. w: $data.formErrors.phone ? 1 : "",
  1015. x: $data.formData.phone,
  1016. y: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
  1017. z: $data.formErrors.phone
  1018. }, $data.formErrors.phone ? {
  1019. A: common_vendor.t($data.formErrors.phone)
  1020. } : {}, {
  1021. B: $data.formErrors.idCard ? 1 : "",
  1022. C: $data.formData.idCard,
  1023. D: common_vendor.o(($event) => $data.formData.idCard = $event.detail.value),
  1024. E: $data.formErrors.idCard
  1025. }, $data.formErrors.idCard ? {
  1026. F: common_vendor.t($data.formErrors.idCard)
  1027. } : {}, {
  1028. G: common_vendor.t($data.politicalOptions[$data.politicalIndex] || "请选择政治面貌"),
  1029. H: common_vendor.o((...args) => $options.bindPoliticalChange && $options.bindPoliticalChange(...args)),
  1030. I: $data.politicalIndex,
  1031. J: $data.politicalOptions,
  1032. K: common_vendor.t($data.ethnicOptions[$data.ethnicIndex] || "请选择民族"),
  1033. L: common_vendor.o((...args) => $options.bindEthnicChange && $options.bindEthnicChange(...args)),
  1034. M: $data.ethnicIndex,
  1035. N: $data.ethnicOptions,
  1036. O: $data.formData.height,
  1037. P: common_vendor.o(($event) => $data.formData.height = $event.detail.value),
  1038. Q: $data.formData.weight,
  1039. R: common_vendor.o(($event) => $data.formData.weight = $event.detail.value),
  1040. S: $data.formData.nativePlace,
  1041. T: common_vendor.o(($event) => $data.formData.nativePlace = $event.detail.value),
  1042. U: $data.formData.residence,
  1043. V: common_vendor.o(($event) => $data.formData.residence = $event.detail.value),
  1044. W: common_vendor.t($data.marriageOptions[$data.marriageIndex] || "请选择婚育状况"),
  1045. X: common_vendor.o((...args) => $options.bindMarriageChange && $options.bindMarriageChange(...args)),
  1046. Y: $data.marriageIndex,
  1047. Z: $data.marriageOptions,
  1048. aa: $data.formData.expectedSalary,
  1049. ab: common_vendor.o(($event) => $data.formData.expectedSalary = $event.detail.value)
  1050. }) : {}, {
  1051. ac: $data.currentStep === 2
  1052. }, $data.currentStep === 2 ? {
  1053. ad: $data.formData.email,
  1054. ae: common_vendor.o(($event) => $data.formData.email = $event.detail.value),
  1055. af: $data.formData.currentAddress,
  1056. ag: common_vendor.o(($event) => $data.formData.currentAddress = $event.detail.value),
  1057. ah: $data.formData.emergencyContact,
  1058. ai: common_vendor.o(($event) => $data.formData.emergencyContact = $event.detail.value),
  1059. aj: $data.formData.emergencyPhone,
  1060. ak: common_vendor.o(($event) => $data.formData.emergencyPhone = $event.detail.value),
  1061. al: $data.formData.hobby,
  1062. am: common_vendor.o(($event) => $data.formData.hobby = $event.detail.value),
  1063. an: $data.formData.motto,
  1064. ao: common_vendor.o(($event) => $data.formData.motto = $event.detail.value)
  1065. } : {}, {
  1066. ap: $data.currentStep === 3
  1067. }, $data.currentStep === 3 ? common_vendor.e({
  1068. aq: $data.familyMembers.length > 0
  1069. }, $data.familyMembers.length > 0 ? {
  1070. ar: common_vendor.f($data.familyMembers, (member, index, i0) => {
  1071. return {
  1072. a: common_vendor.t(index + 1),
  1073. b: common_vendor.o(($event) => $options.editFamilyMember(index), index),
  1074. c: common_vendor.o(($event) => $options.deleteFamilyMember(index), index),
  1075. d: common_vendor.t(member.relation),
  1076. e: common_vendor.t(member.name),
  1077. f: common_vendor.t(member.workplaceOrAddress),
  1078. g: common_vendor.t(member.position),
  1079. h: common_vendor.t(member.phone),
  1080. i: index
  1081. };
  1082. })
  1083. } : {}, {
  1084. as: common_vendor.t($data.isEditing ? "编辑家庭成员" : "添加家庭成员"),
  1085. at: $data.isEditing
  1086. }, $data.isEditing ? {
  1087. av: common_vendor.o((...args) => $options.cancelEdit && $options.cancelEdit(...args))
  1088. } : {}, {
  1089. aw: $data.familyMemberForm.relation,
  1090. ax: common_vendor.o(($event) => $data.familyMemberForm.relation = $event.detail.value),
  1091. ay: $data.familyMemberForm.name,
  1092. az: common_vendor.o(($event) => $data.familyMemberForm.name = $event.detail.value),
  1093. aA: $data.familyMemberForm.workplaceOrAddress,
  1094. aB: common_vendor.o(($event) => $data.familyMemberForm.workplaceOrAddress = $event.detail.value),
  1095. aC: $data.familyMemberForm.position,
  1096. aD: common_vendor.o(($event) => $data.familyMemberForm.position = $event.detail.value),
  1097. aE: $data.familyMemberForm.phone,
  1098. aF: common_vendor.o(($event) => $data.familyMemberForm.phone = $event.detail.value),
  1099. aG: common_vendor.t($data.isEditing ? "✓" : "+"),
  1100. aH: common_vendor.o((...args) => $options.saveFamilyMember && $options.saveFamilyMember(...args)),
  1101. aI: common_vendor.t($data.isEditing ? "保存修改" : "添加成员")
  1102. }) : {}, {
  1103. aJ: $data.currentStep === 4
  1104. }, $data.currentStep === 4 ? {
  1105. aK: $data.formData.sourceType === "social" && $data.formData.socialSource === "BOSS",
  1106. aL: common_vendor.o(($event) => $options.selectSocialSource("BOSS")),
  1107. aM: $data.formData.sourceType === "social" && $data.formData.socialSource === "zhilian",
  1108. aN: common_vendor.o(($event) => $options.selectSocialSource("zhilian")),
  1109. aO: $data.formData.sourceType === "social" && $data.formData.socialSource === "liepin",
  1110. aP: common_vendor.o(($event) => $options.selectSocialSource("liepin")),
  1111. aQ: $data.formData.sourceType !== "social" || $data.formData.socialSource !== "other",
  1112. aR: common_vendor.o(($event) => $options.selectSocialSource("other")),
  1113. aS: $data.formData.otherSocialSource,
  1114. aT: common_vendor.o(($event) => $data.formData.otherSocialSource = $event.detail.value)
  1115. } : {}, {
  1116. aU: $data.currentStep === 5
  1117. }, $data.currentStep === 5 ? common_vendor.e({
  1118. aV: $data.educationList.length > 0
  1119. }, $data.educationList.length > 0 ? {
  1120. aW: common_vendor.f($data.educationList, (edu, index, i0) => {
  1121. return {
  1122. a: common_vendor.t(index === 0 ? "第一学历" : "最高学历"),
  1123. b: common_vendor.o(($event) => $options.editEducation(index), index),
  1124. c: common_vendor.o(($event) => $options.deleteEducation(index), index),
  1125. d: common_vendor.t(edu.startTime),
  1126. e: common_vendor.t(edu.endTime),
  1127. f: common_vendor.t(edu.schoolName),
  1128. g: common_vendor.t(edu.major),
  1129. h: common_vendor.t(edu.degree),
  1130. i: index
  1131. };
  1132. })
  1133. } : {}, {
  1134. aX: $data.educationList.length < 2 || $data.isEditingEducation
  1135. }, $data.educationList.length < 2 || $data.isEditingEducation ? common_vendor.e({
  1136. aY: common_vendor.t($data.isEditingEducation ? "编辑教育经历" : $data.educationList.length === 0 ? "添加第一学历" : "添加最高学历"),
  1137. aZ: $data.isEditingEducation
  1138. }, $data.isEditingEducation ? {
  1139. ba: common_vendor.o((...args) => $options.cancelEditEducation && $options.cancelEditEducation(...args))
  1140. } : {}, {
  1141. bb: common_vendor.t($data.educationForm.startTime || "开始时间"),
  1142. bc: $data.educationForm.startTime,
  1143. bd: common_vendor.o((...args) => $options.bindStartTimeChange && $options.bindStartTimeChange(...args)),
  1144. be: common_vendor.t($data.educationForm.endTime || "结束时间"),
  1145. bf: $data.educationForm.endTime,
  1146. bg: common_vendor.o((...args) => $options.bindEndTimeChange && $options.bindEndTimeChange(...args)),
  1147. bh: $data.educationForm.schoolName,
  1148. bi: common_vendor.o(($event) => $data.educationForm.schoolName = $event.detail.value),
  1149. bj: $data.educationForm.major,
  1150. bk: common_vendor.o(($event) => $data.educationForm.major = $event.detail.value),
  1151. bl: common_vendor.t($data.degreeOptions[$data.degreeIndex] || "请选择学历"),
  1152. bm: common_vendor.o((...args) => $options.bindDegreeChange && $options.bindDegreeChange(...args)),
  1153. bn: $data.degreeIndex,
  1154. bo: $data.degreeOptions,
  1155. bp: common_vendor.t($data.isEditingEducation ? "✓" : "+"),
  1156. bq: common_vendor.o((...args) => $options.saveEducation && $options.saveEducation(...args)),
  1157. br: common_vendor.t($data.isEditingEducation ? "保存修改" : "添加学历")
  1158. }) : {}) : {}, {
  1159. bs: $data.currentStep === 6
  1160. }, $data.currentStep === 6 ? {
  1161. bt: $data.formData.skills,
  1162. bv: common_vendor.o(($event) => $data.formData.skills = $event.detail.value)
  1163. } : {}, {
  1164. bw: $data.currentStep === 7
  1165. }, $data.currentStep === 7 ? {
  1166. bx: $data.formData.training,
  1167. by: common_vendor.o(($event) => $data.formData.training = $event.detail.value)
  1168. } : {}, {
  1169. bz: $data.currentStep === 8
  1170. }, $data.currentStep === 8 ? common_vendor.e({
  1171. bA: $data.workList.length > 0
  1172. }, $data.workList.length > 0 ? {
  1173. bB: common_vendor.f($data.workList, (work, index, i0) => {
  1174. return {
  1175. a: common_vendor.t(index + 1),
  1176. b: common_vendor.o(($event) => $options.editWork(index), index),
  1177. c: common_vendor.o(($event) => $options.deleteWork(index), index),
  1178. d: common_vendor.t(work.startTime),
  1179. e: common_vendor.t(work.endTime),
  1180. f: common_vendor.t(work.companyName),
  1181. g: common_vendor.t(work.department),
  1182. h: common_vendor.t(work.employeeCount),
  1183. i: common_vendor.t(work.position),
  1184. j: common_vendor.t(work.monthlySalary),
  1185. k: common_vendor.t(work.supervisor),
  1186. l: common_vendor.t(work.supervisorPhone),
  1187. m: index
  1188. };
  1189. })
  1190. } : {}, {
  1191. bC: $data.workList.length < 2 || $data.isEditingWork
  1192. }, $data.workList.length < 2 || $data.isEditingWork ? common_vendor.e({
  1193. bD: common_vendor.t($data.isEditingWork ? "编辑工作经历" : "添加工作经历"),
  1194. bE: $data.isEditingWork
  1195. }, $data.isEditingWork ? {
  1196. bF: common_vendor.o((...args) => $options.cancelEditWork && $options.cancelEditWork(...args))
  1197. } : {}, {
  1198. bG: common_vendor.t($data.workForm.startTime || "开始时间"),
  1199. bH: $data.workForm.startTime,
  1200. bI: common_vendor.o((...args) => $options.bindWorkStartTimeChange && $options.bindWorkStartTimeChange(...args)),
  1201. bJ: common_vendor.t($data.workForm.endTime || "结束时间"),
  1202. bK: $data.workForm.endTime,
  1203. bL: common_vendor.o((...args) => $options.bindWorkEndTimeChange && $options.bindWorkEndTimeChange(...args)),
  1204. bM: $data.workForm.companyName,
  1205. bN: common_vendor.o(($event) => $data.workForm.companyName = $event.detail.value),
  1206. bO: $data.workForm.employeeCount,
  1207. bP: common_vendor.o(($event) => $data.workForm.employeeCount = $event.detail.value),
  1208. bQ: $data.workForm.department,
  1209. bR: common_vendor.o(($event) => $data.workForm.department = $event.detail.value),
  1210. bS: $data.workForm.position,
  1211. bT: common_vendor.o(($event) => $data.workForm.position = $event.detail.value),
  1212. bU: $data.workForm.monthlySalary,
  1213. bV: common_vendor.o(($event) => $data.workForm.monthlySalary = $event.detail.value),
  1214. bW: $data.workForm.supervisor,
  1215. bX: common_vendor.o(($event) => $data.workForm.supervisor = $event.detail.value),
  1216. bY: $data.workForm.supervisorPhone,
  1217. bZ: common_vendor.o(($event) => $data.workForm.supervisorPhone = $event.detail.value),
  1218. ca: common_vendor.t($data.isEditingWork ? "✓" : "+"),
  1219. cb: common_vendor.o((...args) => $options.saveWork && $options.saveWork(...args)),
  1220. cc: common_vendor.t($data.isEditingWork ? "保存修改" : "添加工作经历")
  1221. }) : {}) : {}, {
  1222. cd: $data.currentStep === 9
  1223. }, $data.currentStep === 9 ? {
  1224. ce: common_vendor.t($data.formData.name),
  1225. cf: common_vendor.t($data.formData.gender)
  1226. } : {}, {
  1227. cg: $data.currentStep > 1
  1228. }, $data.currentStep > 1 ? {
  1229. ch: common_vendor.o((...args) => $options.prevStep && $options.prevStep(...args))
  1230. } : {}, {
  1231. ci: $data.currentStep < $data.steps.length
  1232. }, $data.currentStep < $data.steps.length ? {
  1233. cj: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
  1234. } : {}, {
  1235. ck: $data.currentStep === $data.steps.length
  1236. }, $data.currentStep === $data.steps.length ? {
  1237. cl: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args))
  1238. } : {});
  1239. }
  1240. const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
  1241. wx.createPage(MiniProgramPage);