| | |
| | | <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" |
| | |
| | | <text>未进入矿场区域</text> |
| | | </view> --> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | 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; |
| | | this.yyId = params.yyId; |
| | | }, |
| | | data() { |
| | | return { |
| | | nowTime: '', |
| | | coalStatus: 0, |
| | | orderPlanId:'', |
| | | yyId:null, |
| | | coalDetailsData:{}, |
| | | punchTheClockObj: { |
| | | tmcoa: null, |
| | | latA: null, |
| | | latB: null |
| | | } |
| | | }, |
| | | getYuYueDataParams: { |
| | | deptId: '', |
| | | filedId: '', |
| | | sendDate: '' |
| | | }, |
| | | }; |
| | | }, |
| | | onShow() { |
| | | this.init(); |
| | | this.getSetting(); //获取授权 |
| | | this.getFuzzyLocation(); //获取位置 |
| | | this.todayDate(); //当前时间 |
| | | }, |
| | | methods: { |
| | | init(){ |
| | | uni.showLoading({ |
| | | title: '加载中' |
| | | }); |
| | | 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({ |
| | |
| | | console.log(res, '签到'); |
| | | if (res.code == 0) { |
| | | this.$u.toast('签到成功'); |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | delta: 1 |
| | | }, |
| | | 500 |
| | | ); |
| | | }); |
| | | // 如果是签到后才能更改时间,点签到完成就别返回主界面了,更改完后再返回 |
| | | // setTimeout(() => { |
| | | // uni.navigateBack({ |
| | | // delta: 1 |
| | | // }, |
| | | // 500 |
| | | // ); |
| | | // }); |
| | | } else { |
| | | this.$u.toast(res.msg ? res.msg : '签到失败'); |
| | | } |
| | |
| | | height: 100vh; |
| | | display: flex; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | position: relative; |
| | | |
| | | .punchTheClock_container { |
| | | .punchTheClock_btn { |
| | |
| | | } |
| | | } |
| | | } |
| | | .editIn{ |
| | | position: absolute; |
| | | right:10rpx; |
| | | top: 15rpx; |
| | | } |
| | | } |
| | | </style> |