From c68b834b980da63ccbb53d68cbccc9b1ba86a4bc Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 2 Mar 2023 09:36:20 +0800 Subject: [PATCH] =?UTF-8?q?0302=E5=AF=BC=E5=87=BA=E5=91=A8=E5=87=A0?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/hrm/clock_record.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/hrm/clock_record.vue b/src/views/hrm/clock_record.vue index 6f88beef..a79d90d8 100644 --- a/src/views/hrm/clock_record.vue +++ b/src/views/hrm/clock_record.vue @@ -172,16 +172,20 @@ export default { exportList(){ let that = this; this.dLoading = true; - if(this.query.employee__belong_dept && this.query.year && this.query.month){ + if(this.query.employee__belong_dept!=undefined &&this.query.employee__belong_dept!=null && + this.query.year!=undefined &&this.query.year!=null && this.query.month!=undefined&& this.query.month!=null){ }else{ this.$message.warning("请选择部门和月份后导出") this.dLoading = false; + return; } let days = new Date(this.query.year, this.query.month , 0).getDate(); let weekList = ['姓名','星期'],daysList=['姓名','日期'],titleData = []; for(var i = 1;i<= days;i++){ - let weekNum = new Date(this.query.year,this.query.month,i).getDay(); + let weekNum = new Date(this.query.year+'-'+this.query.month+'-'+i).getDay(); + // debugger; + console.log(weekNum) let week=that.getDayWeek(weekNum) daysList.push(i); weekList.push(week);