diff --git a/src/pages/clockout/index.vue b/src/pages/clockout/index.vue index 99704c6..fcf3605 100644 --- a/src/pages/clockout/index.vue +++ b/src/pages/clockout/index.vue @@ -120,7 +120,7 @@ const position = ref({}) const newTime = ref('') const detail = ref({}) const form = reactive({ - time: 1, + time: null, type: 1, remarks: '', sign_time: '', @@ -178,8 +178,8 @@ const initLo = async () => { }, }) detail.value = resdata - // form.type = resdata.type - form.sign_time = timeList.value[0].find((e) => e.value == resdata.time)?.name + form.time = resdata.time || 1 + form.sign_time = timeList.value[0].find((e) => e.value == form.time)?.name } const openPicker = () => { @@ -187,11 +187,16 @@ const openPicker = () => { } const clockIn = async () => { + if (!form.time) { + return uni.showToast({ title: '请选择打卡时间', icon: 'none' }) + } if (form.type == 2 && !form.remarks) { return uni.showToast({ title: '请填写外勤事由', icon: 'none' }) } + if (loading.value) return loading.value = true + try { await http.post('/hr/sign', { time: form.time, diff --git a/src/pages/examination/index.vue b/src/pages/examination/index.vue index 09e2993..0f6ac3b 100644 --- a/src/pages/examination/index.vue +++ b/src/pages/examination/index.vue @@ -1,7 +1,7 @@