增加汇总审批人审核外包商发起评价功能
This commit is contained in:
parent
4325d8c2ca
commit
6a80d77b9e
|
|
@ -73,4 +73,5 @@ public class InitiateEvaluateBean {
|
|||
|
||||
private List<SubBean> subList;
|
||||
private String subInfo;
|
||||
}
|
||||
private Integer isActive;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,6 +163,18 @@ public class InitiateEvaluateController {
|
|||
}
|
||||
return ar;
|
||||
}
|
||||
@RequestMapping(value = "audit", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public AjaxRes audit(InitiateEvaluateBean o) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
try {
|
||||
ar = service.audit(o);
|
||||
}catch(Exception e) {
|
||||
ar.setFailMsg(GlobalConst.DATA_FAIL);
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "getInitiateEvaluateDetails", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
|
|
|
|||
|
|
@ -109,4 +109,6 @@ public interface InitiateEvaluateDao {
|
|||
int insertPjTaskEvaluate(String id, String ids, String deptId, String isWait);
|
||||
|
||||
List<SysUser> getBusinessDivisionUserIdByDeptId(String orgId);
|
||||
|
||||
Integer audit(InitiateEvaluateBean o);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ public interface InitiateEvaluateService {
|
|||
* @return
|
||||
*/
|
||||
AjaxRes submitInitiateEvaluate(InitiateEvaluateBean o);
|
||||
AjaxRes audit(InitiateEvaluateBean o);
|
||||
/**
|
||||
* 获取外包商发起评价详情
|
||||
* @param bean
|
||||
|
|
|
|||
|
|
@ -171,6 +171,16 @@ public class InitiateEvaluateServiceImpl implements InitiateEvaluateService {
|
|||
return ar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxRes audit(InitiateEvaluateBean o) {
|
||||
Integer res = dao.audit(o);
|
||||
if (res > 0){
|
||||
return AjaxRes.success("审核成功");
|
||||
} else {
|
||||
return AjaxRes.error("审核失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxRes getInitiateEvaluateDetails(InitiateEvaluateBean bean) {
|
||||
AjaxRes ar = new AjaxRes();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<insert id="insertInitiateEvaluate" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into pj_evaluate_record
|
||||
(dept_id, evaluate_name, template_id, version, year_and_month, task_status, is_active,pro_id)
|
||||
values (#{orgId}, #{templateTitle}, #{templateId}, #{version}, #{evaluateDate}, 0, 1, #{proIdStr})
|
||||
values (#{orgId}, #{templateTitle}, #{templateId}, #{version}, #{evaluateDate}, 0, 3, #{proIdStr})
|
||||
</insert>
|
||||
<insert id="insertInitiateEvaluateLink">
|
||||
insert into pj_evaluate_sub
|
||||
|
|
@ -29,6 +29,11 @@
|
|||
version = #{version}
|
||||
where evaluate_id = #{id}
|
||||
</update>
|
||||
<update id="audit">
|
||||
update pj_evaluate_record
|
||||
set is_active = 1
|
||||
where evaluate_id = #{id}
|
||||
</update>
|
||||
<delete id="deleteInitiateEvaluateById">
|
||||
update pj_evaluate_record
|
||||
set is_active = 0
|
||||
|
|
@ -58,6 +63,7 @@
|
|||
pt.config_name as templateName,
|
||||
per.year_and_month as evaluateDate,
|
||||
per.create_time as createTime,
|
||||
per.is_active as isActive,
|
||||
r.proNum as proNum,
|
||||
r.subNum as subNum,
|
||||
CASE
|
||||
|
|
@ -79,7 +85,7 @@
|
|||
left join pj_template_config pt on pt.config_id = per.template_id and pt.is_active = 1
|
||||
left join pm_org_info poi on per.dept_id = poi.id and poi.status = 1
|
||||
left join pm_org_info poi1 on poi1.id = r.pro_id
|
||||
where per.is_active = 1
|
||||
where per.is_active in (1,3)
|
||||
<!-- <if test="deptId == null or deptId == ''">-->
|
||||
<!-- and poi1.user_id = #{userId}-->
|
||||
<!-- </if>-->
|
||||
|
|
@ -168,8 +174,7 @@
|
|||
on pt.config_id = per.template_id and pt.is_active = 1
|
||||
left join pm_org_info poi
|
||||
on per.dept_id = poi.id and poi.status = 1
|
||||
where per.is_active = 1
|
||||
and per.evaluate_id = #{id}
|
||||
where per.evaluate_id = #{id}
|
||||
</select>
|
||||
<select id="getSubInfo" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.SubBean">
|
||||
select sub_id as subId,
|
||||
|
|
|
|||
|
|
@ -129,6 +129,8 @@
|
|||
}
|
||||
|
||||
function initTable() {
|
||||
let loginUser = localStorage.getItem("loginUser");
|
||||
let user = JSON.parse(loginUser);
|
||||
//渲染表格
|
||||
table.render({
|
||||
elem: '#baseTable'
|
||||
|
|
@ -156,6 +158,11 @@
|
|||
'<a lay-event="view" style="color: #009688;cursor: pointer;font-size: 15px"' +
|
||||
' id="view">查看</a>';
|
||||
if (d.status === '待评价'){
|
||||
if (user.roleId == 5 && d.isActive == 3){
|
||||
text +=
|
||||
'<a lay-event="audit" style="color: #009688;cursor: pointer;font-size: 15px;margin-left: 10px"' +
|
||||
' id="audit">审核</a>';
|
||||
}
|
||||
text +=
|
||||
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px;margin-left: 10px"' +
|
||||
' id="view">编辑</a>';
|
||||
|
|
@ -203,6 +210,8 @@
|
|||
view(data);
|
||||
} else if (obj.event === 'edit') {
|
||||
edit(data);
|
||||
}else if (obj.event === 'audit') {
|
||||
audit(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -249,6 +258,40 @@
|
|||
openPage('编辑评价', './InitiateEvaluationForm.html?id=' + data.id + '&type=edit');
|
||||
}
|
||||
|
||||
function audit(data) {
|
||||
// 使用 layer.confirm 实现“只有确定”的效果(隐藏取消按钮)
|
||||
layer.confirm('是否审核通过?', {
|
||||
btn: ['确定'], // 只显示“确定”按钮
|
||||
title: '审核确认',
|
||||
shadeClose: true,
|
||||
closeBtn: 1, // 显示右上角关闭按钮
|
||||
area: ['400px', 'auto']
|
||||
}, function(index) {
|
||||
// 用户点击“确定”后执行
|
||||
$.ajax({
|
||||
url: ctxPath + '/initiateEvaluate/audit',
|
||||
type: 'post',
|
||||
data: {
|
||||
id: data.id
|
||||
},
|
||||
success: function(res) {
|
||||
console.log(JSON.stringify( res)+"res")
|
||||
layer.close(index); // 关闭弹窗
|
||||
if (res.code == 200) {
|
||||
layer.msg('审核成功');
|
||||
initTable(); // ← 调用你的表格初始化/刷新函数
|
||||
} else {
|
||||
layer.msg(res.resMsg || '审核失败');
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
layer.close(index);
|
||||
layer.msg('请求异常,请重试');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function del(data) {
|
||||
layer.confirm('确认删除吗?', function (index) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue