-
zhangwei
2024-10-11 a1a7c2aed860d1a1bb1ac377a69cdeacb7609cb9
src/pages/order/detail.vue
@@ -1,7 +1,7 @@
<template>
   <view class="">
      <scroll-view enable-flex="true">
         <view class="list chuany-flex chuany-flex-direction chuany-align-center c-p-b-30">
         <view class="list chuany-flex chuany-flex-direction chuany-align-center c-p-b-30" @click='toEdit'>
            <view class="content c-p-b-18">
               <view
                  class="bgblue c-p-l-18 c-p-r-18 c-p-b-10 c-p-t-10 chuany-flex chuany-justify-between chuany-font30">
@@ -43,19 +43,26 @@
               <view class='chuany-flex chuany-justify-between c-p-l-18 c-p-r-18 c-p-t-6 chuany-align-center'>
                  <view class="redcla">
                     <text class="chuany-font40">
                        {{detailItem.workPrice}}
                        {{detailItem.workPrice}}<template
                           v-if="detailItem.workPriceMax">~{{detailItem.workPriceMax}}</template>
                     </text>
                     <text class='chuany-font20'>
                        {{detailItem.workerType==0?'元/小时':'元/件'}}
                     </text>
                     <!-- <text class="chuany-font40">
                        {{detailItem.workPrice}}
                     </text>
                     <text class='chuany-font20'>
                        {{detailItem.workerType==0?'元/小时':'元/件'}}
                     </text> -->
                  </view>
                  <view class="">
                  <view class="" @click.stop="manageOrder(detailItem)">
                     <!-- <up-tag class='c-m-r-10' text="下架" shape="circle" type="error" size='mini'
                     v-if="detailItem.orderStatus==0" @click.stop="deleteOrder(detailItem)"></up-tag> -->
                     <up-button class='c-m-r-10' :text="detailItem.isEn?'下架':'上架'" shape="circle"
                        :loading='isLoading' :loadingText="detailItem.isEn?'下架中':'上架中'"
                        v-if="detailItem.orderStatus==0" :type="detailItem.isEn?'error':'primary'" size='mini'
                        @click.stop="manageOrder(detailItem)"></up-button>
                        v-if="detailItem.orderStatus==0" :type="detailItem.isEn?'error':'primary'"
                        size='mini'></up-button>
                     <!-- <up-tag text="去抢活" type="warning" shape="circle"></up-tag> -->
                     <!-- <up-tag text="去抢活" type="warning" shape="circle"></up-tag> -->
                  </view>
@@ -175,12 +182,12 @@
      let {
         orderid
      } = option
      getOrder(orderid)
      orderIdVal = orderid
      console.log(option, '========orderid', orderid);
      // detailItem.value = JSON.parse($db.get('detailItem'))
   })
   onShow(() => {
      getOrder(orderIdVal)
   })
   const click = () => {
   }
@@ -206,7 +213,7 @@
               title: "工价保存成功!",
               icon: "success"
            })
            getOrder(orderIdVal)
            getOrder(orderIdVal, item.id)
            item.showEdit = false
         } else {
            $util.showToast({
@@ -223,7 +230,7 @@
      })
   }
   const toWorkerDetail = (item) => {
      $db.set('toudiItem',item)
      $db.set('toudiItem', item)
      uni.navigateTo({
         url: `/pages/worker/worker?workerid=${item.workerUserId}`
      })
@@ -287,11 +294,14 @@
      modalShow.value = false
      workerItem.value = {}
   }
   const getOrder = (orderid) => {
   const getOrder = (orderid, id) => {
      $api.getOrder(orderid).then(res => {
         if (res.code == 1) {
            res.data.orderBidding.forEach(item => {
               item.showEdit = false
               if (id == item.id) {
                  toWorkerDetail(item)
               }
            })
            detailItem.value = res.data
         }
@@ -333,6 +343,12 @@
         })
      }
   }
   const toEdit = () => {
      $db.set('editItem', detailItem.value)
      uni.navigateTo({
         url: `/pages/release/index`
      })
   }
</script>
<style lang='scss'>