用工小程序前端代码
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.

161 lines
3.9 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
6 months ago
9 months ago
9 months ago
6 months ago
9 months ago
9 months ago
6 months ago
9 months ago
9 months ago
9 months ago
9 months ago
6 months ago
9 months ago
6 months ago
9 months ago
9 months ago
6 months ago
9 months ago
6 months ago
6 months ago
6 months ago
9 months ago
6 months ago
6 months ago
9 months ago
6 months ago
9 months ago
6 months ago
9 months ago
9 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
9 months ago
6 months ago
6 months ago
6 months ago
6 months ago
9 months ago
  1. <template>
  2. <view>
  3. <u-sticky bgColor="#ff7a31">
  4. <u-tabs :list="nav" :current="current" lineColor="#ffffff" :activeStyle="{
  5. color: '#ffffff',
  6. transform: 'scale(1.05)'
  7. }" :inactiveStyle="{
  8. color: '#f5f5f5',
  9. transform: 'scale(1)'
  10. }" :scrollable="true" itemStyle="padding-left: 60rpx; padding-right: 60rpx;font-size:22rpx; height: 100rpx;"
  11. @click="tabClick"></u-tabs>
  12. </u-sticky>
  13. <view class="se-p-40">
  14. <view class="se-px-40 se-mb-30 se-py-30 se-bgc-white se-br-40 se-bs-b" v-for="(items,indexs) in list"
  15. :key="indexs">
  16. <view class="se-flex se-flex-h-sb se-fw-6 se-fs-32 se-pb-20">
  17. <view class="se-flex" @click="onOrderDetail(items)">
  18. <text>{{items.workName}}</text>
  19. <u-icon name="arrow-right"></u-icon>
  20. </view>
  21. <view class="se-c-red">
  22. {{ getStatusText(items) }}
  23. </view>
  24. </view>
  25. <view class="se-flex" @click="onOrderDetail(items)">
  26. <view class="se-w-160 se-h-160">
  27. <image class="se-w-160 se-h-160 se-br-10" :src="items.workHeadImg" mode=""></image>
  28. </view>
  29. <view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
  30. <view class="se-fw-6 se-c-black se-fs-30 se-display-ib">{{items.title}}</view>
  31. <view class="se-fs-24 se-c-text-third se-display-ib">所属行业:{{items.categoryOne}}</view>
  32. <view class="se-fs-24 se-c-text-third se-display-ib">所属工总:{{items.categoryTwo}}</view>
  33. </view>
  34. </view>
  35. <view class="se-flex se-flex-h-sb se-w-p-100 se-pt-20">
  36. <view class="se-fs-24 se-display-ib">
  37. <text class="se-c-black">试工日薪</text>
  38. <text class="se-c-orange se-fs-30 se-fw-6"><text
  39. class="se-fs-24"></text>
  40. {{items.employJob && items.employJob.salaryDay || 0}}
  41. </text>
  42. </view>
  43. <button
  44. open-type="contact"
  45. class="se-display-ib se-px-20 se-br-40 se-flex-h-c se-h-50 se-lh-50 se-ta-c se-fs-24 se-fs-24 se-c-66 se-b"
  46. style="background: transparent; border: none; padding: 0; margin: 0; line-height: 50rpx;">
  47. <text>联系客服</text>
  48. </button>
  49. </view>
  50. </view>
  51. <u-empty v-if="list && list.length==0" mode="list"></u-empty>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. import {
  57. bossOrderList
  58. } from "@/common/api.js"
  59. import {
  60. getStatusText
  61. } from "@/utils/statusText.js"
  62. export default {
  63. components: {
  64. },
  65. data() {
  66. return {
  67. current: 0,
  68. nav: [{
  69. name: '全部',
  70. index: null
  71. },
  72. {
  73. name: '待聘用',
  74. index: 0
  75. },
  76. {
  77. name: '进行中',
  78. index: 1
  79. },
  80. {
  81. name: '试工完成',
  82. index: 2
  83. },
  84. {
  85. name: '企业确认',
  86. index: 3
  87. },
  88. {
  89. name: '已支付',
  90. index: 4
  91. },
  92. {
  93. name: '已完成',
  94. index: 5
  95. },
  96. {
  97. name: '已取消',
  98. index: 6
  99. }
  100. ],
  101. list: [],
  102. orderStatus: null,
  103. pageNo: 1,
  104. pageSize: 20,
  105. }
  106. },
  107. mounted() {
  108. this.onOrder();
  109. },
  110. methods: {
  111. getStatusText,
  112. onReach() {
  113. this.pageNo = this.pageNo + 1
  114. this.onOrder()
  115. },
  116. onRefresh() {
  117. this.list = []
  118. this.pageNo = 1
  119. this.onOrder()
  120. },
  121. onOrder() {
  122. let that = this;
  123. let params = {
  124. role: 0,
  125. status: that.orderStatus,
  126. pageNo: that.pageNo,
  127. pageSize: that.pageSize
  128. }
  129. bossOrderList(params).then(response => {
  130. console.info("bossOrder", response.result.records, that.pageNo)
  131. if (that.pageNo == 1) {
  132. that.list = response.result.records
  133. } else {
  134. that.list = that.list.concat(response.result.records)
  135. }
  136. }).catch(error => {
  137. })
  138. },
  139. tabClick(event) {
  140. this.list = []
  141. this.pageNo = 1
  142. this.current = event.index
  143. this.orderStatus = this.nav[event.index].index
  144. this.onOrder()
  145. },
  146. onOrderDetail(event) {
  147. uni.navigateTo({
  148. url: "/pages_subpack/order-detail/index?orderId=" + event.id
  149. })
  150. },
  151. }
  152. }
  153. </script>
  154. <style>
  155. </style>