Commit 81cec70b authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents c0c01b1a 58a8ccbd
...@@ -149,7 +149,13 @@ export default { ...@@ -149,7 +149,13 @@ export default {
? "审核中" ? "审核中"
: row.auditResult == 1 : row.auditResult == 1
? "通过" ? "通过"
: "不通过" : row.auditResult == 2
? "不通过"
: row.auditResult == 3
? "撤销审批中"
: row.auditResult == 4
? "撤销审批完成"
: "--"
: "--"; : "--";
}, },
}, },
......
...@@ -219,8 +219,8 @@ export default { ...@@ -219,8 +219,8 @@ export default {
{ {
label: "上下班时间", label: "上下班时间",
width: 100,
prop: "goOffTimeStr", prop: "goOffTimeStr",
formatter: this.formatterDate,
}, },
{ {
......
...@@ -226,8 +226,8 @@ export default { ...@@ -226,8 +226,8 @@ export default {
{ {
label: "上下班时间", label: "上下班时间",
width: 100,
prop: "goOffTimeStr", prop: "goOffTimeStr",
formatter: this.formatterDate,
}, },
{ {
......
...@@ -12,27 +12,49 @@ ...@@ -12,27 +12,49 @@
</div> </div>
</div> </div>
<div class="user-right"> <div class="user-right">
<div class="n">{{form.totalScore}}</div> <div class="n">{{ form.totalScore }}</div>
<div class="m">{{ form.month }}月得分</div> <div class="m">{{ form.month }}月得分</div>
</div> </div>
</div> </div>
<div class="userName user-t-item " :class="{t2:item.subAddType == 1,t1:item.subAddType == 2}" v-for="(item) in list" :key="item.id"> <div
class="userName user-t-item "
:class="{ t2: item.subAddType == 1, t1: item.subAddType == 2 }"
v-for="item in list"
:key="item.id"
>
<div class="user-left"> <div class="user-left">
<div class="user-name"> <div class="user-name">
{{dictVal('checkType',item.checkType)}} {{ dictVal("checkType", item.checkType) }}
</div> </div>
<div class="user-info"> <div class="user-info">
<span class="user-i">绩效规则:{{item.ruleName}}</span> <span class="user-i">绩效规则:{{ item.ruleName }}</span>
</div> </div>
<div class="user-info"> <div class="user-info">
<span class="user-i">核查时间:{{momentVal(item.checkTime)}}</span> <span class="user-i"
>{{
item.subAddType == 1
? "加分方式:"
: item.subAddType == 2
? "扣分方式:"
: "方式:"
}}{{ util_formatters("subMethod", item.subMethod) }}</span
>
</div> </div>
<div class="user-info" v-if="item.auditStatus==2"> <div class="user-info">
<span class="user-i">核查结果:{{item.subAddType==1?'+':'-'}}{{item.score}}{{item.checkResult}}</span> <span class="user-i">核查时间:{{ momentVal(item.checkTime) }}</span>
</div>
<div class="user-info" v-if="item.auditStatus == 2">
<span class="user-i"
>核查结果:{{ item.subAddType == 1 ? "+" : "-"
}}{{ item.score }}{{ item.checkResult }}</span
>
</div> </div>
</div> </div>
<div class="user-right"> <div class="user-right">
<div class="n">{{item.subAddType==1?'+':'-'}}{{item.auditStatus==2?0:item.score}}</div> <div class="n">
{{ item.subAddType == 1 ? "+" : "-"
}}{{ item.auditStatus == 2 ? 0 : item.score }}
</div>
</div> </div>
</div> </div>
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="120px"> <!-- <el-form ref="form" :model="form" :rules="rules" label-width="120px">
...@@ -58,7 +80,12 @@ ...@@ -58,7 +80,12 @@
</el-form> --> </el-form> -->
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="pageInfo.type !== 'view'" @click="submitForm">确 定</el-button> <el-button
type="primary"
v-if="pageInfo.type !== 'view'"
@click="submitForm"
>确 定</el-button
>
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -81,71 +108,68 @@ export default { ...@@ -81,71 +108,68 @@ export default {
title: "员工绩效统计", title: "员工绩效统计",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
toString: [ toString: ["month"],
"month",
],
// 表单校验 // 表单校验
rules: { rules: {
year: [ year: [{ required: true, message: "请输入年", trigger: "blur" }],
{ required: true, message: "请输入年", trigger: "blur" }, month: [{ required: true, message: "请输入月", trigger: "blur" }],
],
month: [
{ required: true, message: "请输入月", trigger: "blur" },
],
}, },
list:[], list: [],
dict:{} dict: {},
}; };
}, },
methods: { methods: {
// 日期 // 日期
momentVal(v){ momentVal(v) {
return moment(v).format('YYYY-MM-DD HH:SS') return moment(v).format("YYYY-MM-DD HH:SS");
}, },
// 字典转换 // 字典转换
dictVal(key,val){ dictVal(key, val) {
return this.dict[key][val] return this.dict[key][val];
}, },
/** 查看汇总 */ /** 查看汇总 */
checkAll(id) { checkAll(id) {
this.$post("/check/all/record/list", {checkStatus:2,staffId:id}).then((res) => { this.$post("/check/all/record/list", {
const { code, data, dict } = res checkStatus: 2,
staffId: id,
}).then((res) => {
const { code, data, dict } = res;
if (code == 1) { if (code == 1) {
const row = data.data || [] const row = data.data || [];
//deductTime申诉时间 checkTime 核查时间 ruleName规则checkType字典 subAddType:1增加2减score //deductTime申诉时间 checkTime 核查时间 ruleName规则checkType字典 subAddType:1增加2减score
this.list = row this.list = row;
this.dict = dict this.dict = dict;
console.log(row,dict,"22222222222") console.log(row, dict, "22222222222");
} }
}); });
}, },
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "staff/perform/summary/edit"; this.urls.currUrl = "staff/perform/summary/edit";
this.getData(); this.getData();
this.pageInfo.type = "edit" this.pageInfo.type = "edit";
this.title = "修改员工绩效统计"; this.title = "修改员工绩效统计";
}, },
/** 新增 */ /** 新增 */
add(row) { add(row) {
this.reset() this.reset();
this.urls.currUrl = "staff/perform/summary/add"; this.urls.currUrl = "staff/perform/summary/add";
this.getData(); this.getData();
this.pageInfo.type = "add" this.pageInfo.type = "add";
this.title = "新增员工绩效统计"; this.title = "新增员工绩效统计";
}, },
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset() this.reset();
this.query = { id: row.id }; this.query = { id: row.id };
this.urls.currUrl = "staff/perform/summary/view"; this.urls.currUrl = "staff/perform/summary/view";
this.getData(); this.getData();
this.pageInfo.type = "view" this.pageInfo.type = "view";
this.title = "员工绩效统计详细"; this.title = "员工绩效统计详细";
this.checkAll(row.staffId) this.checkAll(row.staffId);
}, },
/**取消按钮 */ /**取消按钮 */
cancel() { cancel() {
...@@ -230,16 +254,16 @@ export default { ...@@ -230,16 +254,16 @@ export default {
.user-t-item { .user-t-item {
margin-top: 20px; margin-top: 20px;
border-left: 4px solid #FF4242; border-left: 4px solid #ff4242;
} }
.t1 { .t1 {
border-color: #FF4242; border-color: #ff4242;
background: rgba(255, 66, 66, 0.07); background: rgba(255, 66, 66, 0.07);
.user-name, .user-name,
.n { .n {
color: #FF4242; color: #ff4242;
} }
} }
.t2 { .t2 {
......
...@@ -445,30 +445,47 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -445,30 +445,47 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
PerformDetailInfo performDetailInfo = new PerformDetailInfo(); PerformDetailInfo performDetailInfo = new PerformDetailInfo();
if (PerformTypeEnum.考勤绩效.getValue().equals(performReq.getPerformType())) { if (PerformTypeEnum.考勤绩效.getValue().equals(performReq.getPerformType())) {
CheckAttendRecordEntity checkEntity = checkAttendRecordService.get(performReq.getId(), context); CheckAttendRecordEntity checkEntity = checkAttendRecordService.get(performReq.getId(), context);
if(checkEntity == null){
throw new AppException("绩效核查信息id不正确,查不到相应数据");
}
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity)); BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.评价差评绩效.getValue().equals(performReq.getPerformType())) { } else if (PerformTypeEnum.评价差评绩效.getValue().equals(performReq.getPerformType())) {
CheckReviewRecordEntity checkEntity = checkReviewRecordService.get(performReq.getId(), context); CheckReviewRecordEntity checkEntity = checkReviewRecordService.get(performReq.getId(), context);
if(checkEntity == null){
throw new AppException("绩效核查信息id不正确,查不到相应数据");
}
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity)); BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.评价投诉绩效.getValue().equals(performReq.getPerformType())) { } else if (PerformTypeEnum.评价投诉绩效.getValue().equals(performReq.getPerformType())) {
CheckComplainRecordEntity checkEntity = checkComplainRecordService.get(performReq.getId(), context); CheckComplainRecordEntity checkEntity = checkComplainRecordService.get(performReq.getId(), context);
if(checkEntity == null){
throw new AppException("绩效核查信息id不正确,查不到相应数据");
}
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity)); BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.办件绩效.getValue().equals(performReq.getPerformType())) { } else if (PerformTypeEnum.办件绩效.getValue().equals(performReq.getPerformType())) {
CheckGoworkRecordEntity checkEntity = checkGoworkRecordService.get(performReq.getId(), context); CheckGoworkRecordEntity checkEntity = checkGoworkRecordService.get(performReq.getId(), context);
if(checkEntity == null){
throw new AppException("绩效核查信息id不正确,查不到相应数据");
}
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity)); BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.效能绩效.getValue().equals(performReq.getPerformType())) { } else if (PerformTypeEnum.效能绩效.getValue().equals(performReq.getPerformType())) {
CheckEffectRecordEntity checkEntity = checkEffectRecordService.get(performReq.getId(), context); CheckEffectRecordEntity checkEntity = checkEffectRecordService.get(performReq.getId(), context);
if(checkEntity == null){
throw new AppException("绩效核查信息id不正确,查不到相应数据");
}
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity)); BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else if (PerformTypeEnum.其它绩效.getValue().equals(performReq.getPerformType())) { } else if (PerformTypeEnum.其它绩效.getValue().equals(performReq.getPerformType())) {
CheckOtherRecordEntity checkEntity = checkOtherRecordService.get(performReq.getId(), context); CheckOtherRecordEntity checkEntity = checkOtherRecordService.get(performReq.getId(), context);
if(checkEntity == null){
throw new AppException("绩效核查信息id不正确,查不到相应数据");
}
BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity)); BeanUtils.copyProperties(checkEntity, performDetailInfo, BeanUtil.getNullPropertyNames(checkEntity));
} else { } else {
throw new AppException("不支持当前绩效类型"); throw new AppException("不支持当前绩效类型");
} }
PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(performDetailInfo.getId()).performType(performReq.getPerformType())); PerformAttendAppealEntity entity = appealService.selectOne(new PerformAttendAppealQuery().checkRecordId(performDetailInfo.getId()).performType(performReq.getPerformType()));
log.info("entity:{}", JSONObject.toJSONString(entity));
if (!ObjectUtils.isEmpty(entity)) { if (!ObjectUtils.isEmpty(entity)) {
log.info("entity:{}", JSONObject.toJSONString(entity));
Boolean bool = entity.newEntity(); Boolean bool = entity.newEntity();
if (bool) { if (bool) {
performDetailInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue()); performDetailInfo.setAppealStatus(AppealStatusEnum.未申诉.getValue());
......
...@@ -2,6 +2,8 @@ package com.mortals.xhx.module.attendance.web; ...@@ -2,6 +2,8 @@ package com.mortals.xhx.module.attendance.web;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.code.AppealResultEnum; import com.mortals.xhx.common.code.AppealResultEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum; import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordEntity; import com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordEntity;
...@@ -17,6 +19,8 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -17,6 +19,8 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static java.util.stream.Collectors.toMap;
/** /**
* *
* 请假记录信息 * 请假记录信息
...@@ -34,6 +38,8 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont ...@@ -34,6 +38,8 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
private DeptService deptService; private DeptService deptService;
@Autowired @Autowired
private WorkmanService workmanService; private WorkmanService workmanService;
@Autowired
private UserService userService;
public AttendanceLeaveRecordController(){ public AttendanceLeaveRecordController(){
super.setModuleDesc( "请假记录信息"); super.setModuleDesc( "请假记录信息");
...@@ -41,12 +47,12 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont ...@@ -41,12 +47,12 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getDeptName(),(o, n)->n))); this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(toMap(x->x.getId().toString(), y->y.getDeptName(),(o, n)->n)));
this.addDict(model, "approverId", workmanService.find(new WorkmanQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getName(),(o, n)->n))); this.addDict(model, "approverId", workmanService.find(new WorkmanQuery()).stream().collect(toMap(x->x.getId().toString(), y->y.getName(),(o, n)->n)));
this.addDict(model, "leaveType", paramService.getParamBySecondOrganize("AttendanceLeaveRecord","leaveType")); this.addDict(model, "leaveType", paramService.getParamBySecondOrganize("AttendanceLeaveRecord","leaveType"));
this.addDict(model, "auditResult", AppealResultEnum.getEnumMap()); this.addDict(model, "auditResult", AppealResultEnum.getEnumMap());
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap()); this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
this.addDict(model, "createUserId", userService.find(new UserQuery()).stream().collect(toMap(x -> x.getId().toString(), y -> y.getRealName(), (o, n) -> n)));
super.init(model, context); super.init(model, context);
......
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