diff --git a/pages/common/my_attendance.vue b/pages/common/my_attendance.vue
index 7b36c0e..f8b8d21 100644
--- a/pages/common/my_attendance.vue
+++ b/pages/common/my_attendance.vue
@@ -28,25 +28,31 @@
@click="openInfo(v)"
>
-
-
-
普通考勤
{{v.status_name}}
- 校区:{{v.campus_id_name}}
+ 校区:{{v.campus_id_name || ''}}
备注:{{v.remarks || ''}}
- {{v.attendance_date}} {{v.check_in_time}}
- -
- {{v.attendance_date}} {{v.check_out_time}}
+
+
+ 开始时间:{{ v.attendance_date }} {{ v.check_in_time || '' }}
+ 结束时间:{{ v.attendance_date }} {{ v.check_out_time || '' }}
+
+
+
+
+ 开始时间:{{ v.attendance_date }} {{v.leave_start_time || ''}}
+ 结束时间:{{ v.attendance_date }} {{v.leave_end_time || ''}}
+
+
@@ -67,7 +73,21 @@
:key="k"
>
-
+ 普通考勤
+
+ {{v.status_name}}
+
+
+ 校区:{{v.campus_id_name}}
+
+
+ 备注:{{v.remarks || ''}}
+
+
+ {{v.attendance_date}} {{v.check_in_time}}
+ -
+ {{v.attendance_date}} {{v.check_out_time}}
+
普通考勤
@@ -105,7 +125,21 @@
:key="k"
>
-
+ 普通考勤
+
+ {{v.status_name}}
+
+
+ 校区:{{v.campus_id_name}}
+
+
+ 备注:{{v.remarks || ''}}
+
+
+ {{v.attendance_date}} {{v.check_in_time}}
+ -
+ {{v.attendance_date}} {{v.check_out_time}}
+
普通考勤
@@ -150,8 +184,69 @@
{{signIn_content}}
+
+
+
+
+ {{ (formData.attendance_date) ? formData.attendance_date : '点击选择' }}
+
+
+
+
+
+
+
+
+
+ {{ (formData.leave_time) ? formData.leave_time : '点击选择' }}
+
+
+
+
+
+
+
+
+
+
+
@@ -324,6 +422,9 @@ export default {
status:'',//考勤状态: present-出勤, absent-缺勤, late-迟到, leave_early-早退,leave-请假,sign_out-签退
remarks:'',//备注
attendance_date:'',//请假/打卡日期
+ leave_time:'',//请假时间范围
+ leave_start_time:'',//请假开始时间
+ leave_end_time:'',//请假结束时间
longitude:'',//经度
latitude:'',//纬度
},
@@ -349,6 +450,16 @@ export default {
// },
],//选择器可选值列表
+ //请假日期选择器相关
+ showLeaveData:false,
+ leaveMinDate:'',//请假日期选择器的最小可选日期
+ leaveMaxDate:'',//请假日期选择器的最大可选日期
+
+ //请假开始时间选择器相关
+ showLeaveStartTime:false,
+
+
+
//详情模态窗
info_show:false,//是否展示|true=是,false=否
info_data:{},//详情数据
@@ -399,11 +510,20 @@ export default {
this.userInfo = res.data
this.picker_options = []
res.data.cameus_dept_arr.forEach((v,k)=>{
- this.picker_options.push({
- text: v.campus_id_name,
- value: v.campus_id
- })
+ if(v.campus_id){
+ this.picker_options.push({
+ text: v.campus_id_name,
+ value: v.campus_id
+ })
+ }
})
+
+ //当前用户没校区时
+ if(!this.picker_options.length){
+ this.formData.campus_id = 0
+ this.formData.campus_id_name = ''
+ }
+
console.log(123123,this.picker_options)
},
@@ -420,7 +540,17 @@ export default {
this.formData.attendance_date = res
- },
+
+ //最小可选的请假日期
+ this.leaveMinDate = res
+
+ //最大可选的请假日期
+ const minDate = new Date(this.leaveMinDate);
+ minDate.setMonth(minDate.getMonth() + 6);
+ const max_year = minDate.getFullYear();
+ const max_month = String(minDate.getMonth() + 1).padStart(2, '0');
+ const max_day = String(minDate.getDate()).padStart(2, '0');
+ this.leaveMaxDate = `${max_year}-${max_month}-${max_day}`; },
//切换tag列表
async segmented(e) {
@@ -773,6 +903,43 @@ export default {
return [data];
},
+ //请假日期相关
+ //监听-请假日期选择
+ changeLeaveData(e){
+ console.log('请假日期选择',e)
+ this.formData.attendance_date = e.result
+ this.cancelLeaveData()
+ },
+ //打开请假日期选择器
+ openLeaveData(){
+ this.showLeaveData = true
+ },
+ //关闭请假日期选择器
+ cancelLeaveData(){
+ this.showLeaveData = false
+ },
+
+ //监听-请假开始时间选择
+ changeLeaveStartTime(e){
+ console.log('请假开始时间选择',e)
+ let leave_start_time = e.startDate.result
+ let leave_end_time = e.endDate.result
+
+ this.formData.leave_time = `${leave_start_time}-${leave_end_time}`
+
+ this.formData.leave_start_time = leave_start_time
+ this.formData.leave_end_time = leave_end_time
+ this.cancelLeaveStartTime()
+ },
+ //打开请假日期选择器
+ openLeaveStartTime(){
+ this.showLeaveStartTime = true
+ },
+ //关闭请假日期选择器
+ cancelLeaveStartTime(){
+ this.showLeaveStartTime = false
+ },
+
}
}
@@ -825,24 +992,24 @@ export default {
align-items: center;
gap: 43rpx;
.left{
- image{
- width: 174rpx;
- height: 174rpx;
- border-radius: 24rpx;
- background-color: #333333;
- }
- }
- .right{
+ border: 1px solid red;
display: flex;
flex-direction: column;
gap: 18rpx;
.content{
font-size: 24rpx;
+ .item{
+ display: flex;
+ flex-direction: column;
+ }
}
.content:nth-child(1){
font-size: 28rpx;
}
}
+ .right{
+ border: 1px solid red;
+ }
}
}
.title_box{
@@ -856,6 +1023,7 @@ export default {
}
.section_btn{
+ margin-top: 20rpx;
display: flex;
justify-content: center;
display: flex;
@@ -901,6 +1069,9 @@ export default {
.input-style {
text-align: right !important;
+ .input-title{
+ border: 1px solid red;
+ }
}
.button_box{
margin-top: 30rpx;
diff --git a/pages/market/my/index.vue b/pages/market/my/index.vue
index 9344a65..542ebfe 100644
--- a/pages/market/my/index.vue
+++ b/pages/market/my/index.vue
@@ -23,12 +23,12 @@
校区:
- {{v.campus_id_name}}
+ {{v.campus_id_name || ''}}
部门:
- {{v.dept_name_str}}
+ {{v.dept_name_str || ''}}
@@ -279,7 +279,8 @@ export default {
/* 小程序端样式 */
// #ifdef MP-WEIXIN
- padding: 80rpx 0rpx;
+ padding-top: 110rpx;
+ padding-bottom: 40rpx;
// #endif
font-size: 30rpx;
diff --git a/pages/student/my/my.vue b/pages/student/my/my.vue
index 1106834..445fb23 100644
--- a/pages/student/my/my.vue
+++ b/pages/student/my/my.vue
@@ -174,7 +174,7 @@