| | |
| | | <p>{{ nowTime }}</p> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="punchTheClock_text"> |
| | | <u-icon name="map" color="#51e30d" size="30"></u-icon> |
| | | <text>未进入矿场区域</text> |
| | | </view> --> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | <script> |
| | | import { todayDate } from '@/utils/util.js'; |
| | | export default { |
| | | onLoad(params) { |
| | | this.punchTheClockObj.tmcoa = params.tmId.toString(); |
| | | this.coalStatus = params.coalStatus; |
| | | }, |
| | | data() { |
| | | return { |
| | | nowTime: '', |
| | |
| | | tmcoa: null, |
| | | latA: null, |
| | | latB: null |
| | | } |
| | | }, |
| | | timeout: '2', //'1' 是超时 '2' 是未超时 |
| | | entranceApplyParams: { |
| | | takeCoalId: '', |
| | | filedId: '', |
| | | deptId: '', |
| | | sendDate: '', |
| | | yyId: '' |
| | | }, |
| | | yuYueSection: '', //预约时间段 |
| | | }; |
| | | }, |
| | | onLoad() { |
| | | onLoad(params) { |
| | | this.punchTheClockObj.tmcoa = params.tmId; |
| | | this.coalStatus = params.coalStatus; |
| | | this.entranceApplyParams.takeCoalId = params.orderPlanId |
| | | this.entranceApplyParams.filedId = params.filedId |
| | | this.entranceApplyParams.deptId = params.deptId |
| | | this.entranceApplyParams.yyId = params.yyId |
| | | this.entranceApplyParams.sendDate = params.sendDate |
| | | this.yuYueSection = params.yuYueSection |
| | | this.getSetting(); //获取授权 |
| | | this.getFuzzyLocation(); //获取位置 |
| | | this.todayDate(); //当前时间 |
| | |
| | | this.$reqPost('arrive', this.punchTheClockObj, 'params').then(res => { |
| | | console.log(res, '签到'); |
| | | if (res.code == 0) { |
| | | this.$u.toast('签到成功'); |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }); |
| | | uni.redirectTo({ |
| | | url: `/pages/driver-page/appointment/appointment?type=入场申请&yyId=${this.entranceApplyParams.yyId}&yuYueSection=${this.yuYueSection}&takeCoalId=${this.entranceApplyParams.takeCoalId}&deptId=${this.entranceApplyParams.deptId}&filedId=${this.entranceApplyParams.filedId}&sendDate=${this.entranceApplyParams.sendDate}` |
| | | }) |
| | | }, 1000); |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '签到失败'); |
| | |
| | | } else { |
| | | this.$u.toast('暂获取不到到当前位置'); |
| | | } |
| | | } |
| | | }, |
| | | // entranceApply() { |
| | | // if (this.coalStatus !== 2) { |
| | | // this.$u.toast('请先签到') |
| | | // return |
| | | // } |
| | | // if (this.timeout === '2') { |
| | | // this.$u.toast('未超出预约时间,无需更换'); |
| | | // return |
| | | // } |
| | | // uni.navigateTo({ |
| | | // url: `/pages/driver-page/appointment/appointment?type=入场申请&takeCoalId=${this.entranceApplyParams.takeCoalId}&yyId=${this.entranceApplyParams.yyId}&filedId=${this.entranceApplyParams.filedId}&deptId=${ |
| | | // this.entranceApplyParams.deptId |
| | | // }&sendDate=${this.entranceApplyParams.sendDate}&yuYueSection=${this.yuYueSection}` |
| | | // }); |
| | | // } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | |
| | | .punchTheClock_container { |
| | | .punchTheClock_btn { |