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

6 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
3 months ago
3 months ago
3 months ago
3 months ago
6 months ago
3 months ago
6 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"
  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.companyName}}</text>
  24. <u-icon name="arrow-right"></u-icon>
  25. </view>
  26. <view class="se-c-red">
  27. 已完成
  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.workPic" 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.industryName}}</view>
  37. <view class="se-fs-24 se-c-text-third se-display-ib">工作时间:{{items.workTime}}</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.amount}}</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. onOrder(){
  117. let that = this;
  118. let params={
  119. orderStatus:that.orderStatus,
  120. pageNo:that.pageNo,
  121. pageSize:that.pageSize
  122. }
  123. bossOrderList(params).then(response=>{
  124. console.info("bossOrder",response.result.records,that.pageNo)
  125. if(that.pageNo==1){
  126. that.list = response.result.records
  127. }else{
  128. that.list = that.list.concat(response.result.records)
  129. }
  130. }).catch(error=>{
  131. })
  132. },
  133. tabClick(event){
  134. console.info(event)
  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>