-
zhangwei
2025-01-23 e5a77d6a551d13e4cf74624b31b0fa3e328b304d
src/pages/detail/detail.vue
@@ -1,7 +1,7 @@
<template>
   <view class="list full-page">
      <view class="content c-p-b-18">
         <view class="bgcolor c-p-24 chuany-flex chuany-justify-between chuany-font28 chuany-text-bold">
         <!-- <view class="bgcolor c-p-24 chuany-flex chuany-justify-between chuany-font28 chuany-text-bold">
            报名
            <up-icon name="arrow-right-double" color='#faa93f'></up-icon>
            确认接单
@@ -9,11 +9,12 @@
            上下班打卡
            <up-icon name="arrow-right-double" color='#faa93f'></up-icon>
            结算提现
         </view>
         </view> -->
         <view class="chuany-flex chuany-justify-between">
            <view class="chuany-width100">
               <view class="chuany-flex chuany-justify-between chuany-align-center chuany-width100 chuany-box c-p-18">
                  <view class=" chuany-font34">
               <view
                  class="chuany-flex chuany-justify-between chuany-align-center chuany-width100 chuany-box c-p-18">
                  <view class="chuany-font32">
                     {{orderObj.orderName}}
                  </view>
                  <view>
@@ -24,12 +25,18 @@
                  <up-tag class='c-p-l-14 c-p-b-14' :text="item" plain v-for="(item,index) in tags"> </up-tag>
               </view> -->
               <view class="redcla c-p-l-18 c-p-r-18">
                  <text class="chuany-font40 chuany-text-bold">
                     {{orderObj.workPrice}}
                  <text class="chuany-font40">
                     {{orderObj.workPrice}}<template v-if="orderObj.workPriceMax">~{{orderObj.workPriceMax}}</template>
                  </text>
                  <text class='chuany-font20'>
                     {{orderObj.workerType==0?'元/小时':'元/件'}}
                  </text>
                  <!-- <text class="chuany-font40">
                     {{orderObj.workPrice}}
                  </text>
                  <text class='chuany-font20'>
                     {{orderObj.workerType==0?'元/小时':'元/件'}}
                  </text> -->
               </view>
            </view>
@@ -45,23 +52,30 @@
               <text class="colorgray ">任务日期</text>
            </view>
            <view class="chuany-flex chuany-flex-direction">
               <text>{{$util.formatDate(orderObj.wordStartTime)}} 至 {{$util.formatDate(orderObj.wordEndTime)}}</text>
               <text>{{$util.formatDate(orderObj.wordStartTime)}} 至
                  {{$util.formatDate(orderObj.wordEndTime)}}</text>
            </view>
         </view>
         <view class="chuany-flex c-p-l-20 c-p-r-20 c-p-b-20">
            <view class="chuany-width26">
               <text class="colorgray ">任务时间</text>
            </view>
            <view class="chuany-flex chuany-flex-direction">
            <!-- <view class="chuany-flex chuany-flex-direction">
               <text>{{orderObj.startTimeName}} 至 {{orderObj.endTimeName}}</text>
            </view> -->
            <view class="chuany-flex chuany-flex-direction" v-if="orderObj.zixinganpai">
               {{orderObj.zixinganpaiName}}
            </view>
            <view class="" v-else>
               {{orderObj.startTimeName}} 至 {{orderObj.endTimeName}}
            </view>
         </view>
         <view class="chuany-flex  c-p-l-18">
         <!-- <view class="chuany-flex  c-p-l-18">
            <view class="chuany-width26">
               <text class="colorgray">已招人数</text>
            </view>
            <text>{{orderObj.worderCounted}}/{{orderObj.worderCount}}</text>
         </view>
         </view> -->
         <!-- <view class="chuany-flex c-p-18">
            <view class="chuany-width26 ">
               <text class="colorgray">性别</text>
@@ -74,7 +88,7 @@
            </view>
            <text>18岁以上</text>
         </view> -->
         <view class="chuany-flex chuany-justify-between c-p-l-18 c-p-r-18 c-p-t-18 borderbox">
         <view class="chuany-flex chuany-justify-between c-p-l-18 c-p-r-18 borderbox">
            <view class="chuany-flex">
               <image class='dingwei c-p-r-16' src="@/static/image/dingwei.png" mode="widthFix"></image>
               <view class="chuany-flex chuany-flex-direction">
@@ -96,13 +110,38 @@
            {{orderObj.demand}}
         </view>
      </view>
      <view class="tabbtns">
         <up-button color='#fece01' class="text-69" text="报名" @click="enroll"></up-button>
      <!-- <view class="coreshop-bg-white c-m-t-20 c-p-20">
         <view class="c-p-b-20 colorgray">
            工价详情
         </view>
         <view class="c-p-b-20">
            当前工价:{{orderObj.workPriceDangqian}} {{orderObj.workerType==0?'元/小时':'元/件'}}
         </view>
         <view class="c-p-b-20">
            历史工价:
            <view class="chuany-flex chuany-justify-between" v-for="item in orderObj.orderBiddingWorkPrices">
               <view class="">
                  {{$util.formatDate(item.effectTime)}}
               </view>
               <view class="">
                  {{item.workPrice}} {{orderObj.workerType==0?'元/小时':'元/件'}}
               </view>
            </view>
         </view>
      </view> -->
      <view class="tabbtns" v-if="!orderObj.isSelectedName">
         <up-button color='#fece01' :loading='isLoading' loadingText="报名中" text="报名"
            @click="enroll"></up-button>
      </view>
   </view>
</template>
<script>
   import {
      mapActions,
      mapGetters,
      mapMutations
   } from 'vuex'
   export default {
      onLoad(option) {
         let {
@@ -110,11 +149,16 @@
         } = option
         this.getOrder(orderid)
      },
      data() {
         return {
            orderObj: null,
            tags: ['4小时', '可无经验', '手脚麻利', '计时']
            orderObj: {},
            tags: ['4小时', '可无经验', '手脚麻利', '计时'],
            isLoading: false
         }
      },
      computed: {
         ...mapGetters(['userInfo'])
      },
      methods: {
         getOrder(orderid) {
@@ -125,10 +169,21 @@
            })
         },
         enroll() {
            if (!this.userInfo.userWorker) {
               uni.navigateTo({
                  url: '/pages/mine/apply'
               });
               this.$util.showToast({
                  title: '请先完善资料!'
               })
               return
            }
            this.isLoading = true
            this.$api.saveBaoMing({
               orderId: this.orderObj.id
            }).then(res => {
               if (res.code == 1) {
                  uni.navigateBack()
                  this.$util.showToast({
                     title: "报名成功!",
                     icon: "success"
@@ -138,6 +193,7 @@
                     title: res.error
                  })
               }
               this.isLoading = false
            })
         }
      }
@@ -188,6 +244,4 @@
      width: 50rpx;
      height: 50rpx;
   }
</style>