From 38a03bcdf872485cd0a61ca437226acf0a5c6989 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 13 Oct 2022 09:36:21 +0800 Subject: [PATCH] lockRecord --- pages/my/clock_in.vue | 45 +++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/pages/my/clock_in.vue b/pages/my/clock_in.vue index 126c963..b387385 100644 --- a/pages/my/clock_in.vue +++ b/pages/my/clock_in.vue @@ -16,9 +16,6 @@ - 打卡人员:{{val.detail.personName}} - 所在岗位:{{val.employee_.post_name}} - 所在部门:{{val.detail.deptName}} 触发模式:{{val.detail.openTypeStr}} 打卡类型:上班打卡下班打卡 其他信息:{{val.detail.deviceName}} @@ -91,48 +88,42 @@ }, methods: { bindDateChange(e){ - this.date = e.target.value; - - this.params.month = this.date.split('-')[1]; - this.params.year = this.date.split('-')[0]; - let current = this.currentYear+'-'+this.currentMonth; - if(this.date==current){ - this.activeIndex=true; + let that = this; + that.date = e.target.value; + that.params.month = that.date.split('-')[1]; + that.params.year = that.date.split('-')[0]; + let current = that.currentYear+'-'+that.currentMonth; + if(that.date==current){ + that.activeIndex=true; }else{ - this.activeIndex=false; + that.activeIndex=false; } - this.lists = []; - this.getLists(); + that.params.pageNum = 1; + that.lists = []; + that.getLists(); }, getLists() { let that = this; that.$u.api.hrmClockRecord(that.params).then(res => { that.lists = that.lists.concat(res.results); - this.totalNum = res.count; + that.totalNum = res.count; }) }, changeList(index){ let that = this; that.activeIndex = index; - that.resetSearch(); - + that.params.month = that.currentMonth; + that.params.year = that.currentYear; + that.params.pageNum = 1; + that.lists = []; + that.getLists(); }, goBack() { uni.navigateBack({ delta: 1 }) }, - searchHandle() { - this.params.pageNum = 1; - this.lists = []; - this.getLists() - }, - resetSearch() { - this.params.pageNum = 1; - this.params.search = ""; - this.lists = []; - this.getLists(); - }, + } }