Personal.vue 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719
  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. for (let i = 0; i < this.workList.length; i++) {
  1082. const work = this.workList[i];
  1083. // 检查起止时间
  1084. if (!work.startTime) {
  1085. uni.showToast({
  1086. title: `单位${i+1}:请选择开始时间`,
  1087. icon: 'none'
  1088. });
  1089. return false;
  1090. }
  1091. if (!work.endTime) {
  1092. uni.showToast({
  1093. title: `单位${i+1}:请选择结束时间`,
  1094. icon: 'none'
  1095. });
  1096. return false;
  1097. }
  1098. // 检查单位名称
  1099. if (!work.companyName) {
  1100. uni.showToast({
  1101. title: `单位${i+1}:请输入单位名称`,
  1102. icon: 'none'
  1103. });
  1104. return false;
  1105. }
  1106. // 检查任职部门
  1107. if (!work.department) {
  1108. uni.showToast({
  1109. title: `单位${i+1}:请输入任职部门`,
  1110. icon: 'none'
  1111. });
  1112. return false;
  1113. }
  1114. // 检查单位人数
  1115. if (!work.employeeCount) {
  1116. uni.showToast({
  1117. title: `单位${i+1}:请输入单位人数`,
  1118. icon: 'none'
  1119. });
  1120. return false;
  1121. }
  1122. // 检查担任职务
  1123. if (!work.position) {
  1124. uni.showToast({
  1125. title: `单位${i+1}:请输入担任职务`,
  1126. icon: 'none'
  1127. });
  1128. return false;
  1129. }
  1130. // 检查月总收入
  1131. if (!work.monthlySalary) {
  1132. uni.showToast({
  1133. title: `单位${i+1}:请输入月总收入`,
  1134. icon: 'none'
  1135. });
  1136. return false;
  1137. }
  1138. // 检查直接领导
  1139. if (!work.supervisor) {
  1140. uni.showToast({
  1141. title: `单位${i+1}:请输入直接领导姓名`,
  1142. icon: 'none'
  1143. });
  1144. return false;
  1145. }
  1146. // 检查领导电话
  1147. if (!work.supervisorPhone) {
  1148. uni.showToast({
  1149. title: `单位${i+1}:请输入领导电话`,
  1150. icon: 'none'
  1151. });
  1152. return false;
  1153. }
  1154. }
  1155. // 构建提交数据结构
  1156. const submitData = {
  1157. tenant_id: 1,
  1158. user_id: JSON.parse(uni.getStorageSync('userInfo')).id, // 从存储中获取用户ID
  1159. personal_info: {
  1160. name: this.formData.name,
  1161. gender: this.formData.gender,
  1162. birth_date: this.formData.birthDate,
  1163. phone: this.formData.phone,
  1164. id_card: this.formData.idCard,
  1165. email: this.formData.email,
  1166. address: this.formData.currentAddress,
  1167. professional_skills: this.formData.skills ? this.formData.skills.split(',') : []
  1168. },
  1169. profile: {
  1170. // 女性特殊状态映射
  1171. female_status: this.formData.gender === '女' ?
  1172. (this.formData.threePeriod === '孕期' ? 1 :
  1173. this.formData.threePeriod === '产期' ? 2 :
  1174. this.formData.threePeriod === '哺乳期' ? 3 : 0) : 0,
  1175. // 婚姻状况映射
  1176. marital_status: this.formData.marriage === '未婚' ? 0 :
  1177. this.formData.marriage === '已婚' ? 1 :
  1178. this.formData.marriage === '离异' ? 2 :
  1179. this.formData.marriage === '丧偶' ? 3 : 0,
  1180. height: parseFloat(this.formData.height) || 0,
  1181. weight: parseFloat(this.formData.weight) || 0,
  1182. political_status: this.formData.political,
  1183. ethnicity: this.formData.ethnic,
  1184. native_place: this.formData.nativePlace,
  1185. household_location: this.formData.residence,
  1186. current_address: this.formData.currentAddress,
  1187. expected_salary: parseFloat(this.formData.expectedSalary) || 0,
  1188. emergency_contact: this.formData.emergencyContact,
  1189. emergency_phone: this.formData.emergencyPhone,
  1190. specialties: this.formData.hobby,
  1191. life_motto: this.formData.motto,
  1192. // 应聘来源映射
  1193. recruitment_source: this.formData.sourceType === 'social' ?
  1194. (this.formData.socialSource === 'BOSS' ? 2 :
  1195. this.formData.socialSource === 'zhilian' ? 3 :
  1196. this.formData.socialSource === 'liepin' ? 4 : 5) : 1,
  1197. recruitment_source_detail: this.formData.sourceType === 'social' ?
  1198. (this.formData.socialSource === 'other' ? this.formData.otherSocialSource :
  1199. this.formData.socialSource === 'BOSS' ? 'BOSS直聘' :
  1200. this.formData.socialSource === 'zhilian' ? '智联招聘' :
  1201. this.formData.socialSource === 'liepin' ? '猎聘' : '') :
  1202. this.formData.otherSchoolSource
  1203. },
  1204. // 教育经历映射
  1205. educations: this.educationList.map((edu, index) => ({
  1206. education_type: index === 0 ? 1 : 2, // 第一个为第一学历,第二个为最高学历
  1207. degree: this.mapDegreeToNumber(edu.degree),
  1208. start_date: edu.startTime,
  1209. end_date: edu.endTime,
  1210. school_name: edu.schoolName,
  1211. major: edu.major
  1212. })),
  1213. // 家庭成员映射
  1214. family_members: this.familyMembers.map(member => ({
  1215. relation: member.relation,
  1216. name: member.name,
  1217. workplace: member.workplaceOrAddress,
  1218. position: member.position,
  1219. phone: member.phone
  1220. })),
  1221. // 工作经历映射
  1222. work_experiences: this.workList.map(work => ({
  1223. start_date: work.startTime,
  1224. end_date: work.endTime,
  1225. company_name: work.companyName,//单位名称
  1226. department: work.department,//任职部门
  1227. company_size: work.employeeCount,//员工人数
  1228. position: work.position,//担任职务
  1229. monthly_salary: work.monthlySalary,//月薪
  1230. supervisor_name: work.supervisor,//直属上级
  1231. supervisor_phone: work.supervisorPhone//直属上级电话
  1232. })),
  1233. // 培训经历可以从技能和培训文本框中提取
  1234. /* trainings: this.formData.training ? [{
  1235. training_name: "培训经历",
  1236. description: this.formData.training
  1237. }] : [] */
  1238. };
  1239. console.log('提交的表单数据:', submitData);
  1240. // 显示加载提示
  1241. uni.showLoading({
  1242. title: '提交中...'
  1243. });
  1244. // 发送数据到服务器
  1245. uni.request({
  1246. url: `${apiBaseUrl}/wechat/user/profile/update`, // 根据实际API路径调整
  1247. method: 'POST',
  1248. data: submitData,
  1249. success: (res) => {
  1250. uni.hideLoading();
  1251. // 先清空所有错误信息
  1252. this.formErrors = {
  1253. name: '',
  1254. idCard: '',
  1255. phone: ''
  1256. };
  1257. // 根据接口返回判断验证是否通过
  1258. if (res.data.code === 2000) { // 假设0是成功状态码,根据实际情况调整
  1259. // 验证通过,进入下一步
  1260. this.currentStep++;
  1261. // 滚动到页面顶部
  1262. // uni.pageScrollTo({
  1263. // scrollTop: 0,
  1264. // duration: 300
  1265. // });
  1266. /* uni.switchTab({
  1267. url: '/pages/index/index'
  1268. }); */
  1269. uni.navigateTo({
  1270. url: '/pages/interview-notice/interview-notice'
  1271. });
  1272. } else {
  1273. // 验证失败,显示错误信息
  1274. let errorMsg = res.data.msg || '身份验证失败';
  1275. /*
  1276. // 根据错误类型设置对应字段的错误信息
  1277. if (res.data.code === 1001) { // 假设1001是姓名错误的状态码
  1278. this.formErrors.name = '姓名验证失败,请检查姓名是否正确';
  1279. } else if (res.data.code === 1002) { // 假设1002是身份证号错误的状态码
  1280. this.formErrors.idCard = '身份证号验证失败,请检查身份证号是否正确';
  1281. } else if (res.data.code === 1003) { // 假设1003是手机号错误的状态码
  1282. this.formErrors.phone = '手机号验证失败,请检查手机号是否正确';
  1283. } else { */
  1284. // 如果是其他错误,可能涉及多个字段,显示通用错误
  1285. uni.showToast({
  1286. title: errorMsg,
  1287. icon: 'none',
  1288. duration: 2000
  1289. });
  1290. /* } */
  1291. }
  1292. },
  1293. fail: (err) => {
  1294. uni.hideLoading();
  1295. uni.showToast({
  1296. title: '网络错误,请检查网络连接',
  1297. icon: 'none'
  1298. });
  1299. console.error('提交失败:', err);
  1300. }
  1301. });
  1302. },
  1303. // 学历映射辅助方法
  1304. mapDegreeToNumber(degreeText) {
  1305. const degreeMap = {
  1306. '高中': 1,
  1307. '中专': 1,
  1308. '大专': 2,
  1309. '本科': 3,
  1310. '硕士': 4,
  1311. '博士': 5
  1312. };
  1313. return degreeMap[degreeText] || 6; // 默认为其他
  1314. },
  1315. prevStep() {
  1316. if (this.currentStep > 1) {
  1317. this.currentStep--;
  1318. // 滚动到页面顶部
  1319. uni.pageScrollTo({
  1320. scrollTop: 0,
  1321. duration: 300
  1322. });
  1323. }
  1324. },
  1325. nextStep() {
  1326. // 验证当前步骤的必填项
  1327. if (!this.validateCurrentStep()) {
  1328. return;
  1329. }
  1330. // 如果是第一步,需要进行身份验证
  1331. if (this.currentStep === 1) {
  1332. // 清空之前的错误信息
  1333. this.formErrors = {
  1334. name: '',
  1335. idCard: '',
  1336. phone: ''
  1337. };
  1338. // 显示加载提示
  1339. uni.showLoading({
  1340. title: '身份验证中...'
  1341. });
  1342. // 调用身份验证接口
  1343. uni.request({
  1344. url: `${apiBaseUrl}/wechat/identity/verify`,
  1345. method: 'POST',
  1346. data: {
  1347. name: this.formData.name,
  1348. id_number: this.formData.idCard,
  1349. mobile: this.formData.phone
  1350. },
  1351. header: {
  1352. 'content-type': 'application/x-www-form-urlencoded'
  1353. },
  1354. success: (res) => {
  1355. uni.hideLoading();
  1356. // 根据接口返回判断验证是否通过
  1357. if (res.data.code === 200) { // 假设0是成功状态码,根据实际情况调整
  1358. // 验证通过,进入下一步
  1359. this.currentStep++;
  1360. // 滚动到页面顶部
  1361. uni.pageScrollTo({
  1362. scrollTop: 0,
  1363. duration: 300
  1364. });
  1365. } else {
  1366. // 验证失败,显示错误信息
  1367. let errorMsg = res.data.msg || '身份验证失败';
  1368. this.formErrors.name = '姓名验证失败,请检查姓名是否正确';
  1369. this.formErrors.idCard = '身份证号验证失败,请检查身份证号是否正确';
  1370. this.formErrors.phone = '手机号验证失败,请检查手机号是否正确';
  1371. }
  1372. },
  1373. fail: (err) => {
  1374. uni.hideLoading();
  1375. uni.showToast({
  1376. title: '网络错误,请检查网络连接',
  1377. icon: 'none',
  1378. duration: 2000
  1379. });
  1380. console.error('身份验证请求失败:', err);
  1381. }
  1382. });
  1383. } else {
  1384. // 不是第一步,直接进入下一步
  1385. if (this.currentStep < this.steps.length) {
  1386. this.currentStep++;
  1387. // 滚动到页面顶部
  1388. uni.pageScrollTo({
  1389. scrollTop: 0,
  1390. duration: 300
  1391. });
  1392. }
  1393. }
  1394. },
  1395. // 验证当前步骤的必填项
  1396. validateCurrentStep() {
  1397. switch (this.currentStep) {
  1398. case 1: // 个人基本信息
  1399. if (!this.formData.name) {
  1400. uni.showToast({
  1401. title: '请输入姓名',
  1402. icon: 'none'
  1403. });
  1404. return false;
  1405. }
  1406. if (this.genderIndex === -1) {
  1407. uni.showToast({
  1408. title: '请选择性别',
  1409. icon: 'none'
  1410. });
  1411. return false;
  1412. }
  1413. if (this.formData.gender === '女' && this.threePeriodIndex === -1) {
  1414. uni.showToast({
  1415. title: '请选择是否为三期',
  1416. icon: 'none'
  1417. });
  1418. return false;
  1419. }
  1420. // 添加对手机号的验证
  1421. if (!this.formData.phone) {
  1422. uni.showToast({
  1423. title: '请输入手机号',
  1424. icon: 'none'
  1425. });
  1426. return false;
  1427. }
  1428. // 添加对身份证号的验证
  1429. if (!this.formData.idCard) {
  1430. uni.showToast({
  1431. title: '请输入身份证号',
  1432. icon: 'none'
  1433. });
  1434. return false;
  1435. }
  1436. // 添加对政治面貌的验证
  1437. if (this.politicalIndex === -1) {
  1438. uni.showToast({
  1439. title: '请选择政治面貌',
  1440. icon: 'none'
  1441. });
  1442. return false;
  1443. }
  1444. // 添加对民族的验证
  1445. if (this.ethnicIndex === -1) {
  1446. uni.showToast({
  1447. title: '请选择民族',
  1448. icon: 'none'
  1449. });
  1450. return false;
  1451. }
  1452. // 添加对婚育状况的验证
  1453. if (this.marriageIndex === -1) {
  1454. uni.showToast({
  1455. title: '请选择婚育状况',
  1456. icon: 'none'
  1457. });
  1458. return false;
  1459. }
  1460. return true;
  1461. case 2: // 紧急联系人信息
  1462. if (!this.formData.email) {
  1463. uni.showToast({
  1464. title: '请输入电子邮箱',
  1465. icon: 'none'
  1466. });
  1467. return false;
  1468. }
  1469. if (!this.formData.currentAddress) {
  1470. uni.showToast({
  1471. title: '请输入现居住地址',
  1472. icon: 'none'
  1473. });
  1474. return false;
  1475. }
  1476. if (!this.formData.emergencyContact) {
  1477. uni.showToast({
  1478. title: '请输入紧急联系人',
  1479. icon: 'none'
  1480. });
  1481. return false;
  1482. }
  1483. if (!this.formData.emergencyPhone) {
  1484. uni.showToast({
  1485. title: '请输入紧急联系人电话',
  1486. icon: 'none'
  1487. });
  1488. return false;
  1489. }
  1490. return true;
  1491. case 3: // 家庭成员信息
  1492. if (this.familyMembers.length === 0) {
  1493. uni.showToast({
  1494. title: '请至少添加一位家庭成员',
  1495. icon: 'none'
  1496. });
  1497. return false;
  1498. }
  1499. return true;
  1500. case 4: // 应聘来源
  1501. if (this.formData.sourceType === 'school' && !this.formData.otherSchoolSource) {
  1502. uni.showToast({
  1503. title: '请填写学校来源',
  1504. icon: 'none'
  1505. });
  1506. return false;
  1507. }
  1508. if (this.formData.sourceType === 'social') {
  1509. if (!this.formData.socialSource) {
  1510. uni.showToast({
  1511. title: '请选择社招来源',
  1512. icon: 'none'
  1513. });
  1514. return false;
  1515. }
  1516. if (this.formData.socialSource === 'other' && !this.formData.otherSocialSource) {
  1517. uni.showToast({
  1518. title: '请填写其他社招来源',
  1519. icon: 'none'
  1520. });
  1521. return false;
  1522. }
  1523. }
  1524. return true;
  1525. case 5: // 教育经历
  1526. if (this.educationList.length === 0) {
  1527. uni.showToast({
  1528. title: '请至少添加一项教育经历',
  1529. icon: 'none'
  1530. });
  1531. return false;
  1532. }
  1533. return true;
  1534. case 6: // 专业技能
  1535. if (!this.formData.skills) {
  1536. uni.showToast({
  1537. title: '请描述您的专业技能',
  1538. icon: 'none'
  1539. });
  1540. return false;
  1541. }
  1542. return true;
  1543. case 7: // 培训经历
  1544. if (!this.formData.training) {
  1545. uni.showToast({
  1546. title: '请描述您接受过的培训经历',
  1547. icon: 'none'
  1548. });
  1549. return false;
  1550. }
  1551. return true;
  1552. case 8: // 工作经历
  1553. if (this.workList.length === 0) {
  1554. uni.showToast({
  1555. title: '请至少添加一项工作经历',
  1556. icon: 'none'
  1557. });
  1558. return false;
  1559. }
  1560. // 检查每个工作经历的必填字段
  1561. for (let i = 0; i < this.workList.length; i++) {
  1562. const work = this.workList[i];
  1563. // 检查起止时间
  1564. if (!work.startTime) {
  1565. uni.showToast({
  1566. title: `单位${i+1}:请选择开始时间`,
  1567. icon: 'none'
  1568. });
  1569. return false;
  1570. }
  1571. if (!work.endTime) {
  1572. uni.showToast({
  1573. title: `单位${i+1}:请选择结束时间`,
  1574. icon: 'none'
  1575. });
  1576. return false;
  1577. }
  1578. // 检查单位名称
  1579. if (!work.companyName) {
  1580. uni.showToast({
  1581. title: `单位${i+1}:请输入单位名称`,
  1582. icon: 'none'
  1583. });
  1584. return false;
  1585. }
  1586. // 检查任职部门
  1587. if (!work.department) {
  1588. uni.showToast({
  1589. title: `单位${i+1}:请输入任职部门`,
  1590. icon: 'none'
  1591. });
  1592. return false;
  1593. }
  1594. // 检查单位人数
  1595. if (!work.employeeCount) {
  1596. uni.showToast({
  1597. title: `单位${i+1}:请输入单位人数`,
  1598. icon: 'none'
  1599. });
  1600. return false;
  1601. }
  1602. // 检查担任职务
  1603. if (!work.position) {
  1604. uni.showToast({
  1605. title: `单位${i+1}:请输入担任职务`,
  1606. icon: 'none'
  1607. });
  1608. return false;
  1609. }
  1610. // 检查月总收入
  1611. if (!work.monthlySalary) {
  1612. uni.showToast({
  1613. title: `单位${i+1}:请输入月总收入`,
  1614. icon: 'none'
  1615. });
  1616. return false;
  1617. }
  1618. // 检查直接领导
  1619. if (!work.supervisor) {
  1620. uni.showToast({
  1621. title: `单位${i+1}:请输入直接领导姓名`,
  1622. icon: 'none'
  1623. });
  1624. return false;
  1625. }
  1626. // 检查领导电话
  1627. if (!work.supervisorPhone) {
  1628. uni.showToast({
  1629. title: `单位${i+1}:请输入领导电话`,
  1630. icon: 'none'
  1631. });
  1632. return false;
  1633. }
  1634. }
  1635. return true;
  1636. default:
  1637. return true;
  1638. }
  1639. },
  1640. // Add method to fetch user data
  1641. fetchUserData() {
  1642. this.isLoading = true;
  1643. // Get openid from storage
  1644. const userInfo = uni.getStorageSync('userInfo') ? JSON.parse(uni.getStorageSync('userInfo')) : {};
  1645. const openid = userInfo.openid;
  1646. if (!openid) {
  1647. uni.showToast({
  1648. title: '用户信息获取失败,请重新登录',
  1649. icon: 'none'
  1650. });
  1651. this.isLoading = false;
  1652. return;
  1653. }
  1654. uni.request({
  1655. url: `${apiBaseUrl}/api/wechat/user/get_full_info?tenant_id=1&openid=${openid}`,
  1656. method: 'GET',
  1657. success: (res) => {
  1658. // 无论结果如何,都保持承诺书显示状态
  1659. this.showPromiseModal = true;
  1660. /* if (res.data.code === 2000) { */
  1661. // Successfully fetched data
  1662. this.populateFormData(res.data.data);
  1663. /* } else {
  1664. uni.showToast({
  1665. title: res.data.msg || '获取用户信息失败',
  1666. icon: 'none'
  1667. });
  1668. } */
  1669. },
  1670. fail: (err) => {
  1671. /* console.error('获取用户信息失败:', err);
  1672. uni.showToast({
  1673. title: '网络错误,请检查网络连接',
  1674. icon: 'none'
  1675. }); */
  1676. },
  1677. complete: () => {
  1678. this.isLoading = false;
  1679. }
  1680. });
  1681. },
  1682. // Add method to populate form data with fetched data
  1683. populateFormData(data) {
  1684. const { user_info, profile, educations, work_experiences, family_members } = data;
  1685. // Populate basic user info
  1686. if (user_info) {
  1687. this.formData.name = user_info.name || '';
  1688. this.formData.gender = user_info.gender_text || '';
  1689. this.genderIndex = this.genderOptions.findIndex(item => item === this.formData.gender);
  1690. this.formData.idCard = user_info.id_card || '';
  1691. this.formData.phone = user_info.phone || '';
  1692. this.formData.email = user_info.email || '';
  1693. }
  1694. // Populate profile data
  1695. if (profile) {
  1696. // Set political status
  1697. this.formData.political = profile.political_status || '';
  1698. this.politicalIndex = this.politicalOptions.findIndex(item => item === this.formData.political);
  1699. // Set ethnic
  1700. this.formData.ethnic = profile.ethnicity || '';
  1701. this.ethnicIndex = this.ethnicOptions.findIndex(item => item === this.formData.ethnic);
  1702. // Set height and weight
  1703. this.formData.height = profile.height || '';
  1704. this.formData.weight = profile.weight || '';
  1705. // Set native place and residence
  1706. this.formData.nativePlace = profile.native_place || '';
  1707. this.formData.residence = profile.household_location || '';
  1708. // Set current address
  1709. this.formData.currentAddress = profile.current_address || '';
  1710. // Set marriage status
  1711. this.formData.marriage = profile.marital_status_text || '';
  1712. this.marriageIndex = this.marriageOptions.findIndex(item => item === this.formData.marriage);
  1713. // Set three period status for female
  1714. if (this.formData.gender === '女' && profile.female_status !== undefined) {
  1715. const femaleStatusMap = {0: '无', 1: '孕期', 2: '产期', 3: '哺乳期'};
  1716. this.formData.threePeriod = femaleStatusMap[profile.female_status] || '无';
  1717. this.threePeriodIndex = this.threePeriodOptions.findIndex(item => item === this.formData.threePeriod);
  1718. }
  1719. // Set expected salary
  1720. this.formData.expectedSalary = profile.expected_salary || '';
  1721. // Set emergency contact
  1722. this.formData.emergencyContact = profile.emergency_contact || '';
  1723. this.formData.emergencyPhone = profile.emergency_phone || '';
  1724. // Set hobby and motto
  1725. this.formData.hobby = profile.specialties || '';
  1726. this.formData.motto = profile.life_motto || '';
  1727. // Set recruitment source
  1728. const sourceTypeMap = {
  1729. 1: 'school',
  1730. 2: 'social',
  1731. 3: 'social',
  1732. 4: 'social',
  1733. 5: 'social'
  1734. };
  1735. const socialSourceMap = {
  1736. 2: 'BOSS',
  1737. 3: 'zhilian',
  1738. 4: 'liepin',
  1739. 5: 'other'
  1740. };
  1741. this.formData.sourceType = sourceTypeMap[profile.recruitment_source] || 'social';
  1742. if (this.formData.sourceType === 'social') {
  1743. this.formData.socialSource = socialSourceMap[profile.recruitment_source] || '';
  1744. if (this.formData.socialSource === 'other') {
  1745. this.formData.otherSocialSource = profile.recruitment_source_detail || '';
  1746. }
  1747. } else if (this.formData.sourceType === 'school') {
  1748. this.formData.otherSchoolSource = profile.recruitment_source_detail || '';
  1749. }
  1750. }
  1751. // Populate educations data
  1752. if (educations && educations.length > 0) {
  1753. this.educationList = educations.map(edu => {
  1754. const degreeMap = {
  1755. 1: '高中',
  1756. 2: '大专',
  1757. 3: '本科',
  1758. 4: '硕士',
  1759. 5: '博士'
  1760. };
  1761. return {
  1762. startTime: edu.start_date || '',
  1763. endTime: edu.end_date || '',
  1764. schoolName: edu.school_name || '',
  1765. major: edu.major || '',
  1766. degree: degreeMap[edu.degree] || ''
  1767. };
  1768. });
  1769. }
  1770. // Populate work experience data
  1771. if (work_experiences && work_experiences.length > 0) {
  1772. this.workList = work_experiences.map(work => {
  1773. return {
  1774. startTime: work.start_date || '',
  1775. endTime: work.end_date || '',
  1776. companyName: work.company_name || '',
  1777. department: work.department || '',
  1778. employeeCount: work.company_size || '',
  1779. position: work.position || '',
  1780. monthlySalary: work.monthly_salary || '',
  1781. supervisor: work.supervisor_name || '',
  1782. supervisorPhone: work.supervisor_phone || ''
  1783. };
  1784. });
  1785. }
  1786. // Populate family members data
  1787. if (family_members && family_members.length > 0) {
  1788. this.familyMembers = family_members.map(member => {
  1789. return {
  1790. relation: member.relation || '',
  1791. name: member.name || '',
  1792. workplaceOrAddress: member.workplace || '',
  1793. position: member.position || '',
  1794. phone: member.phone || ''
  1795. };
  1796. });
  1797. }
  1798. // 移除这段代码,确保承诺书始终显示
  1799. // if (user_info && user_info.is_profile_complete) {
  1800. // this.showPromiseModal = false;
  1801. // }
  1802. },
  1803. },
  1804. // 添加监听器来清除错误信息
  1805. watch: {
  1806. 'formData.name': function(newVal) {
  1807. if (newVal && this.formErrors.name) {
  1808. this.formErrors.name = '';
  1809. }
  1810. },
  1811. 'formData.idCard': function(newVal) {
  1812. if (newVal && this.formErrors.idCard) {
  1813. this.formErrors.idCard = '';
  1814. }
  1815. },
  1816. 'formData.phone': function(newVal) {
  1817. if (newVal && this.formErrors.phone) {
  1818. this.formErrors.phone = '';
  1819. }
  1820. }
  1821. },
  1822. }
  1823. </script>
  1824. <style>
  1825. .personal-container {
  1826. padding: 20rpx;
  1827. }
  1828. .form-title {
  1829. font-size: 36rpx;
  1830. font-weight: bold;
  1831. text-align: center;
  1832. margin-bottom: 30rpx;
  1833. }
  1834. .form-container {
  1835. background-color: #fff;
  1836. border-radius: 10rpx;
  1837. padding: 20rpx;
  1838. }
  1839. .section-title {
  1840. font-size: 32rpx;
  1841. font-weight: bold;
  1842. margin: 30rpx 0 20rpx 10rpx;
  1843. color: #333;
  1844. border-left: 4rpx solid #007AFF;
  1845. padding-left: 15rpx;
  1846. }
  1847. .form-row {
  1848. display: flex;
  1849. flex-direction: row;
  1850. margin-bottom: 20rpx;
  1851. flex-wrap: wrap;
  1852. }
  1853. .form-item {
  1854. flex: 1;
  1855. min-width: 300rpx;
  1856. margin: 10rpx;
  1857. border-bottom: 1px solid #eee;
  1858. padding-bottom: 10rpx;
  1859. }
  1860. .label {
  1861. font-size: 28rpx;
  1862. color: #333;
  1863. margin-right: 10rpx;
  1864. display: block;
  1865. margin-bottom: 10rpx;
  1866. }
  1867. input {
  1868. font-size: 28rpx;
  1869. height: 60rpx;
  1870. }
  1871. .picker-text {
  1872. font-size: 28rpx;
  1873. height: 60rpx;
  1874. line-height: 60rpx;
  1875. color: #666;
  1876. }
  1877. .submit-btn {
  1878. margin-top: 40rpx;
  1879. background-color: #007AFF;
  1880. color: #fff;
  1881. }
  1882. .family-members-list {
  1883. margin-top: 20rpx;
  1884. }
  1885. .family-member-item {
  1886. background-color: #f8f8f8;
  1887. border-radius: 8rpx;
  1888. padding: 20rpx;
  1889. margin-bottom: 20rpx;
  1890. }
  1891. .family-member-header {
  1892. display: flex;
  1893. justify-content: space-between;
  1894. align-items: center;
  1895. margin-bottom: 15rpx;
  1896. border-bottom: 1px solid #eee;
  1897. padding-bottom: 10rpx;
  1898. }
  1899. .family-member-title {
  1900. font-size: 30rpx;
  1901. font-weight: bold;
  1902. color: #333;
  1903. }
  1904. .family-member-actions {
  1905. display: flex;
  1906. gap: 20rpx;
  1907. }
  1908. .family-member-edit {
  1909. font-size: 26rpx;
  1910. color: #1890ff;
  1911. }
  1912. .family-member-delete {
  1913. font-size: 26rpx;
  1914. color: #ff4d4f;
  1915. }
  1916. .form-subtitle {
  1917. font-size: 28rpx;
  1918. font-weight: bold;
  1919. margin-bottom: 20rpx;
  1920. display: flex;
  1921. justify-content: space-between;
  1922. align-items: center;
  1923. }
  1924. .cancel-edit {
  1925. font-size: 26rpx;
  1926. color: #999;
  1927. font-weight: normal;
  1928. }
  1929. .family-member-content {
  1930. padding: 10rpx 0;
  1931. }
  1932. .family-member-row {
  1933. display: flex;
  1934. margin-bottom: 10rpx;
  1935. }
  1936. .family-member-label {
  1937. font-size: 26rpx;
  1938. color: #666;
  1939. width: 200rpx;
  1940. }
  1941. .family-member-value {
  1942. font-size: 26rpx;
  1943. color: #333;
  1944. flex: 1;
  1945. }
  1946. .family-member-form {
  1947. background-color: #fff;
  1948. border-radius: 8rpx;
  1949. padding: 20rpx;
  1950. margin-top: 20rpx;
  1951. }
  1952. .form-row button-row {
  1953. display: flex;
  1954. justify-content: center;
  1955. margin-top: 20rpx;
  1956. }
  1957. .form-item button-container {
  1958. display: flex;
  1959. flex-direction: column;
  1960. align-items: center;
  1961. }
  1962. .circle-btn {
  1963. width: 40rpx;
  1964. height: 40rpx;
  1965. border-radius: 50%;
  1966. background-color: #007AFF;
  1967. display: flex;
  1968. justify-content: center;
  1969. align-items: center;
  1970. margin-bottom: 10rpx;
  1971. }
  1972. .btn-icon {
  1973. font-size: 32rpx;
  1974. color: #fff;
  1975. }
  1976. .btn-text {
  1977. font-size: 28rpx;
  1978. color: #333;
  1979. }
  1980. /* 添加圆形按钮相关样式 */
  1981. .button-row {
  1982. justify-content: center;
  1983. margin-top: 30rpx;
  1984. }
  1985. .button-container {
  1986. display: flex;
  1987. flex-direction: column;
  1988. align-items: center;
  1989. border-bottom: none;
  1990. min-width: auto;
  1991. }
  1992. .circle-btn {
  1993. width: 100rpx;
  1994. height: 100rpx;
  1995. border-radius: 50%;
  1996. padding: 0;
  1997. display: flex;
  1998. align-items: center;
  1999. justify-content: center;
  2000. background-color: #52c41a;
  2001. box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.1);
  2002. margin: 0;
  2003. }
  2004. .btn-icon {
  2005. font-size: 50rpx;
  2006. color: #fff;
  2007. line-height: 1;
  2008. }
  2009. .btn-text {
  2010. font-size: 24rpx;
  2011. color: #666;
  2012. margin-top: 10rpx;
  2013. }
  2014. /* 编辑状态下的按钮颜色 */
  2015. .circle-btn.editing {
  2016. background-color: #1890ff;
  2017. }
  2018. /* 移除原来的添加按钮样式 */
  2019. .add-member-btn {
  2020. display: none;
  2021. }
  2022. /* 应聘来源样式 */
  2023. .source-container {
  2024. background-color: #fff;
  2025. border-radius: 10rpx;
  2026. padding: 20rpx;
  2027. margin-bottom: 30rpx;
  2028. }
  2029. .source-row {
  2030. display: flex;
  2031. margin-bottom: 20rpx;
  2032. align-items: flex-start;
  2033. }
  2034. .source-label {
  2035. width: 120rpx;
  2036. font-size: 28rpx;
  2037. color: #333;
  2038. padding-top: 6rpx;
  2039. }
  2040. .source-options {
  2041. flex: 1;
  2042. display: flex;
  2043. flex-wrap: wrap;
  2044. }
  2045. .source-option {
  2046. display: flex;
  2047. align-items: center;
  2048. margin-right: 30rpx;
  2049. margin-bottom: 15rpx;
  2050. }
  2051. .source-option text {
  2052. font-size: 28rpx;
  2053. margin-left: 8rpx;
  2054. }
  2055. .other-option {
  2056. flex-basis: 100%;
  2057. margin-top: 10rpx;
  2058. }
  2059. .other-option input {
  2060. border-bottom: 1px solid #eee;
  2061. width: 300rpx;
  2062. margin-left: 10rpx;
  2063. font-size: 28rpx;
  2064. }
  2065. /* 教育经历样式 */
  2066. .education-list {
  2067. margin-top: 20rpx;
  2068. }
  2069. .education-item {
  2070. background-color: #f8f8f8;
  2071. border-radius: 8rpx;
  2072. padding: 20rpx;
  2073. margin-bottom: 20rpx;
  2074. }
  2075. .education-header {
  2076. display: flex;
  2077. justify-content: space-between;
  2078. align-items: center;
  2079. margin-bottom: 15rpx;
  2080. border-bottom: 1px solid #eee;
  2081. padding-bottom: 10rpx;
  2082. }
  2083. .education-title {
  2084. font-size: 30rpx;
  2085. font-weight: bold;
  2086. color: #333;
  2087. }
  2088. .education-actions {
  2089. display: flex;
  2090. gap: 20rpx;
  2091. }
  2092. .education-edit {
  2093. font-size: 26rpx;
  2094. color: #1890ff;
  2095. }
  2096. .education-delete {
  2097. font-size: 26rpx;
  2098. color: #ff4d4f;
  2099. }
  2100. .education-content {
  2101. padding: 10rpx 0;
  2102. }
  2103. .education-row {
  2104. display: flex;
  2105. margin-bottom: 10rpx;
  2106. }
  2107. .education-label {
  2108. font-size: 26rpx;
  2109. color: #666;
  2110. width: 150rpx;
  2111. }
  2112. .education-value {
  2113. font-size: 26rpx;
  2114. color: #333;
  2115. flex: 1;
  2116. }
  2117. .education-form {
  2118. background-color: #fff;
  2119. border-radius: 8rpx;
  2120. padding: 20rpx;
  2121. margin-top: 20rpx;
  2122. }
  2123. .date-range {
  2124. display: flex;
  2125. align-items: center;
  2126. justify-content: space-around;
  2127. }
  2128. .date-separator {
  2129. margin: 0 10rpx;
  2130. color: #666;
  2131. }
  2132. /* 专业技能和培训样式 */
  2133. .skills-container, .training-container {
  2134. background-color: #fff;
  2135. border-radius: 10rpx;
  2136. padding: 20rpx;
  2137. margin-bottom: 20rpx;
  2138. }
  2139. .skills-textarea, .training-textarea {
  2140. width: 100%;
  2141. height: 200rpx;
  2142. font-size: 28rpx;
  2143. line-height: 1.5;
  2144. padding: 10rpx;
  2145. box-sizing: border-box;
  2146. border: 1px solid #eee;
  2147. border-radius: 6rpx;
  2148. }
  2149. /* 工作经历样式 */
  2150. .work-list {
  2151. margin-top: 20rpx;
  2152. }
  2153. .work-item {
  2154. background-color: #f8f8f8;
  2155. border-radius: 8rpx;
  2156. padding: 20rpx;
  2157. margin-bottom: 20rpx;
  2158. }
  2159. .work-header {
  2160. display: flex;
  2161. justify-content: space-between;
  2162. align-items: center;
  2163. margin-bottom: 15rpx;
  2164. border-bottom: 1px solid #eee;
  2165. padding-bottom: 10rpx;
  2166. }
  2167. .work-title {
  2168. font-size: 30rpx;
  2169. font-weight: bold;
  2170. color: #333;
  2171. }
  2172. .work-actions {
  2173. display: flex;
  2174. gap: 20rpx;
  2175. }
  2176. .work-edit {
  2177. font-size: 26rpx;
  2178. color: #1890ff;
  2179. }
  2180. .work-delete {
  2181. font-size: 26rpx;
  2182. color: #ff4d4f;
  2183. }
  2184. .work-content {
  2185. padding: 10rpx 0;
  2186. }
  2187. .work-row {
  2188. display: flex;
  2189. margin-bottom: 10rpx;
  2190. }
  2191. .work-label {
  2192. font-size: 26rpx;
  2193. color: #666;
  2194. width: 150rpx;
  2195. }
  2196. .work-value {
  2197. font-size: 26rpx;
  2198. color: #333;
  2199. flex: 1;
  2200. }
  2201. .work-form {
  2202. background-color: #fff;
  2203. border-radius: 8rpx;
  2204. padding: 20rpx;
  2205. margin-top: 20rpx;
  2206. }
  2207. /* 步骤指示器样式 */
  2208. .steps-indicator {
  2209. display: flex;
  2210. justify-content: space-between;
  2211. margin-bottom: 30rpx;
  2212. padding: 20rpx;
  2213. background-color: #fff;
  2214. border-radius: 10rpx;
  2215. overflow-x: auto;
  2216. }
  2217. .step-item {
  2218. display: flex;
  2219. flex-direction: column;
  2220. align-items: center;
  2221. position: relative;
  2222. min-width: 120rpx;
  2223. }
  2224. .step-item:not(:last-child)::after {
  2225. content: '';
  2226. position: absolute;
  2227. top: 20rpx;
  2228. right: -50%;
  2229. width: 100%;
  2230. height: 2rpx;
  2231. background-color: #ddd;
  2232. z-index: 1;
  2233. }
  2234. .step-item.active:not(:last-child)::after {
  2235. background-color: #007AFF;
  2236. }
  2237. .step-number {
  2238. width: 40rpx;
  2239. height: 40rpx;
  2240. border-radius: 50%;
  2241. background-color: #ddd;
  2242. color: #fff;
  2243. display: flex;
  2244. justify-content: center;
  2245. align-items: center;
  2246. font-size: 24rpx;
  2247. margin-bottom: 10rpx;
  2248. position: relative;
  2249. z-index: 2;
  2250. }
  2251. .step-item.active .step-number {
  2252. background-color: #007AFF;
  2253. }
  2254. .step-item.current .step-number {
  2255. background-color: #007AFF;
  2256. box-shadow: 0 0 0 4rpx rgba(0, 122, 255, 0.2);
  2257. }
  2258. .step-name {
  2259. font-size: 22rpx;
  2260. color: #999;
  2261. text-align: center;
  2262. }
  2263. .step-item.active .step-name {
  2264. color: #333;
  2265. }
  2266. .step-item.current .step-name {
  2267. color: #007AFF;
  2268. font-weight: bold;
  2269. }
  2270. /* 导航按钮样式 */
  2271. .nav-buttons {
  2272. display: flex;
  2273. justify-content: space-between;
  2274. margin-top: 40rpx;
  2275. padding: 0 20rpx;
  2276. }
  2277. .nav-btn {
  2278. flex: 1;
  2279. margin: 0 10rpx;
  2280. height: 80rpx;
  2281. line-height: 80rpx;
  2282. text-align: center;
  2283. border-radius: 40rpx;
  2284. font-size: 28rpx;
  2285. }
  2286. .prev-btn {
  2287. background-color: #f0f0f0;
  2288. color: #666;
  2289. }
  2290. .next-btn {
  2291. background-color: #007AFF;
  2292. color: #fff;
  2293. }
  2294. .submit-btn {
  2295. flex: 1;
  2296. margin: 0 10rpx;
  2297. height: 80rpx;
  2298. line-height: 80rpx;
  2299. text-align: center;
  2300. border-radius: 40rpx;
  2301. font-size: 28rpx;
  2302. background-color: #52c41a;
  2303. color: #fff;
  2304. }
  2305. /* 确认提交页样式 */
  2306. .confirm-container {
  2307. background-color: #fff;
  2308. border-radius: 10rpx;
  2309. padding: 20rpx;
  2310. margin-bottom: 30rpx;
  2311. }
  2312. .confirm-message {
  2313. padding: 20rpx;
  2314. background-color: #f6f6f6;
  2315. border-radius: 8rpx;
  2316. margin-bottom: 20rpx;
  2317. }
  2318. .info-summary {
  2319. padding: 20rpx;
  2320. }
  2321. .summary-item {
  2322. display: flex;
  2323. margin-bottom: 15rpx;
  2324. }
  2325. .summary-label {
  2326. width: 150rpx;
  2327. font-size: 28rpx;
  2328. color: #666;
  2329. }
  2330. .summary-value {
  2331. flex: 1;
  2332. font-size: 28rpx;
  2333. color: #333;
  2334. }
  2335. .input-error {
  2336. border-bottom: 1px solid #ff4d4f !important;
  2337. }
  2338. .error-message {
  2339. color: #ff4d4f;
  2340. font-size: 24rpx;
  2341. margin-top: 6rpx;
  2342. display: block;
  2343. }
  2344. /* 添加承诺书弹框样式 */
  2345. .promise-modal {
  2346. position: fixed;
  2347. top: 0;
  2348. left: 0;
  2349. right: 0;
  2350. bottom: 0;
  2351. background-color: rgba(0, 0, 0, 0.5);
  2352. z-index: 999;
  2353. display: flex;
  2354. justify-content: center;
  2355. align-items: center;
  2356. }
  2357. .promise-content {
  2358. width: 80%;
  2359. max-width: 600rpx;
  2360. background-color: #fff;
  2361. border-radius: 12rpx;
  2362. padding: 30rpx;
  2363. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
  2364. }
  2365. .promise-title {
  2366. font-size: 34rpx;
  2367. font-weight: bold;
  2368. text-align: center;
  2369. margin-bottom: 20rpx;
  2370. color: #333;
  2371. }
  2372. .promise-text {
  2373. height: 600rpx;
  2374. margin-bottom: 20rpx;
  2375. /* padding: 20rpx; */
  2376. background-color: #f8f8f8;
  2377. border-radius: 8rpx;
  2378. font-size: 28rpx;
  2379. line-height: 1.6;
  2380. color: #333;
  2381. }
  2382. .promise-checkbox {
  2383. display: flex;
  2384. align-items: center;
  2385. margin-bottom: 30rpx;
  2386. padding: 0 10rpx;
  2387. }
  2388. .promise-checkbox text {
  2389. font-size: 28rpx;
  2390. margin-left: 10rpx;
  2391. color: #333;
  2392. }
  2393. .promise-buttons {
  2394. display: flex;
  2395. justify-content: center;
  2396. }
  2397. .promise-btn {
  2398. width: 200rpx;
  2399. height: 80rpx;
  2400. line-height: 80rpx;
  2401. text-align: center;
  2402. border-radius: 40rpx;
  2403. font-size: 28rpx;
  2404. }
  2405. .confirm-btn {
  2406. background-color: #007AFF;
  2407. color: #fff;
  2408. }
  2409. .confirm-btn[disabled] {
  2410. background-color: #cccccc;
  2411. color: #ffffff;
  2412. }
  2413. /* Loading indicator styles */
  2414. .loading-container {
  2415. position: fixed;
  2416. top: 0;
  2417. left: 0;
  2418. right: 0;
  2419. bottom: 0;
  2420. background-color: rgba(255, 255, 255, 0.8);
  2421. display: flex;
  2422. flex-direction: column;
  2423. justify-content: center;
  2424. align-items: center;
  2425. z-index: 1000;
  2426. }
  2427. .loading-spinner {
  2428. width: 60rpx;
  2429. height: 60rpx;
  2430. border: 6rpx solid #f3f3f3;
  2431. border-top: 6rpx solid #007AFF;
  2432. border-radius: 50%;
  2433. animation: spin 1s linear infinite;
  2434. margin-bottom: 20rpx;
  2435. }
  2436. .loading-text {
  2437. font-size: 28rpx;
  2438. color: #666;
  2439. }
  2440. @keyframes spin {
  2441. 0% { transform: rotate(0deg); }
  2442. 100% { transform: rotate(360deg); }
  2443. }
  2444. </style>