特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

317 lines
6.4 KiB

4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
  1. <template>
  2. <view class="page">
  3. <navbar title="发布招工" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="form">
  5. <view class="help-issue">
  6. <text>招工标题</text>
  7. <text style="color: #BD3624;">*</text>
  8. </view>
  9. <view class="form-sheet-cell">
  10. <input type="text" class="title-input"/>
  11. </view>
  12. <uv-cell
  13. title="工作地点"
  14. rightIconStyle="fontSize: 30rpx;"
  15. value="请选择招工地点"
  16. isLink
  17. ></uv-cell>
  18. <uv-cell
  19. title="所属工种"
  20. rightIconStyle="fontSize: 30rpx;"
  21. :value="form.workYear || '请选择所属工种'"
  22. @click="openPicker('workYear')"
  23. isLink
  24. ></uv-cell>
  25. <uv-cell
  26. title="工龄要求"
  27. rightIconStyle="fontSize: 30rpx;"
  28. :value="form.workYear || '请选择工龄要求'"
  29. @click="openPicker('workYear')"
  30. isLink
  31. ></uv-cell>
  32. <!-- <view class="form-sheet-cell">
  33. <view class="label">
  34. 工作地点
  35. </view>
  36. <view>
  37. 请选择招工地点
  38. </view>
  39. <view class="right-icon">
  40. <uv-icon
  41. name="arrow-right"
  42. ></uv-icon>
  43. </view>
  44. </view>
  45. <view class="form-sheet-cell">
  46. <view class="label">
  47. 学历要求
  48. </view>
  49. <view>
  50. 请选择学历要求
  51. </view>
  52. <view class="right-icon">
  53. <uv-icon
  54. name="arrow-right"
  55. ></uv-icon>
  56. </view>
  57. </view>
  58. <view class="form-sheet-cell">
  59. <view class="label">
  60. 工龄要求
  61. </view>
  62. <view>
  63. 请选择工龄要求
  64. </view>
  65. <view class="right-icon">
  66. <uv-icon
  67. name="arrow-right"
  68. ></uv-icon>
  69. </view>
  70. </view>
  71. <view class="form-sheet-cell">
  72. <view class="label">
  73. 所属工种
  74. </view>
  75. <view>
  76. 请选择工种
  77. </view>
  78. <view class="right-icon">
  79. <uv-icon
  80. name="arrow-right"
  81. ></uv-icon>
  82. </view>
  83. </view> -->
  84. <view class="form-sheet-cell">
  85. <view class="label">
  86. 薪资范围
  87. </view>
  88. <view class="price">
  89. <input placeholder="最小值" v-model="form.min" />
  90. ~
  91. <input placeholder="最大值" v-model="form.max" />
  92. </view>
  93. </view>
  94. <view class="form-sheet-cell">
  95. <view class="label">
  96. 结算方式
  97. </view>
  98. <uv-radio-group v-model="radiovalue">
  99. <view class="price">
  100. <uv-radio
  101. :customStyle="{margin: '8px'}"
  102. v-for="(item, index) in priceList"
  103. :key="index"
  104. iconSize="30rpx"
  105. size="40rpx"
  106. labelSize="26rpx"
  107. :label="item.name"
  108. :name="item.name">
  109. </uv-radio>
  110. </view>
  111. </uv-radio-group>
  112. </view>
  113. <view class="form-sheet-cell">
  114. <view class="label">
  115. 工作性质
  116. </view>
  117. <uv-radio-group v-model="form.natureId">
  118. <view class="price">
  119. <uv-radio
  120. :customStyle="{margin: '8px'}"
  121. v-for="(item, index) in natureList"
  122. :key="index"
  123. iconSize="30rpx"
  124. size="40rpx"
  125. labelSize="26rpx"
  126. :label="item.name"
  127. :name="item.id">
  128. </uv-radio>
  129. </view>
  130. </uv-radio-group>
  131. </view>
  132. <view class="form-sheet-cell">
  133. <view class="label">
  134. 联系电话
  135. </view>
  136. <input placeholder="请输入联系电话" v-model="form.phone" />
  137. </view>
  138. <view class="">
  139. <uv-textarea
  140. v-model="form.content"
  141. count
  142. :maxlength="300"
  143. autoHeight
  144. placeholder="请输入详细介绍"></uv-textarea>
  145. </view>
  146. <uv-picker ref="picker"
  147. :columns="columns"
  148. @confirm="pickerConfirm"></uv-picker>
  149. <view class="uni-color-btn">
  150. 发布
  151. </view>
  152. </view>
  153. </view>
  154. </template>
  155. <script>
  156. import { mapState } from 'vuex'
  157. export default {
  158. data() {
  159. return {
  160. form : {
  161. // school : '',
  162. // workYear : '',
  163. // minPrice : '',
  164. // maxPrice : '',
  165. // address : '',
  166. // addId : '',
  167. // company : '',
  168. // gsContext : '',
  169. // jobContext : '',
  170. natureId : 0,
  171. },
  172. radiovalue : '',
  173. priceList : [
  174. {
  175. name : '日结',
  176. },
  177. {
  178. name : '月结',
  179. },
  180. ],
  181. picker : {
  182. workYear : [
  183. '不限经验',
  184. ],
  185. school : [
  186. '不限',
  187. '初中',
  188. '高中',
  189. '专科',
  190. '本科',
  191. '研究生',
  192. '博士',
  193. ],
  194. },
  195. pickerKey : 'workYear',
  196. }
  197. },
  198. onLoad() {
  199. for (var i = 0; i < 30; i++) {
  200. this.picker.workYear.push((i + 1) + '年经验')
  201. }
  202. // this.form.addId = this.cityList[0].id
  203. this.form.natureId = this.natureList[0].id
  204. },
  205. computed : {
  206. columns(){
  207. return [this.picker[this.pickerKey]]
  208. },
  209. ...mapState(['natureList']),
  210. },
  211. methods: {
  212. openPicker(key){
  213. this.pickerKey = key
  214. this.$refs.picker.open()
  215. },
  216. pickerConfirm(e){
  217. this.form[this.pickerKey] = e.value[0]
  218. },
  219. // 提交
  220. submit(){
  221. // if(this.fileList.length == 0){
  222. // return uni.showToast({
  223. // title: '请上传图片',
  224. // icon : 'none'
  225. // })
  226. // }
  227. if (this.$utils.verificationAll(this.form, {
  228. title: '请输入招工标题',
  229. address : '请选择工作地点',
  230. workYear : '请选择工龄要求',
  231. company : '请输入招聘公司',
  232. minPrice : '请输入薪资范围',
  233. iconText: '请输入标签',
  234. userName: '请输入联系人',
  235. userPhone: '请输入联系电话',
  236. jobContext : '请输入职位描述',
  237. school : '请输入岗位要求',
  238. jobDetails: '请输入岗位详细介绍',
  239. gsContext : '请输入公司介绍',
  240. })) {
  241. return
  242. }
  243. this.$api('publishJob', this.form, res => {
  244. if(res.code == 200){
  245. uni.showToast({
  246. title: '发布成功!',
  247. icon: 'none'
  248. })
  249. setTimeout(uni.navigateBack, 1000, -1)
  250. }
  251. })
  252. },
  253. }
  254. }
  255. </script>
  256. <style scoped lang="scss">
  257. .page{
  258. background-color: #fff;
  259. min-height: 100vh;
  260. box-sizing: border-box;
  261. color: #333333;
  262. font-size: 28rpx;
  263. /deep/ text{
  264. font-size: 28rpx !important;
  265. }
  266. .form{
  267. padding: 30rpx;
  268. .help-issue {
  269. margin: 20rpx;
  270. }
  271. .title-input{
  272. border: 1px solid $uni-color;
  273. width: 100%;
  274. border-radius: 10rpx;
  275. padding: 10rpx 20rpx;
  276. box-sizing: border-box;
  277. height: 65rpx;
  278. }
  279. .form-sheet-cell{
  280. display: flex;
  281. background-color: #fff;
  282. padding: 20rpx 30rpx;
  283. align-items: center;
  284. .label{
  285. width: 160rpx;
  286. }
  287. .price{
  288. display: flex;
  289. text-align: center;
  290. input{
  291. width: 150rpx;
  292. border: 1px solid $uni-color;
  293. margin: 0 10rpx;
  294. }
  295. }
  296. .right-icon{
  297. margin-left: auto;
  298. }
  299. }
  300. }
  301. }
  302. </style>