From c0e9df213221d16f6ab6c9106ae01ad571cd45fc Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期五, 15 十一月 2024 09:08:02 +0800
Subject: [PATCH] 1.考勤打卡递交
---
src/views/attendanceModule/attendanceClockIn.vue | 41 ++++++++++++++++++++++++-----------------
1 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/src/views/attendanceModule/attendanceClockIn.vue b/src/views/attendanceModule/attendanceClockIn.vue
index e3485b7..9b90eba 100644
--- a/src/views/attendanceModule/attendanceClockIn.vue
+++ b/src/views/attendanceModule/attendanceClockIn.vue
@@ -79,19 +79,19 @@
/>
</el-table>
</div>
- <div
- class="bodyTopButtonGroup"
- style="margin-top: 0;height: 60px;display:flex;align-items: center;justify-content: center"
- >
- <el-button
- v-waves
- :disabled="isDisabled"
- type="primary"
- style="width: 150px;height: 40px;"
- icon="el-icon-alarm-clock"
- @click="clockIn"
- >鑰冨嫟鎵撳崱</el-button>
- </div>
+ <!-- <div-->
+ <!-- class="bodyTopButtonGroup"-->
+ <!-- style="margin-top: 0;height: 60px;display:flex;align-items: center;justify-content: center"-->
+ <!-- >-->
+ <!-- <el-button-->
+ <!-- v-waves-->
+ <!-- :disabled="isDisabled"-->
+ <!-- type="primary"-->
+ <!-- style="width: 150px;height: 40px;"-->
+ <!-- icon="el-icon-alarm-clock"-->
+ <!-- @click="clockIn"-->
+ <!-- >鑰冨嫟鎵撳崱</el-button>-->
+ <!-- </div>-->
</div>
@@ -103,6 +103,7 @@
import waves from '@/directive/waves'
import { AttendanceSave, AttendanceSearch } from '@/api/attendanceModule'
import $ from 'jquery'
+import { handleDatetime2 } from '@/utils/global'
export default {
name: 'AttendanceClockIn',
@@ -148,8 +149,10 @@
this.isDisabled = true
} else {
this.form2 = res.userdate[0]
- this.tableData = res.checkcrd
- this.isDisabled = false
+ await this.clockIn()
+
+ // this.tableData = res.checkcrd
+ // this.isDisabled = false
}
},
async clockIn() {
@@ -159,15 +162,19 @@
}
const res = await AttendanceSave(data)
if (res.code === '200') {
- await this.enterNative(this.form2.usercode)
+ // await this.enterNative(this.form2.usercode)
this.$message.success('鎵撳崱鎴愬姛锛�')
+
+ const { data: res2 } = await AttendanceSearch({ usercode: this.form2.usercode })
+ this.tableData = res2.checkcrd.sort((a, b) => new Date(b.createdate).getTime() - new Date(a.createdate).getTime())
+ this.isDisabled = false
}
},
// 鑾峰彇椤甸潰楂樺害
getHeight() {
this.$nextTick(() => {
this.mainHeight = window.innerHeight - 85
- this.tableHeight = this.mainHeight - 250
+ this.tableHeight = this.mainHeight - 180
this.$refs.tableDataRef.doLayout()
})
}
--
Gitblit v1.9.3