|
|
|
|
@ -98,11 +98,11 @@
|
|
|
|
|
<view class="text1">签到</view>
|
|
|
|
|
<view class="text2">{{dateFormat(time,'HH:mm:ss')}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="btn" v-if="detail.status === 1" @click="$u.throttle(signOut,5000)">
|
|
|
|
|
<view class="btn" v-if="detail.status === 1" @click="$u.throttle(checkSignOut,5000)">
|
|
|
|
|
<view class="text1">签退</view>
|
|
|
|
|
<view class="text2">{{dateFormat(time,'HH:mm:ss')}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="btn" v-if="detail.status === 0 && !flag" @click="$u.throttle(refreshLoaction,5000)">
|
|
|
|
|
<view class="btn" v-if="detail.status === 0 && !flag" @click="$u.throttle(refreshLoaction,3000)">
|
|
|
|
|
<view class="text1">更新定位</view>
|
|
|
|
|
<view class="text2">{{dateFormat(time,'HH:mm:ss')}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -139,6 +139,8 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
<u-modal v-model="isShowModal" :show-cancel-button="true" content="服务时间超过120分钟,是否确认提交?" @confirm="signOut"></u-modal>
|
|
|
|
|
|
|
|
|
|
<imgUpload ref="imgUpload" :isShow.sync="isShowImg" :type="type" @confirm="clock"></imgUpload>
|
|
|
|
|
</view>
|
|
|
|
|
@ -161,6 +163,7 @@
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
isShowModal:false,//是否超过时间确认
|
|
|
|
|
type: 0, //打卡类型,1签到 2过程打卡 3签退
|
|
|
|
|
isShowImg: false,
|
|
|
|
|
id: '',
|
|
|
|
|
@ -447,9 +450,10 @@
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//签退
|
|
|
|
|
signOut() {
|
|
|
|
|
|
|
|
|
|
//签退前检查
|
|
|
|
|
checkSignOut(){
|
|
|
|
|
//验证打卡次数是否已满
|
|
|
|
|
if (this.detail.logs_count < this.detail.product.process_total) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
@ -471,24 +475,23 @@
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
//验证服务时间是否都已完成
|
|
|
|
|
// let flag2 = 0
|
|
|
|
|
// let tempArr = []
|
|
|
|
|
// for (let i of this.skuList) {
|
|
|
|
|
// if (i.isSelect && (i.form.time >= i.info.time_lenth)) {
|
|
|
|
|
// flag2++
|
|
|
|
|
// } else {
|
|
|
|
|
// tempArr.push(i.info.name)
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (flag2 < this.skuList.length) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: `${tempArr.toString()}服务时间未满`
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//时间是否超出120分钟
|
|
|
|
|
let totalTime = 0
|
|
|
|
|
for (let i of this.skuList) {
|
|
|
|
|
if (i.isSelect && i.form.time) {
|
|
|
|
|
totalTime += Number(i.form.time)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(11111,totalTime);
|
|
|
|
|
if(totalTime > 120){
|
|
|
|
|
this.isShowModal = true
|
|
|
|
|
}else{
|
|
|
|
|
this.signOut()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//签退
|
|
|
|
|
signOut() {
|
|
|
|
|
this.saveSku().then(() => {
|
|
|
|
|
this.type = 3
|
|
|
|
|
this.isShowImg = true
|
|
|
|
|
|