postMessage.vue 15 KB

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