-
zhangwei
2024-08-29 447e19fa298ae11a1c3a3fa2d2ff3a1a8dba0501
src/pages/checkin/index.vue
@@ -3,17 +3,17 @@
      <up-sticky>
         <view class="coreshop-ff content c-p-10">
            <up-search placeholder="请点击选择日期" @clickIcon='clickIcon' v-model="wordDate" search-icon="calendar"
               @custom='PostMyComDakaListPage'></up-search>
               @custom='PostMyDakaListPage'></up-search>
         </view>
         <up-subsection :list="list" activeColor="#f9ae3d" @change="sectionChange"></up-subsection>
      </up-sticky>
      <view class="" v-if="viewList&&viewList.length>0">
         <view class="listrecord c-p-18" v-for="item in viewList" :key='item.id' @click='jumpWorkDetail'>
         <view class="listrecord c-p-18" v-for="item in viewList" :key='item.id' @click='jumpWorkDetail(item)'>
            <view class="coreshop-ff chuany-bradius20">
               <view
                  class="bgblue c-p-l-18 c-p-r-18 c-p-t-10 c-p-b-10 chuany-flex chuany-justify-between chuany-font30">
                  <text class=''>
                     日期:{{$util.formatDate(item.workDate,true)}}
                     日期:{{$util.formatDate(item.workDate)}}
                  </text>
               </view>
               <view class="c-p-26">
@@ -153,11 +153,11 @@
         }
      },
      onLoad() {
         this.PostMyComDakaListPage();
         this.PostMyDakaListPage();
      },
      onReachBottom() {
         if (this.loadStatus != 'nomore') {
            this.PostMyComDakaListPage();
            this.PostMyDakaListPage();
         }
      },
      onPullDownRefresh() {
@@ -165,14 +165,21 @@
         this.pageSize = 20
         this.wordDate = ''
         this.isJieSuan = ''
         this.PostMyComDakaListPage();
         this.PostMyDakaListPage();
      },
      methods: {
         sectionChange(val) {
            this.isJieSuan = val
            this.PostMyComDakaListPage()
            this.PostMyDakaListPage()
         },
         saveDakaDetail(item) {
            if(item.workerType==1&&this.workCount){
               this.$util.showToast({
                  title:'请填写数量!',
                  icon:'error'
               })
               return
            }
            let obj = {
               orderBiddingDetailId: item.orderBiddingDetailId, //招工打卡Id
               workTime: item.workTime, //工作时长
@@ -185,7 +192,7 @@
               console.log(res,'----');
            })
         },
         PostMyComDakaListPage() {
         PostMyDakaListPage() {
            let data = {
               pageIndex: this.pageIndex,
               pageSize: this.pageSize,
@@ -207,7 +214,7 @@
               }
               data.isJieSuan = this.isJieSuan
            }
            this.$api.PostMyComDakaListPage(data).then(res => {
            this.$api.PostMyDakaListPage(data).then(res => {
               if (res.code == 1) {
                  if (this.pageIndex == 1) {
                     this.viewList = res.data.items
@@ -233,9 +240,9 @@
         clickIcon() {
            this.datePickerShow = true
         },
         jumpWorkDetail() {
         jumpWorkDetail(item) {
            uni.navigateTo({
               url: '/pages/checkin/workdetail'
               url: `/pages/checkin/workdetail?id=${item.orderBiddingDetailId}`
            })
         }
      }