-
zhangwei
2024-09-10 38130802e3fd55080f518f4128ef20ddfdd907c3
src/pages/order/myorder.vue
@@ -2,40 +2,43 @@
   <view>
      <up-sticky bgColor="#fff">
         <view class="coreshop-ff content c-p-10">
            <up-search placeholder="请点击选择日期" @clear='clear' @clickIcon='clickTime' @custom='search'
            <up-search placeholder="请点击选择日期" @clear='clear' @click='clickTime' disabled  @custom='search'
               v-model="workTime" search-icon="calendar" @search='search'></up-search>
         </view>
         <!-- <up-subsection :list="list" :current="current4" activeColor="#f9ae3d"
            @change="sectionChange"></up-subsection> -->
      </up-sticky>
      <view class="full-page">
         <view class="" v-if="listO.orderList&&listO.orderList.length>0">
            <view class="listrecord c-p-20" v-for="(item,index) in listO.orderList" :key="item.id"
               @click="pageToDetail(item)">
         <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">
               <view class="coreshop-ff chuany-bradius20">
                  <view class="c-p-26">
                     <view class="chuany-flex chuany-justify-between">
                        <text class="chuany-font34 chuany-text-bold">
                           {{item.orderName}}
                        <text class="chuany-font34">
                           {{item.orderComName}}
                        </text>
                        <view class="chuany-flex chuany-justify-between">
                           <!-- 招工人数:{{item.worderCount}}人 -->
                           <!-- <text class="c-p-r-20">
                           
                        </text> -->
                           <up-tag class='c-m-r-10' text="去打卡" shape="circle" type="success"
                              size='mini'></up-tag>
                           <up-tag class='c-m-r-10' text="上班打卡" shape="circle" type="success"
                              v-if="item.isSelected" @click="pageToDetail(item)" size='mini'></up-tag>
                           <up-tag class='c-m-r-10' :text="item.isSelectedName" shape="circle" type="warning"
                              v-else size='mini'></up-tag>
                        </view>
                     </view>
                     <view class="c-p-t-20">
                        {{$util.formatDate(item.wordStartTime,true)}}至
                        {{$util.formatDate(item.wordEndTime,true)}}
                     <view class="c-p-t-10">
                        日期:{{item.wordStartTimeName}} 至 {{item.wordEndTimeName}}
                     </view>
                     <view class="chuany-flex chuany-justify-between c-p-t-20">
                     <!-- <view class="c-p-t-14">
                        时间:{{item.startTimeName}} 至 {{item.endTimeName}}
                     </view> -->
                     <view class="chuany-flex chuany-justify-between c-p-t-10">
                        <view class="chuany-width50">
                           <text>
                              方式:{{item.workerType==0?'计时':'计件'}}
                              <!-- 方式:{{item.workerType==0?'计时':'计件'}} -->
                              时间:{{item.startTimeName}} 至 {{item.endTimeName}}
                           </text>
                        </view>
                        <view class="chuany-width50">
@@ -53,7 +56,7 @@
            </up-empty>
         </view>
      </view>
      <fui-date-picker range :show="datePickerShow" type="5" @change="changePicker"
      <fui-date-picker range :show="datePickerShow" :value="$util.formatDate(new Date())" type="3" @change="changePicker"
         @cancel="cancel"></fui-date-picker>
   </view>
</template>
@@ -62,7 +65,8 @@
   import {
      onLoad,
      onShow,
      onReachBottom
      onReachBottom,
      onPullDownRefresh
   } from "@dcloudio/uni-app";
   import {
      reactive,
@@ -91,6 +95,13 @@
         PostMyListPage();
      }
   })
   onPullDownRefresh(() => {
      state.pageIndex = 1
      state.pageSize = 20
      loadStatus.value = 'loadmore'
      PostMyListPage()
      uni.stopPullDownRefresh();
   })
   onLoad(() => {
      PostMyListPage()
   })
@@ -101,6 +112,7 @@
      workTime.value = val.startDate.result + '至' + val.endDate.result
      state.wordStartTime = new Date(val.startDate.result) //工作开始时间
      state.wordEndTime = new Date(val.endDate.result)
      datePickerShow.value = !datePickerShow.value
   }
   const search = (index) => {
@@ -119,6 +131,10 @@
   const clickTime = () => {
      datePickerShow.value = !datePickerShow.value
   }
   const cancel=()=>{
      datePickerShow.value = !datePickerShow.value
   }
   const PostMyListPage = (orderStatus) => {
      let data = {
         pageIndex: state.pageIndex,