postMessage.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795
  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. <!-- 基本信息 -->
  6. <view class="information-group">
  7. <view class="headline">
  8. 基本信息
  9. </view>
  10. <!-- 职位名称 -->
  11. <view class="item">
  12. <view class="title">
  13. <text>*</text>职位名称
  14. </view>
  15. <view class="input">
  16. <u-input type="text" v-model="formData.positionName" placeholder="请填写职位名称"></u-input>
  17. </view>
  18. </view>
  19. <!--结算形式 -->
  20. <view class="item">
  21. <view class="title">
  22. <text>*</text>结算形式
  23. </view>
  24. <view class="input">
  25. <u-input type="select" v-model="settlementMethod" @click="showselect(1)"
  26. placeholder="请选择结算形式"></u-input>
  27. </view>
  28. </view>
  29. <!-- *薪资待遇 -->
  30. <view class="item">
  31. <view class="title">
  32. <text>*</text>薪资待遇
  33. </view>
  34. <view class="input2">
  35. <u-input type="text" v-model="formData.salary" placeholder="请填写薪资待遇"></u-input>
  36. </view>
  37. <view class="unit">
  38. {{getUnit(formData)}}
  39. </view>
  40. <!-- <view class="icon" @click="showselect(0)">
  41. <u-icon name="arrow-right" color="#999999"></u-icon>
  42. </view> -->
  43. </view>
  44. <!-- 行业 -->
  45. <view class="item">
  46. <view class="title">
  47. <text>*</text>行业
  48. </view>
  49. <view class="input">
  50. <u-input type="select" v-model="industry" @click="popupShow=true" readonly
  51. placeholder="请选择行业"></u-input>
  52. </view>
  53. </view>
  54. <!-- 招聘人数 -->
  55. <view class="item">
  56. <view class="title">
  57. <text>*</text>招聘人数
  58. </view>
  59. <view class="input">
  60. <u-input type="number" v-model="formData.recruitingNumbers" placeholder="请填写招聘人数"></u-input>
  61. </view>
  62. </view>
  63. <!-- 招聘人数 -->
  64. <view class="item">
  65. <view class="title">
  66. 年龄要求
  67. </view>
  68. <view class="input">
  69. <u-input type="text" v-model="formData.ageRequirement" placeholder="请填写年龄要求"></u-input>
  70. </view>
  71. </view>
  72. </view>
  73. <!-- 工作描述 -->
  74. <view class="job-description">
  75. <view class="title">
  76. <text>*</text>工作描述
  77. </view>
  78. <view class="input" style="padding-bottom: 20px;" >
  79. 请简单描述工作内容及职位要求
  80. <u-input type="text"
  81. v-model="formData.desc"
  82. placeholder="请填写"></u-input>
  83. </view>
  84. </view>
  85. <!-- 个人信息 -->
  86. <view class="information-group">
  87. <view class="headline">
  88. 基本信息
  89. </view>
  90. <!-- 联系人 -->
  91. <view class="item">
  92. <view class="title">
  93. <text>*</text>联系人
  94. </view>
  95. <view class="input">
  96. <u-input type="text" v-model="formData.contacts" placeholder="请填写联系人"></u-input>
  97. </view>
  98. </view>
  99. <!-- 联系电话 -->
  100. <view class="item">
  101. <view class="title">
  102. <text>*</text>联系电话
  103. </view>
  104. <view class="input">
  105. <u-input type="text" v-model="formData.contactsPhone" placeholder="请填写联系电话"></u-input>
  106. </view>
  107. </view>
  108. <!--工作地区 -->
  109. <view class="item">
  110. <view class="title">
  111. <text>*</text>工作地区
  112. </view>
  113. <view class="input">
  114. <u-input type="select" v-model="workArea" @click="showselect(3)" placeholder="请选择工作地区"></u-input>
  115. </view>
  116. </view>
  117. <!-- 详细地址 -->
  118. <view class="item">
  119. <view class="title">
  120. <text>*</text>详细地址
  121. </view>
  122. <view class="input">
  123. <u-input type="text" v-model="formData.address" placeholder="请填写详细的工作地址"></u-input>
  124. </view>
  125. </view>
  126. </view>
  127. <view class="information-group">
  128. <view class="headline">
  129. 展示图片<span>(最多上传5张)</span>
  130. </view>
  131. <u-upload ref="uUpload" :action="action" name="photoFile" :file-list="listPic"
  132. :form-data="formDataUpload" :header="header" width="180" max-count="5" @on-success="onSuccess">
  133. </u-upload>
  134. </view>
  135. <u-select v-model="show" value-name="value" label-name="name" :list="list" @confirm="confirm"></u-select>
  136. <button class="issue" @click="submit()" type="default">提交审核</button>
  137. <!-- 筛选框 -->
  138. <u-popup v-model="popupShow" @open="popupShowOpen" mode="bottom" border-radius="20" :closeable="true">
  139. <view class="popup-content">
  140. <view class="headline">
  141. 筛选
  142. </view>
  143. <!-- 行业 -->
  144. <view class="industry">
  145. <view class="title">
  146. <u-search v-model="querypop"></u-search>
  147. <view>意向行业 <span
  148. style="color: #4696f6;">{{isChecked!=-1?'已选中:'+industryList[isChecked].name:''}}</span>
  149. (向下拉可滑动)</view>
  150. </view>
  151. <!-- 选项 -->
  152. <scroll-view class="scrollview" scroll-y="true" style="height: 620rpx;">
  153. <view class="options">
  154. <view :class="{item,checked:isChecked==index}" v-for="(item,index) in industryList"
  155. v-show="item.name.indexOf(querypop)!=-1" :key="index" @click="changeChecked(index)">
  156. <!-- 快递跑腿/配送/分拣 -->{{item.name}}
  157. </view>
  158. </view>
  159. </scroll-view>
  160. </view>
  161. <!-- 结算方式 -->
  162. <view class="clearing-form" v-if="false">
  163. <view class="title">
  164. 结算方式
  165. </view>
  166. <!-- 选项 -->
  167. <view class="options">
  168. <view :class="{item,checked:wayChecked==index}" v-for="(item,index) in wayList" :key="index"
  169. @click="changeWayChecked(index)">
  170. {{item.name}}
  171. </view>
  172. </view>
  173. </view>
  174. <!-- 薪资形式 -->
  175. <view class="salary-form" v-if="false">
  176. <view class="title">
  177. 薪资形式
  178. </view>
  179. <!-- 选项 -->
  180. <view class="options ">
  181. <view :class="{item,checked:saralyChecked==index}" v-for="(item,index) in salaryList"
  182. :key="index" @click="changeSaralyChecked(index)">
  183. {{item.name}}
  184. </view>
  185. </view>
  186. </view>
  187. <view class="button">
  188. <button class="reset" @click="reset()">重置</button>
  189. <button class="confirm" @click="queryBtn()">确认</button>
  190. </view>
  191. </view>
  192. </u-popup>
  193. </view>
  194. </template>
  195. <script>
  196. import * as API_weixin from '@/apis/weixin.js'
  197. import * as API from '@/apis/pagejs/packages.js'
  198. export default {
  199. data() {
  200. return {
  201. querypop: "",
  202. popupShow: false,
  203. isChecked: -1,
  204. industryList: [],
  205. selectIndex: 0,
  206. show: false,
  207. list: [],
  208. formData: {
  209. positionName: "",
  210. salary: "",
  211. settlementMethod: "",
  212. industry: "",
  213. recruitingNumbers: "",
  214. desc: "",
  215. contacts: "",
  216. contactsPhone: "",
  217. workArea: "",
  218. address: "",
  219. salaryForm: "2",
  220. ageRequirement:"",
  221. images:"",
  222. },
  223. settlementMethod: "",
  224. salaryForm: "计时",
  225. industry: "",
  226. workArea: "",
  227. sqlList: [
  228. [],
  229. [{
  230. "name": "日结",
  231. "value": "1",
  232. },
  233. {
  234. "name": "周结",
  235. "value": "2",
  236. },
  237. {
  238. "name": "月结",
  239. "value": "3",
  240. }
  241. ],
  242. [],
  243. [],
  244. [],
  245. [],
  246. []
  247. ],
  248. valueList: [-1, -1, -1, -1, -1, -1],
  249. userInfo: {},
  250. id: "",
  251. formDataUpload:{},
  252. action: '',
  253. header: '',
  254. listPic: [],
  255. }
  256. },
  257. onLoad(op) {
  258. this.userInfo = this.carhelp.getPersonInfo()
  259. if (op.id) {
  260. this.id = op.id
  261. this.getInfo()
  262. } else {
  263. var enterpriseInfo = this.carhelp.getPersonInfoPlus().enterpriseInfo
  264. if(enterpriseInfo){
  265. this.formData.contacts = enterpriseInfo.contactsPersonId
  266. this.formData.address = enterpriseInfo.address
  267. }
  268. }
  269. this.action = process.car.BASE_URL+"uploadPicture";
  270. this.formDataUpload = {
  271. subFolder: "laborManagement"
  272. }
  273. var token = this.carhelp.getToken();
  274. this.header={
  275. 'Authorization': token,
  276. 'X-Requested-With': 'XMLHttpRequest'
  277. }
  278. //this.tel=this.userInfo.phone
  279. },
  280. methods: {
  281. onSuccess(data, index, lists, name) {
  282. console.log(this.$refs.uUpload.lists)
  283. if(data.result) {
  284. }
  285. },
  286. reset() {
  287. this.isChecked = -1;
  288. },
  289. queryBtn() {
  290. this.formData.industry = this.industryList[this.isChecked].value
  291. this.industry = this.industryList[this.isChecked].name
  292. this.popupShow = false;
  293. },
  294. changeChecked(index) {
  295. this.isChecked = index;
  296. },
  297. popupShowOpen() {
  298. if (this.industryList.length == 0) {
  299. uni.showLoading({
  300. title: "加载中",
  301. mask: true,
  302. })
  303. API_weixin.findListByCatalogName({
  304. name: '意向行业',
  305. }).then((res) => {
  306. uni.hideLoading();
  307. this.industryList = res.data.dictionaryList
  308. }).catch(error => {
  309. uni.showToast({
  310. icon: 'none',
  311. title: error
  312. })
  313. //this.getPhone()
  314. })
  315. }
  316. },
  317. getInfo() {
  318. uni.showLoading({
  319. title: "加载中",
  320. mask: true,
  321. })
  322. API.recruitDetail({
  323. recruitId: this.id
  324. }).then((res) => {
  325. uni.hideLoading()
  326. if (res.data.recruitInformationInfo) {
  327. this.formData = res.data.recruitInformationInfo;
  328. var name = ["salaryForm", "settlementMethod", "industry", ]
  329. for (var i in name) {
  330. //.log(name[i]+'N')
  331. this[name[i]] = this.formData[(name[i] + 'N')]
  332. }
  333. this.workArea = this.formData.workArea
  334. this.listPic=JSON.parse(this.formData.images)
  335. for(var i in this.listPic){
  336. var obj=this.listPic[i]
  337. obj.progress=100
  338. obj.error=false
  339. obj.response={
  340. code: 200,
  341. data: obj.url,
  342. message: null,
  343. result: true
  344. }
  345. }
  346. this.$refs.uUpload.lists=this.listPic
  347. }
  348. }).catch(error => {
  349. uni.showToast({
  350. icon: 'none',
  351. title: error,
  352. icon: "none"
  353. })
  354. })
  355. },
  356. confirm(e) {
  357. this.show = false;
  358. var name = ["salaryForm", "settlementMethod",
  359. "industry",
  360. "workArea",
  361. ]
  362. this[name[this.selectIndex]] = e[0].label
  363. this.formData[name[this.selectIndex]] = e[0].value
  364. //.log(e)
  365. },
  366. showselect(k) {
  367. this.selectIndex = k;
  368. if (this.sqlList[k].length == 0) {
  369. var name = ['薪资形式', '结算方式', '意向行业', '工作地区']
  370. uni.showLoading({
  371. title: "加载中",
  372. mask: true,
  373. })
  374. API_weixin.findListByCatalogName({
  375. name: name[k],
  376. }).then((res) => {
  377. uni.hideLoading();
  378. this.sqlList[k] = res.data.dictionaryList
  379. this.list = this.sqlList[k];
  380. this.show = true
  381. }).catch(error => {
  382. uni.showToast({
  383. icon: 'none',
  384. title: error
  385. })
  386. //this.getPhone()
  387. })
  388. } else {
  389. this.list = this.sqlList[k];
  390. this.show = true
  391. }
  392. },
  393. submit() {
  394. this.formData.images="";
  395. var imgs= this.$refs.uUpload.lists.filter(val => {
  396. return val.progress == 100;
  397. })
  398. if(imgs&&imgs.length){
  399. var str =imgs.map(item=>{
  400. return {
  401. name:"1.jpg",
  402. url:item.response.data
  403. }
  404. })
  405. console.log(str)
  406. this.formData.images=JSON.stringify(str);
  407. }
  408. if (!this.formData.positionName) {
  409. uni.showToast({
  410. icon: 'none',
  411. title: "请填写职位名称"
  412. })
  413. return
  414. }
  415. if (!this.formData.salary) {
  416. uni.showToast({
  417. icon: 'none',
  418. title: "请填写薪资待遇"
  419. })
  420. return
  421. }
  422. if (!this.formData.settlementMethod) {
  423. uni.showToast({
  424. icon: 'none',
  425. title: "请选择结算形式"
  426. })
  427. return
  428. }
  429. if (!this.formData.industry) {
  430. uni.showToast({
  431. icon: 'none',
  432. title: "请选择行业"
  433. })
  434. return
  435. }
  436. if (!this.formData.recruitingNumbers) {
  437. uni.showToast({
  438. icon: 'none',
  439. title: "请填写招聘人数"
  440. })
  441. return
  442. }
  443. if (!this.formData.desc) {
  444. uni.showToast({
  445. icon: 'none',
  446. title: "请简单描述工作内容及职位要求"
  447. })
  448. return
  449. }
  450. if (!this.formData.contacts) {
  451. uni.showToast({
  452. icon: 'none',
  453. title: "请填写联系人"
  454. })
  455. return
  456. }
  457. if (!this.formData.contactsPhone) {
  458. uni.showToast({
  459. icon: 'none',
  460. title: "请填写联系电话"
  461. })
  462. return
  463. }
  464. if (!this.formData.workArea) {
  465. uni.showToast({
  466. icon: 'none',
  467. title: "请选择工作地区"
  468. })
  469. return
  470. }
  471. if (!this.formData.address) {
  472. uni.showToast({
  473. icon: 'none',
  474. title: "请填写详细的工作地址"
  475. })
  476. return
  477. }
  478. this.formData.workArea = this.workArea
  479. uni.showLoading({
  480. title: "加载中",
  481. mask: true,
  482. })
  483. API.createRecruit(this.formData).then((res) => {
  484. uni.hideLoading();
  485. const eventChannel = this.getOpenerEventChannel();
  486. eventChannel.emit('refreshData');
  487. uni.showModal({
  488. title: '提示',
  489. content: '提交成功,等待审核!',
  490. showCancel: false,
  491. success: function(res) {
  492. if (res.confirm) {
  493. uni.navigateBack()
  494. } else if (res.cancel) {
  495. //.log('用户点击取消');
  496. }
  497. }
  498. });
  499. }).catch(error => {
  500. uni.showToast({
  501. icon: 'none',
  502. title: error
  503. })
  504. //this.getPhone()
  505. })
  506. }
  507. }
  508. }
  509. </script>
  510. <style>
  511. page {
  512. background: #F0F0F2;
  513. padding-bottom: 150px;
  514. }
  515. </style>
  516. <style lang="scss" scoped>
  517. .information-group {
  518. margin: 32rpx;
  519. padding: 24rpx 32rpx;
  520. background-color: #fff;
  521. border-radius: 24rpx;
  522. .headline {
  523. color: rgba(16, 16, 16, 1);
  524. font-size: 36rpx;
  525. margin-bottom: 24rpx;
  526. font-family: 'PingFangSC-medium';
  527. span{
  528. font-size: 24rpx;
  529. color: #9E9E9E;
  530. }
  531. }
  532. .item {
  533. display: flex;
  534. align-items: center;
  535. padding: 12rpx 0;
  536. border-bottom: 1px solid #f1f1f1;
  537. .title {
  538. color: rgba(51, 51, 51, 1);
  539. font-size: 32rpx;
  540. width: 148rpx;
  541. text {
  542. color: #EE3138
  543. }
  544. }
  545. .input {
  546. width: 450rpx;
  547. margin-left: 24rpx;
  548. /deep/.uni-input-input {
  549. color: rgba(51, 51, 51, 1);
  550. }
  551. }
  552. .input2 {
  553. width: 350rpx;
  554. margin-left: 24rpx;
  555. /deep/.uni-input-input {
  556. color: rgba(51, 51, 51, 1);
  557. }
  558. }
  559. .icon {
  560. margin-left: auto;
  561. }
  562. .unit {
  563. margin-left: auto;
  564. color: rgba(51, 51, 51, 1);
  565. font-size: 32rpx;
  566. }
  567. }
  568. }
  569. // 工作描述
  570. .job-description {
  571. margin: 24rpx 32rpx;
  572. background-color: #fff;
  573. border-radius: 12px;
  574. padding: 24rpx 32rpx;
  575. .title {
  576. color: #333333;
  577. font-size: 18px;
  578. font-family: 'PingFangSC-medium';
  579. }
  580. text {
  581. color: #FF0000;
  582. }
  583. .textarea {
  584. margin-top: 24rpx;
  585. line-height: 40rpx;
  586. width: 100%;
  587. height: 200rpx;
  588. }
  589. }
  590. /* 发布 */
  591. .issue {
  592. background-color: rgba(34, 149, 255, 1);
  593. color: rgba(241, 241, 241, 1);
  594. font-size: 18px;
  595. height: 96rpx;
  596. line-height: 96rpx;
  597. border-radius: 50px;
  598. position: fixed;
  599. left: 32rpx;
  600. right: 32rpx;
  601. bottom: 20rpx;
  602. z-index: 999;
  603. }
  604. // 筛选框
  605. .popup-content {
  606. padding: 32rpx;
  607. .headline {
  608. color: #101010;
  609. font-size: 40rpx;
  610. text-align: center;
  611. }
  612. //行业
  613. .industry,
  614. .clearing-form,
  615. .salary-form {
  616. margin-top: 16rpx;
  617. .title {
  618. font-size: 32rpx;
  619. color: #111111;
  620. }
  621. // 选项
  622. .options {
  623. display: flex;
  624. flex-wrap: wrap;
  625. margin-top: 24rpx;
  626. .item {
  627. height: 56rpx;
  628. line-height: 56rpx;
  629. min-width: 210rpx;
  630. text-align: center;
  631. margin-bottom: 16rpx;
  632. margin-right: 16rpx;
  633. color: #999999;
  634. background-color: #F3F3F4;
  635. border-radius: 4px;
  636. padding: 0 6rpx;
  637. }
  638. .checked {
  639. background-color: #2795FD;
  640. color: #fff;
  641. }
  642. }
  643. }
  644. .button {
  645. display: flex;
  646. margin-top: 8rpx;
  647. .reset:after {
  648. border: 0
  649. }
  650. .reset {
  651. color: #999999;
  652. background-color: #F3F3F4;
  653. width: 200rpx;
  654. height: 72rpx;
  655. line-height: 72rpx;
  656. border-radius: 8px;
  657. }
  658. .confirm {
  659. width: 440rpx;
  660. background-color: #2795FD;
  661. color: #fff;
  662. height: 72rpx;
  663. line-height: 72rpx;
  664. border-radius: 8px;
  665. }
  666. }
  667. }
  668. .salary-form,
  669. .clearing-form {
  670. .options {
  671. justify-content: start !important;
  672. }
  673. .item {
  674. margin-right: 24rpx;
  675. }
  676. }
  677. .scrollview {
  678. border: 1px #101010 dashed;
  679. }
  680. </style>