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

163 lines
3.8 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
3 months ago
6 months ago
3 months ago
3 months ago
6 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
3 months ago
6 months ago
3 months ago
3 months ago
3 months ago
6 months ago
3 months ago
6 months ago
6 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
6 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
6 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. {{ item.status_dictText }}
  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>{{ item.jobMoney }}</text>
  42. </view>
  43. <view
  44. 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">
  45. <text>联系客服</text>
  46. </view>
  47. </view>
  48. </view>
  49. <u-empty v-if="list && list.length==0" mode="list"></u-empty>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. import {
  55. bossOrderList
  56. } from "@/common/api.js"
  57. export default {
  58. components: {
  59. },
  60. data() {
  61. return {
  62. current: 0,
  63. nav: [
  64. {
  65. name: '全部',
  66. index: null
  67. },
  68. {
  69. name: '待聘用',
  70. index: 0
  71. },
  72. {
  73. name: '进行中',
  74. index: 1
  75. },
  76. {
  77. name: '试工完成',
  78. index: 2
  79. },
  80. {
  81. name: '企业确认',
  82. index: 3
  83. },
  84. {
  85. name: '已支付',
  86. index: 4
  87. },
  88. {
  89. name: '已完成',
  90. index: 5
  91. },
  92. {
  93. name: '已取消',
  94. index: 6
  95. }
  96. ],
  97. list: [],
  98. orderStatus: null,
  99. pageNo: 1,
  100. pageSize: 20,
  101. }
  102. },
  103. mounted() {
  104. this.onOrder()
  105. },
  106. methods: {
  107. onReach() {
  108. this.pageNo = this.pageNo + 1
  109. this.onOrder()
  110. },
  111. onRefresh() {
  112. this.list = []
  113. this.pageNo = 1
  114. this.onOrder()
  115. },
  116. onOrder() {
  117. let that = this;
  118. let params = {
  119. role: 1,
  120. status: that.orderStatus,
  121. pageNo: that.pageNo,
  122. pageSize: that.pageSize
  123. }
  124. bossOrderList(params).then(response => {
  125. if (this.pageNo == 1) {
  126. this.list = response.result.records
  127. } else {
  128. this.list = this.list.concat(response.result.records)
  129. }
  130. }).catch(error => {
  131. })
  132. },
  133. tabClick(event) {
  134. this.list = []
  135. this.pageNo = 1
  136. this.current = event.index
  137. this.orderStatus = this.nav[event.index].index
  138. this.onOrder()
  139. },
  140. onOrderDetail(event) {
  141. uni.navigateTo({
  142. url: "/pages_subpack/job-order-detail/index?orderId=" + event.id
  143. })
  144. },
  145. callPhone(event) {
  146. uni.makePhoneCall({
  147. phoneNumber: event.phone,
  148. success: () => {
  149. console.log("拨打成功");
  150. },
  151. fail: (err) => {
  152. console.error("拨打失败", err);
  153. },
  154. })
  155. }
  156. }
  157. }
  158. </script>
  159. <style>
  160. </style>