Personal.vue 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479
  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. education: 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. /* if (res.data.code === 2000) { */
  1443. // Successfully fetched data
  1444. this.populateFormData(res.data.data);
  1445. /* } else {
  1446. uni.showToast({
  1447. title: res.data.msg || '获取用户信息失败',
  1448. icon: 'none'
  1449. });
  1450. } */
  1451. },
  1452. fail: (err) => {
  1453. /* console.error('获取用户信息失败:', err);
  1454. uni.showToast({
  1455. title: '网络错误,请检查网络连接',
  1456. icon: 'none'
  1457. }); */
  1458. },
  1459. complete: () => {
  1460. this.isLoading = false;
  1461. }
  1462. });
  1463. },
  1464. // Add method to populate form data with fetched data
  1465. populateFormData(data) {
  1466. const { user_info, profile, educations, work_experiences, family_members } = data;
  1467. // Populate basic user info
  1468. if (user_info) {
  1469. this.formData.name = user_info.name || '';
  1470. this.formData.gender = user_info.gender_text || '';
  1471. this.genderIndex = this.genderOptions.findIndex(item => item === this.formData.gender);
  1472. this.formData.idCard = user_info.id_card || '';
  1473. this.formData.phone = user_info.phone || '';
  1474. this.formData.email = user_info.email || '';
  1475. }
  1476. // Populate profile data
  1477. if (profile) {
  1478. // Set political status
  1479. this.formData.political = profile.political_status || '';
  1480. this.politicalIndex = this.politicalOptions.findIndex(item => item === this.formData.political);
  1481. // Set ethnic
  1482. this.formData.ethnic = profile.ethnicity || '';
  1483. this.ethnicIndex = this.ethnicOptions.findIndex(item => item === this.formData.ethnic);
  1484. // Set height and weight
  1485. this.formData.height = profile.height || '';
  1486. this.formData.weight = profile.weight || '';
  1487. // Set native place and residence
  1488. this.formData.nativePlace = profile.native_place || '';
  1489. this.formData.residence = profile.household_location || '';
  1490. // Set current address
  1491. this.formData.currentAddress = profile.current_address || '';
  1492. // Set marriage status
  1493. this.formData.marriage = profile.marital_status_text || '';
  1494. this.marriageIndex = this.marriageOptions.findIndex(item => item === this.formData.marriage);
  1495. // Set three period status for female
  1496. if (this.formData.gender === '女' && profile.female_status !== undefined) {
  1497. const femaleStatusMap = {0: '无', 1: '孕期', 2: '产期', 3: '哺乳期'};
  1498. this.formData.threePeriod = femaleStatusMap[profile.female_status] || '无';
  1499. this.threePeriodIndex = this.threePeriodOptions.findIndex(item => item === this.formData.threePeriod);
  1500. }
  1501. // Set expected salary
  1502. this.formData.expectedSalary = profile.expected_salary || '';
  1503. // Set emergency contact
  1504. this.formData.emergencyContact = profile.emergency_contact || '';
  1505. this.formData.emergencyPhone = profile.emergency_phone || '';
  1506. // Set hobby and motto
  1507. this.formData.hobby = profile.specialties || '';
  1508. this.formData.motto = profile.life_motto || '';
  1509. // Set recruitment source
  1510. const sourceTypeMap = {
  1511. 1: 'school',
  1512. 2: 'social',
  1513. 3: 'social',
  1514. 4: 'social',
  1515. 5: 'social'
  1516. };
  1517. const socialSourceMap = {
  1518. 2: 'BOSS',
  1519. 3: 'zhilian',
  1520. 4: 'liepin',
  1521. 5: 'other'
  1522. };
  1523. this.formData.sourceType = sourceTypeMap[profile.recruitment_source] || 'social';
  1524. if (this.formData.sourceType === 'social') {
  1525. this.formData.socialSource = socialSourceMap[profile.recruitment_source] || '';
  1526. if (this.formData.socialSource === 'other') {
  1527. this.formData.otherSocialSource = profile.recruitment_source_detail || '';
  1528. }
  1529. } else if (this.formData.sourceType === 'school') {
  1530. this.formData.otherSchoolSource = profile.recruitment_source_detail || '';
  1531. }
  1532. }
  1533. // Populate educations data
  1534. if (educations && educations.length > 0) {
  1535. this.educationList = educations.map(edu => {
  1536. const degreeMap = {
  1537. 1: '高中',
  1538. 2: '大专',
  1539. 3: '本科',
  1540. 4: '硕士',
  1541. 5: '博士'
  1542. };
  1543. return {
  1544. startTime: edu.start_date || '',
  1545. endTime: edu.end_date || '',
  1546. schoolName: edu.school_name || '',
  1547. major: edu.major || '',
  1548. degree: degreeMap[edu.degree] || ''
  1549. };
  1550. });
  1551. }
  1552. // Populate work experience data
  1553. if (work_experiences && work_experiences.length > 0) {
  1554. this.workList = work_experiences.map(work => {
  1555. return {
  1556. startTime: work.start_date || '',
  1557. endTime: work.end_date || '',
  1558. companyName: work.company_name || '',
  1559. department: work.department || '',
  1560. employeeCount: work.company_size || '',
  1561. position: work.position || '',
  1562. monthlySalary: work.monthly_salary || '',
  1563. supervisor: work.supervisor_name || '',
  1564. supervisorPhone: work.supervisor_phone || ''
  1565. };
  1566. });
  1567. }
  1568. // Populate family members data
  1569. if (family_members && family_members.length > 0) {
  1570. this.familyMembers = family_members.map(member => {
  1571. return {
  1572. relation: member.relation || '',
  1573. name: member.name || '',
  1574. workplaceOrAddress: member.workplace || '',
  1575. position: member.position || '',
  1576. phone: member.phone || ''
  1577. };
  1578. });
  1579. }
  1580. // If user profile is complete, we can skip the promise modal
  1581. if (user_info && user_info.is_profile_complete) {
  1582. this.showPromiseModal = false;
  1583. }
  1584. },
  1585. },
  1586. // 添加监听器来清除错误信息
  1587. watch: {
  1588. 'formData.name': function(newVal) {
  1589. if (newVal && this.formErrors.name) {
  1590. this.formErrors.name = '';
  1591. }
  1592. },
  1593. 'formData.idCard': function(newVal) {
  1594. if (newVal && this.formErrors.idCard) {
  1595. this.formErrors.idCard = '';
  1596. }
  1597. },
  1598. 'formData.phone': function(newVal) {
  1599. if (newVal && this.formErrors.phone) {
  1600. this.formErrors.phone = '';
  1601. }
  1602. }
  1603. },
  1604. }
  1605. </script>
  1606. <style>
  1607. .personal-container {
  1608. padding: 20rpx;
  1609. }
  1610. .form-title {
  1611. font-size: 36rpx;
  1612. font-weight: bold;
  1613. text-align: center;
  1614. margin-bottom: 30rpx;
  1615. }
  1616. .form-container {
  1617. background-color: #fff;
  1618. border-radius: 10rpx;
  1619. padding: 20rpx;
  1620. }
  1621. .section-title {
  1622. font-size: 32rpx;
  1623. font-weight: bold;
  1624. margin: 30rpx 0 20rpx 10rpx;
  1625. color: #333;
  1626. border-left: 4rpx solid #007AFF;
  1627. padding-left: 15rpx;
  1628. }
  1629. .form-row {
  1630. display: flex;
  1631. flex-direction: row;
  1632. margin-bottom: 20rpx;
  1633. flex-wrap: wrap;
  1634. }
  1635. .form-item {
  1636. flex: 1;
  1637. min-width: 300rpx;
  1638. margin: 10rpx;
  1639. border-bottom: 1px solid #eee;
  1640. padding-bottom: 10rpx;
  1641. }
  1642. .label {
  1643. font-size: 28rpx;
  1644. color: #333;
  1645. margin-right: 10rpx;
  1646. display: block;
  1647. margin-bottom: 10rpx;
  1648. }
  1649. input {
  1650. font-size: 28rpx;
  1651. height: 60rpx;
  1652. }
  1653. .picker-text {
  1654. font-size: 28rpx;
  1655. height: 60rpx;
  1656. line-height: 60rpx;
  1657. color: #666;
  1658. }
  1659. .submit-btn {
  1660. margin-top: 40rpx;
  1661. background-color: #007AFF;
  1662. color: #fff;
  1663. }
  1664. .family-members-list {
  1665. margin-top: 20rpx;
  1666. }
  1667. .family-member-item {
  1668. background-color: #f8f8f8;
  1669. border-radius: 8rpx;
  1670. padding: 20rpx;
  1671. margin-bottom: 20rpx;
  1672. }
  1673. .family-member-header {
  1674. display: flex;
  1675. justify-content: space-between;
  1676. align-items: center;
  1677. margin-bottom: 15rpx;
  1678. border-bottom: 1px solid #eee;
  1679. padding-bottom: 10rpx;
  1680. }
  1681. .family-member-title {
  1682. font-size: 30rpx;
  1683. font-weight: bold;
  1684. color: #333;
  1685. }
  1686. .family-member-actions {
  1687. display: flex;
  1688. gap: 20rpx;
  1689. }
  1690. .family-member-edit {
  1691. font-size: 26rpx;
  1692. color: #1890ff;
  1693. }
  1694. .family-member-delete {
  1695. font-size: 26rpx;
  1696. color: #ff4d4f;
  1697. }
  1698. .form-subtitle {
  1699. font-size: 28rpx;
  1700. font-weight: bold;
  1701. margin-bottom: 20rpx;
  1702. display: flex;
  1703. justify-content: space-between;
  1704. align-items: center;
  1705. }
  1706. .cancel-edit {
  1707. font-size: 26rpx;
  1708. color: #999;
  1709. font-weight: normal;
  1710. }
  1711. .family-member-content {
  1712. padding: 10rpx 0;
  1713. }
  1714. .family-member-row {
  1715. display: flex;
  1716. margin-bottom: 10rpx;
  1717. }
  1718. .family-member-label {
  1719. font-size: 26rpx;
  1720. color: #666;
  1721. width: 200rpx;
  1722. }
  1723. .family-member-value {
  1724. font-size: 26rpx;
  1725. color: #333;
  1726. flex: 1;
  1727. }
  1728. .family-member-form {
  1729. background-color: #fff;
  1730. border-radius: 8rpx;
  1731. padding: 20rpx;
  1732. margin-top: 20rpx;
  1733. }
  1734. .form-row button-row {
  1735. display: flex;
  1736. justify-content: center;
  1737. margin-top: 20rpx;
  1738. }
  1739. .form-item button-container {
  1740. display: flex;
  1741. flex-direction: column;
  1742. align-items: center;
  1743. }
  1744. .circle-btn {
  1745. width: 40rpx;
  1746. height: 40rpx;
  1747. border-radius: 50%;
  1748. background-color: #007AFF;
  1749. display: flex;
  1750. justify-content: center;
  1751. align-items: center;
  1752. margin-bottom: 10rpx;
  1753. }
  1754. .btn-icon {
  1755. font-size: 32rpx;
  1756. color: #fff;
  1757. }
  1758. .btn-text {
  1759. font-size: 28rpx;
  1760. color: #333;
  1761. }
  1762. /* 添加圆形按钮相关样式 */
  1763. .button-row {
  1764. justify-content: center;
  1765. margin-top: 30rpx;
  1766. }
  1767. .button-container {
  1768. display: flex;
  1769. flex-direction: column;
  1770. align-items: center;
  1771. border-bottom: none;
  1772. min-width: auto;
  1773. }
  1774. .circle-btn {
  1775. width: 100rpx;
  1776. height: 100rpx;
  1777. border-radius: 50%;
  1778. padding: 0;
  1779. display: flex;
  1780. align-items: center;
  1781. justify-content: center;
  1782. background-color: #52c41a;
  1783. box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.1);
  1784. margin: 0;
  1785. }
  1786. .btn-icon {
  1787. font-size: 50rpx;
  1788. color: #fff;
  1789. line-height: 1;
  1790. }
  1791. .btn-text {
  1792. font-size: 24rpx;
  1793. color: #666;
  1794. margin-top: 10rpx;
  1795. }
  1796. /* 编辑状态下的按钮颜色 */
  1797. .circle-btn.editing {
  1798. background-color: #1890ff;
  1799. }
  1800. /* 移除原来的添加按钮样式 */
  1801. .add-member-btn {
  1802. display: none;
  1803. }
  1804. /* 应聘来源样式 */
  1805. .source-container {
  1806. background-color: #fff;
  1807. border-radius: 10rpx;
  1808. padding: 20rpx;
  1809. margin-bottom: 30rpx;
  1810. }
  1811. .source-row {
  1812. display: flex;
  1813. margin-bottom: 20rpx;
  1814. align-items: flex-start;
  1815. }
  1816. .source-label {
  1817. width: 120rpx;
  1818. font-size: 28rpx;
  1819. color: #333;
  1820. padding-top: 6rpx;
  1821. }
  1822. .source-options {
  1823. flex: 1;
  1824. display: flex;
  1825. flex-wrap: wrap;
  1826. }
  1827. .source-option {
  1828. display: flex;
  1829. align-items: center;
  1830. margin-right: 30rpx;
  1831. margin-bottom: 15rpx;
  1832. }
  1833. .source-option text {
  1834. font-size: 28rpx;
  1835. margin-left: 8rpx;
  1836. }
  1837. .other-option {
  1838. flex-basis: 100%;
  1839. margin-top: 10rpx;
  1840. }
  1841. .other-option input {
  1842. border-bottom: 1px solid #eee;
  1843. width: 300rpx;
  1844. margin-left: 10rpx;
  1845. font-size: 28rpx;
  1846. }
  1847. /* 教育经历样式 */
  1848. .education-list {
  1849. margin-top: 20rpx;
  1850. }
  1851. .education-item {
  1852. background-color: #f8f8f8;
  1853. border-radius: 8rpx;
  1854. padding: 20rpx;
  1855. margin-bottom: 20rpx;
  1856. }
  1857. .education-header {
  1858. display: flex;
  1859. justify-content: space-between;
  1860. align-items: center;
  1861. margin-bottom: 15rpx;
  1862. border-bottom: 1px solid #eee;
  1863. padding-bottom: 10rpx;
  1864. }
  1865. .education-title {
  1866. font-size: 30rpx;
  1867. font-weight: bold;
  1868. color: #333;
  1869. }
  1870. .education-actions {
  1871. display: flex;
  1872. gap: 20rpx;
  1873. }
  1874. .education-edit {
  1875. font-size: 26rpx;
  1876. color: #1890ff;
  1877. }
  1878. .education-delete {
  1879. font-size: 26rpx;
  1880. color: #ff4d4f;
  1881. }
  1882. .education-content {
  1883. padding: 10rpx 0;
  1884. }
  1885. .education-row {
  1886. display: flex;
  1887. margin-bottom: 10rpx;
  1888. }
  1889. .education-label {
  1890. font-size: 26rpx;
  1891. color: #666;
  1892. width: 150rpx;
  1893. }
  1894. .education-value {
  1895. font-size: 26rpx;
  1896. color: #333;
  1897. flex: 1;
  1898. }
  1899. .education-form {
  1900. background-color: #fff;
  1901. border-radius: 8rpx;
  1902. padding: 20rpx;
  1903. margin-top: 20rpx;
  1904. }
  1905. .date-range {
  1906. display: flex;
  1907. align-items: center;
  1908. justify-content: space-around;
  1909. }
  1910. .date-separator {
  1911. margin: 0 10rpx;
  1912. color: #666;
  1913. }
  1914. /* 专业技能和培训样式 */
  1915. .skills-container, .training-container {
  1916. background-color: #fff;
  1917. border-radius: 10rpx;
  1918. padding: 20rpx;
  1919. margin-bottom: 20rpx;
  1920. }
  1921. .skills-textarea, .training-textarea {
  1922. width: 100%;
  1923. height: 200rpx;
  1924. font-size: 28rpx;
  1925. line-height: 1.5;
  1926. padding: 10rpx;
  1927. box-sizing: border-box;
  1928. border: 1px solid #eee;
  1929. border-radius: 6rpx;
  1930. }
  1931. /* 工作经历样式 */
  1932. .work-list {
  1933. margin-top: 20rpx;
  1934. }
  1935. .work-item {
  1936. background-color: #f8f8f8;
  1937. border-radius: 8rpx;
  1938. padding: 20rpx;
  1939. margin-bottom: 20rpx;
  1940. }
  1941. .work-header {
  1942. display: flex;
  1943. justify-content: space-between;
  1944. align-items: center;
  1945. margin-bottom: 15rpx;
  1946. border-bottom: 1px solid #eee;
  1947. padding-bottom: 10rpx;
  1948. }
  1949. .work-title {
  1950. font-size: 30rpx;
  1951. font-weight: bold;
  1952. color: #333;
  1953. }
  1954. .work-actions {
  1955. display: flex;
  1956. gap: 20rpx;
  1957. }
  1958. .work-edit {
  1959. font-size: 26rpx;
  1960. color: #1890ff;
  1961. }
  1962. .work-delete {
  1963. font-size: 26rpx;
  1964. color: #ff4d4f;
  1965. }
  1966. .work-content {
  1967. padding: 10rpx 0;
  1968. }
  1969. .work-row {
  1970. display: flex;
  1971. margin-bottom: 10rpx;
  1972. }
  1973. .work-label {
  1974. font-size: 26rpx;
  1975. color: #666;
  1976. width: 150rpx;
  1977. }
  1978. .work-value {
  1979. font-size: 26rpx;
  1980. color: #333;
  1981. flex: 1;
  1982. }
  1983. .work-form {
  1984. background-color: #fff;
  1985. border-radius: 8rpx;
  1986. padding: 20rpx;
  1987. margin-top: 20rpx;
  1988. }
  1989. /* 步骤指示器样式 */
  1990. .steps-indicator {
  1991. display: flex;
  1992. justify-content: space-between;
  1993. margin-bottom: 30rpx;
  1994. padding: 20rpx;
  1995. background-color: #fff;
  1996. border-radius: 10rpx;
  1997. overflow-x: auto;
  1998. }
  1999. .step-item {
  2000. display: flex;
  2001. flex-direction: column;
  2002. align-items: center;
  2003. position: relative;
  2004. min-width: 120rpx;
  2005. }
  2006. .step-item:not(:last-child)::after {
  2007. content: '';
  2008. position: absolute;
  2009. top: 20rpx;
  2010. right: -50%;
  2011. width: 100%;
  2012. height: 2rpx;
  2013. background-color: #ddd;
  2014. z-index: 1;
  2015. }
  2016. .step-item.active:not(:last-child)::after {
  2017. background-color: #007AFF;
  2018. }
  2019. .step-number {
  2020. width: 40rpx;
  2021. height: 40rpx;
  2022. border-radius: 50%;
  2023. background-color: #ddd;
  2024. color: #fff;
  2025. display: flex;
  2026. justify-content: center;
  2027. align-items: center;
  2028. font-size: 24rpx;
  2029. margin-bottom: 10rpx;
  2030. position: relative;
  2031. z-index: 2;
  2032. }
  2033. .step-item.active .step-number {
  2034. background-color: #007AFF;
  2035. }
  2036. .step-item.current .step-number {
  2037. background-color: #007AFF;
  2038. box-shadow: 0 0 0 4rpx rgba(0, 122, 255, 0.2);
  2039. }
  2040. .step-name {
  2041. font-size: 22rpx;
  2042. color: #999;
  2043. text-align: center;
  2044. }
  2045. .step-item.active .step-name {
  2046. color: #333;
  2047. }
  2048. .step-item.current .step-name {
  2049. color: #007AFF;
  2050. font-weight: bold;
  2051. }
  2052. /* 导航按钮样式 */
  2053. .nav-buttons {
  2054. display: flex;
  2055. justify-content: space-between;
  2056. margin-top: 40rpx;
  2057. padding: 0 20rpx;
  2058. }
  2059. .nav-btn {
  2060. flex: 1;
  2061. margin: 0 10rpx;
  2062. height: 80rpx;
  2063. line-height: 80rpx;
  2064. text-align: center;
  2065. border-radius: 40rpx;
  2066. font-size: 28rpx;
  2067. }
  2068. .prev-btn {
  2069. background-color: #f0f0f0;
  2070. color: #666;
  2071. }
  2072. .next-btn {
  2073. background-color: #007AFF;
  2074. color: #fff;
  2075. }
  2076. .submit-btn {
  2077. flex: 1;
  2078. margin: 0 10rpx;
  2079. height: 80rpx;
  2080. line-height: 80rpx;
  2081. text-align: center;
  2082. border-radius: 40rpx;
  2083. font-size: 28rpx;
  2084. background-color: #52c41a;
  2085. color: #fff;
  2086. }
  2087. /* 确认提交页样式 */
  2088. .confirm-container {
  2089. background-color: #fff;
  2090. border-radius: 10rpx;
  2091. padding: 20rpx;
  2092. margin-bottom: 30rpx;
  2093. }
  2094. .confirm-message {
  2095. padding: 20rpx;
  2096. background-color: #f6f6f6;
  2097. border-radius: 8rpx;
  2098. margin-bottom: 20rpx;
  2099. }
  2100. .info-summary {
  2101. padding: 20rpx;
  2102. }
  2103. .summary-item {
  2104. display: flex;
  2105. margin-bottom: 15rpx;
  2106. }
  2107. .summary-label {
  2108. width: 150rpx;
  2109. font-size: 28rpx;
  2110. color: #666;
  2111. }
  2112. .summary-value {
  2113. flex: 1;
  2114. font-size: 28rpx;
  2115. color: #333;
  2116. }
  2117. .input-error {
  2118. border-bottom: 1px solid #ff4d4f !important;
  2119. }
  2120. .error-message {
  2121. color: #ff4d4f;
  2122. font-size: 24rpx;
  2123. margin-top: 6rpx;
  2124. display: block;
  2125. }
  2126. /* 添加承诺书弹框样式 */
  2127. .promise-modal {
  2128. position: fixed;
  2129. top: 0;
  2130. left: 0;
  2131. right: 0;
  2132. bottom: 0;
  2133. background-color: rgba(0, 0, 0, 0.5);
  2134. z-index: 999;
  2135. display: flex;
  2136. justify-content: center;
  2137. align-items: center;
  2138. }
  2139. .promise-content {
  2140. width: 80%;
  2141. max-width: 600rpx;
  2142. background-color: #fff;
  2143. border-radius: 12rpx;
  2144. padding: 30rpx;
  2145. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
  2146. }
  2147. .promise-title {
  2148. font-size: 34rpx;
  2149. font-weight: bold;
  2150. text-align: center;
  2151. margin-bottom: 20rpx;
  2152. color: #333;
  2153. }
  2154. .promise-text {
  2155. height: 600rpx;
  2156. margin-bottom: 20rpx;
  2157. /* padding: 20rpx; */
  2158. background-color: #f8f8f8;
  2159. border-radius: 8rpx;
  2160. font-size: 28rpx;
  2161. line-height: 1.6;
  2162. color: #333;
  2163. }
  2164. .promise-checkbox {
  2165. display: flex;
  2166. align-items: center;
  2167. margin-bottom: 30rpx;
  2168. padding: 0 10rpx;
  2169. }
  2170. .promise-checkbox text {
  2171. font-size: 28rpx;
  2172. margin-left: 10rpx;
  2173. color: #333;
  2174. }
  2175. .promise-buttons {
  2176. display: flex;
  2177. justify-content: center;
  2178. }
  2179. .promise-btn {
  2180. width: 200rpx;
  2181. height: 80rpx;
  2182. line-height: 80rpx;
  2183. text-align: center;
  2184. border-radius: 40rpx;
  2185. font-size: 28rpx;
  2186. }
  2187. .confirm-btn {
  2188. background-color: #007AFF;
  2189. color: #fff;
  2190. }
  2191. .confirm-btn[disabled] {
  2192. background-color: #cccccc;
  2193. color: #ffffff;
  2194. }
  2195. /* Loading indicator styles */
  2196. .loading-container {
  2197. position: fixed;
  2198. top: 0;
  2199. left: 0;
  2200. right: 0;
  2201. bottom: 0;
  2202. background-color: rgba(255, 255, 255, 0.8);
  2203. display: flex;
  2204. flex-direction: column;
  2205. justify-content: center;
  2206. align-items: center;
  2207. z-index: 1000;
  2208. }
  2209. .loading-spinner {
  2210. width: 60rpx;
  2211. height: 60rpx;
  2212. border: 6rpx solid #f3f3f3;
  2213. border-top: 6rpx solid #007AFF;
  2214. border-radius: 50%;
  2215. animation: spin 1s linear infinite;
  2216. margin-bottom: 20rpx;
  2217. }
  2218. .loading-text {
  2219. font-size: 28rpx;
  2220. color: #666;
  2221. }
  2222. @keyframes spin {
  2223. 0% { transform: rotate(0deg); }
  2224. 100% { transform: rotate(360deg); }
  2225. }
  2226. </style>