Personal.vue 57 KB

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