zhangwei
2024-09-18 182884c4367668f279851b76be9b2b957ad0d47a
src/pages/order/order.vue
@@ -2,8 +2,10 @@
   <view>
      <up-sticky bgColor="#fff">
         <view class="coreshop-ff content c-p-10">
            <up-search placeholder="请点击选择日期" @clear='clear' @clickIcon='clickTime' @custom='search'
               v-model="workTime" search-icon="calendar" @search='search'></up-search>
            <!-- <up-search placeholder="请点击选择日期" @clear='clear' @clickIcon='clickTime' @custom='search'
               v-model="workTime" search-icon="calendar" @search='search'></up-search> -->
            <up-search placeholder="请输入工作名称" @clear='clear'  @custom='search'
               v-model="state.orderName" @search='search'></up-search>
         </view>
         <!-- <up-subsection :list="list" :current="current4" activeColor="#f9ae3d"
            @change="sectionChange"></up-subsection> -->
@@ -12,10 +14,10 @@
         <view class="c-p-l-20 c-p-r-20" v-if="listO.orderList&&listO.orderList.length>0">
            <view class="listrecord c-p-t-20" v-for="(item,index) in listO.orderList" :key="item.id"
               @click="pageToDetail(item)">
               <view class="coreshop-ff chuany-bradius20">
                  <view class="c-p-26">
               <view class="coreshop-ff chuany-bradius20 ">
                  <view class="c-p-24">
                     <view class="chuany-flex chuany-justify-between">
                        <text class="chuany-font34 chuany-text-bold">
                        <text class="chuany-font32">
                           {{item.orderName}}
                        </text>
                        <view class="chuany-flex chuany-justify-between">
@@ -27,23 +29,26 @@
                              plain plainFill size='mini'></up-tag>
                        </view>
                     </view>
                     <view class="c-p-t-14">
                        日期:{{$util.formatDate(item.wordStartTime)}} 至 {{$util.formatDate(item.wordEndTime)}}
                     </view>
                     <view class="c-p-t-14">
                        时间:{{item.startTimeName}} 至 {{item.endTimeName}}
                     </view>
                     <view class="chuany-flex chuany-justify-between c-p-t-14">
                        <view class="chuany-width50">
                           <text>
                              方式:{{item.workerType==0?'计时':'计件'}}
                           </text>
                     <view class="text-69 chuany-font28">
                        <view class="">
                           日期:{{$util.formatDate(item.wordStartTime)}} 至 {{$util.formatDate(item.wordEndTime)}}
                        </view>
                        <view class="chuany-width50">
                           工价:{{item.workPrice}}{{item.workerType==0?'元/小时':'元/件'}}
                           <text></text>
                        <view class="">
                           时间:{{item.startTimeName}} 至 {{item.endTimeName}}
                        </view>
                        <view class="chuany-flex chuany-justify-between ">
                           <view class="chuany-width50">
                              <text>
                                 方式:{{item.workerType==0?'计时':'计件'}}
                              </text>
                           </view>
                           <view class="chuany-width50">
                              工价:{{item.workPrice}}{{item.workerType==0?'元/小时':'元/件'}}
                              <text></text>
                           </view>
                        </view>
                     </view>
                  </view>
               </view>
            </view>
@@ -63,7 +68,8 @@
   import {
      onLoad,
      onShow,
      onReachBottom
      onReachBottom,
      onPullDownRefresh
   } from "@dcloudio/uni-app";
   import {
      reactive,
@@ -79,6 +85,7 @@
   let state = reactive({
      pageIndex: 1,
      pageSize: 20,
      orderName: ''
   })
   let workTime = ref('')
   let datePickerShow = ref(false)
@@ -95,6 +102,13 @@
   onLoad(() => {
      PostMyListPageCompany()
   })
   onPullDownRefresh(() => {
      state.pageIndex = 1
      state.pageSize = 20
      loadStatus.value = 'loadmore'
      PostMyListPageCompany()
      uni.stopPullDownRefresh();
   })
   const current4 = ref(0);
   const list = ref(['全部', '发布', '招工完毕', '结算完毕']);
   const changePicker = (val) => {
@@ -105,15 +119,10 @@
   }
   const search = (index) => {
      console.log(index, '------’');
      if (index == 0) {
         PostMyListPageCompany()
      } else {
         PostMyListPageCompany(index - 1)
      }
      PostMyListPageCompany()
   }
   const clear = () => {
      state.orderName = ''
      state.wordStartTime = ""
      state.wordEndTime = ""
   }
@@ -132,6 +141,9 @@
      if (state.wordEndTime) {
         data.wordEndTime = state.wordEndTime
      }
      if (state.orderName) {
         data.orderName = state.orderName
      }
      loadStatus.value = 'loading';
      $api.PostMyListPageCompany(data).then(res => {
         console.log(res, res.code, '-----------123’');