|
@@ -109,6 +109,9 @@
|
|
|
remarkTip:'',
|
|
|
remark:'',
|
|
|
workType:1,
|
|
|
+ punchDistance:0, //打卡距离
|
|
|
+ punchRange:0, //打卡范围
|
|
|
+ outwork:0, //是否外勤 0-否 1-是
|
|
|
// 地图
|
|
|
covers: [],
|
|
|
circles:[{
|
|
@@ -153,8 +156,11 @@
|
|
|
var src = res.latitude + ',' + res.longitude;
|
|
|
var locRet = location?.distance?.(src, dst);
|
|
|
that.positionInfo = true;
|
|
|
+ that.punchDistance = locRet.distance;
|
|
|
+ that.punchRange = that.payeeinfo.workDistance;
|
|
|
if(locRet.distance <= that.payeeinfo.workDistance){//在打卡范围内
|
|
|
that.outPosition = false;
|
|
|
+ that.outwork = 0;
|
|
|
if(that.workType==1){
|
|
|
let workStartTime = new Date(that.payeeinfo.workStartTime.replace(/-/g,'/'));
|
|
|
if(that.currentTime<=workStartTime.getTime()){
|
|
@@ -185,6 +191,7 @@
|
|
|
that.getPunchIn();
|
|
|
}else{//不在打卡范围内
|
|
|
that.outPosition = true;
|
|
|
+ that.outwork = 1;
|
|
|
// that.remarkPopupShow = true;
|
|
|
// console.table({locRet:locRet,workDistance:that.payeeinfo.workDistance,r:locRet<=that.payeeinfo.workDistance});
|
|
|
that.$refs.uToast.show({
|
|
@@ -219,7 +226,10 @@
|
|
|
longitude:that.payeeinfo.longitude,
|
|
|
remark:that.remark,
|
|
|
roadNo:that.payeeinfo.roadNo,
|
|
|
- workType:that.workType
|
|
|
+ workType:that.workType,
|
|
|
+ punchDistance: that.punchDistance,
|
|
|
+ punchRange: that.punchRange,
|
|
|
+ outwork: that.outwork
|
|
|
}
|
|
|
that.$u.api.punchIn(param)
|
|
|
.then(res=>{
|