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

177 lines
3.9 KiB

7 months ago
3 months ago
7 months ago
3 months ago
7 months ago
3 months ago
7 months ago
3 months ago
7 months ago
3 months ago
7 months ago
3 months ago
7 months ago
3 months ago
7 months ago
3 months ago
7 months ago
3 months ago
7 months ago
3 months ago
7 months ago
4 months ago
3 months ago
7 months ago
3 months ago
7 months ago
4 months ago
7 months ago
3 months ago
7 months ago
4 months ago
3 months ago
7 months ago
4 months ago
3 months ago
4 months ago
7 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
7 months ago
4 months ago
3 months ago
7 months ago
4 months ago
7 months ago
3 months ago
7 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 months ago
3 months ago
4 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. @change="handleChangeTab"></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="item in list" :key="item.id">
  15. <view class="se-flex se-flex-h-sb se-fw-6 se-fs-32 se-pb-20">
  16. <view class="se-flex">
  17. <text>{{item.companyName}}</text>
  18. <u-icon name="arrow-right"></u-icon>
  19. </view>
  20. <view class="se-c-red">
  21. {{getOrderStatus(item.orderStatus)}}
  22. </view>
  23. </view>
  24. <view class="se-flex se-bgc-f5 se-br-20">
  25. <view class="se-w-160 se-h-160">
  26. <image class="se-w-160 se-h-160 se-br-10" src="https://cdn.uviewui.com/uview/album/1.jpg"
  27. mode=""></image>
  28. </view>
  29. <view class="se-ml-20 se-flex se-flex-v-sa se-flex-ai-fs">
  30. <view class="se-fs-24 se-c-text-third se-display-ib">师傅姓名: {{item.workName}}</view>
  31. <view class="se-fs-24 se-c-text-third se-display-ib">接单时间: {{item.createTime}}</view>
  32. <view class="se-fs-24 se-c-text-third se-display-ib">联系电话: {{item.phone}}</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 class="se-fs-24"></text>{{item.amount}}</text>
  39. </view>
  40. <view
  41. 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">
  42. <text>联系客服</text>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import {
  51. workOrderList
  52. } from "@/common/api.js"
  53. export default {
  54. components: {
  55. },
  56. data() {
  57. return {
  58. current: 0,
  59. nav: [{
  60. name: '全部',
  61. },
  62. {
  63. name: '待接单',
  64. },
  65. {
  66. name: '已接单',
  67. },
  68. {
  69. name: '进行中',
  70. },
  71. {
  72. name: '试工完成',
  73. },
  74. {
  75. name: '企业确认',
  76. },
  77. {
  78. name: '已支付',
  79. },
  80. {
  81. name: '已完成',
  82. },
  83. {
  84. name: '已取消',
  85. },
  86. {
  87. name: '发起支付',
  88. }
  89. ],
  90. list: [],
  91. orderStatus: null,
  92. pageNo: 1,
  93. pageSize: 20,
  94. }
  95. },
  96. computed: {
  97. getOrderStatus() {
  98. return function(status) {
  99. let text = ''
  100. switch (status) {
  101. case 0:
  102. text = "待聘用"
  103. break;
  104. case 1:
  105. text = "已接单"
  106. break;
  107. case 2:
  108. text = "进行中"
  109. break;
  110. case 3:
  111. text = "试工完成"
  112. break;
  113. case 4:
  114. text = "企业确认"
  115. break;
  116. case 5:
  117. text = "已支付"
  118. break;
  119. case 6:
  120. text = "已完成"
  121. break;
  122. case 7:
  123. text = "已取消"
  124. break;
  125. case 8:
  126. text = "发起支付"
  127. break;
  128. }
  129. return text;
  130. }
  131. }
  132. },
  133. created() {
  134. // 初始数据获取
  135. },
  136. mounted() {
  137. this.onOrder()
  138. },
  139. methods: {
  140. onOrder(selectNew) {
  141. let params = {
  142. orderStatus: this.orderStatus,
  143. pageNo: this.pageNo,
  144. pageSize: this.pageSize
  145. }
  146. workOrderList(params).then(response => {
  147. const {
  148. code,
  149. result
  150. } = response
  151. if (code === 200) {
  152. if (selectNew) {
  153. this.list = result.records
  154. } else {
  155. this.list = [...this.list, ...result.records]
  156. }
  157. }
  158. }).catch(error => {
  159. })
  160. },
  161. handleChangeTab({
  162. index
  163. }) {
  164. this.pageNo = 1
  165. this.current = index
  166. this.orderStatus = index === 0 ? "" : index - 1
  167. this.onOrder(true)
  168. }
  169. }
  170. }
  171. </script>
  172. <style>
  173. </style>