Commit 61667eab authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 3171b9c0 ccdfedf7
......@@ -19,18 +19,23 @@
<span class="ml10">修改为</span>
</div>
<div class="mt10">
<!-- 处理异常状态 -->
<!--
<Field label="" v-model="dealParams.processResult" type="select" :enumData="dict.errorStatus"/>
-->
<!-- 处理异常状态 -->
<el-select v-model="dealParams.processResult">
<el-option
v-for='($label, $value) in dict.errorStatus'
:key="$value"
:label="$label"
:value="$label">
:value="$value">
</el-option>
</el-select>
<!-- 早退/迟到 -->
<el-input style="width:220px" placeholder="请输入数字" :maxlength="4" v-model="duration"
v-if="dealParams.processResult == '迟到'|| dealParams.processResult == '早退'"
<el-input style="width:220px" placeholder="请输入数字" :maxlength="4" v-model="duration"
v-if="dealParams.processResult == '1'|| dealParams.processResult == '2'"
class="ml20" type="number">
<template slot="append">分钟</template>
</el-input>
......@@ -44,7 +49,7 @@
<div class="mt20">
<el-button type="primary" @click="saveForm">确定</el-button>
<el-button @click="cancleFn">取消</el-button>
</div>
</div>
</div>
</el-drawer>
......@@ -54,7 +59,7 @@
export default {
name: "AttendanceRecordDetail",
created() {
},
data() {
return {
......@@ -65,6 +70,7 @@
// 是否显示弹出层
open: false,
direction:"rtl",
toString: ["processResult"],
// 表单校验
rules: {
staffName: [
......@@ -77,6 +83,8 @@
},
dealParams:{
remark:'',
errorStatus:null,
durtion:0,
processResult:'',
recordErrorEntities:[],//处理员工
processStatus:1//处理状态
......@@ -131,8 +139,10 @@
this.$message.error('请选择处理结果')
return
}
if(this.duration && (this.dealParams.processResult == '早退' || this.dealParams.processResult == '迟到')){
this.dealParams.processResult = this.dealParams.processResult + this.duration +'分钟'
this.dealParams.errorStatus=this.dealParams.processResult
if(this.duration && (this.dealParams.processResult == '1' || this.dealParams.processResult == '2')){
this.dealParams.processResult =this.dict.errorStatus[this.dealParams.processResult] + this.duration +'分钟'
this.dealParams.durtion=this.duration
}
// 保存结果处理
this.$post(this.urls.saveUrl,this.dealParams).then(res => {
......@@ -145,6 +155,8 @@
this.open = false
this.dealParams = {
remark:'',
errorStatus:null,
durtion:0,
processResult:'',
recordErrorEntities:[],//处理员工
processStatus:1//处理状态
......
......@@ -91,14 +91,12 @@
{
name: "deptId",
type: "select",
label: "全部部门",
fuzzy: false
label: "全部部门"
},
{
name: "groupId",
type: "select",
label: "全部考勤组",
fuzzy: false
label: "全部考勤组"
},
/* {
name: "classId",
......@@ -109,38 +107,34 @@
{
name: "errorStatus",
type: "select",
label: "全部异常状态",
fuzzy: false
label: "全部异常状态"
},
{
name: "processStatus",
type: "select",
label: "全部处理状态",
fuzzy: false
label: "全部处理状态"
},
{
name:'attendanceDateStart',
name:'errorDateTimeStart',
type: "date",
label: "异常开始时间",
fuzzy: false
label: "异常开始时间"
},
{
name:'attendanceDateEnd',
type: "date",
label: "异常结束时间",
fuzzy: false
label: "errorDateTimeEnd"
},
{
name: "staffName",
type: "text",
label: "员工姓名",
fuzzy: false
fuzzy: true
},
{
name: "phoneNumber",
type: "text",
label: "手机号",
fuzzy: false
fuzzy: true
},
],
columns: [
......
......@@ -24,4 +24,16 @@ public class AttendanceRecordErrorVo extends BaseEntityLong {
*/
private List<AttendanceRecordErrorEntity> recordErrorEntities;
/** 开始 异常时间 */
private String errorDateTimeStart;
/** 结束 异常时间 */
private String errorDateTimeEnd;
private Integer duration;
}
......@@ -143,15 +143,19 @@ public class AttendanceRecordErrorController extends BaseCRUDJsonBodyMappingCont
for (AttendanceRecordErrorEntity recordErrorEntity : entity.getRecordErrorEntities()) {
AttendanceRecordErrorEntity updateEntity = new AttendanceRecordErrorEntity();
updateEntity.setId(recordErrorEntity.getId());
updateEntity.setErrorDateTime(recordErrorEntity.getErrorDateTime());
updateEntity.setGoOffDateTime(recordErrorEntity.getGoOffDateTime());
updateEntity.setProcessStatus(entity.getProcessStatus());
updateEntity.setGoOffDateTime(null);
updateEntity.setProcessResult(entity.getProcessResult());
updateEntity.setStaffId(recordErrorEntity.getStaffId());
updateEntity.setErrorStatus(entity.getErrorStatus());
updateEntity.setOpertor(context.getUser().getRealName());
updateEntity.setOperDateTime(new Date());
updateEntity.setRemark(entity.getRemark());
updateEntity.setUpdateTime(new Date());
updateEntity.setUpdateUserId(this.getContextUserId(getContext()));
this.service.update(recordErrorEntity, getContext());
updateEntity.setDuration(entity.getDuration());
this.service.update(updateEntity, getContext());
}
for (AttendanceRecordErrorEntity item : entity.getRecordErrorEntities()) {
......@@ -220,49 +224,6 @@ public class AttendanceRecordErrorController extends BaseCRUDJsonBodyMappingCont
}
@Override
protected int saveAfter(AttendanceRecordErrorEntity entity, Map<String, Object> model, Context context) throws AppException {
if (YesNoEnum.YES.getValue() == entity.getProcessStatus()) {
//已经处理,根据错误状态提交考勤绩效
String ruleCode = "";
if (ErrorStatusEnum.早退.getValue() == entity.getErrorStatus()) {
//判断时间差定义
//entity.getErrorStatus()
}
/* AttendSaveReq attendSaveReq = new AttendSaveReq();
attendSaveReq.setAttendanceGroupId(entity.getAttendanceGroupId());
attendSaveReq.setAttendanceGroupName(entity.getAttendanceGroupName());
attendSaveReq.setAttendanceDate(entity.getActualAttendanceDateTime());
attendSaveReq.setErrorTime(entity.getErrorDateTime());
attendSaveReq.setGoOffTimeStr(entity.getGoOrOff());
attendSaveReq.setActualAttendTime();
attendSaveReq.setErrorResult(entity.getRemark());
attendSaveReq.setExt();
attendSaveReq.setWorkNum();
attendSaveReq.setTitle();
attendSaveReq.setHappenTime(entity.getErrorDateTime());
attendSaveReq.setRuleCode(ruleCode);
attendSaveReq.setRuleId();
attendSaveReq.setPhone();
attendSaveReq.setPerformType();
attendSaveReq.setStaffId();*/
// apiWebPerformController.attendSave(attendSaveReq);
}
return super.saveAfter(entity, model, context);
}
@Override
protected int editAfter(Long id, Map<String, Object> model, AttendanceRecordErrorEntity entity, Context context) throws AppException {
this.addDict(model, "errorStatus", paramService.getParamBySecondOrganize("AttendanceRecordDetail", "goWorkResult"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment