jobInformation.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. <template>
  2. <view>
  3. <u-navbar back-text="用工信息" back-icon-size="0" :customBack="customBack" back-icon-color="#ffffff"
  4. :background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
  5. <!-- 搜索框 -->
  6. <view class="search">
  7. <view class="search-box">
  8. <view class="option">
  9. <nxsearch :selectList="selectList" button="inside" @search="doSearch" @confirm="doSearc"
  10. :setIsFocus="false" @focus="gotoUrl('pages/packages/search/search')"
  11. v-model="searchQuery.keyword" placeholder="输入关键字找工作" />
  12. </view>
  13. </view>
  14. </view>
  15. <!-- 搜索结果 -->
  16. <view class="result">
  17. <view class="tabs">
  18. <view class="left">
  19. <u-tabs bg-color="#F0F0F2" :list="tabList" :is-scroll="false" :current="current"
  20. @change="change"></u-tabs>
  21. </view>
  22. <view class="screen" @click="popupShow = true">
  23. <view class="icon">
  24. <img src="@/assets/img/riLine-filter-line@1x.png" alt="">
  25. </view>
  26. <view>筛选</view>
  27. </view>
  28. </view>
  29. <view class="result-item" v-for="(item,i) in tabList[current].list" :key="i"
  30. @click="gotoUrl('pages/packages/jobInformation/jobDetails?id='+item.id)">
  31. <view class="content-1">
  32. <!-- 职位 -->
  33. <view class="position">
  34. {{item.positionName}}
  35. </view>
  36. <!-- 薪水 -->
  37. <view class="salary">
  38. {{item.salary}}元/天
  39. </view>
  40. </view>
  41. <view class="content-2">
  42. <!-- 标签 -->
  43. <view class="tag">
  44. <view class="tag-item">
  45. {{item.workArea}}
  46. </view>
  47. <view class="tag-item">
  48. {{item.settlementMethodN}}
  49. </view>
  50. <view class="tag-item">
  51. {{item.industryN}}
  52. </view>
  53. </view>
  54. <!-- 日期 -->
  55. <view class="date">
  56. {{getTime(item)}}
  57. </view>
  58. </view>
  59. <view class="content-3">
  60. <view class="issuer">
  61. {{item.contacts}}
  62. </view>
  63. <view class="address">
  64. {{item.address}}
  65. </view>
  66. </view>
  67. </view>
  68. <u-divider style="background: #F0F0F2;" bgNoneColor="#F0F0F2"
  69. v-if="tabList[current].recordsTotal==tabList[current].list.length"
  70. :isnone="tabList[current].recordsTotal==0" nonetext="没有找到相关内容"
  71. border-color="#CFD2D5">已经到底了</u-divider>
  72. </view>
  73. <!-- 筛选框 -->
  74. <u-popup v-model="popupShow" @open="popupShowOpen" mode="bottom" border-radius="20" :closeable="true">
  75. <view class="popup-content">
  76. <view class="headline">
  77. 筛选
  78. </view>
  79. <!-- 行业 -->
  80. <view class="industry">
  81. <view class="title">
  82. 行业
  83. </view>
  84. <!-- 选项 -->
  85. <view class="options">
  86. <view :class="{item,checked:isChecked==index}" v-for="(item,index) in industryList" :key="index"
  87. @click="changeChecked(index)">
  88. <!-- 快递跑腿/配送/分拣 -->{{item.name}}
  89. </view>
  90. </view>
  91. </view>
  92. <!-- 结算方式 -->
  93. <view class="clearing-form" v-if="false">
  94. <view class="title">
  95. 结算方式
  96. </view>
  97. <!-- 选项 -->
  98. <view class="options">
  99. <view :class="{item,checked:wayChecked==index}" v-for="(item,index) in wayList" :key="index"
  100. @click="changeWayChecked(index)">
  101. {{item.name}}
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 薪资形式 -->
  106. <view class="salary-form" v-if="false">
  107. <view class="title">
  108. 薪资形式
  109. </view>
  110. <!-- 选项 -->
  111. <view class="options ">
  112. <view :class="{item,checked:saralyChecked==index}" v-for="(item,index) in salaryList"
  113. :key="index" @click="changeSaralyChecked(index)">
  114. {{item.name}}
  115. </view>
  116. </view>
  117. </view>
  118. <view class="button">
  119. <button class="reset" @click="reset()">重置</button>
  120. <button class="confirm" @click="queryBtn()" >确认</button>
  121. </view>
  122. </view>
  123. </u-popup>
  124. <tabbar :current="1"></tabbar>
  125. </view>
  126. </template>
  127. <script>
  128. import * as API from '@/apis/pagejs/tab.js'
  129. import tabbar from "@/components/Tabbar.vue"
  130. import * as API_weixin from '@/apis/weixin.js'
  131. import nxsearch from "@/components/nx-search.vue"
  132. export default {
  133. components: {
  134. nxsearch,
  135. tabbar
  136. },
  137. data() {
  138. return {
  139. keyword: '',
  140. popupShow: false,
  141. isChecked: -1,
  142. wayChecked: -1,
  143. saralyChecked: -1,
  144. searchQuery: {
  145. keyword: '',
  146. selectIndex: 0
  147. },
  148. tabList: [{
  149. name: '最新',
  150. pageIndex: 1,
  151. pageSize: 20,
  152. statusType:"",
  153. list:[],
  154. recordsTotal:0
  155. }, {
  156. name: '日结',
  157. unit:"日",
  158. statusType:"1",
  159. pageIndex: 1,
  160. pageSize: 20,
  161. list:[],
  162. recordsTotal:0
  163. }, {
  164. name: '周结',
  165. unit:"周",
  166. pageIndex: 1,
  167. pageSize: 20,
  168. statusType:"2",
  169. list:[],
  170. recordsTotal:0
  171. }, {
  172. name: '月结',
  173. unit:"月",
  174. pageIndex: 1,
  175. pageSize: 20,
  176. statusType:"3",
  177. list:[],
  178. recordsTotal:0
  179. }],
  180. industryList: [
  181. ],
  182. wayList: [{
  183. name: '日结'
  184. },
  185. {
  186. name: '周结'
  187. },
  188. {
  189. name: '月结'
  190. },
  191. {
  192. name: '完工结算'
  193. }
  194. ],
  195. salaryList: [{
  196. name: '计件'
  197. },
  198. {
  199. name: '计时'
  200. },
  201. {
  202. name: '定额'
  203. }
  204. ],
  205. selectList: [{
  206. id: 0,
  207. name: '找工作'
  208. },
  209. ],
  210. current: 0,
  211. queryForm:{
  212. status:0
  213. }
  214. }
  215. },
  216. onLoad(op) {
  217. this.findRecruitSearch();
  218. },
  219. onReachBottom() {
  220. var obj = this.tabList[this.current]
  221. if (obj.list.length < obj.recordsTotal) {
  222. this.myLoadmore();
  223. }
  224. },
  225. methods: {
  226. queryBtn(){
  227. this.popupShow=false;
  228. this.current = 0;
  229. this.tabList[this.current].list=[]
  230. this.tabList[this.current].pageIndex = 1;
  231. if(this.isChecked!=-1){
  232. this.queryForm.industry=this.industryList[this.isChecked].value
  233. }
  234. this.findRecruitSearch()
  235. },
  236. popupShowOpen(){
  237. if(this.industryList.length==0){
  238. uni.showLoading({
  239. title: "加载中",
  240. mask: true,
  241. })
  242. API_weixin.findListByCatalogName({
  243. name:'意向行业',
  244. }).then((res) => {
  245. uni.hideLoading();
  246. this.industryList=res.data.dictionaryList
  247. }).catch(error => {
  248. uni.showToast({icon: 'none',
  249. title: error
  250. })
  251. //this.getPhone()
  252. })
  253. }
  254. },
  255. myLoadmore() {
  256. this.tabList[this.current].pageIndex += 1;
  257. this.findRecruitSearch();
  258. },
  259. findRecruitSearch(){
  260. uni.showLoading({
  261. title: "加载中",
  262. mask: true,
  263. })
  264. var list = this.tabList[this.current].list
  265. var obj = this.tabList[this.current]
  266. var listForm = {
  267. ...obj,
  268. ...this.queryForm
  269. }
  270. delete listForm.list
  271. API.findRecruitSearch(listForm).then((res) => {
  272. if (listForm.pageIndex == 1) {
  273. list = res.data.data;
  274. } else {
  275. list = [
  276. ...list,
  277. ...res.data.data
  278. ];
  279. }
  280. this.tabList[this.current].list = list
  281. this.tabList[this.current].recordsTotal = res.data.recordsTotal;
  282. uni.hideLoading();
  283. }).catch(error => {
  284. uni.showToast({icon: 'none',
  285. title: error,
  286. icon: "none"
  287. })
  288. })
  289. },
  290. customBack() {
  291. },
  292. // 执行搜索
  293. doSearch(searchQuery) {
  294. //.log('searchQuery', searchQuery);
  295. this.searchQuery=searchQuery;
  296. },
  297. change(index) {
  298. this.current = index;
  299. var list = this.tabList[this.current].list
  300. if (list.length == 0) {
  301. this.findRecruitSearch();
  302. }
  303. },
  304. changeChecked(index) {
  305. this.isChecked = index;
  306. },
  307. changeWayChecked(index) {
  308. this.wayChecked = index;
  309. },
  310. changeSaralyChecked(index) {
  311. this.saralyChecked = index;
  312. },
  313. reset() {
  314. this.isChecked = -1;
  315. this.queryForm.industry=""
  316. this.wayChecked = -1;
  317. this.saralyChecked = -1;
  318. this.queryBtn()
  319. }
  320. }
  321. }
  322. </script>
  323. <style>
  324. page {
  325. background: #F0F0F2;
  326. padding-bottom: 50px;
  327. }
  328. </style>
  329. <style lang="scss" scoped>
  330. .search {
  331. background-color: #fff;
  332. padding: 16rpx 32rpx;
  333. .search-box {
  334. border-radius: 50px;
  335. height: 72rpx;
  336. line-height: 72rpx;
  337. }
  338. }
  339. // 搜索结果
  340. .result {
  341. background-color: #fff;
  342. .tabs {
  343. padding-right: 32rpx;
  344. display: flex;
  345. justify-content: space-between;
  346. align-items: center;
  347. border-bottom: 1px solid #f1f1f1;
  348. .left {
  349. width: 68%;
  350. /deep/.u-tabs {
  351. background-color: #fff !important;
  352. }
  353. }
  354. .screen {
  355. display: flex;
  356. align-items: center;
  357. color: rgba(39, 149, 253, 1);
  358. font-size: 16px;
  359. img {
  360. width: 16px;
  361. height: 16px;
  362. vertical-align: middle;
  363. margin-right: 4rpx;
  364. }
  365. }
  366. }
  367. .result-item {
  368. padding: 24rpx 0;
  369. margin: 0 32rpx;
  370. border-bottom: 1px solid #F0F0F2;
  371. .content-1 {
  372. display: flex;
  373. justify-content: space-between;
  374. align-items: center;
  375. // 职位
  376. .position {
  377. color: rgba(16, 16, 16, 1);
  378. font-size: 36rpx;
  379. font-family: 'PingFang Medium';
  380. }
  381. // 薪水
  382. .salary {
  383. color: rgba(255, 61, 0, 1);
  384. font-size: 32rpx;
  385. font-family: 'PingFang Medium';
  386. }
  387. }
  388. .content-2 {
  389. margin-top: 12rpx;
  390. display: flex;
  391. justify-content: space-between;
  392. // 标签
  393. .tag {
  394. display: flex;
  395. .tag-item {
  396. min-width: 64rpx;
  397. height: 36rpx;
  398. line-height: 36rpx;
  399. border-radius: 8rpx;
  400. background-color: rgba(241, 241, 247, 1);
  401. color: rgba(129, 127, 153, 1);
  402. font-size: 24rpx;
  403. text-align: center;
  404. margin-right: 12rpx;
  405. padding: 0 12rpx;
  406. }
  407. }
  408. // 日期
  409. .date {
  410. color: rgba(153, 153, 153, 1);
  411. font-size: 24rpx;
  412. }
  413. }
  414. .content-3 {
  415. margin-top: 20rpx;
  416. display: flex;
  417. justify-content: space-between;
  418. align-items: center;
  419. .issuer {
  420. color: rgba(51, 51, 51, 1);
  421. font-size: 24rpx;
  422. }
  423. .address {
  424. color: rgba(51, 51, 51, 1);
  425. font-size: 24rpx;
  426. }
  427. }
  428. }
  429. }
  430. // 筛选框
  431. .popup-content {
  432. padding: 32rpx;
  433. .headline {
  434. color: #101010;
  435. font-size: 40rpx;
  436. text-align: center;
  437. }
  438. //行业
  439. .industry,
  440. .clearing-form,
  441. .salary-form {
  442. margin-top: 16rpx;
  443. margin-bottom: 176rpx;
  444. .title {
  445. font-size: 32rpx;
  446. color: #111111;
  447. }
  448. // 选项
  449. .options {
  450. display: flex;
  451. justify-content: space-between;
  452. flex-wrap: wrap;
  453. margin-top: 24rpx;
  454. .item {
  455. height: 56rpx;
  456. line-height: 56rpx;
  457. padding: 0 32rpx;
  458. margin-bottom: 16rpx;
  459. color: #999999;
  460. background-color: #F3F3F4;
  461. border-radius: 4px;
  462. }
  463. .checked {
  464. background-color: #2795FD;
  465. color: #fff;
  466. }
  467. }
  468. }
  469. .button {
  470. display: flex;
  471. margin-top: 8rpx;
  472. .reset {
  473. color: #999999;
  474. background-color: #F3F3F4;
  475. width: 200rpx;
  476. height: 72rpx;
  477. line-height: 72rpx;
  478. border-radius: 8px;
  479. }
  480. .confirm {
  481. width: 440rpx;
  482. background-color: #2795FD;
  483. color: #fff;
  484. height: 72rpx;
  485. line-height: 72rpx;
  486. border-radius: 8px;
  487. }
  488. }
  489. }
  490. .salary-form,
  491. .clearing-form {
  492. .options {
  493. justify-content: start !important;
  494. }
  495. .item {
  496. margin-right: 24rpx;
  497. }
  498. }
  499. /deep/.u-close--top-right {
  500. top: 44rpx;
  501. }
  502. </style>