From 69371b747949a58edb415a70071da0daea149da8 Mon Sep 17 00:00:00 2001 From: liutong <836164388@qq.com> Date: Thu, 12 Jun 2025 17:20:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(common):=20=E4=BC=98=E5=8C=96=E8=80=83?= =?UTF-8?q?=E5=8B=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在列表中添加签退按钮 - 优化打卡弹窗逻辑,支持签退操作 - 调整列表样式,优化布局 - 修复了一些与考勤相关的小问题 --- pages/common/my_attendance.vue | 46 +++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/pages/common/my_attendance.vue b/pages/common/my_attendance.vue index f8b8d21..cf71e4b 100644 --- a/pages/common/my_attendance.vue +++ b/pages/common/my_attendance.vue @@ -25,9 +25,8 @@ - + 普通考勤 {{v.status_name}} @@ -52,7 +51,9 @@ - + + 签退 + @@ -661,10 +662,19 @@ export default { //打卡签到相关 //显示打卡弹窗 - openSignInShow(status){ + openSignInShow(status,obj={}){ this.formData.status = status + console.log('123123',obj); + let attendance_date = this.formData.attendance_date + if(obj.id){ + this.formData.id = obj.id + attendance_date = obj.attendance_date + }else{ + this.formData.id = '' + } + switch (status){ case 'present': this.signIn_title = `是否确认打卡?` @@ -676,7 +686,7 @@ export default { break; case 'sign_out': this.signIn_title = `是否确认签退?` - this.signIn_content = `${this.formData.attendance_date} 是否确认签退?` + this.signIn_content = `${attendance_date} 是否确认签退?` break; } @@ -701,7 +711,8 @@ export default { //取消按钮 this.closeSignInShow() }else{ - if(!this.formData.campus_id){ + console.log('提交',this.formData) + if(!this.formData.campus_id && this.picker_options.length){ uni.showToast({ title: '请选择校区', icon: 'none' @@ -836,6 +847,10 @@ export default { async submitFormData() { this.closeSignInShow() + if(!this.formData.campus_id && !this.picker_options.length){ + this.formData.campus_id = 0 + } + let param = {...this.formData} let res = await apiRoute.common_attendanceEdit(param) if (res.code != 1) { @@ -987,12 +1002,13 @@ export default { .li{ border: 1px solid #5f5f5f; border-radius: 15rpx; - padding: 20rpx 0; + padding: 20rpx 20rpx; display: flex; + justify-content: space-between; align-items: center; gap: 43rpx; .left{ - border: 1px solid red; + width: 70%; display: flex; flex-direction: column; gap: 18rpx; @@ -1008,7 +1024,15 @@ export default { } } .right{ - border: 1px solid red; + .btn{ + width: 120rpx; + height: 60rpx; + line-height: 60rpx; + border-radius: 8rpx; + color: rgba(255,255,255,1); + font-size: 28rpx; + text-align: center; + } } } } @@ -1069,9 +1093,7 @@ export default { .input-style { text-align: right !important; - .input-title{ - border: 1px solid red; - } + .input-title{} } .button_box{ margin-top: 30rpx;