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

162 lines
3.8 KiB

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