提交 80275d3a authored 作者: lidongxu's avatar lidongxu

新增下班确认提示,切换tab再获取一次是否打卡下班的信息接口

上级 b1c877c3
......@@ -255,16 +255,24 @@ export default {
// 判断是否能下班
if (type === 4) {
// 下班先提交促销上班看看是否通过后台校验
await getOnWorkCardStatusAPI(this.onWorkRecord.reportedId)
const res = await getOnWorkCardStatusAPI(this.onWorkRecord.reportedId)
if (res.code !== 0) return
}
// 判断确定下班
let wantClockOut = false
if (type === 4) {
await this.$modal.confirm('你真的确定下班吗?').then(() => {
wantClockOut = true
})
}
if (!wantClockOut && type === 4) return
// 前置条件过滤完毕,走打卡流程
const photoUrl = await this.pickerPhoto(type) // 拍照
const { id, name } = this.$store.getters.user
// 配置考勤参数
console.log(this.onWorkRecord.id, 'this.onWorkRecord.id')
const attObj = {
temporaryId: id, // 促销员 ID
temporaryName: name, // 促销员姓名
......
......@@ -59,6 +59,9 @@ export default {
this.getOnWorkRecordFn()
this.getPromotionPhotoFn()
},
onShow() {
this.getPromotionPhotoFn()
},
methods: {
// 获取促销员任务列表
async getOnWorkRecordFn() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论