jk-popup.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  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: 420rpx;">
  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&&ptype=='per'">
  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. ptype: {
  68. value: String,
  69. default: 'per'
  70. },
  71. },
  72. data() {
  73. return {
  74. popupShow: false,
  75. querypop:"",
  76. methodChecked: -1,
  77. industryChecked: -1,
  78. saralyChecked:-1,
  79. salaryStart:'',
  80. salaryEnd:'',
  81. methodList:[
  82. {
  83. name: '日结',
  84. value:"1"
  85. }, {
  86. name: '周结',
  87. value:"2"
  88. }, {
  89. name: '月结',
  90. value:"3"
  91. }
  92. ],//结算方式
  93. industryList:[],//
  94. //salaryList: [],
  95. salaryList3: [{
  96. name: '1000元/月以下',
  97. max:1000
  98. },
  99. {
  100. name: '1000-1500元/月',
  101. min:1000,
  102. max:1500
  103. }, {
  104. name: '1500-3000元/月',
  105. min:1500,
  106. max:3000
  107. }, {
  108. name: '3000-5000元/月',
  109. min:3000,
  110. max:5000
  111. },
  112. {
  113. name: '5000元/月以上',
  114. min:5000,
  115. }
  116. ],
  117. salaryList2: [{
  118. name: '500元/周以下',
  119. max:500
  120. },
  121. {
  122. name: '500-800元/周',
  123. min:500,
  124. max:800
  125. }, {
  126. name: '800-1200元/周',
  127. min:800,
  128. max:1200
  129. }, {
  130. name: '1200-2000元/周',
  131. min:1200,
  132. max:2000
  133. },
  134. {
  135. name: '2000元/周以上',
  136. min:2000,
  137. }
  138. ],
  139. salaryList1: [{
  140. name: '100元/天以下',
  141. max:100
  142. },
  143. {
  144. name: '100-200元/天',
  145. min:100,
  146. max:200
  147. }, {
  148. name: '200-300元/天',
  149. min:200,
  150. max:300
  151. }, {
  152. name: '300-500元/天',
  153. min:300,
  154. max:500
  155. },
  156. {
  157. name: '500元/天以上',
  158. min:500,
  159. }
  160. ],
  161. };
  162. },
  163. computed:{
  164. salaryList(){
  165. if(this.methodChecked!=-1){
  166. if(this.methodChecked==0){
  167. return this.salaryList1
  168. }
  169. if(this.methodChecked==1){
  170. return this.salaryList2
  171. }
  172. if(this.methodChecked==2){
  173. return this.salaryList3
  174. }
  175. }
  176. return []
  177. }
  178. },
  179. methods:{
  180. show(){
  181. this.popupShow=true;
  182. },
  183. hide(){
  184. this.popupShow=false;
  185. },
  186. popupShowOpen(){
  187. if(this.industryList.length==0){
  188. uni.showLoading({
  189. title: "加载中",
  190. mask: true,
  191. })
  192. API_weixin.findListByCatalogName({
  193. name:'意向行业',
  194. }).then((res) => {
  195. uni.hideLoading();
  196. this.industryList=res.data.dictionaryList
  197. }).catch(error => {
  198. uni.showToast({icon: 'none',
  199. title: error
  200. })
  201. //this.getPhone()
  202. })
  203. }
  204. },
  205. close(){},
  206. reset() {
  207. this.querypop=""
  208. this.methodChecked= -1
  209. this.industryChecked= -1
  210. this.saralyChecked=-1
  211. this.salaryStart=''
  212. this.salaryEnd=''
  213. this.$emit("reset",{})
  214. },
  215. queryBtn(){
  216. var queryForm={}
  217. if(this.saralyChecked!=-1&&this.ptype=='per'){
  218. queryForm.salaryStart=this.salaryList[this.saralyChecked].min
  219. if(queryForm.salaryStart==undefined){
  220. queryForm.salaryStart=''
  221. }
  222. queryForm.salaryEnd=this.salaryList[this.saralyChecked].max
  223. if(queryForm.salaryEnd==undefined){
  224. queryForm.salaryEnd=''
  225. }
  226. }
  227. if(this.methodChecked!=-1){
  228. queryForm.settlementMethod=this.methodList[this.methodChecked].value
  229. }
  230. if(this.industryChecked!=-1){
  231. queryForm.industry=this.industryList[this.industryChecked].value
  232. }
  233. this.$emit("queryBtn",queryForm)
  234. },
  235. },
  236. mounted(){
  237. },destroyed(){
  238. }
  239. }
  240. </script>
  241. <style lang="scss" scoped>
  242. // 筛选框
  243. .popup-content {
  244. padding: 32rpx;
  245. .headline {
  246. color: #101010;
  247. font-size: 40rpx;
  248. text-align: center;
  249. }
  250. // 薪资待遇
  251. .industry,
  252. .salary-package,
  253. .work-experience {
  254. margin-top: 16rpx;
  255. .title {
  256. font-size: 32rpx;
  257. color: #111111;
  258. }
  259. // 选项
  260. .options {
  261. display: flex;
  262. flex-wrap: wrap;
  263. justify-content: flex-start;
  264. margin-top: 24rpx;
  265. .item {
  266. height: 56rpx;
  267. line-height: 56rpx;
  268. min-width: 210rpx;
  269. text-align: center;
  270. margin-bottom: 16rpx;
  271. margin-right: 16rpx;
  272. color: #999999;
  273. background-color: #F3F3F4;
  274. border-radius: 4px;
  275. padding: 0 6rpx;
  276. }
  277. .checked {
  278. background-color: #2795FD;
  279. color: #fff;
  280. }
  281. }
  282. }
  283. .button {
  284. display: flex;
  285. margin-top: 8rpx;
  286. .reset:after{
  287. border:0
  288. }
  289. .reset {
  290. color: #999999;
  291. background-color: #F3F3F4;
  292. width: 200rpx;
  293. height: 72rpx;
  294. line-height: 72rpx;
  295. border-radius: 8px;
  296. }
  297. .confirm {
  298. width: 440rpx;
  299. background-color: #2795FD;
  300. color: #fff;
  301. height: 72rpx;
  302. line-height: 72rpx;
  303. border-radius: 8px;
  304. }
  305. }
  306. }
  307. .industry,
  308. .salary-form,
  309. .clearing-form {
  310. .options {
  311. justify-content: start !important;
  312. }
  313. .item {
  314. margin-right: 24rpx;
  315. }
  316. }
  317. .scrollview{
  318. border: 1px #101010 dashed;
  319. margin-bottom: 40rpx;
  320. }
  321. </style>