postMessage.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  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. <textarea class="textarea" v-model="formData.desc" placeholder="请简单描述工作内容及职位要求"></textarea>
  79. </view>
  80. <!-- 个人信息 -->
  81. <view class="information-group">
  82. <view class="headline">
  83. 基本信息
  84. </view>
  85. <!-- 联系人 -->
  86. <view class="item">
  87. <view class="title">
  88. <text>*</text>联系人
  89. </view>
  90. <view class="input">
  91. <u-input type="text" v-model="formData.contacts" placeholder="请填写联系人"></u-input>
  92. </view>
  93. </view>
  94. <!-- 联系电话 -->
  95. <view class="item">
  96. <view class="title">
  97. <text>*</text>联系电话
  98. </view>
  99. <view class="input">
  100. <u-input type="text" v-model="formData.contactsPhone" placeholder="请填写联系电话"></u-input>
  101. </view>
  102. </view>
  103. <!--工作地区 -->
  104. <view class="item">
  105. <view class="title">
  106. <text>*</text>工作地区
  107. </view>
  108. <view class="input">
  109. <u-input type="select" v-model="workArea" @click="showselect(3)" placeholder="请选择工作地区"></u-input>
  110. </view>
  111. </view>
  112. <!-- 详细地址 -->
  113. <view class="item">
  114. <view class="title">
  115. <text>*</text>详细地址
  116. </view>
  117. <view class="input">
  118. <u-input type="text" v-model="formData.address" placeholder="请填写详细的工作地址"></u-input>
  119. </view>
  120. </view>
  121. </view>
  122. <u-select v-model="show" value-name="value" label-name="name" :list="list" @confirm="confirm"></u-select>
  123. <button class="issue" @click="submit()" type="default">提交审核</button>
  124. <!-- 筛选框 -->
  125. <u-popup v-model="popupShow" @open="popupShowOpen" mode="bottom" border-radius="20" :closeable="true">
  126. <view class="popup-content">
  127. <view class="headline">
  128. 筛选
  129. </view>
  130. <!-- 行业 -->
  131. <view class="industry">
  132. <view class="title">
  133. <u-search v-model="querypop"></u-search>
  134. <view>意向行业 <span
  135. style="color: #4696f6;">{{isChecked!=-1?'已选中:'+industryList[isChecked].name:''}}</span>
  136. (向下拉可滑动)</view>
  137. </view>
  138. <!-- 选项 -->
  139. <scroll-view class="scrollview" scroll-y="true" style="height: 620rpx;">
  140. <view class="options">
  141. <view :class="{item,checked:isChecked==index}" v-for="(item,index) in industryList"
  142. v-show="item.name.indexOf(querypop)!=-1" :key="index" @click="changeChecked(index)">
  143. <!-- 快递跑腿/配送/分拣 -->{{item.name}}
  144. </view>
  145. </view>
  146. </scroll-view>
  147. </view>
  148. <!-- 结算方式 -->
  149. <view class="clearing-form" v-if="false">
  150. <view class="title">
  151. 结算方式
  152. </view>
  153. <!-- 选项 -->
  154. <view class="options">
  155. <view :class="{item,checked:wayChecked==index}" v-for="(item,index) in wayList" :key="index"
  156. @click="changeWayChecked(index)">
  157. {{item.name}}
  158. </view>
  159. </view>
  160. </view>
  161. <!-- 薪资形式 -->
  162. <view class="salary-form" v-if="false">
  163. <view class="title">
  164. 薪资形式
  165. </view>
  166. <!-- 选项 -->
  167. <view class="options ">
  168. <view :class="{item,checked:saralyChecked==index}" v-for="(item,index) in salaryList"
  169. :key="index" @click="changeSaralyChecked(index)">
  170. {{item.name}}
  171. </view>
  172. </view>
  173. </view>
  174. <view class="button">
  175. <button class="reset" @click="reset()">重置</button>
  176. <button class="confirm" @click="queryBtn()">确认</button>
  177. </view>
  178. </view>
  179. </u-popup>
  180. </view>
  181. </template>
  182. <script>
  183. import * as API_weixin from '@/apis/weixin.js'
  184. import * as API from '@/apis/pagejs/packages.js'
  185. export default {
  186. data() {
  187. return {
  188. querypop: "",
  189. popupShow: false,
  190. isChecked: -1,
  191. industryList: [],
  192. selectIndex: 0,
  193. show: false,
  194. list: [],
  195. formData: {
  196. positionName: "",
  197. salary: "",
  198. settlementMethod: "",
  199. industry: "",
  200. recruitingNumbers: "",
  201. desc: "",
  202. contacts: "",
  203. contactsPhone: "",
  204. workArea: "",
  205. address: "",
  206. salaryForm: "2",
  207. ageRequirement:"",
  208. },
  209. settlementMethod: "",
  210. salaryForm: "计时",
  211. industry: "",
  212. workArea: "",
  213. sqlList: [
  214. [],
  215. [{
  216. "name": "日结",
  217. "value": "1",
  218. },
  219. {
  220. "name": "周结",
  221. "value": "2",
  222. },
  223. {
  224. "name": "月结",
  225. "value": "3",
  226. }
  227. ],
  228. [],
  229. [],
  230. [],
  231. [],
  232. []
  233. ],
  234. valueList: [-1, -1, -1, -1, -1, -1],
  235. userInfo: {},
  236. id: "",
  237. }
  238. },
  239. onLoad(op) {
  240. this.userInfo = this.carhelp.getPersonInfo()
  241. if (op.id) {
  242. this.id = op.id
  243. this.getInfo()
  244. } else {
  245. var enterpriseInfo = this.carhelp.getPersonInfoPlus().enterpriseInfo
  246. this.formData.contacts = enterpriseInfo.contactsPersonId
  247. this.formData.address = enterpriseInfo.address
  248. }
  249. //this.tel=this.userInfo.phone
  250. },
  251. methods: {
  252. reset() {
  253. this.isChecked = -1;
  254. },
  255. queryBtn() {
  256. this.formData.industry = this.industryList[this.isChecked].value
  257. this.industry = this.industryList[this.isChecked].name
  258. this.popupShow = false;
  259. },
  260. changeChecked(index) {
  261. this.isChecked = index;
  262. },
  263. popupShowOpen() {
  264. if (this.industryList.length == 0) {
  265. uni.showLoading({
  266. title: "加载中",
  267. mask: true,
  268. })
  269. API_weixin.findListByCatalogName({
  270. name: '意向行业',
  271. }).then((res) => {
  272. uni.hideLoading();
  273. this.industryList = res.data.dictionaryList
  274. }).catch(error => {
  275. uni.showToast({
  276. icon: 'none',
  277. title: error
  278. })
  279. //this.getPhone()
  280. })
  281. }
  282. },
  283. getInfo() {
  284. uni.showLoading({
  285. title: "加载中",
  286. mask: true,
  287. })
  288. API.recruitDetail({
  289. recruitId: this.id
  290. }).then((res) => {
  291. uni.hideLoading()
  292. if (res.data.recruitInformationInfo) {
  293. this.formData = res.data.recruitInformationInfo;
  294. var name = ["salaryForm", "settlementMethod", "industry", ]
  295. for (var i in name) {
  296. //.log(name[i]+'N')
  297. this[name[i]] = this.formData[(name[i] + 'N')]
  298. }
  299. this.workArea = this.formData.workArea
  300. }
  301. }).catch(error => {
  302. uni.showToast({
  303. icon: 'none',
  304. title: error,
  305. icon: "none"
  306. })
  307. })
  308. },
  309. confirm(e) {
  310. this.show = false;
  311. var name = ["salaryForm", "settlementMethod",
  312. "industry",
  313. "workArea",
  314. ]
  315. this[name[this.selectIndex]] = e[0].label
  316. this.formData[name[this.selectIndex]] = e[0].value
  317. //.log(e)
  318. },
  319. showselect(k) {
  320. this.selectIndex = k;
  321. if (this.sqlList[k].length == 0) {
  322. var name = ['薪资形式', '结算方式', '意向行业', '工作地区']
  323. uni.showLoading({
  324. title: "加载中",
  325. mask: true,
  326. })
  327. API_weixin.findListByCatalogName({
  328. name: name[k],
  329. }).then((res) => {
  330. uni.hideLoading();
  331. this.sqlList[k] = res.data.dictionaryList
  332. this.list = this.sqlList[k];
  333. this.show = true
  334. }).catch(error => {
  335. uni.showToast({
  336. icon: 'none',
  337. title: error
  338. })
  339. //this.getPhone()
  340. })
  341. } else {
  342. this.list = this.sqlList[k];
  343. this.show = true
  344. }
  345. },
  346. submit() {
  347. if (!this.formData.positionName) {
  348. uni.showToast({
  349. icon: 'none',
  350. title: "请填写职位名称"
  351. })
  352. return
  353. }
  354. if (!this.formData.salary) {
  355. uni.showToast({
  356. icon: 'none',
  357. title: "请填写薪资待遇"
  358. })
  359. return
  360. }
  361. if (!this.formData.settlementMethod) {
  362. uni.showToast({
  363. icon: 'none',
  364. title: "请选择结算形式"
  365. })
  366. return
  367. }
  368. if (!this.formData.industry) {
  369. uni.showToast({
  370. icon: 'none',
  371. title: "请选择行业"
  372. })
  373. return
  374. }
  375. if (!this.formData.recruitingNumbers) {
  376. uni.showToast({
  377. icon: 'none',
  378. title: "请填写招聘人数"
  379. })
  380. return
  381. }
  382. if (!this.formData.desc) {
  383. uni.showToast({
  384. icon: 'none',
  385. title: "请简单描述工作内容及职位要求"
  386. })
  387. return
  388. }
  389. if (!this.formData.contacts) {
  390. uni.showToast({
  391. icon: 'none',
  392. title: "请填写联系人"
  393. })
  394. return
  395. }
  396. if (!this.formData.contactsPhone) {
  397. uni.showToast({
  398. icon: 'none',
  399. title: "请填写联系电话"
  400. })
  401. return
  402. }
  403. if (!this.formData.workArea) {
  404. uni.showToast({
  405. icon: 'none',
  406. title: "请选择工作地区"
  407. })
  408. return
  409. }
  410. if (!this.formData.address) {
  411. uni.showToast({
  412. icon: 'none',
  413. title: "请填写详细的工作地址"
  414. })
  415. return
  416. }
  417. this.formData.workArea = this.workArea
  418. uni.showLoading({
  419. title: "加载中",
  420. mask: true,
  421. })
  422. API.createRecruit(this.formData).then((res) => {
  423. uni.hideLoading();
  424. const eventChannel = this.getOpenerEventChannel();
  425. eventChannel.emit('refreshData');
  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({
  440. icon: 'none',
  441. title: error
  442. })
  443. //this.getPhone()
  444. })
  445. }
  446. }
  447. }
  448. </script>
  449. <style>
  450. page {
  451. background: #F0F0F2;
  452. padding-bottom: 150px;
  453. }
  454. </style>
  455. <style lang="scss" scoped>
  456. .information-group {
  457. margin: 32rpx;
  458. padding: 24rpx 32rpx;
  459. background-color: #fff;
  460. border-radius: 24rpx;
  461. .headline {
  462. color: rgba(16, 16, 16, 1);
  463. font-size: 36rpx;
  464. margin-bottom: 24rpx;
  465. font-family: 'PingFangSC-medium';
  466. }
  467. .item {
  468. display: flex;
  469. align-items: center;
  470. padding: 12rpx 0;
  471. border-bottom: 1px solid #f1f1f1;
  472. .title {
  473. color: rgba(51, 51, 51, 1);
  474. font-size: 32rpx;
  475. width: 148rpx;
  476. text {
  477. color: #EE3138
  478. }
  479. }
  480. .input {
  481. width: 450rpx;
  482. margin-left: 24rpx;
  483. /deep/.uni-input-input {
  484. color: rgba(51, 51, 51, 1);
  485. }
  486. }
  487. .input2 {
  488. width: 350rpx;
  489. margin-left: 24rpx;
  490. /deep/.uni-input-input {
  491. color: rgba(51, 51, 51, 1);
  492. }
  493. }
  494. .icon {
  495. margin-left: auto;
  496. }
  497. .unit {
  498. margin-left: auto;
  499. color: rgba(51, 51, 51, 1);
  500. font-size: 32rpx;
  501. }
  502. }
  503. }
  504. // 工作描述
  505. .job-description {
  506. margin: 24rpx 32rpx;
  507. background-color: #fff;
  508. border-radius: 12px;
  509. padding: 24rpx 32rpx;
  510. .title {
  511. color: #333333;
  512. font-size: 18px;
  513. font-family: 'PingFangSC-medium';
  514. }
  515. text {
  516. color: #FF0000;
  517. }
  518. .textarea {
  519. margin-top: 24rpx;
  520. line-height: 40rpx;
  521. width: 100%;
  522. height: 200rpx;
  523. }
  524. }
  525. /* 发布 */
  526. .issue {
  527. background-color: rgba(34, 149, 255, 1);
  528. color: rgba(241, 241, 241, 1);
  529. font-size: 18px;
  530. height: 96rpx;
  531. line-height: 96rpx;
  532. border-radius: 50px;
  533. position: fixed;
  534. left: 32rpx;
  535. right: 32rpx;
  536. bottom: 20rpx;
  537. z-index: 999;
  538. }
  539. // 筛选框
  540. .popup-content {
  541. padding: 32rpx;
  542. .headline {
  543. color: #101010;
  544. font-size: 40rpx;
  545. text-align: center;
  546. }
  547. //行业
  548. .industry,
  549. .clearing-form,
  550. .salary-form {
  551. margin-top: 16rpx;
  552. .title {
  553. font-size: 32rpx;
  554. color: #111111;
  555. }
  556. // 选项
  557. .options {
  558. display: flex;
  559. flex-wrap: wrap;
  560. margin-top: 24rpx;
  561. .item {
  562. height: 56rpx;
  563. line-height: 56rpx;
  564. min-width: 210rpx;
  565. text-align: center;
  566. margin-bottom: 16rpx;
  567. margin-right: 16rpx;
  568. color: #999999;
  569. background-color: #F3F3F4;
  570. border-radius: 4px;
  571. padding: 0 6rpx;
  572. }
  573. .checked {
  574. background-color: #2795FD;
  575. color: #fff;
  576. }
  577. }
  578. }
  579. .button {
  580. display: flex;
  581. margin-top: 8rpx;
  582. .reset:after {
  583. border: 0
  584. }
  585. .reset {
  586. color: #999999;
  587. background-color: #F3F3F4;
  588. width: 200rpx;
  589. height: 72rpx;
  590. line-height: 72rpx;
  591. border-radius: 8px;
  592. }
  593. .confirm {
  594. width: 440rpx;
  595. background-color: #2795FD;
  596. color: #fff;
  597. height: 72rpx;
  598. line-height: 72rpx;
  599. border-radius: 8px;
  600. }
  601. }
  602. }
  603. .salary-form,
  604. .clearing-form {
  605. .options {
  606. justify-content: start !important;
  607. }
  608. .item {
  609. margin-right: 24rpx;
  610. }
  611. }
  612. .scrollview {
  613. border: 1px #101010 dashed;
  614. }
  615. </style>