Browse Source

打卡

pull/2/head
xuesinan 4 years ago
parent
commit
8be5178124
  1. 19
      src/components/List/List.vue

19
src/components/List/List.vue

@ -214,6 +214,7 @@
<a-time-picker <a-time-picker
placeholder="请选择" placeholder="请选择"
format="HH:mm" format="HH:mm"
:default-value="defaultValue"
@change="timeChange" @change="timeChange"
@openChange=" @openChange="
openChange( openChange(
@ -285,6 +286,7 @@ export default {
recordInfo: {}, // recordInfo: {}, //
punchTimeType: 0, // 0 1 punchTimeType: 0, // 0 1
remark: '', // remark: '', //
defaultValue: this.$moment(new Date()), //
}; };
}, },
@ -296,6 +298,7 @@ export default {
clearInterval(this.timer); clearInterval(this.timer);
await this.setParams(); await this.setParams();
console.log(this.defaultValue);
// //
// document.querySelector('#scrollTo').scrollIntoView({ // document.querySelector('#scrollTo').scrollIntoView({
// behavior: 'smooth', // // behavior: 'smooth', //
@ -328,10 +331,6 @@ export default {
handleOk(e) { handleOk(e) {
this.handleClockPunch(this.punchParams); this.handleClockPunch(this.punchParams);
setTimeout(() => {
this.visible = false;
}, 2000);
}, },
handleCancel(e) { handleCancel(e) {
@ -410,10 +409,18 @@ export default {
// } else { // } else {
// this.nightLoading = true; // this.nightLoading = true;
// } // }
if (this.checkerId) { if (this.checkerId) {
params.param.checkerId = this.checkerId; params.param.checkerId = this.checkerId;
} }
if (this.selectedDate != this.today) {
if (!this.remark) {
this.$message.error('请填写打卡原因');
return false;
}
}
if (this.remark) { if (this.remark) {
params.param.remark = this.remark; params.param.remark = this.remark;
} }
@ -433,6 +440,10 @@ export default {
// } else { // } else {
// this.nightLoading = false; // this.nightLoading = false;
// } // }
setTimeout(() => {
this.visible = false;
}, 2000);
} catch (error) { } catch (error) {
// if (params.param.clockType === 0) { // if (params.param.clockType === 0) {
// this.morningLoading = false; // this.morningLoading = false;

Loading…
Cancel
Save