update code

dev_xds
haha 2024-05-14 22:05:11 +08:00
parent 717f630524
commit d1d3aa20e3
2 changed files with 20 additions and 8 deletions

View File

@ -24,6 +24,9 @@
<el-form-item label="日期" prop="createBy"> <el-form-item label="日期" prop="createBy">
<el-date-picker v-model="queryParams.attendanceTime" :picker-options="disableTime" type="date" placeholder="选择日期"> <el-date-picker v-model="queryParams.attendanceTime" :picker-options="disableTime" type="date" placeholder="选择日期">
</el-date-picker> </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>
<el-form-item label="姓名" prop="workerName"> <el-form-item label="姓名" prop="workerName">
<el-input v-model="queryParams.workerName" placeholder="请输入姓名"></el-input> <el-input v-model="queryParams.workerName" placeholder="请输入姓名"></el-input>
@ -71,18 +74,18 @@
<el-table-column label="性别" align="center" prop="attendanceType" > <el-table-column label="性别" align="center" prop="attendanceType" >
<template slot-scope="{row}">{{ row.workerGender==1?'女':'男' }}</template> <template slot-scope="{row}">{{ row.workerGender==1?'女':'男' }}</template>
</el-table-column> </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}"> <template slot-scope="{row}">
<span v-if="row.attendanceTime"> <span v-if="row.attendanceTime">
{{ row.attendanceTime|formatTime }} {{ row.attendanceTime|formatDateTime }}
</span> </span>
<i v-else class="el-icon-close" style="color:red;"></i> <i v-else class="el-icon-close" style="color:red;"></i>
</template> </template>
</el-table-column> </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}"> <template slot-scope="{row}">
<span v-if="row.attendanceOutTime"> <span v-if="row.attendanceOutTime">
{{ row.attendanceOutTime|formatTime }} {{ row.attendanceOutTime|formatDateTime }}
</span> </span>
<i v-else class="el-icon-close" style="color:red;"></i> <i v-else class="el-icon-close" style="color:red;"></i>
</template> </template>
@ -182,7 +185,8 @@ export default {
workerName:'', workerName:'',
deptId:null, deptId:null,
companyTypeId:"0", companyTypeId:"0",
attendanceTime:new Date() attendanceTime:new Date(),
attendanceOutTime:undefined
}, },
// //
form: {}, form: {},
@ -255,10 +259,15 @@ export default {
this.$refs.attDrawer.show(); this.$refs.attDrawer.show();
}, },
/** 查询劳务实名制管理列表 */ /** 查询劳务实名制管理列表 */
getList() { getList() {
this.loading = true; this.loading = true;
let postData={}; let postData={};
postData.attendanceTime=this.$dt(this.queryParams.attendanceTime).format("YYYY-MM-DD"); 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); let tmps=this.cfgList.filter(d=>d.projectId==this.queryParams.projectId && d.subDeptId==this.queryParams.deptId);
if(tmps.length>0){ if(tmps.length>0){
postData.cfgid=tmps[0].id; postData.cfgid=tmps[0].id;

View File

@ -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="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
<if test="serverid != null "> and serverid = #{serverid}</if> <if test="serverid != null "> and serverid = #{serverid}</if>
<if test="workerId != null "> and workerId = #{workerId}</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) &lt;=date(#{attendanceOutTime})
</if>
<if test="attendanceTime != null and attendanceTime != ''"> and date(attendance_time) &gt;= date(#{attendanceTime})</if>
<if test="identification != null and identification != ''"> and identification = #{identification}</if> <if test="identification != null and identification != ''"> and identification = #{identification}</if>
<if test="teamId != null "> and teamId = #{teamId}</if> <if test="teamId != null "> and teamId = #{teamId}</if>
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if> <if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>