jk-popup.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <template >
  2. <view>
  3. <!-- 筛选框 -->
  4. <u-popup v-model="popupShow" @close="close" @open="popupShowOpen" mode="bottom" border-radius="20" :closeable="true">
  5. <view class="popup-content">
  6. <view class="headline">
  7. 筛选
  8. </view>
  9. <!-- 行业 -->
  10. <view class="industry">
  11. <view class="title">
  12. <view>意向行业 <span style="color: #4696f6;">{{industryChecked!=-1?'已选中:'+industryList[industryChecked].name:''}}</span> (向下拉可滑动)</view>
  13. <u-search v-model="querypop"></u-search>
  14. </view>
  15. <!-- 选项 -->
  16. <scroll-view class="scrollview" scroll-y="true" style="height: 520rpx;">
  17. <view class="options">
  18. <view
  19. :class="{item,checked:industryChecked==index}" v-for="(item,index) in industryList"
  20. v-show="item.name.indexOf(querypop)!=-1"
  21. :key="index"
  22. @click="industryChecked=index">
  23. <!-- 快递跑腿/配送/分拣 -->{{item.name}}
  24. </view>
  25. </view>
  26. </scroll-view>
  27. </view>
  28. <!-- 工作经验 -->
  29. <view class="work-experience">
  30. <view class="title">
  31. 结算方式
  32. </view>
  33. <!-- 选项 -->
  34. <view class="options">
  35. <view :class="{item,checked:methodChecked==index}" v-for="(item,index) in methodList" :key="index"
  36. @click="methodChecked=index">
  37. {{item.name}}
  38. </view>
  39. </view>
  40. </view>
  41. <!-- 薪资待遇 -->
  42. <view class="salary-package" v-show="methodChecked!=-1">
  43. <view class="title">
  44. 薪资待遇
  45. </view>
  46. <!-- 选项 -->
  47. <view class="options">
  48. <view :class="{item,checked:saralyChecked==index}" v-for="(item,index) in salaryList"
  49. :key="index" @click="saralyChecked=index">
  50. {{item.name}}
  51. </view>
  52. </view>
  53. </view>
  54. <view class="button">
  55. <button class="reset" @click="reset()">重置</button>
  56. <button class="confirm" @click="queryBtn()" >确认</button>
  57. </view>
  58. </view>
  59. </u-popup>
  60. </view>
  61. </template>
  62. <script>
  63. import * as API_weixin from '@/apis/weixin.js'
  64. export default {
  65. name:"tabbarJob",
  66. props:{
  67. current: 0,
  68. elderStatus: false
  69. },
  70. data() {
  71. return {
  72. popupShow: false,
  73. querypop:"",
  74. methodChecked: -1,
  75. industryChecked: -1,
  76. saralyChecked:-1,
  77. salaryStart:'',
  78. salaryEnd:'',
  79. methodList:[
  80. {
  81. name: '日结',
  82. value:"1"
  83. }, {
  84. name: '周结',
  85. value:"2"
  86. }, {
  87. name: '月结',
  88. value:"3"
  89. }
  90. ],//结算方式
  91. industryList:[],//
  92. //salaryList: [],
  93. salaryList3: [{
  94. name: '1000元/月以下',
  95. max:1000
  96. },
  97. {
  98. name: '1000-1500元/月',
  99. min:1000,
  100. max:1500
  101. }, {
  102. name: '1500-3000元/月',
  103. min:1500,
  104. max:3000
  105. }, {
  106. name: '3000-5000元/月',
  107. min:3000,
  108. max:5000
  109. },
  110. {
  111. name: '5000元/月以上',
  112. min:5000,
  113. }
  114. ],
  115. salaryList2: [{
  116. name: '500元/周以下',
  117. max:500
  118. },
  119. {
  120. name: '500-800元/周',
  121. min:500,
  122. max:800
  123. }, {
  124. name: '800-1200元/周',
  125. min:800,
  126. max:1200
  127. }, {
  128. name: '1200-2000元/周',
  129. min:1200,
  130. max:2000
  131. },
  132. {
  133. name: '2000元/周以上',
  134. min:2000,
  135. }
  136. ],
  137. salaryList1: [{
  138. name: '100元/天以下',
  139. max:100
  140. },
  141. {
  142. name: '100-200元/天',
  143. min:100,
  144. max:200
  145. }, {
  146. name: '200-300元/天',
  147. min:200,
  148. max:300
  149. }, {
  150. name: '300-500元/天',
  151. min:300,
  152. max:500
  153. },
  154. {
  155. name: '500元/天以上',
  156. min:500,
  157. }
  158. ],
  159. };
  160. },
  161. computed:{
  162. salaryList(){
  163. if(this.methodChecked!=-1){
  164. if(this.methodChecked==0){
  165. return this.salaryList1
  166. }
  167. if(this.methodChecked==1){
  168. return this.salaryList2
  169. }
  170. if(this.methodChecked==2){
  171. return this.salaryList3
  172. }
  173. }
  174. return []
  175. }
  176. },
  177. methods:{
  178. show(){
  179. this.popupShow=true;
  180. },
  181. hide(){
  182. this.popupShow=false;
  183. },
  184. popupShowOpen(){
  185. if(this.industryList.length==0){
  186. uni.showLoading({
  187. title: "加载中",
  188. mask: true,
  189. })
  190. API_weixin.findListByCatalogName({
  191. name:'意向行业',
  192. }).then((res) => {
  193. uni.hideLoading();
  194. this.industryList=res.data.dictionaryList
  195. }).catch(error => {
  196. uni.showToast({icon: 'none',
  197. title: error
  198. })
  199. //this.getPhone()
  200. })
  201. }
  202. },
  203. close(){},
  204. reset() {
  205. this.querypop=""
  206. this.methodChecked= -1
  207. this.industryChecked= -1
  208. this.saralyChecked=-1
  209. this.salaryStart=''
  210. this.salaryEnd=''
  211. this.$emit("reset",{})
  212. },
  213. queryBtn(){
  214. var queryForm={}
  215. if(this.saralyChecked!=-1){
  216. queryForm.salaryStart=this.salaryList[this.saralyChecked].min
  217. if(queryForm.salaryStart==undefined){
  218. queryForm.salaryStart=''
  219. }
  220. queryForm.salaryEnd=this.salaryList[this.saralyChecked].max
  221. if(queryForm.salaryEnd==undefined){
  222. queryForm.salaryEnd=''
  223. }
  224. }
  225. if(this.methodChecked!=-1){
  226. queryForm.settlementMethod=this.methodList[this.methodChecked].value
  227. }
  228. if(this.industryChecked!=-1){
  229. queryForm.industry=this.industryList[this.industryChecked].value
  230. }
  231. this.$emit("queryBtn",queryForm)
  232. },
  233. },
  234. mounted(){
  235. },destroyed(){
  236. }
  237. }
  238. </script>
  239. <style lang="scss" scoped>
  240. // 筛选框
  241. .popup-content {
  242. padding: 32rpx;
  243. .headline {
  244. color: #101010;
  245. font-size: 40rpx;
  246. text-align: center;
  247. }
  248. // 薪资待遇
  249. .industry,
  250. .salary-package,
  251. .work-experience {
  252. margin-top: 16rpx;
  253. .title {
  254. font-size: 32rpx;
  255. color: #111111;
  256. }
  257. // 选项
  258. .options {
  259. display: flex;
  260. flex-wrap: wrap;
  261. justify-content: flex-start;
  262. margin-top: 24rpx;
  263. .item {
  264. height: 56rpx;
  265. line-height: 56rpx;
  266. min-width: 210rpx;
  267. text-align: center;
  268. margin-bottom: 16rpx;
  269. margin-right: 16rpx;
  270. color: #999999;
  271. background-color: #F3F3F4;
  272. border-radius: 4px;
  273. }
  274. .checked {
  275. background-color: #2795FD;
  276. color: #fff;
  277. }
  278. }
  279. }
  280. .button {
  281. display: flex;
  282. margin-top: 8rpx;
  283. .reset:after{
  284. border:0
  285. }
  286. .reset {
  287. color: #999999;
  288. background-color: #F3F3F4;
  289. width: 200rpx;
  290. height: 72rpx;
  291. line-height: 72rpx;
  292. border-radius: 8px;
  293. }
  294. .confirm {
  295. width: 440rpx;
  296. background-color: #2795FD;
  297. color: #fff;
  298. height: 72rpx;
  299. line-height: 72rpx;
  300. border-radius: 8px;
  301. }
  302. }
  303. }
  304. .industry,
  305. .salary-form,
  306. .clearing-form {
  307. .options {
  308. justify-content: start !important;
  309. }
  310. .item {
  311. margin-right: 24rpx;
  312. }
  313. }
  314. .scrollview{
  315. border: 1px #101010 dashed;
  316. margin-bottom: 40rpx;
  317. }
  318. </style>