postMessage.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477
  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"
  17. placeholder="请填写职位名称"></u-input>
  18. </view>
  19. </view>
  20. <!-- *薪资待遇 -->
  21. <view class="item">
  22. <view class="title">
  23. <text>*</text>薪资待遇
  24. </view>
  25. <view class="input2">
  26. <u-input type="number" v-model="formData.salary"
  27. placeholder="请填写薪资待遇"></u-input>
  28. </view>
  29. <view class="unit" >
  30. {{getUnit(formData)}}
  31. </view>
  32. <!-- <view class="icon" @click="showselect(0)">
  33. <u-icon name="arrow-right" color="#999999"></u-icon>
  34. </view> -->
  35. </view>
  36. <!--结算形式 -->
  37. <view class="item">
  38. <view class="title">
  39. <text>*</text>结算形式
  40. </view>
  41. <view class="input">
  42. <u-input type="select" v-model="settlementMethod"
  43. @click="showselect(1)" placeholder="请选择结算形式"></u-input>
  44. </view>
  45. </view>
  46. <!-- 行业 -->
  47. <view class="item">
  48. <view class="title">
  49. <text>*</text>行业
  50. </view>
  51. <view class="input">
  52. <u-input type="select" v-model="industry"
  53. @click="showselect(2)" placeholder="请选择行业"></u-input>
  54. </view>
  55. </view>
  56. <!-- 招聘人数 -->
  57. <view class="item">
  58. <view class="title">
  59. <text>*</text>招聘人数
  60. </view>
  61. <view class="input">
  62. <u-input type="number" v-model="formData.recruitingNumbers"
  63. placeholder="请填写招聘人数"></u-input>
  64. </view>
  65. </view>
  66. </view>
  67. <!-- 工作描述 -->
  68. <view class="job-description">
  69. <view class="title">
  70. <text>*</text>工作描述
  71. </view>
  72. <textarea class="textarea" v-model="formData.desc"
  73. placeholder="请简单描述工作内容及职位要求"></textarea>
  74. </view>
  75. <!-- 个人信息 -->
  76. <view class="information-group">
  77. <view class="headline">
  78. 基本信息
  79. </view>
  80. <!-- 联系人 -->
  81. <view class="item">
  82. <view class="title">
  83. <text>*</text>联系人
  84. </view>
  85. <view class="input">
  86. <u-input type="text" v-model="formData.contacts"
  87. placeholder="请填写联系人"></u-input>
  88. </view>
  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.contactsPhone"
  97. placeholder="请填写联系电话"></u-input>
  98. </view>
  99. </view>
  100. <!--工作地区 -->
  101. <view class="item">
  102. <view class="title">
  103. <text>*</text>工作地区
  104. </view>
  105. <view class="input">
  106. <u-input type="select" v-model="workArea"
  107. @click="showselect(3)" placeholder="请选择工作地区"></u-input>
  108. </view>
  109. </view>
  110. <!-- 详细地址 -->
  111. <view class="item">
  112. <view class="title">
  113. <text>*</text>详细地址
  114. </view>
  115. <view class="input">
  116. <u-input type="text" v-model="formData.address"
  117. placeholder="请填写详细的工作地址"></u-input>
  118. </view>
  119. </view>
  120. </view>
  121. <u-select v-model="show" value-name="value" label-name="name"
  122. :list="list" @confirm="confirm"></u-select>
  123. <button class="issue" @click="submit()"
  124. type="default">发布</button>
  125. </view>
  126. </template>
  127. <script>
  128. import * as API_weixin from '@/apis/weixin.js'
  129. import * as API from '@/apis/pagejs/packages.js'
  130. export default {
  131. data() {
  132. return {
  133. selectIndex:0,
  134. show: false,
  135. list: [],
  136. formData:{
  137. positionName:"",
  138. salary:"",
  139. settlementMethod:"",
  140. industry:"",
  141. recruitingNumbers:"",
  142. desc:"",
  143. contacts:"",
  144. contactsPhone:"",
  145. workArea:"",
  146. address:"",
  147. salaryForm:"2",
  148. },
  149. settlementMethod:"",
  150. salaryForm:"计时",
  151. industry:"",
  152. workArea:"",
  153. sqlList:[[],[],[],[],[],[],[]],
  154. valueList:[-1,-1,-1,-1,-1,-1],
  155. userInfo:{},
  156. id:"",
  157. }
  158. },
  159. onLoad(op){
  160. this.userInfo=this.carhelp.getPersonInfo()
  161. if(op.id){
  162. this.id=op.id
  163. this.getInfo()
  164. }else{
  165. var enterpriseInfo=this.carhelp.getPersonInfoPlus().enterpriseInfo
  166. this.formData.contacts=enterpriseInfo.contactsPersonId
  167. this.formData.address=enterpriseInfo.address
  168. }
  169. //this.tel=this.userInfo.phone
  170. },
  171. methods: {
  172. getInfo(){
  173. uni.showLoading({
  174. title: "加载中",
  175. mask: true,
  176. })
  177. API.recruitDetail({
  178. recruitId:this.id
  179. }).then((res) => {
  180. uni.hideLoading()
  181. if(res.data.recruitInformationInfo){
  182. this.formData = res.data.recruitInformationInfo;
  183. var name=["salaryForm","settlementMethod","industry",]
  184. for(var i in name){
  185. //.log(name[i]+'N')
  186. this[name[i]]=this.formData[(name[i]+'N')]
  187. }
  188. this.workArea= this.formData.workArea
  189. }
  190. }).catch(error => {
  191. uni.showToast({icon: 'none',
  192. title: error,
  193. icon: "none"
  194. })
  195. })
  196. },
  197. confirm(e) {
  198. this.show = false;
  199. var name=["salaryForm","settlementMethod",
  200. "industry",
  201. "workArea",]
  202. this[name[this.selectIndex]]=e[0].label
  203. this.formData[name[this.selectIndex]]=e[0].value
  204. //.log(e)
  205. },
  206. showselect(k){
  207. this.selectIndex=k;
  208. if(this.sqlList[k].length==0){
  209. var name=['薪资形式','结算方式','意向行业','工作地区']
  210. uni.showLoading({
  211. title: "加载中",
  212. mask: true,
  213. })
  214. API_weixin.findListByCatalogName({
  215. name:name[k],
  216. }).then((res) => {
  217. uni.hideLoading();
  218. this.sqlList[k]=res.data.dictionaryList
  219. this.list=this.sqlList[k];
  220. this.show= true
  221. }).catch(error => {
  222. uni.showToast({icon: 'none',
  223. title: error
  224. })
  225. //this.getPhone()
  226. })
  227. }else{
  228. this.list=this.sqlList[k];
  229. this.show= true
  230. }
  231. },
  232. submit(){
  233. if(!this.formData.positionName){
  234. uni.showToast({icon: 'none',
  235. title: "请填写职位名称"
  236. })
  237. return
  238. }
  239. if(!this.formData.salary){
  240. uni.showToast({icon: 'none',
  241. title: "请填写薪资待遇"
  242. })
  243. return
  244. }
  245. if(!this.formData.settlementMethod){
  246. uni.showToast({icon: 'none',
  247. title: "请选择结算形式"
  248. })
  249. return
  250. }
  251. if(!this.formData.industry){
  252. uni.showToast({icon: 'none',
  253. title: "请选择行业"
  254. })
  255. return
  256. }
  257. if(!this.formData.recruitingNumbers){
  258. uni.showToast({icon: 'none',
  259. title: "请填写招聘人数"
  260. })
  261. return
  262. }
  263. if(!this.formData.desc){
  264. uni.showToast({icon: 'none',
  265. title: "请简单描述工作内容及职位要求"
  266. })
  267. return
  268. }
  269. if(!this.formData.contacts){
  270. uni.showToast({icon: 'none',
  271. title: "请填写联系人"
  272. })
  273. return
  274. }
  275. if(!this.formData.contactsPhone){
  276. uni.showToast({icon: 'none',
  277. title: "请填写联系电话"
  278. })
  279. return
  280. }
  281. if(!this.formData.workArea){
  282. uni.showToast({icon: 'none',
  283. title: "请选择工作地区"
  284. })
  285. return
  286. }
  287. if(!this.formData.address){
  288. uni.showToast({icon: 'none',
  289. title: "请填写详细的工作地址"
  290. })
  291. return
  292. }
  293. this.formData.workArea=this.workArea
  294. uni.showLoading({
  295. title: "加载中",
  296. mask: true,
  297. })
  298. API.createRecruit(this.formData).then((res) => {
  299. uni.hideLoading();
  300. const eventChannel = this.getOpenerEventChannel();
  301. eventChannel.emit('refreshData');
  302. uni.showModal({
  303. title: '提示',
  304. content: '发布成功,等待审核!',
  305. showCancel:false,
  306. success: function (res) {
  307. if (res.confirm) {
  308. uni.navigateBack()
  309. } else if (res.cancel) {
  310. //.log('用户点击取消');
  311. }
  312. }
  313. });
  314. }).catch(error => {
  315. uni.showToast({icon: 'none',
  316. title: error
  317. })
  318. //this.getPhone()
  319. })
  320. }
  321. }
  322. }
  323. </script>
  324. <style>
  325. page {
  326. background: #F0F0F2;
  327. padding-bottom: 150px;
  328. }
  329. </style>
  330. <style lang="scss" scoped>
  331. .information-group {
  332. margin: 32rpx;
  333. padding: 24rpx 32rpx;
  334. background-color: #fff;
  335. border-radius: 24rpx;
  336. .headline {
  337. color: rgba(16, 16, 16, 1);
  338. font-size: 36rpx;
  339. margin-bottom: 24rpx;
  340. font-family: 'PingFangSC-medium';
  341. }
  342. .item {
  343. display: flex;
  344. align-items: center;
  345. padding: 12rpx 0;
  346. border-bottom: 1px solid #f1f1f1;
  347. .title {
  348. color: rgba(51, 51, 51, 1);
  349. font-size: 32rpx;
  350. width: 148rpx;
  351. text {
  352. color: #EE3138
  353. }
  354. }
  355. .input {
  356. width: 450rpx;
  357. margin-left: 24rpx;
  358. /deep/.uni-input-input {
  359. color: rgba(51, 51, 51, 1);
  360. }
  361. }
  362. .input2 {
  363. width: 350rpx;
  364. margin-left: 24rpx;
  365. /deep/.uni-input-input {
  366. color: rgba(51, 51, 51, 1);
  367. }
  368. }
  369. .icon {
  370. margin-left: auto;
  371. }
  372. .unit {
  373. margin-left: auto;
  374. color: rgba(51, 51, 51, 1);
  375. font-size: 32rpx;
  376. }
  377. }
  378. }
  379. // 工作描述
  380. .job-description {
  381. margin: 24rpx 32rpx;
  382. background-color: #fff;
  383. border-radius: 12px;
  384. padding: 24rpx 32rpx;
  385. .title {
  386. color: #333333;
  387. font-size: 18px;
  388. font-family: 'PingFangSC-medium';
  389. }
  390. text {
  391. color: #FF0000;
  392. }
  393. .textarea {
  394. margin-top: 24rpx;
  395. line-height: 40rpx;
  396. width: 100%;
  397. height: 200rpx;
  398. }
  399. }
  400. /* 发布 */
  401. .issue {
  402. background-color: rgba(34, 149, 255, 1);
  403. color: rgba(241, 241, 241, 1);
  404. font-size: 18px;
  405. height: 96rpx;
  406. line-height: 96rpx;
  407. border-radius: 50px;
  408. position: fixed;
  409. left: 32rpx;
  410. right: 32rpx;
  411. bottom: 20rpx;
  412. z-index: 999;
  413. }
  414. </style>