update code
parent
717f630524
commit
d1d3aa20e3
|
@ -24,6 +24,9 @@
|
|||
<el-form-item label="日期" prop="createBy">
|
||||
<el-date-picker v-model="queryParams.attendanceTime" :picker-options="disableTime" type="date" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
-
|
||||
<el-date-picker v-model="queryParams.attendanceOutTime" :picker-options="disableTime" type="date" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="姓名" prop="workerName">
|
||||
<el-input v-model="queryParams.workerName" placeholder="请输入姓名"></el-input>
|
||||
|
@ -71,18 +74,18 @@
|
|||
<el-table-column label="性别" align="center" prop="attendanceType" >
|
||||
<template slot-scope="{row}">{{ row.workerGender==1?'女':'男' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="进场时间" align="center" prop="inTime">
|
||||
<el-table-column label="进场时间" align="center" prop="inTime" width="90">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.attendanceTime">
|
||||
{{ row.attendanceTime|formatTime }}
|
||||
{{ row.attendanceTime|formatDateTime }}
|
||||
</span>
|
||||
<i v-else class="el-icon-close" style="color:red;"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离场时间" align="center" prop="outTime">
|
||||
<el-table-column label="离场时间" align="center" prop="outTime" width="90">
|
||||
<template slot-scope="{row}">
|
||||
<span v-if="row.attendanceOutTime">
|
||||
{{ row.attendanceOutTime|formatTime }}
|
||||
{{ row.attendanceOutTime|formatDateTime }}
|
||||
</span>
|
||||
<i v-else class="el-icon-close" style="color:red;"></i>
|
||||
</template>
|
||||
|
@ -182,7 +185,8 @@ export default {
|
|||
workerName:'',
|
||||
deptId:null,
|
||||
companyTypeId:"0",
|
||||
attendanceTime:new Date()
|
||||
attendanceTime:new Date(),
|
||||
attendanceOutTime:undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
@ -258,7 +262,12 @@ export default {
|
|||
getList() {
|
||||
this.loading = true;
|
||||
let postData={};
|
||||
if(this.queryParams.attendanceTime){
|
||||
postData.attendanceTime=this.$dt(this.queryParams.attendanceTime).format("YYYY-MM-DD");
|
||||
}
|
||||
if(this.queryParams.attendanceOutTime){
|
||||
postData.attendanceOutTime=this.$dt(this.queryParams.attendanceOutTime).format("YYYY-MM-DD");
|
||||
}
|
||||
let tmps=this.cfgList.filter(d=>d.projectId==this.queryParams.projectId && d.subDeptId==this.queryParams.deptId);
|
||||
if(tmps.length>0){
|
||||
postData.cfgid=tmps[0].id;
|
||||
|
|
|
@ -108,7 +108,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||||
<if test="serverid != null "> and serverid = #{serverid}</if>
|
||||
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and ( date(attendance_time) =date(#{attendanceTime}) or date(attendance_out_time) =date(#{attendanceTime}))</if>
|
||||
<if test="attendanceOutTime!=null and attendanceOutTime!=''">
|
||||
and date(attendance_out_time) <=date(#{attendanceOutTime})
|
||||
</if>
|
||||
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) >= date(#{attendanceTime})</if>
|
||||
<if test="identification != null and identification != ''"> and identification = #{identification}</if>
|
||||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||
|
|
Loading…
Reference in New Issue