Personal.vue 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482
  1. <template>
  2. <view class="personal-container">
  3. <!-- Add loading indicator -->
  4. <view class="loading-container" v-if="isLoading">
  5. <view class="loading-spinner"></view>
  6. <text class="loading-text">加载中...</text>
  7. </view>
  8. <!-- 添加承诺书弹框 -->
  9. <view class="promise-modal" v-if="showPromiseModal">
  10. <view class="promise-content">
  11. <view class="promise-title">入职承诺书</view>
  12. <scroll-view scroll-y class="promise-text">
  13. <text>
  14. 本人郑重承诺:
  15. 所提交的入职登记表、学历证书、职业资格证明、工作履历等全部个人信息及证明材料均真实、准确、完整。若经公司核查发现存在虚构工作经历、伪造学历证书、隐瞒竞业限制义务、虚报健康状况等任何不实或欺诈情形,本人自愿承担以下责任:
  16. 1. 法律责任:因信息不实引发的劳动纠纷、民事赔偿、行政处罚或刑事追责,由本人独立承担全部法律后果,公司不承担任何连带责任;
  17. 2. 劳动关系处理:公司有权立即解除劳动合同,无需支付经济补偿,并保留向本人追偿因信息欺诈导致公司经济损失(包括但不限于招聘成本、培训费用、商誉损失等)的权利;
  18. 3. 其他后果:若已入职,公司可单方撤销录用决定,要求返还已发放的工资、福利等费用,并可将不实行为记入个人档案。
  19. 本人确认已充分理解上述条款内容,无任何歧义,并自愿受其约束。
  20. </text>
  21. </scroll-view>
  22. <view class="promise-checkbox">
  23. <checkbox :checked="promiseChecked" @click="togglePromiseChecked" />
  24. <text>我已阅读并同意以上承诺书内容</text>
  25. </view>
  26. <view class="promise-buttons">
  27. <button class="promise-btn confirm-btn" :disabled="!promiseChecked" @click="confirmPromise">确认</button>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="form-title">个人信息表</view>
  32. <!-- 添加步骤指示器 -->
  33. <!-- <view class="steps-indicator">
  34. <view
  35. v-for="(step, index) in steps"
  36. :key="step.id"
  37. class="step-item"
  38. :class="{ 'active': currentStep >= step.id, 'current': currentStep === step.id }"
  39. >
  40. <view class="step-number">{{ step.id }}</view>
  41. <view class="step-name">{{ step.name }}</view>
  42. </view>
  43. </view> -->
  44. <!-- 第一步:个人基本信息 -->
  45. <view v-if="currentStep === 1" class="form-container">
  46. <!-- 第一行 -->
  47. <view class="form-row">
  48. <view class="form-item">
  49. <text class="label">姓名</text>
  50. <input type="text" v-model="formData.name" placeholder="请输入姓名" :class="{'input-error': formErrors.name}" />
  51. <text v-if="formErrors.name" class="error-message">{{formErrors.name}}</text>
  52. </view>
  53. <view class="form-item">
  54. <text class="label">性别</text>
  55. <picker @change="bindGenderChange" :value="genderIndex" :range="genderOptions">
  56. <view class="picker-text">{{ genderOptions[genderIndex] || '请选择性别' }}</view>
  57. </picker>
  58. </view>
  59. <!-- 当性别为女时显示三期选择 -->
  60. <view class="form-item" v-if="formData.gender === '女'">
  61. <text class="label">是否为三期</text>
  62. <picker @change="bindThreePeriodChange" :value="threePeriodIndex" :range="threePeriodOptions">
  63. <view class="picker-text">{{ threePeriodOptions[threePeriodIndex] || '请选择' }}</view>
  64. </picker>
  65. </view>
  66. <view class="form-row">
  67. <view class="form-item">
  68. <text class="label">手机号</text>
  69. <input type="number" v-model="formData.phone" placeholder="请输入手机号" :class="{'input-error': formErrors.phone}" />
  70. <text v-if="formErrors.phone" class="error-message">{{formErrors.phone}}</text>
  71. </view>
  72. </view>
  73. <!-- <view class="form-item">
  74. <text class="label">出生日期</text>
  75. <picker mode="date" :value="formData.birthDate" @change="bindDateChange">
  76. <view class="picker-text">{{ formData.birthDate || '请选择日期' }}</view>
  77. </picker>
  78. </view> -->
  79. </view>
  80. <view class="form-item">
  81. <text class="label">身份证号</text>
  82. <input type="idcard" v-model="formData.idCard" placeholder="请输入身份证号" :class="{'input-error': formErrors.idCard}" />
  83. <text v-if="formErrors.idCard" class="error-message">{{formErrors.idCard}}</text>
  84. </view>
  85. <view class="form-item">
  86. <text class="label">政治面貌</text>
  87. <picker @change="bindPoliticalChange" :value="politicalIndex" :range="politicalOptions">
  88. <view class="picker-text">{{ politicalOptions[politicalIndex] || '请选择政治面貌' }}</view>
  89. </picker>
  90. </view>
  91. <view class="form-item">
  92. <text class="label">民族</text>
  93. <picker @change="bindEthnicChange" :value="ethnicIndex" :range="ethnicOptions">
  94. <view class="picker-text">{{ ethnicOptions[ethnicIndex] || '请选择民族' }}</view>
  95. </picker>
  96. </view>
  97. <!-- 第三行 -->
  98. <view class="form-row">
  99. <view class="form-item">
  100. <text class="label">身高(cm)</text>
  101. <input type="digit" v-model="formData.height" placeholder="请输入身高" />
  102. </view>
  103. <view class="form-item">
  104. <text class="label">体重(kg)</text>
  105. <input type="digit" v-model="formData.weight" placeholder="请输入体重" />
  106. </view>
  107. <view class="form-item">
  108. <text class="label">籍贯</text>
  109. <input type="text" v-model="formData.nativePlace" placeholder="请输入籍贯" />
  110. </view>
  111. </view>
  112. <!-- 第四行 -->
  113. <view class="form-row">
  114. <view class="form-item">
  115. <text class="label">户口所在地</text>
  116. <input type="text" v-model="formData.residence" placeholder="请输入户口所在地" />
  117. </view>
  118. <view class="form-item">
  119. <text class="label">婚育状况</text>
  120. <picker @change="bindMarriageChange" :value="marriageIndex" :range="marriageOptions">
  121. <view class="picker-text">{{ marriageOptions[marriageIndex] || '请选择婚育状况' }}</view>
  122. </picker>
  123. </view>
  124. <view class="form-item">
  125. <text class="label">期望薪资(元/月)</text>
  126. <input type="digit" v-model="formData.expectedSalary" placeholder="请输入期望薪资" />
  127. </view>
  128. </view>
  129. </view>
  130. <!-- 第二步:紧急联系人信息 -->
  131. <view v-if="currentStep === 2" class="form-container">
  132. <view class="section-title">紧急联系人信息</view>
  133. <view class="form-row">
  134. <view class="form-item">
  135. <text class="label">Email</text>
  136. <input type="text" v-model="formData.email" placeholder="请输入电子邮箱" />
  137. </view>
  138. <view class="form-item">
  139. <text class="label">现居住地址</text>
  140. <input type="text" v-model="formData.currentAddress" placeholder="请输入现居住地址" />
  141. </view>
  142. </view>
  143. <view class="form-row">
  144. <view class="form-item">
  145. <text class="label">紧急联系人</text>
  146. <input type="text" v-model="formData.emergencyContact" placeholder="请输入紧急联系人姓名" />
  147. </view>
  148. <view class="form-item">
  149. <text class="label">紧急联系人电话</text>
  150. <input type="number" v-model="formData.emergencyPhone" placeholder="请输入紧急联系人电话" />
  151. </view>
  152. </view>
  153. <view class="form-row">
  154. <view class="form-item">
  155. <text class="label">个人专长/业余爱好</text>
  156. <input type="text" v-model="formData.hobby" placeholder="请输入个人专长或业余爱好" />
  157. </view>
  158. <view class="form-item">
  159. <text class="label">人生信条或座右铭</text>
  160. <input type="text" v-model="formData.motto" placeholder="请输入人生信条或座右铭" />
  161. </view>
  162. </view>
  163. </view>
  164. <!-- 第三步:家庭成员信息 -->
  165. <view v-if="currentStep === 3">
  166. <view class="section-title">家庭主要成员信息</view>
  167. <!-- 已添加的家庭成员列表 -->
  168. <view class="family-members-list" v-if="familyMembers.length > 0">
  169. <view class="family-member-item" v-for="(member, index) in familyMembers" :key="index">
  170. <view class="family-member-header">
  171. <text class="family-member-title">成员 {{index + 1}}</text>
  172. <view class="family-member-actions">
  173. <text class="family-member-edit" @click="editFamilyMember(index)">编辑</text>
  174. <text class="family-member-delete" @click="deleteFamilyMember(index)">删除</text>
  175. </view>
  176. </view>
  177. <view class="family-member-content">
  178. <view class="family-member-row">
  179. <text class="family-member-label">称谓:</text>
  180. <text class="family-member-value">{{member.relation}}</text>
  181. </view>
  182. <view class="family-member-row">
  183. <text class="family-member-label">姓名:</text>
  184. <text class="family-member-value">{{member.name}}</text>
  185. </view>
  186. <view class="family-member-row">
  187. <text class="family-member-label">工作单位/家庭地址:</text>
  188. <text class="family-member-value">{{member.workplaceOrAddress}}</text>
  189. </view>
  190. <view class="family-member-row">
  191. <text class="family-member-label">职务:</text>
  192. <text class="family-member-value">{{member.position}}</text>
  193. </view>
  194. <view class="family-member-row">
  195. <text class="family-member-label">联系电话:</text>
  196. <text class="family-member-value">{{member.phone}}</text>
  197. </view>
  198. </view>
  199. </view>
  200. </view>
  201. <!-- 家庭成员信息表单 -->
  202. <view class="family-member-form">
  203. <view class="form-subtitle">
  204. {{ isEditing ? '编辑家庭成员' : '添加家庭成员' }}
  205. <text v-if="isEditing" class="cancel-edit" @click="cancelEdit">取消编辑</text>
  206. </view>
  207. <view class="form-row">
  208. <view class="form-item">
  209. <text class="label">称谓</text>
  210. <input type="text" v-model="familyMemberForm.relation" placeholder="如:父亲、母亲、配偶等" />
  211. </view>
  212. <view class="form-item">
  213. <text class="label">姓名</text>
  214. <input type="text" v-model="familyMemberForm.name" placeholder="请输入姓名" />
  215. </view>
  216. </view>
  217. <view class="form-row">
  218. <view class="form-item">
  219. <text class="label">工作单位/家庭地址</text>
  220. <input type="text" v-model="familyMemberForm.workplaceOrAddress" placeholder="请输入工作单位或家庭地址" />
  221. </view>
  222. <view class="form-item">
  223. <text class="label">职务</text>
  224. <input type="text" v-model="familyMemberForm.position" placeholder="请输入职务" />
  225. </view>
  226. </view>
  227. <view class="form-row">
  228. <view class="form-item">
  229. <text class="label">联系电话</text>
  230. <input type="number" v-model="familyMemberForm.phone" placeholder="请输入联系电话" />
  231. </view>
  232. </view>
  233. <view class="form-row button-row">
  234. <view class="form-item button-container">
  235. <button class="circle-btn" @click="saveFamilyMember">
  236. <text class="btn-icon">{{ isEditing ? '✓' : '+' }}</text>
  237. </button>
  238. <text class="btn-text">{{ isEditing ? '保存修改' : '添加成员' }}</text>
  239. </view>
  240. </view>
  241. </view>
  242. </view>
  243. <!-- 第四步:应聘来源 -->
  244. <view v-if="currentStep === 4">
  245. <view class="section-title">应聘来源</view>
  246. <view class="source-container">
  247. <!-- <view class="source-row">
  248. <view class="source-label">实习生:</view>
  249. <view class="source-options">
  250. <view class="source-option">
  251. <checkbox :checked="formData.sourceType === 'school'" @click="selectSourceType('school')" />
  252. <text>学校</text>
  253. </view>
  254. <view class="source-option other-option">
  255. <text>其他渠道:</text>
  256. <input
  257. type="text"
  258. v-model="formData.otherSchoolSource"
  259. placeholder="请填写"
  260. :disabled="formData.sourceType !== 'school'"
  261. />
  262. </view>
  263. </view>
  264. </view> -->
  265. <view class="source-row">
  266. <view class="source-label">社招:</view>
  267. <view class="source-options">
  268. <view class="source-option">
  269. <checkbox :checked="formData.sourceType === 'social' && formData.socialSource === 'BOSS'" @click="selectSocialSource('BOSS')" />
  270. <text>BOSS直聘</text>
  271. </view>
  272. <view class="source-option">
  273. <checkbox :checked="formData.sourceType === 'social' && formData.socialSource === 'zhilian'" @click="selectSocialSource('zhilian')" />
  274. <text>智联招聘</text>
  275. </view>
  276. <view class="source-option">
  277. <checkbox :checked="formData.sourceType === 'social' && formData.socialSource === 'liepin'" @click="selectSocialSource('liepin')" />
  278. <text>猎聘</text>
  279. </view>
  280. <view class="source-option other-option">
  281. <text>其他渠道:</text>
  282. <input
  283. type="text"
  284. v-model="formData.otherSocialSource"
  285. placeholder="请填写"
  286. :disabled="formData.sourceType !== 'social' || formData.socialSource !== 'other'"
  287. @click="selectSocialSource('other')"
  288. />
  289. </view>
  290. </view>
  291. </view>
  292. </view>
  293. </view>
  294. <!-- 第五步:教育经历 -->
  295. <view v-if="currentStep === 5">
  296. <view class="section-title">教育经历</view>
  297. <!-- 已添加的教育经历列表 -->
  298. <view class="education-list" v-if="educationList.length > 0">
  299. <view class="education-item" v-for="(edu, index) in educationList" :key="index">
  300. <view class="education-header">
  301. <text class="education-title">{{ index === 0 ? '第一学历' : '最高学历' }}</text>
  302. <view class="education-actions">
  303. <text class="education-edit" @click="editEducation(index)">编辑</text>
  304. <text class="education-delete" @click="deleteEducation(index)">删除</text>
  305. </view>
  306. </view>
  307. <view class="education-content">
  308. <view class="education-row">
  309. <text class="education-label">起止时间:</text>
  310. <text class="education-value">{{edu.startTime}} 至 {{edu.endTime}}</text>
  311. </view>
  312. <view class="education-row">
  313. <text class="education-label">学校名称:</text>
  314. <text class="education-value">{{edu.schoolName}}</text>
  315. </view>
  316. <view class="education-row">
  317. <text class="education-label">专业:</text>
  318. <text class="education-value">{{edu.major}}</text>
  319. </view>
  320. <view class="education-row">
  321. <text class="education-label">学历:</text>
  322. <text class="education-value">{{edu.degree}}</text>
  323. </view>
  324. </view>
  325. </view>
  326. </view>
  327. <!-- 教育经历表单 -->
  328. <view class="education-form" v-if="educationList.length < 2 || isEditingEducation">
  329. <view class="form-subtitle">
  330. {{ isEditingEducation ? '编辑教育经历' : (educationList.length === 0 ? '添加第一学历' : '添加最高学历') }}
  331. <text v-if="isEditingEducation" class="cancel-edit" @click="cancelEditEducation">取消编辑</text>
  332. </view>
  333. <view class="form-row">
  334. <view class="form-item">
  335. <text class="label">起止时间</text>
  336. <view class="date-range">
  337. <picker mode="date" :value="educationForm.startTime" @change="bindStartTimeChange">
  338. <view class="picker-text">{{ educationForm.startTime || '开始时间' }}</view>
  339. </picker>
  340. <text class="date-separator">至</text>
  341. <picker mode="date" :value="educationForm.endTime" @change="bindEndTimeChange">
  342. <view class="picker-text">{{ educationForm.endTime || '结束时间' }}</view>
  343. </picker>
  344. </view>
  345. </view>
  346. </view>
  347. <view class="form-row">
  348. <view class="form-item">
  349. <text class="label">学校名称</text>
  350. <input type="text" v-model="educationForm.schoolName" placeholder="请输入学校名称" />
  351. </view>
  352. <view class="form-item">
  353. <text class="label">专业</text>
  354. <input type="text" v-model="educationForm.major" placeholder="请输入专业" />
  355. </view>
  356. </view>
  357. <view class="form-row">
  358. <view class="form-item">
  359. <text class="label">学历</text>
  360. <picker @change="bindDegreeChange" :value="degreeIndex" :range="degreeOptions">
  361. <view class="picker-text">{{ degreeOptions[degreeIndex] || '请选择学历' }}</view>
  362. </picker>
  363. </view>
  364. </view>
  365. <view class="form-row button-row">
  366. <view class="form-item button-container">
  367. <button class="circle-btn" @click="saveEducation">
  368. <text class="btn-icon">{{ isEditingEducation ? '✓' : '+' }}</text>
  369. </button>
  370. <text class="btn-text">{{ isEditingEducation ? '保存修改' : '添加学历' }}</text>
  371. </view>
  372. </view>
  373. </view>
  374. </view>
  375. <!-- 第六步:专业技能 -->
  376. <view v-if="currentStep === 6">
  377. <view class="section-title">专业技能</view>
  378. <view class="skills-container">
  379. <textarea v-model="formData.skills" placeholder="请描述您的专业技能" class="skills-textarea"></textarea>
  380. </view>
  381. </view>
  382. <!-- 第七步:培训经历 -->
  383. <view v-if="currentStep === 7">
  384. <view class="section-title">受过的培训</view>
  385. <view class="training-container">
  386. <textarea v-model="formData.training" placeholder="请描述您接受过的培训经历" class="training-textarea"></textarea>
  387. </view>
  388. </view>
  389. <!-- 第八步:工作经历 -->
  390. <view v-if="currentStep === 8">
  391. <view class="section-title">工作经历</view>
  392. <!-- 已添加的工作经历列表 -->
  393. <view class="work-list" v-if="workList.length > 0">
  394. <view class="work-item" v-for="(work, index) in workList" :key="index">
  395. <view class="work-header">
  396. <text class="work-title">单位{{ index + 1 }}</text>
  397. <view class="work-actions">
  398. <text class="work-edit" @click="editWork(index)">编辑</text>
  399. <text class="work-delete" @click="deleteWork(index)">删除</text>
  400. </view>
  401. </view>
  402. <view class="work-content">
  403. <view class="work-row">
  404. <text class="work-label">起止时间:</text>
  405. <text class="work-value">{{work.startTime}} 至 {{work.endTime}}</text>
  406. </view>
  407. <view class="work-row">
  408. <text class="work-label">单位名称:</text>
  409. <text class="work-value">{{work.companyName}}</text>
  410. </view>
  411. <view class="work-row">
  412. <text class="work-label">任职部门:</text>
  413. <text class="work-value">{{work.department}}</text>
  414. </view>
  415. <view class="work-row">
  416. <text class="work-label">单位人数:</text>
  417. <text class="work-value">{{work.employeeCount}}</text>
  418. </view>
  419. <view class="work-row">
  420. <text class="work-label">担任职务:</text>
  421. <text class="work-value">{{work.position}}</text>
  422. </view>
  423. <view class="work-row">
  424. <text class="work-label">月总收入:</text>
  425. <text class="work-value">{{work.monthlySalary}}</text>
  426. </view>
  427. <view class="work-row">
  428. <text class="work-label">直接领导:</text>
  429. <text class="work-value">{{work.supervisor}}</text>
  430. </view>
  431. <view class="work-row">
  432. <text class="work-label">领导电话:</text>
  433. <text class="work-value">{{work.supervisorPhone}}</text>
  434. </view>
  435. </view>
  436. </view>
  437. </view>
  438. <!-- 工作经历表单 -->
  439. <view class="work-form" v-if="workList.length < 2 || isEditingWork">
  440. <view class="form-subtitle">
  441. {{ isEditingWork ? '编辑工作经历' : '添加工作经历' }}
  442. <text v-if="isEditingWork" class="cancel-edit" @click="cancelEditWork">取消编辑</text>
  443. </view>
  444. <view class="form-row">
  445. <view class="form-item">
  446. <text class="label">起止时间</text>
  447. <view class="date-range">
  448. <picker mode="date" :value="workForm.startTime" @change="bindWorkStartTimeChange">
  449. <view class="picker-text">{{ workForm.startTime || '开始时间' }}</view>
  450. </picker>
  451. <text class="date-separator">至</text>
  452. <picker mode="date" :value="workForm.endTime" @change="bindWorkEndTimeChange">
  453. <view class="picker-text">{{ workForm.endTime || '结束时间' }}</view>
  454. </picker>
  455. </view>
  456. </view>
  457. </view>
  458. <view class="form-row">
  459. <view class="form-item">
  460. <text class="label">单位名称</text>
  461. <input type="text" v-model="workForm.companyName" placeholder="请输入单位名称" />
  462. </view>
  463. <view class="form-item">
  464. <text class="label">单位人数</text>
  465. <input type="number" v-model="workForm.employeeCount" placeholder="请输入单位人数" />
  466. </view>
  467. </view>
  468. <view class="form-row">
  469. <view class="form-item">
  470. <text class="label">任职部门</text>
  471. <input type="text" v-model="workForm.department" placeholder="请输入任职部门" />
  472. </view>
  473. <view class="form-item">
  474. <text class="label">担任职务</text>
  475. <input type="text" v-model="workForm.position" placeholder="请输入担任职务" />
  476. </view>
  477. </view>
  478. <view class="form-row">
  479. <view class="form-item">
  480. <text class="label">月总收入</text>
  481. <input type="digit" v-model="workForm.monthlySalary" placeholder="请输入月总收入" />
  482. </view>
  483. </view>
  484. <view class="form-row">
  485. <view class="form-item">
  486. <text class="label">直接领导</text>
  487. <input type="text" v-model="workForm.supervisor" placeholder="请输入直接领导姓名" />
  488. </view>
  489. <view class="form-item">
  490. <text class="label">领导电话</text>
  491. <input type="number" v-model="workForm.supervisorPhone" placeholder="请输入领导电话" />
  492. </view>
  493. </view>
  494. <view class="form-row button-row">
  495. <view class="form-item button-container">
  496. <button class="circle-btn" @click="saveWork">
  497. <text class="btn-icon">{{ isEditingWork ? '✓' : '+' }}</text>
  498. </button>
  499. <text class="btn-text">{{ isEditingWork ? '保存修改' : '添加工作经历' }}</text>
  500. </view>
  501. </view>
  502. </view>
  503. </view>
  504. <!-- 第九步:确认提交 -->
  505. <view v-if="currentStep === 9" class="confirm-container">
  506. <view class="section-title">确认提交</view>
  507. <view class="confirm-message">
  508. <text>您已完成所有信息的填写,请确认信息无误后提交。</text>
  509. </view>
  510. <!-- 可以在这里添加信息摘要展示 -->
  511. <view class="info-summary">
  512. <view class="summary-item">
  513. <text class="summary-label">姓名:</text>
  514. <text class="summary-value">{{ formData.name }}</text>
  515. </view>
  516. <view class="summary-item">
  517. <text class="summary-label">性别:</text>
  518. <text class="summary-value">{{ formData.gender }}</text>
  519. </view>
  520. <!-- 其他关键信息摘要 -->
  521. </view>
  522. </view>
  523. <!-- 导航按钮 -->
  524. <view class="nav-buttons">
  525. <button
  526. v-if="currentStep > 1"
  527. class="nav-btn prev-btn"
  528. @click="prevStep"
  529. >上一步</button>
  530. <button
  531. v-if="currentStep < steps.length"
  532. class="nav-btn next-btn"
  533. @click="nextStep"
  534. >下一步</button>
  535. <button
  536. v-if="currentStep === steps.length"
  537. class="submit-btn"
  538. @click="submitForm"
  539. >提交</button>
  540. </view>
  541. </view>
  542. </template>
  543. <script>
  544. import { apiBaseUrl } from '@/common/config.js';
  545. export default {
  546. data() {
  547. return {
  548. // 添加承诺书相关数据
  549. showPromiseModal: true,
  550. promiseChecked: false,
  551. formData: {
  552. name: '',
  553. gender: '',
  554. threePeriod: '',
  555. birthDate: '',
  556. idCard: '',
  557. political: '',
  558. ethnic: '',
  559. height: '',
  560. weight: '',
  561. nativePlace: '',
  562. residence: '',
  563. marriage: '',
  564. expectedSalary: '',
  565. phone: '',
  566. email: '',
  567. currentAddress: '',
  568. emergencyContact: '',
  569. emergencyPhone: '',
  570. hobby: '',
  571. motto: '',
  572. // 添加应聘来源相关字段
  573. sourceType: 'social', // 默认为社招
  574. socialSource: '', // 社招来源
  575. otherSocialSource: '', // 其他社招来源
  576. otherSchoolSource: '', // 其他学校来源
  577. // 添加技能和培训字段
  578. skills: '',
  579. training: '',
  580. },
  581. genderOptions: ['男', '女'],
  582. genderIndex: -1,
  583. threePeriodOptions: ['无', '孕期', '产期', '哺乳期'],
  584. threePeriodIndex: -1,
  585. politicalOptions: ['群众', '共青团员', '中共党员', '民主党派'],
  586. politicalIndex: -1,
  587. ethnicOptions: ['汉族', '蒙古族', '回族', '藏族', '维吾尔族', '其他'],
  588. ethnicIndex: -1,
  589. marriageOptions: ['未婚', '已婚', '离异', '丧偶'],
  590. marriageIndex: -1,
  591. familyMembers: [],
  592. familyMemberForm: {
  593. relation: '',
  594. name: '',
  595. workplaceOrAddress: '',
  596. position: '',
  597. phone: ''
  598. },
  599. isEditing: false,
  600. editingIndex: -1,
  601. // 添加教育经历相关数据
  602. educationList: [],
  603. educationForm: {
  604. startTime: '',
  605. endTime: '',
  606. schoolName: '',
  607. major: '',
  608. degree: ''
  609. },
  610. isEditingEducation: false,
  611. editingEducationIndex: -1,
  612. degreeOptions: ['高中', '中专', '大专', '本科', '硕士', '博士'],
  613. degreeIndex: -1,
  614. // 添加工作经历相关数据
  615. workList: [],
  616. workForm: {
  617. startTime: '',
  618. endTime: '',
  619. companyName: '',
  620. department: '',
  621. employeeCount: '',
  622. position: '',
  623. monthlySalary: '',
  624. supervisor: '',
  625. supervisorPhone: ''
  626. },
  627. isEditingWork: false,
  628. editingWorkIndex: -1,
  629. // 添加步骤控制
  630. currentStep: 1,
  631. steps: [
  632. { id: 1, name: '个人基本信息' },
  633. { id: 2, name: '紧急联系人信息' },
  634. { id: 3, name: '家庭成员信息' },
  635. { id: 4, name: '应聘来源' },
  636. { id: 5, name: '教育经历' },
  637. { id: 6, name: '专业技能' },
  638. { id: 7, name: '培训经历' },
  639. { id: 8, name: '工作经历' },
  640. { id: 9, name: '确认提交' }
  641. ],
  642. formErrors: {
  643. name: '',
  644. idCard: '',
  645. phone: ''
  646. },
  647. // Add loading state
  648. isLoading: true,
  649. }
  650. },
  651. onLoad() {
  652. // Fetch user data when component loads
  653. this.fetchUserData();
  654. },
  655. methods: {
  656. // 添加承诺书相关方法
  657. togglePromiseChecked() {
  658. this.promiseChecked = !this.promiseChecked;
  659. },
  660. confirmPromise() {
  661. if (this.promiseChecked) {
  662. this.showPromiseModal = false;
  663. } else {
  664. uni.showToast({
  665. title: '请先阅读并同意承诺书内容',
  666. icon: 'none'
  667. });
  668. }
  669. },
  670. bindGenderChange(e) {
  671. this.genderIndex = e.detail.value;
  672. this.formData.gender = this.genderOptions[this.genderIndex];
  673. // 如果性别从女变为男,清空三期选择
  674. if (this.formData.gender !== '女') {
  675. this.formData.threePeriod = '';
  676. this.threePeriodIndex = -1;
  677. }
  678. },
  679. bindThreePeriodChange(e) {
  680. this.threePeriodIndex = e.detail.value;
  681. this.formData.threePeriod = this.threePeriodOptions[this.threePeriodIndex];
  682. },
  683. bindPoliticalChange(e) {
  684. this.politicalIndex = e.detail.value;
  685. this.formData.political = this.politicalOptions[this.politicalIndex];
  686. },
  687. bindEthnicChange(e) {
  688. this.ethnicIndex = e.detail.value;
  689. this.formData.ethnic = this.ethnicOptions[this.ethnicIndex];
  690. },
  691. bindMarriageChange(e) {
  692. this.marriageIndex = e.detail.value;
  693. this.formData.marriage = this.marriageOptions[this.marriageIndex];
  694. },
  695. bindDateChange(e) {
  696. this.formData.birthDate = e.detail.value;
  697. },
  698. saveFamilyMember() {
  699. if (!this.familyMemberForm.relation) {
  700. uni.showToast({
  701. title: '请输入称谓',
  702. icon: 'none'
  703. });
  704. return;
  705. }
  706. if (!this.familyMemberForm.name) {
  707. uni.showToast({
  708. title: '请输入姓名',
  709. icon: 'none'
  710. });
  711. return;
  712. }
  713. if (!this.familyMemberForm.phone) {
  714. uni.showToast({
  715. title: '请输入联系电话',
  716. icon: 'none'
  717. });
  718. return;
  719. }
  720. if (this.isEditing) {
  721. this.familyMembers[this.editingIndex] = {...this.familyMemberForm};
  722. uni.showToast({
  723. title: '修改成功',
  724. icon: 'success'
  725. });
  726. this.isEditing = false;
  727. this.editingIndex = -1;
  728. } else {
  729. this.familyMembers.push({...this.familyMemberForm});
  730. uni.showToast({
  731. title: '添加成功',
  732. icon: 'success'
  733. });
  734. }
  735. this.familyMemberForm = {
  736. relation: '',
  737. name: '',
  738. workplaceOrAddress: '',
  739. position: '',
  740. phone: ''
  741. };
  742. },
  743. editFamilyMember(index) {
  744. this.isEditing = true;
  745. this.editingIndex = index;
  746. this.familyMemberForm = {...this.familyMembers[index]};
  747. uni.pageScrollTo({
  748. selector: '.family-member-form',
  749. duration: 300
  750. });
  751. },
  752. cancelEdit() {
  753. this.isEditing = false;
  754. this.editingIndex = -1;
  755. this.familyMemberForm = {
  756. relation: '',
  757. name: '',
  758. workplaceOrAddress: '',
  759. position: '',
  760. phone: ''
  761. };
  762. },
  763. deleteFamilyMember(index) {
  764. if (this.isEditing && this.editingIndex === index) {
  765. this.cancelEdit();
  766. }
  767. this.familyMembers.splice(index, 1);
  768. uni.showToast({
  769. title: '已删除',
  770. icon: 'none'
  771. });
  772. },
  773. // 选择应聘来源类型
  774. selectSourceType(type) {
  775. this.formData.sourceType = type;
  776. if (type === 'social') {
  777. // 默认选择第一个社招来源
  778. this.formData.socialSource = 'BOSS';
  779. } else {
  780. // 清空社招来源
  781. this.formData.socialSource = '';
  782. }
  783. },
  784. // 选择社招来源
  785. selectSocialSource(source) {
  786. this.formData.sourceType = 'social';
  787. this.formData.socialSource = source;
  788. },
  789. // 教育经历相关方法
  790. bindStartTimeChange(e) {
  791. this.educationForm.startTime = e.detail.value;
  792. },
  793. bindEndTimeChange(e) {
  794. this.educationForm.endTime = e.detail.value;
  795. },
  796. bindDegreeChange(e) {
  797. this.degreeIndex = e.detail.value;
  798. this.educationForm.degree = this.degreeOptions[this.degreeIndex];
  799. },
  800. saveEducation() {
  801. if (!this.educationForm.startTime) {
  802. uni.showToast({
  803. title: '请选择开始时间',
  804. icon: 'none'
  805. });
  806. return;
  807. }
  808. if (!this.educationForm.endTime) {
  809. uni.showToast({
  810. title: '请选择结束时间',
  811. icon: 'none'
  812. });
  813. return;
  814. }
  815. if (!this.educationForm.schoolName) {
  816. uni.showToast({
  817. title: '请输入学校名称',
  818. icon: 'none'
  819. });
  820. return;
  821. }
  822. if (!this.educationForm.major) {
  823. uni.showToast({
  824. title: '请输入专业',
  825. icon: 'none'
  826. });
  827. return;
  828. }
  829. if (!this.educationForm.degree) {
  830. uni.showToast({
  831. title: '请选择学历',
  832. icon: 'none'
  833. });
  834. return;
  835. }
  836. if (this.isEditingEducation) {
  837. this.educationList[this.editingEducationIndex] = {...this.educationForm};
  838. uni.showToast({
  839. title: '修改成功',
  840. icon: 'success'
  841. });
  842. this.isEditingEducation = false;
  843. this.editingEducationIndex = -1;
  844. } else {
  845. this.educationList.push({...this.educationForm});
  846. uni.showToast({
  847. title: '添加成功',
  848. icon: 'success'
  849. });
  850. }
  851. this.educationForm = {
  852. startTime: '',
  853. endTime: '',
  854. schoolName: '',
  855. major: '',
  856. degree: ''
  857. };
  858. this.degreeIndex = -1;
  859. },
  860. editEducation(index) {
  861. this.isEditingEducation = true;
  862. this.editingEducationIndex = index;
  863. this.educationForm = {...this.educationList[index]};
  864. // 设置学历索引
  865. this.degreeIndex = this.degreeOptions.findIndex(item => item === this.educationForm.degree);
  866. uni.pageScrollTo({
  867. selector: '.education-form',
  868. duration: 300
  869. });
  870. },
  871. cancelEditEducation() {
  872. this.isEditingEducation = false;
  873. this.editingEducationIndex = -1;
  874. this.educationForm = {
  875. startTime: '',
  876. endTime: '',
  877. schoolName: '',
  878. major: '',
  879. degree: ''
  880. };
  881. this.degreeIndex = -1;
  882. },
  883. deleteEducation(index) {
  884. if (this.isEditingEducation && this.editingEducationIndex === index) {
  885. this.cancelEditEducation();
  886. }
  887. this.educationList.splice(index, 1);
  888. uni.showToast({
  889. title: '已删除',
  890. icon: 'none'
  891. });
  892. },
  893. // 工作经历相关方法
  894. bindWorkStartTimeChange(e) {
  895. this.workForm.startTime = e.detail.value;
  896. },
  897. bindWorkEndTimeChange(e) {
  898. this.workForm.endTime = e.detail.value;
  899. },
  900. saveWork() {
  901. if (!this.workForm.startTime) {
  902. uni.showToast({
  903. title: '请选择开始时间',
  904. icon: 'none'
  905. });
  906. return;
  907. }
  908. if (!this.workForm.endTime) {
  909. uni.showToast({
  910. title: '请选择结束时间',
  911. icon: 'none'
  912. });
  913. return;
  914. }
  915. if (!this.workForm.companyName) {
  916. uni.showToast({
  917. title: '请输入单位名称',
  918. icon: 'none'
  919. });
  920. return;
  921. }
  922. if (!this.workForm.department) {
  923. uni.showToast({
  924. title: '请输入任职部门',
  925. icon: 'none'
  926. });
  927. return;
  928. }
  929. if (!this.workForm.position) {
  930. uni.showToast({
  931. title: '请输入担任职务',
  932. icon: 'none'
  933. });
  934. return;
  935. }
  936. if (this.isEditingWork) {
  937. this.workList[this.editingWorkIndex] = {...this.workForm};
  938. uni.showToast({
  939. title: '修改成功',
  940. icon: 'success'
  941. });
  942. this.isEditingWork = false;
  943. this.editingWorkIndex = -1;
  944. } else {
  945. this.workList.push({...this.workForm});
  946. uni.showToast({
  947. title: '添加成功',
  948. icon: 'success'
  949. });
  950. }
  951. this.workForm = {
  952. startTime: '',
  953. endTime: '',
  954. companyName: '',
  955. department: '',
  956. employeeCount: '',
  957. position: '',
  958. monthlySalary: '',
  959. supervisor: '',
  960. supervisorPhone: ''
  961. };
  962. },
  963. editWork(index) {
  964. this.isEditingWork = true;
  965. this.editingWorkIndex = index;
  966. this.workForm = {...this.workList[index]};
  967. uni.pageScrollTo({
  968. selector: '.work-form',
  969. duration: 300
  970. });
  971. },
  972. cancelEditWork() {
  973. this.isEditingWork = false;
  974. this.editingWorkIndex = -1;
  975. this.workForm = {
  976. startTime: '',
  977. endTime: '',
  978. companyName: '',
  979. department: '',
  980. employeeCount: '',
  981. position: '',
  982. monthlySalary: '',
  983. supervisor: '',
  984. supervisorPhone: ''
  985. };
  986. },
  987. deleteWork(index) {
  988. if (this.isEditingWork && this.editingWorkIndex === index) {
  989. this.cancelEditWork();
  990. }
  991. this.workList.splice(index, 1);
  992. uni.showToast({
  993. title: '已删除',
  994. icon: 'none'
  995. });
  996. },
  997. submitForm() {
  998. if (!this.formData.name) {
  999. uni.showToast({
  1000. title: '请输入姓名',
  1001. icon: 'none'
  1002. });
  1003. return;
  1004. }
  1005. if (this.genderIndex === -1) {
  1006. uni.showToast({
  1007. title: '请选择性别',
  1008. icon: 'none'
  1009. });
  1010. return;
  1011. }
  1012. if (this.formData.gender === '女' && this.threePeriodIndex === -1) {
  1013. uni.showToast({
  1014. title: '请选择是否为三期',
  1015. icon: 'none'
  1016. });
  1017. return;
  1018. }
  1019. if (!this.formData.emergencyContact) {
  1020. uni.showToast({
  1021. title: '请输入紧急联系人',
  1022. icon: 'none'
  1023. });
  1024. return;
  1025. }
  1026. if (!this.formData.emergencyPhone) {
  1027. uni.showToast({
  1028. title: '请输入紧急联系人电话',
  1029. icon: 'none'
  1030. });
  1031. return;
  1032. }
  1033. if (this.familyMembers.length === 0) {
  1034. uni.showToast({
  1035. title: '请至少添加一位家庭成员',
  1036. icon: 'none'
  1037. });
  1038. return;
  1039. }
  1040. // 添加应聘来源验证
  1041. if (this.formData.sourceType === 'school' && !this.formData.otherSchoolSource) {
  1042. uni.showToast({
  1043. title: '请填写学校来源',
  1044. icon: 'none'
  1045. });
  1046. return;
  1047. }
  1048. if (this.formData.sourceType === 'social') {
  1049. if (!this.formData.socialSource) {
  1050. uni.showToast({
  1051. title: '请选择社招来源',
  1052. icon: 'none'
  1053. });
  1054. return;
  1055. }
  1056. if (this.formData.socialSource === 'other' && !this.formData.otherSocialSource) {
  1057. uni.showToast({
  1058. title: '请填写其他社招来源',
  1059. icon: 'none'
  1060. });
  1061. return;
  1062. }
  1063. }
  1064. // 添加教育经历验证
  1065. if (this.educationList.length === 0) {
  1066. uni.showToast({
  1067. title: '请至少添加一项教育经历',
  1068. icon: 'none'
  1069. });
  1070. return;
  1071. }
  1072. // 添加工作经历验证
  1073. if (this.workList.length === 0) {
  1074. uni.showToast({
  1075. title: '请至少添加一项工作经历',
  1076. icon: 'none'
  1077. });
  1078. return;
  1079. }
  1080. // 构建提交数据结构
  1081. const submitData = {
  1082. tenant_id: 1,
  1083. user_id: JSON.parse(uni.getStorageSync('userInfo')).id, // 从存储中获取用户ID
  1084. personal_info: {
  1085. name: this.formData.name,
  1086. gender: this.formData.gender,
  1087. birth_date: this.formData.birthDate,
  1088. phone: this.formData.phone,
  1089. id_card: this.formData.idCard,
  1090. email: this.formData.email,
  1091. address: this.formData.currentAddress,
  1092. professional_skills: this.formData.skills ? this.formData.skills.split(',') : []
  1093. },
  1094. profile: {
  1095. // 女性特殊状态映射
  1096. female_status: this.formData.gender === '女' ?
  1097. (this.formData.threePeriod === '孕期' ? 1 :
  1098. this.formData.threePeriod === '产期' ? 2 :
  1099. this.formData.threePeriod === '哺乳期' ? 3 : 0) : 0,
  1100. // 婚姻状况映射
  1101. marital_status: this.formData.marriage === '未婚' ? 0 :
  1102. this.formData.marriage === '已婚' ? 1 :
  1103. this.formData.marriage === '离异' ? 2 :
  1104. this.formData.marriage === '丧偶' ? 3 : 0,
  1105. height: parseFloat(this.formData.height) || 0,
  1106. weight: parseFloat(this.formData.weight) || 0,
  1107. political_status: this.formData.political,
  1108. ethnicity: this.formData.ethnic,
  1109. native_place: this.formData.nativePlace,
  1110. household_location: this.formData.residence,
  1111. current_address: this.formData.currentAddress,
  1112. expected_salary: parseFloat(this.formData.expectedSalary) || 0,
  1113. emergency_contact: this.formData.emergencyContact,
  1114. emergency_phone: this.formData.emergencyPhone,
  1115. specialties: this.formData.hobby,
  1116. life_motto: this.formData.motto,
  1117. // 应聘来源映射
  1118. recruitment_source: this.formData.sourceType === 'social' ?
  1119. (this.formData.socialSource === 'BOSS' ? 2 :
  1120. this.formData.socialSource === 'zhilian' ? 3 :
  1121. this.formData.socialSource === 'liepin' ? 4 : 5) : 1,
  1122. recruitment_source_detail: this.formData.sourceType === 'social' ?
  1123. (this.formData.socialSource === 'other' ? this.formData.otherSocialSource :
  1124. this.formData.socialSource === 'BOSS' ? 'BOSS直聘' :
  1125. this.formData.socialSource === 'zhilian' ? '智联招聘' :
  1126. this.formData.socialSource === 'liepin' ? '猎聘' : '') :
  1127. this.formData.otherSchoolSource
  1128. },
  1129. // 教育经历映射
  1130. educations: this.educationList.map((edu, index) => ({
  1131. education_type: index === 0 ? 1 : 2, // 第一个为第一学历,第二个为最高学历
  1132. degree: this.mapDegreeToNumber(edu.degree),
  1133. start_date: edu.startTime,
  1134. end_date: edu.endTime,
  1135. school_name: edu.schoolName,
  1136. major: edu.major
  1137. })),
  1138. // 家庭成员映射
  1139. family_members: this.familyMembers.map(member => ({
  1140. relation: member.relation,
  1141. name: member.name,
  1142. workplace: member.workplaceOrAddress,
  1143. position: member.position,
  1144. phone: member.phone
  1145. })),
  1146. // 工作经历映射
  1147. work_experiences: this.workList.map(work => ({
  1148. start_date: work.startTime,
  1149. end_date: work.endTime,
  1150. company_name: work.companyName,//单位名称
  1151. department: work.department,//任职部门
  1152. company_size: work.employeeCount,//员工人数
  1153. position: work.position,//担任职务
  1154. monthly_salary: work.monthlySalary,//月薪
  1155. supervisor_name: work.supervisor,//直属上级
  1156. supervisor_phone: work.supervisorPhone//直属上级电话
  1157. })),
  1158. // 培训经历可以从技能和培训文本框中提取
  1159. /* trainings: this.formData.training ? [{
  1160. training_name: "培训经历",
  1161. description: this.formData.training
  1162. }] : [] */
  1163. };
  1164. console.log('提交的表单数据:', submitData);
  1165. // 显示加载提示
  1166. uni.showLoading({
  1167. title: '提交中...'
  1168. });
  1169. // 发送数据到服务器
  1170. uni.request({
  1171. url: `${apiBaseUrl}/wechat/user/profile/update`, // 根据实际API路径调整
  1172. method: 'POST',
  1173. data: submitData,
  1174. success: (res) => {
  1175. uni.hideLoading();
  1176. // 先清空所有错误信息
  1177. this.formErrors = {
  1178. name: '',
  1179. idCard: '',
  1180. phone: ''
  1181. };
  1182. // 根据接口返回判断验证是否通过
  1183. if (res.data.code === 2000) { // 假设0是成功状态码,根据实际情况调整
  1184. // 验证通过,进入下一步
  1185. this.currentStep++;
  1186. // 滚动到页面顶部
  1187. // uni.pageScrollTo({
  1188. // scrollTop: 0,
  1189. // duration: 300
  1190. // });
  1191. /* uni.switchTab({
  1192. url: '/pages/index/index'
  1193. }); */
  1194. uni.navigateTo({
  1195. url: '/pages/interview-notice/interview-notice'
  1196. });
  1197. } else {
  1198. // 验证失败,显示错误信息
  1199. let errorMsg = res.data.msg || '身份验证失败';
  1200. /*
  1201. // 根据错误类型设置对应字段的错误信息
  1202. if (res.data.code === 1001) { // 假设1001是姓名错误的状态码
  1203. this.formErrors.name = '姓名验证失败,请检查姓名是否正确';
  1204. } else if (res.data.code === 1002) { // 假设1002是身份证号错误的状态码
  1205. this.formErrors.idCard = '身份证号验证失败,请检查身份证号是否正确';
  1206. } else if (res.data.code === 1003) { // 假设1003是手机号错误的状态码
  1207. this.formErrors.phone = '手机号验证失败,请检查手机号是否正确';
  1208. } else { */
  1209. // 如果是其他错误,可能涉及多个字段,显示通用错误
  1210. uni.showToast({
  1211. title: errorMsg,
  1212. icon: 'none',
  1213. duration: 2000
  1214. });
  1215. /* } */
  1216. }
  1217. },
  1218. fail: (err) => {
  1219. uni.hideLoading();
  1220. uni.showToast({
  1221. title: '网络错误,请检查网络连接',
  1222. icon: 'none'
  1223. });
  1224. console.error('提交失败:', err);
  1225. }
  1226. });
  1227. },
  1228. // 学历映射辅助方法
  1229. mapDegreeToNumber(degreeText) {
  1230. const degreeMap = {
  1231. '高中': 1,
  1232. '中专': 1,
  1233. '大专': 2,
  1234. '本科': 3,
  1235. '硕士': 4,
  1236. '博士': 5
  1237. };
  1238. return degreeMap[degreeText] || 6; // 默认为其他
  1239. },
  1240. prevStep() {
  1241. if (this.currentStep > 1) {
  1242. this.currentStep--;
  1243. // 滚动到页面顶部
  1244. uni.pageScrollTo({
  1245. scrollTop: 0,
  1246. duration: 300
  1247. });
  1248. }
  1249. },
  1250. nextStep() {
  1251. // 验证当前步骤的必填项
  1252. if (!this.validateCurrentStep()) {
  1253. return;
  1254. }
  1255. // 如果是第一步,需要进行身份验证
  1256. if (this.currentStep === 1) {
  1257. // 清空之前的错误信息
  1258. this.formErrors = {
  1259. name: '',
  1260. idCard: '',
  1261. phone: ''
  1262. };
  1263. // 显示加载提示
  1264. uni.showLoading({
  1265. title: '身份验证中...'
  1266. });
  1267. // 调用身份验证接口
  1268. uni.request({
  1269. url: `${apiBaseUrl}/wechat/identity/verify`,
  1270. method: 'POST',
  1271. data: {
  1272. name: this.formData.name,
  1273. id_number: this.formData.idCard,
  1274. mobile: this.formData.phone
  1275. },
  1276. header: {
  1277. 'content-type': 'application/x-www-form-urlencoded'
  1278. },
  1279. success: (res) => {
  1280. uni.hideLoading();
  1281. // 根据接口返回判断验证是否通过
  1282. if (res.data.code === 200) { // 假设0是成功状态码,根据实际情况调整
  1283. // 验证通过,进入下一步
  1284. this.currentStep++;
  1285. // 滚动到页面顶部
  1286. uni.pageScrollTo({
  1287. scrollTop: 0,
  1288. duration: 300
  1289. });
  1290. } else {
  1291. // 验证失败,显示错误信息
  1292. let errorMsg = res.data.msg || '身份验证失败';
  1293. this.formErrors.name = '姓名验证失败,请检查姓名是否正确';
  1294. this.formErrors.idCard = '身份证号验证失败,请检查身份证号是否正确';
  1295. this.formErrors.phone = '手机号验证失败,请检查手机号是否正确';
  1296. }
  1297. },
  1298. fail: (err) => {
  1299. uni.hideLoading();
  1300. uni.showToast({
  1301. title: '网络错误,请检查网络连接',
  1302. icon: 'none',
  1303. duration: 2000
  1304. });
  1305. console.error('身份验证请求失败:', err);
  1306. }
  1307. });
  1308. } else {
  1309. // 不是第一步,直接进入下一步
  1310. if (this.currentStep < this.steps.length) {
  1311. this.currentStep++;
  1312. // 滚动到页面顶部
  1313. uni.pageScrollTo({
  1314. scrollTop: 0,
  1315. duration: 300
  1316. });
  1317. }
  1318. }
  1319. },
  1320. // 验证当前步骤的必填项
  1321. validateCurrentStep() {
  1322. switch (this.currentStep) {
  1323. case 1: // 个人基本信息
  1324. if (!this.formData.name) {
  1325. uni.showToast({
  1326. title: '请输入姓名',
  1327. icon: 'none'
  1328. });
  1329. return false;
  1330. }
  1331. if (this.genderIndex === -1) {
  1332. uni.showToast({
  1333. title: '请选择性别',
  1334. icon: 'none'
  1335. });
  1336. return false;
  1337. }
  1338. if (this.formData.gender === '女' && this.threePeriodIndex === -1) {
  1339. uni.showToast({
  1340. title: '请选择是否为三期',
  1341. icon: 'none'
  1342. });
  1343. return false;
  1344. }
  1345. return true;
  1346. case 2: // 紧急联系人信息
  1347. if (!this.formData.emergencyContact) {
  1348. uni.showToast({
  1349. title: '请输入紧急联系人',
  1350. icon: 'none'
  1351. });
  1352. return false;
  1353. }
  1354. if (!this.formData.emergencyPhone) {
  1355. uni.showToast({
  1356. title: '请输入紧急联系人电话',
  1357. icon: 'none'
  1358. });
  1359. return false;
  1360. }
  1361. return true;
  1362. case 3: // 家庭成员信息
  1363. if (this.familyMembers.length === 0) {
  1364. uni.showToast({
  1365. title: '请至少添加一位家庭成员',
  1366. icon: 'none'
  1367. });
  1368. return false;
  1369. }
  1370. return true;
  1371. case 4: // 应聘来源
  1372. if (this.formData.sourceType === 'school' && !this.formData.otherSchoolSource) {
  1373. uni.showToast({
  1374. title: '请填写学校来源',
  1375. icon: 'none'
  1376. });
  1377. return false;
  1378. }
  1379. if (this.formData.sourceType === 'social') {
  1380. if (!this.formData.socialSource) {
  1381. uni.showToast({
  1382. title: '请选择社招来源',
  1383. icon: 'none'
  1384. });
  1385. return false;
  1386. }
  1387. if (this.formData.socialSource === 'other' && !this.formData.otherSocialSource) {
  1388. uni.showToast({
  1389. title: '请填写其他社招来源',
  1390. icon: 'none'
  1391. });
  1392. return false;
  1393. }
  1394. }
  1395. return true;
  1396. case 5: // 教育经历
  1397. if (this.educationList.length === 0) {
  1398. uni.showToast({
  1399. title: '请至少添加一项教育经历',
  1400. icon: 'none'
  1401. });
  1402. return false;
  1403. }
  1404. return true;
  1405. case 6: // 专业技能
  1406. // 专业技能可以选填
  1407. return true;
  1408. case 7: // 培训经历
  1409. // 培训经历可以选填
  1410. return true;
  1411. case 8: // 工作经历
  1412. if (this.workList.length === 0) {
  1413. uni.showToast({
  1414. title: '请至少添加一项工作经历',
  1415. icon: 'none'
  1416. });
  1417. return false;
  1418. }
  1419. return true;
  1420. default:
  1421. return true;
  1422. }
  1423. },
  1424. // Add method to fetch user data
  1425. fetchUserData() {
  1426. this.isLoading = true;
  1427. // Get openid from storage
  1428. const userInfo = uni.getStorageSync('userInfo') ? JSON.parse(uni.getStorageSync('userInfo')) : {};
  1429. const openid = userInfo.openid;
  1430. if (!openid) {
  1431. uni.showToast({
  1432. title: '用户信息获取失败,请重新登录',
  1433. icon: 'none'
  1434. });
  1435. this.isLoading = false;
  1436. return;
  1437. }
  1438. uni.request({
  1439. url: `${apiBaseUrl}/api/wechat/user/get_full_info?tenant_id=1&openid=${openid}`,
  1440. method: 'GET',
  1441. success: (res) => {
  1442. // 无论结果如何,都保持承诺书显示状态
  1443. this.showPromiseModal = true;
  1444. /* if (res.data.code === 2000) { */
  1445. // Successfully fetched data
  1446. this.populateFormData(res.data.data);
  1447. /* } else {
  1448. uni.showToast({
  1449. title: res.data.msg || '获取用户信息失败',
  1450. icon: 'none'
  1451. });
  1452. } */
  1453. },
  1454. fail: (err) => {
  1455. /* console.error('获取用户信息失败:', err);
  1456. uni.showToast({
  1457. title: '网络错误,请检查网络连接',
  1458. icon: 'none'
  1459. }); */
  1460. },
  1461. complete: () => {
  1462. this.isLoading = false;
  1463. }
  1464. });
  1465. },
  1466. // Add method to populate form data with fetched data
  1467. populateFormData(data) {
  1468. const { user_info, profile, educations, work_experiences, family_members } = data;
  1469. // Populate basic user info
  1470. if (user_info) {
  1471. this.formData.name = user_info.name || '';
  1472. this.formData.gender = user_info.gender_text || '';
  1473. this.genderIndex = this.genderOptions.findIndex(item => item === this.formData.gender);
  1474. this.formData.idCard = user_info.id_card || '';
  1475. this.formData.phone = user_info.phone || '';
  1476. this.formData.email = user_info.email || '';
  1477. }
  1478. // Populate profile data
  1479. if (profile) {
  1480. // Set political status
  1481. this.formData.political = profile.political_status || '';
  1482. this.politicalIndex = this.politicalOptions.findIndex(item => item === this.formData.political);
  1483. // Set ethnic
  1484. this.formData.ethnic = profile.ethnicity || '';
  1485. this.ethnicIndex = this.ethnicOptions.findIndex(item => item === this.formData.ethnic);
  1486. // Set height and weight
  1487. this.formData.height = profile.height || '';
  1488. this.formData.weight = profile.weight || '';
  1489. // Set native place and residence
  1490. this.formData.nativePlace = profile.native_place || '';
  1491. this.formData.residence = profile.household_location || '';
  1492. // Set current address
  1493. this.formData.currentAddress = profile.current_address || '';
  1494. // Set marriage status
  1495. this.formData.marriage = profile.marital_status_text || '';
  1496. this.marriageIndex = this.marriageOptions.findIndex(item => item === this.formData.marriage);
  1497. // Set three period status for female
  1498. if (this.formData.gender === '女' && profile.female_status !== undefined) {
  1499. const femaleStatusMap = {0: '无', 1: '孕期', 2: '产期', 3: '哺乳期'};
  1500. this.formData.threePeriod = femaleStatusMap[profile.female_status] || '无';
  1501. this.threePeriodIndex = this.threePeriodOptions.findIndex(item => item === this.formData.threePeriod);
  1502. }
  1503. // Set expected salary
  1504. this.formData.expectedSalary = profile.expected_salary || '';
  1505. // Set emergency contact
  1506. this.formData.emergencyContact = profile.emergency_contact || '';
  1507. this.formData.emergencyPhone = profile.emergency_phone || '';
  1508. // Set hobby and motto
  1509. this.formData.hobby = profile.specialties || '';
  1510. this.formData.motto = profile.life_motto || '';
  1511. // Set recruitment source
  1512. const sourceTypeMap = {
  1513. 1: 'school',
  1514. 2: 'social',
  1515. 3: 'social',
  1516. 4: 'social',
  1517. 5: 'social'
  1518. };
  1519. const socialSourceMap = {
  1520. 2: 'BOSS',
  1521. 3: 'zhilian',
  1522. 4: 'liepin',
  1523. 5: 'other'
  1524. };
  1525. this.formData.sourceType = sourceTypeMap[profile.recruitment_source] || 'social';
  1526. if (this.formData.sourceType === 'social') {
  1527. this.formData.socialSource = socialSourceMap[profile.recruitment_source] || '';
  1528. if (this.formData.socialSource === 'other') {
  1529. this.formData.otherSocialSource = profile.recruitment_source_detail || '';
  1530. }
  1531. } else if (this.formData.sourceType === 'school') {
  1532. this.formData.otherSchoolSource = profile.recruitment_source_detail || '';
  1533. }
  1534. }
  1535. // Populate educations data
  1536. if (educations && educations.length > 0) {
  1537. this.educationList = educations.map(edu => {
  1538. const degreeMap = {
  1539. 1: '高中',
  1540. 2: '大专',
  1541. 3: '本科',
  1542. 4: '硕士',
  1543. 5: '博士'
  1544. };
  1545. return {
  1546. startTime: edu.start_date || '',
  1547. endTime: edu.end_date || '',
  1548. schoolName: edu.school_name || '',
  1549. major: edu.major || '',
  1550. degree: degreeMap[edu.degree] || ''
  1551. };
  1552. });
  1553. }
  1554. // Populate work experience data
  1555. if (work_experiences && work_experiences.length > 0) {
  1556. this.workList = work_experiences.map(work => {
  1557. return {
  1558. startTime: work.start_date || '',
  1559. endTime: work.end_date || '',
  1560. companyName: work.company_name || '',
  1561. department: work.department || '',
  1562. employeeCount: work.company_size || '',
  1563. position: work.position || '',
  1564. monthlySalary: work.monthly_salary || '',
  1565. supervisor: work.supervisor_name || '',
  1566. supervisorPhone: work.supervisor_phone || ''
  1567. };
  1568. });
  1569. }
  1570. // Populate family members data
  1571. if (family_members && family_members.length > 0) {
  1572. this.familyMembers = family_members.map(member => {
  1573. return {
  1574. relation: member.relation || '',
  1575. name: member.name || '',
  1576. workplaceOrAddress: member.workplace || '',
  1577. position: member.position || '',
  1578. phone: member.phone || ''
  1579. };
  1580. });
  1581. }
  1582. // 移除这段代码,确保承诺书始终显示
  1583. // if (user_info && user_info.is_profile_complete) {
  1584. // this.showPromiseModal = false;
  1585. // }
  1586. },
  1587. },
  1588. // 添加监听器来清除错误信息
  1589. watch: {
  1590. 'formData.name': function(newVal) {
  1591. if (newVal && this.formErrors.name) {
  1592. this.formErrors.name = '';
  1593. }
  1594. },
  1595. 'formData.idCard': function(newVal) {
  1596. if (newVal && this.formErrors.idCard) {
  1597. this.formErrors.idCard = '';
  1598. }
  1599. },
  1600. 'formData.phone': function(newVal) {
  1601. if (newVal && this.formErrors.phone) {
  1602. this.formErrors.phone = '';
  1603. }
  1604. }
  1605. },
  1606. }
  1607. </script>
  1608. <style>
  1609. .personal-container {
  1610. padding: 20rpx;
  1611. }
  1612. .form-title {
  1613. font-size: 36rpx;
  1614. font-weight: bold;
  1615. text-align: center;
  1616. margin-bottom: 30rpx;
  1617. }
  1618. .form-container {
  1619. background-color: #fff;
  1620. border-radius: 10rpx;
  1621. padding: 20rpx;
  1622. }
  1623. .section-title {
  1624. font-size: 32rpx;
  1625. font-weight: bold;
  1626. margin: 30rpx 0 20rpx 10rpx;
  1627. color: #333;
  1628. border-left: 4rpx solid #007AFF;
  1629. padding-left: 15rpx;
  1630. }
  1631. .form-row {
  1632. display: flex;
  1633. flex-direction: row;
  1634. margin-bottom: 20rpx;
  1635. flex-wrap: wrap;
  1636. }
  1637. .form-item {
  1638. flex: 1;
  1639. min-width: 300rpx;
  1640. margin: 10rpx;
  1641. border-bottom: 1px solid #eee;
  1642. padding-bottom: 10rpx;
  1643. }
  1644. .label {
  1645. font-size: 28rpx;
  1646. color: #333;
  1647. margin-right: 10rpx;
  1648. display: block;
  1649. margin-bottom: 10rpx;
  1650. }
  1651. input {
  1652. font-size: 28rpx;
  1653. height: 60rpx;
  1654. }
  1655. .picker-text {
  1656. font-size: 28rpx;
  1657. height: 60rpx;
  1658. line-height: 60rpx;
  1659. color: #666;
  1660. }
  1661. .submit-btn {
  1662. margin-top: 40rpx;
  1663. background-color: #007AFF;
  1664. color: #fff;
  1665. }
  1666. .family-members-list {
  1667. margin-top: 20rpx;
  1668. }
  1669. .family-member-item {
  1670. background-color: #f8f8f8;
  1671. border-radius: 8rpx;
  1672. padding: 20rpx;
  1673. margin-bottom: 20rpx;
  1674. }
  1675. .family-member-header {
  1676. display: flex;
  1677. justify-content: space-between;
  1678. align-items: center;
  1679. margin-bottom: 15rpx;
  1680. border-bottom: 1px solid #eee;
  1681. padding-bottom: 10rpx;
  1682. }
  1683. .family-member-title {
  1684. font-size: 30rpx;
  1685. font-weight: bold;
  1686. color: #333;
  1687. }
  1688. .family-member-actions {
  1689. display: flex;
  1690. gap: 20rpx;
  1691. }
  1692. .family-member-edit {
  1693. font-size: 26rpx;
  1694. color: #1890ff;
  1695. }
  1696. .family-member-delete {
  1697. font-size: 26rpx;
  1698. color: #ff4d4f;
  1699. }
  1700. .form-subtitle {
  1701. font-size: 28rpx;
  1702. font-weight: bold;
  1703. margin-bottom: 20rpx;
  1704. display: flex;
  1705. justify-content: space-between;
  1706. align-items: center;
  1707. }
  1708. .cancel-edit {
  1709. font-size: 26rpx;
  1710. color: #999;
  1711. font-weight: normal;
  1712. }
  1713. .family-member-content {
  1714. padding: 10rpx 0;
  1715. }
  1716. .family-member-row {
  1717. display: flex;
  1718. margin-bottom: 10rpx;
  1719. }
  1720. .family-member-label {
  1721. font-size: 26rpx;
  1722. color: #666;
  1723. width: 200rpx;
  1724. }
  1725. .family-member-value {
  1726. font-size: 26rpx;
  1727. color: #333;
  1728. flex: 1;
  1729. }
  1730. .family-member-form {
  1731. background-color: #fff;
  1732. border-radius: 8rpx;
  1733. padding: 20rpx;
  1734. margin-top: 20rpx;
  1735. }
  1736. .form-row button-row {
  1737. display: flex;
  1738. justify-content: center;
  1739. margin-top: 20rpx;
  1740. }
  1741. .form-item button-container {
  1742. display: flex;
  1743. flex-direction: column;
  1744. align-items: center;
  1745. }
  1746. .circle-btn {
  1747. width: 40rpx;
  1748. height: 40rpx;
  1749. border-radius: 50%;
  1750. background-color: #007AFF;
  1751. display: flex;
  1752. justify-content: center;
  1753. align-items: center;
  1754. margin-bottom: 10rpx;
  1755. }
  1756. .btn-icon {
  1757. font-size: 32rpx;
  1758. color: #fff;
  1759. }
  1760. .btn-text {
  1761. font-size: 28rpx;
  1762. color: #333;
  1763. }
  1764. /* 添加圆形按钮相关样式 */
  1765. .button-row {
  1766. justify-content: center;
  1767. margin-top: 30rpx;
  1768. }
  1769. .button-container {
  1770. display: flex;
  1771. flex-direction: column;
  1772. align-items: center;
  1773. border-bottom: none;
  1774. min-width: auto;
  1775. }
  1776. .circle-btn {
  1777. width: 100rpx;
  1778. height: 100rpx;
  1779. border-radius: 50%;
  1780. padding: 0;
  1781. display: flex;
  1782. align-items: center;
  1783. justify-content: center;
  1784. background-color: #52c41a;
  1785. box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.1);
  1786. margin: 0;
  1787. }
  1788. .btn-icon {
  1789. font-size: 50rpx;
  1790. color: #fff;
  1791. line-height: 1;
  1792. }
  1793. .btn-text {
  1794. font-size: 24rpx;
  1795. color: #666;
  1796. margin-top: 10rpx;
  1797. }
  1798. /* 编辑状态下的按钮颜色 */
  1799. .circle-btn.editing {
  1800. background-color: #1890ff;
  1801. }
  1802. /* 移除原来的添加按钮样式 */
  1803. .add-member-btn {
  1804. display: none;
  1805. }
  1806. /* 应聘来源样式 */
  1807. .source-container {
  1808. background-color: #fff;
  1809. border-radius: 10rpx;
  1810. padding: 20rpx;
  1811. margin-bottom: 30rpx;
  1812. }
  1813. .source-row {
  1814. display: flex;
  1815. margin-bottom: 20rpx;
  1816. align-items: flex-start;
  1817. }
  1818. .source-label {
  1819. width: 120rpx;
  1820. font-size: 28rpx;
  1821. color: #333;
  1822. padding-top: 6rpx;
  1823. }
  1824. .source-options {
  1825. flex: 1;
  1826. display: flex;
  1827. flex-wrap: wrap;
  1828. }
  1829. .source-option {
  1830. display: flex;
  1831. align-items: center;
  1832. margin-right: 30rpx;
  1833. margin-bottom: 15rpx;
  1834. }
  1835. .source-option text {
  1836. font-size: 28rpx;
  1837. margin-left: 8rpx;
  1838. }
  1839. .other-option {
  1840. flex-basis: 100%;
  1841. margin-top: 10rpx;
  1842. }
  1843. .other-option input {
  1844. border-bottom: 1px solid #eee;
  1845. width: 300rpx;
  1846. margin-left: 10rpx;
  1847. font-size: 28rpx;
  1848. }
  1849. /* 教育经历样式 */
  1850. .education-list {
  1851. margin-top: 20rpx;
  1852. }
  1853. .education-item {
  1854. background-color: #f8f8f8;
  1855. border-radius: 8rpx;
  1856. padding: 20rpx;
  1857. margin-bottom: 20rpx;
  1858. }
  1859. .education-header {
  1860. display: flex;
  1861. justify-content: space-between;
  1862. align-items: center;
  1863. margin-bottom: 15rpx;
  1864. border-bottom: 1px solid #eee;
  1865. padding-bottom: 10rpx;
  1866. }
  1867. .education-title {
  1868. font-size: 30rpx;
  1869. font-weight: bold;
  1870. color: #333;
  1871. }
  1872. .education-actions {
  1873. display: flex;
  1874. gap: 20rpx;
  1875. }
  1876. .education-edit {
  1877. font-size: 26rpx;
  1878. color: #1890ff;
  1879. }
  1880. .education-delete {
  1881. font-size: 26rpx;
  1882. color: #ff4d4f;
  1883. }
  1884. .education-content {
  1885. padding: 10rpx 0;
  1886. }
  1887. .education-row {
  1888. display: flex;
  1889. margin-bottom: 10rpx;
  1890. }
  1891. .education-label {
  1892. font-size: 26rpx;
  1893. color: #666;
  1894. width: 150rpx;
  1895. }
  1896. .education-value {
  1897. font-size: 26rpx;
  1898. color: #333;
  1899. flex: 1;
  1900. }
  1901. .education-form {
  1902. background-color: #fff;
  1903. border-radius: 8rpx;
  1904. padding: 20rpx;
  1905. margin-top: 20rpx;
  1906. }
  1907. .date-range {
  1908. display: flex;
  1909. align-items: center;
  1910. justify-content: space-around;
  1911. }
  1912. .date-separator {
  1913. margin: 0 10rpx;
  1914. color: #666;
  1915. }
  1916. /* 专业技能和培训样式 */
  1917. .skills-container, .training-container {
  1918. background-color: #fff;
  1919. border-radius: 10rpx;
  1920. padding: 20rpx;
  1921. margin-bottom: 20rpx;
  1922. }
  1923. .skills-textarea, .training-textarea {
  1924. width: 100%;
  1925. height: 200rpx;
  1926. font-size: 28rpx;
  1927. line-height: 1.5;
  1928. padding: 10rpx;
  1929. box-sizing: border-box;
  1930. border: 1px solid #eee;
  1931. border-radius: 6rpx;
  1932. }
  1933. /* 工作经历样式 */
  1934. .work-list {
  1935. margin-top: 20rpx;
  1936. }
  1937. .work-item {
  1938. background-color: #f8f8f8;
  1939. border-radius: 8rpx;
  1940. padding: 20rpx;
  1941. margin-bottom: 20rpx;
  1942. }
  1943. .work-header {
  1944. display: flex;
  1945. justify-content: space-between;
  1946. align-items: center;
  1947. margin-bottom: 15rpx;
  1948. border-bottom: 1px solid #eee;
  1949. padding-bottom: 10rpx;
  1950. }
  1951. .work-title {
  1952. font-size: 30rpx;
  1953. font-weight: bold;
  1954. color: #333;
  1955. }
  1956. .work-actions {
  1957. display: flex;
  1958. gap: 20rpx;
  1959. }
  1960. .work-edit {
  1961. font-size: 26rpx;
  1962. color: #1890ff;
  1963. }
  1964. .work-delete {
  1965. font-size: 26rpx;
  1966. color: #ff4d4f;
  1967. }
  1968. .work-content {
  1969. padding: 10rpx 0;
  1970. }
  1971. .work-row {
  1972. display: flex;
  1973. margin-bottom: 10rpx;
  1974. }
  1975. .work-label {
  1976. font-size: 26rpx;
  1977. color: #666;
  1978. width: 150rpx;
  1979. }
  1980. .work-value {
  1981. font-size: 26rpx;
  1982. color: #333;
  1983. flex: 1;
  1984. }
  1985. .work-form {
  1986. background-color: #fff;
  1987. border-radius: 8rpx;
  1988. padding: 20rpx;
  1989. margin-top: 20rpx;
  1990. }
  1991. /* 步骤指示器样式 */
  1992. .steps-indicator {
  1993. display: flex;
  1994. justify-content: space-between;
  1995. margin-bottom: 30rpx;
  1996. padding: 20rpx;
  1997. background-color: #fff;
  1998. border-radius: 10rpx;
  1999. overflow-x: auto;
  2000. }
  2001. .step-item {
  2002. display: flex;
  2003. flex-direction: column;
  2004. align-items: center;
  2005. position: relative;
  2006. min-width: 120rpx;
  2007. }
  2008. .step-item:not(:last-child)::after {
  2009. content: '';
  2010. position: absolute;
  2011. top: 20rpx;
  2012. right: -50%;
  2013. width: 100%;
  2014. height: 2rpx;
  2015. background-color: #ddd;
  2016. z-index: 1;
  2017. }
  2018. .step-item.active:not(:last-child)::after {
  2019. background-color: #007AFF;
  2020. }
  2021. .step-number {
  2022. width: 40rpx;
  2023. height: 40rpx;
  2024. border-radius: 50%;
  2025. background-color: #ddd;
  2026. color: #fff;
  2027. display: flex;
  2028. justify-content: center;
  2029. align-items: center;
  2030. font-size: 24rpx;
  2031. margin-bottom: 10rpx;
  2032. position: relative;
  2033. z-index: 2;
  2034. }
  2035. .step-item.active .step-number {
  2036. background-color: #007AFF;
  2037. }
  2038. .step-item.current .step-number {
  2039. background-color: #007AFF;
  2040. box-shadow: 0 0 0 4rpx rgba(0, 122, 255, 0.2);
  2041. }
  2042. .step-name {
  2043. font-size: 22rpx;
  2044. color: #999;
  2045. text-align: center;
  2046. }
  2047. .step-item.active .step-name {
  2048. color: #333;
  2049. }
  2050. .step-item.current .step-name {
  2051. color: #007AFF;
  2052. font-weight: bold;
  2053. }
  2054. /* 导航按钮样式 */
  2055. .nav-buttons {
  2056. display: flex;
  2057. justify-content: space-between;
  2058. margin-top: 40rpx;
  2059. padding: 0 20rpx;
  2060. }
  2061. .nav-btn {
  2062. flex: 1;
  2063. margin: 0 10rpx;
  2064. height: 80rpx;
  2065. line-height: 80rpx;
  2066. text-align: center;
  2067. border-radius: 40rpx;
  2068. font-size: 28rpx;
  2069. }
  2070. .prev-btn {
  2071. background-color: #f0f0f0;
  2072. color: #666;
  2073. }
  2074. .next-btn {
  2075. background-color: #007AFF;
  2076. color: #fff;
  2077. }
  2078. .submit-btn {
  2079. flex: 1;
  2080. margin: 0 10rpx;
  2081. height: 80rpx;
  2082. line-height: 80rpx;
  2083. text-align: center;
  2084. border-radius: 40rpx;
  2085. font-size: 28rpx;
  2086. background-color: #52c41a;
  2087. color: #fff;
  2088. }
  2089. /* 确认提交页样式 */
  2090. .confirm-container {
  2091. background-color: #fff;
  2092. border-radius: 10rpx;
  2093. padding: 20rpx;
  2094. margin-bottom: 30rpx;
  2095. }
  2096. .confirm-message {
  2097. padding: 20rpx;
  2098. background-color: #f6f6f6;
  2099. border-radius: 8rpx;
  2100. margin-bottom: 20rpx;
  2101. }
  2102. .info-summary {
  2103. padding: 20rpx;
  2104. }
  2105. .summary-item {
  2106. display: flex;
  2107. margin-bottom: 15rpx;
  2108. }
  2109. .summary-label {
  2110. width: 150rpx;
  2111. font-size: 28rpx;
  2112. color: #666;
  2113. }
  2114. .summary-value {
  2115. flex: 1;
  2116. font-size: 28rpx;
  2117. color: #333;
  2118. }
  2119. .input-error {
  2120. border-bottom: 1px solid #ff4d4f !important;
  2121. }
  2122. .error-message {
  2123. color: #ff4d4f;
  2124. font-size: 24rpx;
  2125. margin-top: 6rpx;
  2126. display: block;
  2127. }
  2128. /* 添加承诺书弹框样式 */
  2129. .promise-modal {
  2130. position: fixed;
  2131. top: 0;
  2132. left: 0;
  2133. right: 0;
  2134. bottom: 0;
  2135. background-color: rgba(0, 0, 0, 0.5);
  2136. z-index: 999;
  2137. display: flex;
  2138. justify-content: center;
  2139. align-items: center;
  2140. }
  2141. .promise-content {
  2142. width: 80%;
  2143. max-width: 600rpx;
  2144. background-color: #fff;
  2145. border-radius: 12rpx;
  2146. padding: 30rpx;
  2147. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
  2148. }
  2149. .promise-title {
  2150. font-size: 34rpx;
  2151. font-weight: bold;
  2152. text-align: center;
  2153. margin-bottom: 20rpx;
  2154. color: #333;
  2155. }
  2156. .promise-text {
  2157. height: 600rpx;
  2158. margin-bottom: 20rpx;
  2159. /* padding: 20rpx; */
  2160. background-color: #f8f8f8;
  2161. border-radius: 8rpx;
  2162. font-size: 28rpx;
  2163. line-height: 1.6;
  2164. color: #333;
  2165. }
  2166. .promise-checkbox {
  2167. display: flex;
  2168. align-items: center;
  2169. margin-bottom: 30rpx;
  2170. padding: 0 10rpx;
  2171. }
  2172. .promise-checkbox text {
  2173. font-size: 28rpx;
  2174. margin-left: 10rpx;
  2175. color: #333;
  2176. }
  2177. .promise-buttons {
  2178. display: flex;
  2179. justify-content: center;
  2180. }
  2181. .promise-btn {
  2182. width: 200rpx;
  2183. height: 80rpx;
  2184. line-height: 80rpx;
  2185. text-align: center;
  2186. border-radius: 40rpx;
  2187. font-size: 28rpx;
  2188. }
  2189. .confirm-btn {
  2190. background-color: #007AFF;
  2191. color: #fff;
  2192. }
  2193. .confirm-btn[disabled] {
  2194. background-color: #cccccc;
  2195. color: #ffffff;
  2196. }
  2197. /* Loading indicator styles */
  2198. .loading-container {
  2199. position: fixed;
  2200. top: 0;
  2201. left: 0;
  2202. right: 0;
  2203. bottom: 0;
  2204. background-color: rgba(255, 255, 255, 0.8);
  2205. display: flex;
  2206. flex-direction: column;
  2207. justify-content: center;
  2208. align-items: center;
  2209. z-index: 1000;
  2210. }
  2211. .loading-spinner {
  2212. width: 60rpx;
  2213. height: 60rpx;
  2214. border: 6rpx solid #f3f3f3;
  2215. border-top: 6rpx solid #007AFF;
  2216. border-radius: 50%;
  2217. animation: spin 1s linear infinite;
  2218. margin-bottom: 20rpx;
  2219. }
  2220. .loading-text {
  2221. font-size: 28rpx;
  2222. color: #666;
  2223. }
  2224. @keyframes spin {
  2225. 0% { transform: rotate(0deg); }
  2226. 100% { transform: rotate(360deg); }
  2227. }
  2228. </style>