Personal.vue 60 KB

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