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

173 lines
4.0 KiB

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