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

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