|
|
@ -214,6 +214,7 @@ |
|
|
|
<a-time-picker |
|
|
|
placeholder="请选择" |
|
|
|
format="HH:mm" |
|
|
|
:default-value="defaultValue" |
|
|
|
@change="timeChange" |
|
|
|
@openChange=" |
|
|
|
openChange( |
|
|
@ -285,6 +286,7 @@ export default { |
|
|
|
recordInfo: {}, // 当前点击的打卡信息 |
|
|
|
punchTimeType: 0, // 打卡时间是上午还是下午 0 早打卡 1 晚打卡 |
|
|
|
remark: '', // 打卡原因 |
|
|
|
defaultValue: this.$moment(new Date()), // 默认时间 |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
@ -296,6 +298,7 @@ export default { |
|
|
|
clearInterval(this.timer); |
|
|
|
await this.setParams(); |
|
|
|
|
|
|
|
console.log(this.defaultValue); |
|
|
|
// 自动移动到目标位置 |
|
|
|
// document.querySelector('#scrollTo').scrollIntoView({ |
|
|
|
// behavior: 'smooth', // 平滑过渡 |
|
|
@ -328,10 +331,6 @@ export default { |
|
|
|
|
|
|
|
handleOk(e) { |
|
|
|
this.handleClockPunch(this.punchParams); |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
this.visible = false; |
|
|
|
}, 2000); |
|
|
|
}, |
|
|
|
|
|
|
|
handleCancel(e) { |
|
|
@ -410,10 +409,18 @@ export default { |
|
|
|
// } else { |
|
|
|
// this.nightLoading = true; |
|
|
|
// } |
|
|
|
|
|
|
|
if (this.checkerId) { |
|
|
|
params.param.checkerId = this.checkerId; |
|
|
|
} |
|
|
|
|
|
|
|
if (this.selectedDate != this.today) { |
|
|
|
if (!this.remark) { |
|
|
|
this.$message.error('请填写打卡原因'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.remark) { |
|
|
|
params.param.remark = this.remark; |
|
|
|
} |
|
|
@ -433,6 +440,10 @@ export default { |
|
|
|
// } else { |
|
|
|
// this.nightLoading = false; |
|
|
|
// } |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
this.visible = false; |
|
|
|
}, 2000); |
|
|
|
} catch (error) { |
|
|
|
// if (params.param.clockType === 0) { |
|
|
|
// this.morningLoading = false; |
|
|
|