myJobInformation.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868
  1. <template>
  2. <view>
  3. <u-navbar back-text="求职信息" back-icon-size="28" back-icon-color="#ffffff"
  4. :background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
  5. <view class="main">
  6. <!-- 个人信息 -->
  7. <view class="person-infos">
  8. <view class="infos">
  9. <view class="name" v-if="userInfo.status==1">
  10. {{userInfo.realName?userInfo.realName:''}}
  11. </view>
  12. <view class="gender-age" v-if="userInfo.status==0">
  13. <text class="text">简历状态</text>
  14. <text>[未创建]</text>
  15. </view>
  16. <view class="gender-age" v-if="userInfo.status==1">
  17. <text class="text">{{userInfo.gender==1?'男':'女'}}</text>|
  18. <text class="text">{{userInfo.age}}岁</text>|
  19. <text class="text">简历状态</text>
  20. <text style="color:chocolate" v-if="formData.status==0">[审批中]</text>
  21. <text style="color: #4CAF50;" v-else-if="formData.status==1">[生效]</text>
  22. <text v-else >[未创建]</text>
  23. </view>
  24. </view>
  25. <view class="photo" @click="uploadPhoto">
  26. <u-avatar :src="src" size="120" mode="circle"></u-avatar>
  27. <img class="camera" src="@/assets/img/riFill-camera-fill Copy@1x.png" alt="">
  28. </view>
  29. </view>
  30. <u-select v-model="show" value-name="value" label-name="name"
  31. :list="list" @confirm="confirm"></u-select>
  32. <!-- 信息填写 -->
  33. <view class="information-group">
  34. <!-- 联系电话 -->
  35. <view class="item">
  36. <view class="title">
  37. 联系电话
  38. </view>
  39. <view class="input">
  40. {{tel}}
  41. </view>
  42. </view>
  43. <!-- 意向行业 -->
  44. <view class="item">
  45. <view class="title">
  46. 意向行业<text>*</text>
  47. </view>
  48. <view class="input" >
  49. <u-input type="select" v-model="intendedIndustries" @click="popupShow=true" readonly placeholder="请选择意向行业"></u-input>
  50. </view>
  51. </view>
  52. <!--意向岗位 -->
  53. <view class="item">
  54. <view class="title">
  55. 意向岗位<text>*</text>
  56. </view>
  57. <view class="input">
  58. <u-input type="text" v-model="formData.intendedPosition"
  59. placeholder="请填写想找的工作岗位"></u-input>
  60. </view>
  61. </view>
  62. <!-- 结算方式 -->
  63. <view class="item">
  64. <view class="title">
  65. 结算方式<text>*</text>
  66. </view>
  67. <view class="input">
  68. <u-input type="select" v-model="method"
  69. @click="showselect(1)" placeholder="请选择结算方式"></u-input>
  70. </view>
  71. </view>
  72. <!-- 期望薪资 -->
  73. <view class="item">
  74. <view class="title">
  75. 期望薪资<text>*</text>
  76. </view>
  77. <view class="input2">
  78. <u-input type="number" v-model="formData.hopeSalary"
  79. placeholder="请填写期望薪资"></u-input>
  80. </view>
  81. <view class="unit">
  82. {{getUnit(formData)}}
  83. </view>
  84. </view>
  85. <!-- 工作经验 -->
  86. <view class="item" v-if="false">
  87. <view class="title">
  88. 工作经验
  89. </view>
  90. <view class="input">
  91. <u-input type="select" v-model="workExperience"
  92. @click="showselect(2)" placeholder="请选择工作经验"></u-input>
  93. </view>
  94. </view>
  95. <!-- 学历 -->
  96. <view class="item">
  97. <view class="title">
  98. 学历
  99. </view>
  100. <view class="input">
  101. <u-input type="select" v-model="education"
  102. @click="showselect(3)" placeholder="请选择学历"></u-input>
  103. </view>
  104. </view>
  105. <!--意向岗位 -->
  106. <view class="item">
  107. <view class="title">
  108. 现居住地
  109. </view>
  110. <view class="input">
  111. <u-input type="text" v-model="formData.address"
  112. placeholder="请填写您的现居住地"></u-input>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. <view class="service-description">
  118. <view class="title">
  119. <text>*</text>个人简介
  120. </view>
  121. <textarea class="textarea" v-model="formData.serviceDesc"
  122. placeholder="请填写您的个人简历,如工作年限/工作经历/擅长技能等,有助于您更快、更准确的找到工作。"></textarea>
  123. </view>
  124. <view class="main">
  125. <view class="information-group">
  126. <view class="titlesm">
  127. {{userInfo.status==0?'实名认证':'已实名'}}
  128. </view>
  129. <!--意向岗位 -->
  130. <view class="item">
  131. <view class="title">
  132. 真实姓名<text class="redtext">*</text>
  133. </view>
  134. <view class="input" v-if="userInfo.status==0">
  135. <u-input type="text" v-model="personalForm.realName"
  136. placeholder="请填写真实姓名"></u-input>
  137. </view>
  138. <view v-if="userInfo.status==1" class="input input3" >
  139. {{personalForm.realName}}
  140. </view>
  141. </view>
  142. <!--意向岗位 -->
  143. <view class="item">
  144. <view class="title">
  145. 身份证号<text class="redtext">*</text>
  146. </view>
  147. <view class="input " v-if="userInfo.status==0">
  148. <u-input type="text" v-model="personalForm.idCard"
  149. placeholder="请填写18位身份证号"></u-input>
  150. </view>
  151. <view v-if="userInfo.status==1" class="input input3" >
  152. {{personalForm.idCard}}
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. <button class="save" @click="submit"
  158. type="default">
  159. <span v-if="formData.status==0">提交修改</span>
  160. <span v-else-if="formData.status==1">提交修改</span>
  161. <span v-else >提交审批</span>
  162. </button>
  163. <!-- 筛选框 -->
  164. <u-popup v-model="popupShow" @open="popupShowOpen" mode="bottom" border-radius="20" :closeable="true">
  165. <view class="popup-content">
  166. <view class="headline">
  167. 筛选
  168. </view>
  169. <!-- 行业 -->
  170. <view class="industry">
  171. <view class="title">
  172. <u-search v-model="querypop"></u-search>
  173. <view>意向行业 <span style="color: #4696f6;">{{isChecked!=-1?'已选中:'+industryList[isChecked].name:''}}</span> (向下拉可滑动)</view>
  174. </view>
  175. <!-- 选项 -->
  176. <scroll-view class="scrollview" scroll-y="true" style="height: 620rpx;">
  177. <view class="options">
  178. <view
  179. :class="{item,checked:isChecked==index}" v-for="(item,index) in industryList"
  180. v-show="item.name.indexOf(querypop)!=-1"
  181. :key="index"
  182. @click="changeChecked(index)">
  183. <!-- 快递跑腿/配送/分拣 -->{{item.name}}
  184. </view>
  185. </view>
  186. </scroll-view>
  187. </view>
  188. <!-- 结算方式 -->
  189. <view class="clearing-form" v-if="false">
  190. <view class="title">
  191. 结算方式
  192. </view>
  193. <!-- 选项 -->
  194. <view class="options">
  195. <view :class="{item,checked:wayChecked==index}" v-for="(item,index) in wayList" :key="index"
  196. @click="changeWayChecked(index)">
  197. {{item.name}}
  198. </view>
  199. </view>
  200. </view>
  201. <!-- 薪资形式 -->
  202. <view class="salary-form" v-if="false">
  203. <view class="title">
  204. 薪资形式
  205. </view>
  206. <!-- 选项 -->
  207. <view class="options ">
  208. <view :class="{item,checked:saralyChecked==index}" v-for="(item,index) in salaryList"
  209. :key="index" @click="changeSaralyChecked(index)">
  210. {{item.name}}
  211. </view>
  212. </view>
  213. </view>
  214. <view class="button">
  215. <button class="reset" @click="reset()">重置</button>
  216. <button class="confirm" @click="queryBtn()" >确认</button>
  217. </view>
  218. </view>
  219. </u-popup>
  220. </view>
  221. </template>
  222. <script>
  223. import * as API_weixin from '@/apis/weixin.js'
  224. import {
  225. checkIdCard
  226. } from '@/apis/utils'
  227. import * as API from '@/apis/pagejs/packages.js'
  228. export default {
  229. data() {
  230. return {
  231. querypop:"",
  232. popupShow: false,
  233. isChecked: -1,
  234. industryList: [
  235. ],
  236. personalForm:{
  237. realName:'',
  238. idCard:"",
  239. },
  240. src: '',
  241. tel: '15011110000',
  242. show: false,
  243. list: [],
  244. formData:{
  245. id:"",
  246. intendedIndustries:"",
  247. intendedPosition:"",
  248. hopeSalary:"",
  249. method:"",
  250. workExperience:"",
  251. education:"",
  252. serviceDesc:"",
  253. photo:"",
  254. },
  255. intendedIndustries:"",
  256. method:"",
  257. workExperience:"",
  258. education:"",
  259. sqlList:[[],[
  260. {
  261. "name": "日结",
  262. "value": "1",
  263. },
  264. {
  265. "name": "周结",
  266. "value": "2",
  267. },
  268. {
  269. "name": "月结",
  270. "value": "3",
  271. }
  272. ],[],[],[],[],[]],
  273. valueList:[-1,-1,-1,-1,-1,-1],
  274. selectIndex:0,
  275. form: {},
  276. userInfo:{}
  277. }
  278. },
  279. onLoad(){
  280. this.userInfo=this.carhelp.getPersonInfo()
  281. this.tel=this.userInfo.phone
  282. if(this.userInfo.realName){
  283. this.personalForm.realName=this.userInfo.realName
  284. this.personalForm.idCard=this.userInfo.idCard
  285. }
  286. this.myJobHunt()
  287. },
  288. methods: {
  289. reset() {
  290. this.isChecked = -1;
  291. },
  292. queryBtn(){
  293. this.formData.intendedIndustries=this.industryList[this.isChecked].value
  294. this.intendedIndustries=this.industryList[this.isChecked].name
  295. this.popupShow=false;
  296. },
  297. changeChecked(index) {
  298. this.isChecked = index;
  299. },
  300. popupShowOpen(){
  301. if(this.industryList.length==0){
  302. uni.showLoading({
  303. title: "加载中",
  304. mask: true,
  305. })
  306. API_weixin.findListByCatalogName({
  307. name:'意向行业',
  308. }).then((res) => {
  309. uni.hideLoading();
  310. this.industryList=res.data.dictionaryList
  311. }).catch(error => {
  312. uni.showToast({icon: 'none',
  313. title: error
  314. })
  315. //this.getPhone()
  316. })
  317. }
  318. },
  319. myJobHunt(){
  320. uni.showLoading({
  321. title: "加载中",
  322. mask: true,
  323. })
  324. API.myJobHunt().then((res) => {
  325. uni.hideLoading()
  326. if(res.data.jobInformationInfo){
  327. this.formData = res.data.jobInformationInfo;
  328. var name=["intendedIndustries","method",
  329. "workExperience","education",]
  330. for(var i in name){
  331. //.log(name[i]+'N')
  332. var test=this.formData[(name[i]+'N')]
  333. this[name[i]]=test?test:''
  334. }
  335. this.src= this.formData.photo
  336. }
  337. }).catch(error => {
  338. uni.showToast({icon: 'none',
  339. title: error,
  340. icon: "none"
  341. })
  342. })
  343. },
  344. submit(){
  345. if(!this.formData.intendedIndustries){
  346. uni.showToast({icon: 'none',
  347. title: "请选择意向行业"
  348. })
  349. return
  350. }
  351. if(!this.formData.intendedPosition){
  352. uni.showToast({icon: 'none',
  353. title: "请填写想找的工作岗位"
  354. })
  355. return
  356. }
  357. if(!this.formData.method){
  358. uni.showToast({icon: 'none',
  359. title: "请选择结算方式"
  360. })
  361. return
  362. }
  363. if(!this.formData.hopeSalary){
  364. uni.showToast({icon: 'none',
  365. title: "请填写期望薪资"
  366. })
  367. return
  368. }
  369. if(!this.formData.serviceDesc){
  370. uni.showToast({icon: 'none',
  371. title: "请描述您能提供哪些服务"
  372. })
  373. return
  374. }
  375. uni.showLoading({
  376. title: "加载中",
  377. mask: true,
  378. })
  379. this.formData.photo=this.src
  380. if(this.userInfo.status==0){
  381. if(!this.personalForm.realName) {
  382. uni.showToast({icon: 'none',
  383. title: "请填写真实姓名",
  384. icon: "none"
  385. })
  386. return
  387. }
  388. if(!this.personalForm.idCard) {
  389. uni.showToast({icon: 'none',
  390. title: "请填写身份证号",
  391. icon: "none"
  392. })
  393. return
  394. }
  395. var checkIdCardResult = checkIdCard(this.personalForm.idCard);
  396. if (checkIdCardResult !== true) {
  397. uni.showToast({icon: 'none',
  398. title: checkIdCardResult,
  399. icon: "none"
  400. })
  401. return;
  402. }
  403. this.personalAutApi();
  404. }else{
  405. this.createJobHuntApi()
  406. }
  407. },
  408. personalAutApi(){
  409. uni.showLoading({
  410. title: "加载中",
  411. mask: true
  412. })
  413. API.createAuthentication(this.personalForm).then((res) => {
  414. uni.hideLoading();
  415. this.createJobHuntApi();
  416. }).catch(error => {
  417. uni.showToast({icon: 'none',
  418. title: error,
  419. icon: "none"
  420. })
  421. })
  422. },
  423. createJobHuntApi(){
  424. API.createJobHunt(this.formData).then((res) => {
  425. uni.hideLoading();
  426. uni.showModal({
  427. title: '提示',
  428. content: '简历审批中,请耐心等待',
  429. showCancel:false,
  430. success: function (res) {
  431. if (res.confirm) {
  432. uni.navigateBack()
  433. } else if (res.cancel) {
  434. //.log('用户点击取消');
  435. }
  436. }
  437. });
  438. }).catch(error => {
  439. uni.showToast({icon: 'none',
  440. title: error
  441. })
  442. //this.getPhone()
  443. })
  444. },
  445. showselect(k){
  446. this.selectIndex=k;
  447. if(this.sqlList[k].length==0){
  448. var name=['意向行业','结算方式','工作经验','学历']
  449. uni.showLoading({
  450. title: "加载中",
  451. mask: true,
  452. })
  453. API_weixin.findListByCatalogName({
  454. name:name[k],
  455. }).then((res) => {
  456. uni.hideLoading();
  457. this.sqlList[k]=res.data.dictionaryList
  458. this.list=this.sqlList[k];
  459. this.show= true
  460. }).catch(error => {
  461. uni.showToast({icon: 'none',
  462. title: error
  463. })
  464. //this.getPhone()
  465. })
  466. }else{
  467. this.list=this.sqlList[k];
  468. this.show= true
  469. }
  470. },
  471. saveRecordConfirmMethod(fileData) {
  472. var token = this.carhelp.getToken()
  473. uni.uploadFile({
  474. url: process.car.BASE_URL + "uploadPicture", //仅为示例,非真实的接口地址
  475. filePath:fileData,
  476. header: {
  477. 'Authorization': token,
  478. //'Content-Type': 'multipart/form-data',
  479. 'X-Requested-With': 'XMLHttpRequest',
  480. // 'content-type': 'multipart/form-data'
  481. },
  482. name: 'photoFile',
  483. formData: {
  484. subFolder: "headimg"
  485. },
  486. success: (uploadFileRes) => {
  487. var obj = JSON.parse(uploadFileRes.data)
  488. //.log(obj);
  489. this.src = obj.data;
  490. // uni.hideLoading();
  491. }
  492. });
  493. },
  494. confirm(e) {
  495. this.show = false;
  496. var name=["intendedIndustries","method",
  497. "workExperience","education",]
  498. this[name[this.selectIndex]]=e[0].label
  499. this.formData[name[this.selectIndex]]=e[0].value
  500. //.log(e)
  501. },
  502. uploadPhoto() {
  503. let _self = this;
  504. const crop = {
  505. quality: 100,
  506. width: 600,
  507. height: 600,
  508. resize: true
  509. };
  510. // 上传图片
  511. uni.chooseImage({
  512. count: 1,
  513. crop,
  514. success: async (res) => {
  515. //(res);
  516. let tempFile = res.tempFiles[0];
  517. var filePath = res.tempFilePaths[0]
  518. let fileData = await new Promise((callback) => {
  519. uni.navigateTo({
  520. url: './cropImage?path=' + filePath +
  521. `&options=${JSON.stringify(crop)}`,
  522. animationType: "fade-in",
  523. events: {
  524. success: url => {
  525. callback(url)
  526. }
  527. }
  528. });
  529. })
  530. this.saveRecordConfirmMethod(fileData);
  531. }
  532. });
  533. },
  534. }
  535. }
  536. </script>
  537. <style>
  538. page {
  539. background: #F0F0F2;
  540. padding-bottom: 150px;
  541. }
  542. </style>
  543. <style lang="scss" scoped>
  544. .main {
  545. margin: 24rpx 32rpx;
  546. background-color: #fff;
  547. padding: 40rpx 32rpx 0;
  548. border-radius: 12px;
  549. .redtext{
  550. color:red;
  551. }
  552. .titlesm {
  553. color: #333333;
  554. font-size: 18px;
  555. font-family: 'PingFangSC-medium';
  556. }
  557. .person-infos {
  558. display: flex;
  559. justify-content: space-between;
  560. .infos {
  561. .name {
  562. color: rgba(51, 51, 51, 1);
  563. font-size: 20px;
  564. font-family: 'PingFangSC-medium';
  565. }
  566. .gender-age {
  567. color: rgba(119, 119, 119, 1);
  568. margin-top: 8rpx;
  569. .text {
  570. margin: 0 8rpx;
  571. }
  572. .text:nth-of-type(1) {
  573. margin-left: 0;
  574. }
  575. }
  576. }
  577. .photo {
  578. position: relative;
  579. img {
  580. width: 60px;
  581. height: 60px;
  582. }
  583. .camera {
  584. width: 48rpx;
  585. height: 48rpx;
  586. position: absolute;
  587. top: 36rpx;
  588. left: 36rpx;
  589. z-index: 999;
  590. }
  591. }
  592. }
  593. .information-group {
  594. .item {
  595. display: flex;
  596. align-items: center;
  597. padding: 12rpx 0;
  598. border-bottom: 1px solid #f1f1f1;
  599. .title {
  600. color: rgba(51, 51, 51, 1);
  601. font-size: 32rpx;
  602. width: 150rpx;
  603. text {
  604. color: #FF0000;
  605. }
  606. }
  607. .input3{
  608. padding: 16rpx 0;
  609. }
  610. .input2 {
  611. width: 360rpx;
  612. margin-left: 24rpx;
  613. /deep/.uni-input-input {
  614. color: rgba(51, 51, 51, 1);
  615. }
  616. }
  617. .input {
  618. width: 460rpx;
  619. margin-left: 24rpx;
  620. /deep/.uni-input-input {
  621. color: rgba(51, 51, 51, 1);
  622. }
  623. }
  624. .icon {
  625. margin-left: auto;
  626. }
  627. .unit {
  628. margin-left: auto;
  629. color: #333333;
  630. font-size: 24rpx;
  631. }
  632. }
  633. }
  634. }
  635. // 服务描述
  636. .service-description {
  637. margin: 24rpx 32rpx;
  638. background-color: #fff;
  639. border-radius: 12px;
  640. padding: 24rpx 32rpx;
  641. .title {
  642. color: #333333;
  643. font-size: 18px;
  644. font-family: 'PingFangSC-medium';
  645. }
  646. text {
  647. color: #FF0000;
  648. }
  649. .textarea {
  650. margin-top: 24rpx;
  651. line-height: 40rpx;
  652. width: 100%;
  653. height: 240rpx;
  654. }
  655. }
  656. .save {
  657. background-color: rgba(34, 149, 255, 1);
  658. color: rgba(241, 241, 241, 1);
  659. font-size: 18px;
  660. height: 96rpx;
  661. line-height: 96rpx;
  662. border-radius: 50px;
  663. position: fixed;
  664. left: 32rpx;
  665. right: 32rpx;
  666. bottom: 20rpx;
  667. z-index: 999;
  668. }
  669. // 筛选框
  670. .popup-content {
  671. padding: 32rpx;
  672. .headline {
  673. color: #101010;
  674. font-size: 40rpx;
  675. text-align: center;
  676. }
  677. //行业
  678. .industry,
  679. .clearing-form,
  680. .salary-form {
  681. margin-top: 16rpx;
  682. .title {
  683. font-size: 32rpx;
  684. color: #111111;
  685. }
  686. // 选项
  687. .options {
  688. display: flex;
  689. justify-content: space-between;
  690. flex-wrap: wrap;
  691. margin-top: 24rpx;
  692. .item {
  693. height: 56rpx;
  694. line-height: 56rpx;
  695. min-width: 210rpx;
  696. text-align: center;
  697. margin-bottom: 16rpx;
  698. margin-right: 16rpx;
  699. color: #999999;
  700. background-color: #F3F3F4;
  701. border-radius: 4px;
  702. }
  703. .checked {
  704. background-color: #2795FD;
  705. color: #fff;
  706. }
  707. }
  708. }
  709. .button {
  710. display: flex;
  711. margin-top: 8rpx;
  712. .reset:after{
  713. border:0
  714. }
  715. .reset {
  716. color: #999999;
  717. background-color: #F3F3F4;
  718. width: 200rpx;
  719. height: 72rpx;
  720. line-height: 72rpx;
  721. border-radius: 8px;
  722. }
  723. .confirm {
  724. width: 440rpx;
  725. background-color: #2795FD;
  726. color: #fff;
  727. height: 72rpx;
  728. line-height: 72rpx;
  729. border-radius: 8px;
  730. }
  731. }
  732. }
  733. .salary-form,
  734. .clearing-form {
  735. .options {
  736. justify-content: start !important;
  737. }
  738. .item {
  739. margin-right: 24rpx;
  740. }
  741. }
  742. .scrollview{
  743. border: 1px #101010 dashed;
  744. }
  745. </style>