yangan
2023-11-09 81062e5937779fd4ee4004412ca89942b67017b4
pages/driver-page/driver-index/bill-of-lading-details/punchTheClock/punchTheClock.vue
@@ -1,6 +1,14 @@
<template>
   <!-- 打卡 -->
   <view class="punchTheClock">
      <view class="editIn">
         <u-button text=" 更改入场"
                  type="primary"
                  plain
                  @click="rcsqClick"
                  shape="circle"
                :disabled="coalDetailsData.status >= 3"></u-button>
      </view>
      <!-- 打卡按钮 -->
      <view class="punchTheClock_container">
         <view class="punchTheClock_btn"
@@ -15,6 +23,8 @@
            <text>未进入矿场区域</text>
         </view> -->
      </view>
   </view>
</template>
@@ -22,26 +32,59 @@
   import { todayDate } from '@/utils/util.js';
   export default {
      onLoad(params) {
         console.log(params,'params')
         this.punchTheClockObj.tmcoa = params.tmId.toString();
         this.orderPlanId = params.orderPlanId;
         this.coalStatus = params.coalStatus;
      },
      data() {
         return {
            nowTime: '',
            coalStatus: 0,
            orderPlanId:'',
            coalDetailsData:{},
            punchTheClockObj: {
               tmcoa: null,
               latA: null,
               latB: null
            }
            },
            getYuYueDataParams: {
               deptId: '',
               filedId: '',
               sendDate: ''
            },
         };
      },
      onShow() {
         this.init();
         this.getSetting(); //获取授权
         this.getFuzzyLocation(); //获取位置
         this.todayDate(); //当前时间
      },
      methods: {
         init(){
            this.$reqGet('getTakeCoal', { takeCoalId: this.orderPlanId }).then(res => {
               uni.hideLoading();
               if (res.code == 0) {
                  this.coalDetailsData = res.data;
                  console.log(res, '通知单详情');
                  // 获取入场申请操作后的预约列表的参数
                  this.getYuYueDataParams.deptId = res.data.deptId;
                  this.getYuYueDataParams.filedId = res.data.filedId;
                  this.getYuYueDataParams.sendDate = res.data.sendDate;
               } else {
                  this.$u.toast('加载失败');
               }
            })
         },
         // 入场申请
         rcsqClick() {
            uni.navigateTo({
               url: `/pages/driver-page/appointment/appointment?type=入场申请&takeCoalId=${this.orderPlanId}&yyId=${this.yyId}&filedId=${this.getYuYueDataParams.filedId}&deptId=${
               this.getYuYueDataParams.deptId
            }&sendDate=${this.getYuYueDataParams.sendDate}`
            });
         },
         getSetting() {
            // 获取权限信息
            wx.getSetting({
@@ -111,7 +154,9 @@
      height: 100vh;
      display: flex;
      justify-content: center;
      flex-direction: column;
      align-items: center;
      position: relative;
      .punchTheClock_container {
         .punchTheClock_btn {
@@ -141,5 +186,10 @@
            }
         }
      }
      .editIn{
         position: absolute;
            right:10rpx;
          top: 15rpx;
      }
   }
</style>