增加汇总审批人审核外包商发起评价功能
This commit is contained in:
parent
4325d8c2ca
commit
6a80d77b9e
|
|
@ -73,4 +73,5 @@ public class InitiateEvaluateBean {
|
||||||
|
|
||||||
private List<SubBean> subList;
|
private List<SubBean> subList;
|
||||||
private String subInfo;
|
private String subInfo;
|
||||||
|
private Integer isActive;
|
||||||
}
|
}
|
||||||
|
|
@ -163,6 +163,18 @@ public class InitiateEvaluateController {
|
||||||
}
|
}
|
||||||
return ar;
|
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)
|
@RequestMapping(value = "getInitiateEvaluateDetails", method = RequestMethod.GET)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
|
||||||
|
|
@ -109,4 +109,6 @@ public interface InitiateEvaluateDao {
|
||||||
int insertPjTaskEvaluate(String id, String ids, String deptId, String isWait);
|
int insertPjTaskEvaluate(String id, String ids, String deptId, String isWait);
|
||||||
|
|
||||||
List<SysUser> getBusinessDivisionUserIdByDeptId(String orgId);
|
List<SysUser> getBusinessDivisionUserIdByDeptId(String orgId);
|
||||||
|
|
||||||
|
Integer audit(InitiateEvaluateBean o);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ public interface InitiateEvaluateService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxRes submitInitiateEvaluate(InitiateEvaluateBean o);
|
AjaxRes submitInitiateEvaluate(InitiateEvaluateBean o);
|
||||||
|
AjaxRes audit(InitiateEvaluateBean o);
|
||||||
/**
|
/**
|
||||||
* 获取外包商发起评价详情
|
* 获取外包商发起评价详情
|
||||||
* @param bean
|
* @param bean
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,16 @@ public class InitiateEvaluateServiceImpl implements InitiateEvaluateService {
|
||||||
return ar;
|
return ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxRes audit(InitiateEvaluateBean o) {
|
||||||
|
Integer res = dao.audit(o);
|
||||||
|
if (res > 0){
|
||||||
|
return AjaxRes.success("审核成功");
|
||||||
|
} else {
|
||||||
|
return AjaxRes.error("审核失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxRes getInitiateEvaluateDetails(InitiateEvaluateBean bean) {
|
public AjaxRes getInitiateEvaluateDetails(InitiateEvaluateBean bean) {
|
||||||
AjaxRes ar = new AjaxRes();
|
AjaxRes ar = new AjaxRes();
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<insert id="insertInitiateEvaluate" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertInitiateEvaluate" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into pj_evaluate_record
|
insert into pj_evaluate_record
|
||||||
(dept_id, evaluate_name, template_id, version, year_and_month, task_status, is_active,pro_id)
|
(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>
|
||||||
<insert id="insertInitiateEvaluateLink">
|
<insert id="insertInitiateEvaluateLink">
|
||||||
insert into pj_evaluate_sub
|
insert into pj_evaluate_sub
|
||||||
|
|
@ -29,6 +29,11 @@
|
||||||
version = #{version}
|
version = #{version}
|
||||||
where evaluate_id = #{id}
|
where evaluate_id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="audit">
|
||||||
|
update pj_evaluate_record
|
||||||
|
set is_active = 1
|
||||||
|
where evaluate_id = #{id}
|
||||||
|
</update>
|
||||||
<delete id="deleteInitiateEvaluateById">
|
<delete id="deleteInitiateEvaluateById">
|
||||||
update pj_evaluate_record
|
update pj_evaluate_record
|
||||||
set is_active = 0
|
set is_active = 0
|
||||||
|
|
@ -58,6 +63,7 @@
|
||||||
pt.config_name as templateName,
|
pt.config_name as templateName,
|
||||||
per.year_and_month as evaluateDate,
|
per.year_and_month as evaluateDate,
|
||||||
per.create_time as createTime,
|
per.create_time as createTime,
|
||||||
|
per.is_active as isActive,
|
||||||
r.proNum as proNum,
|
r.proNum as proNum,
|
||||||
r.subNum as subNum,
|
r.subNum as subNum,
|
||||||
CASE
|
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 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 poi on per.dept_id = poi.id and poi.status = 1
|
||||||
left join pm_org_info poi1 on poi1.id = r.pro_id
|
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 == ''">-->
|
<!-- <if test="deptId == null or deptId == ''">-->
|
||||||
<!-- and poi1.user_id = #{userId}-->
|
<!-- and poi1.user_id = #{userId}-->
|
||||||
<!-- </if>-->
|
<!-- </if>-->
|
||||||
|
|
@ -168,8 +174,7 @@
|
||||||
on pt.config_id = per.template_id and pt.is_active = 1
|
on pt.config_id = per.template_id and pt.is_active = 1
|
||||||
left join pm_org_info poi
|
left join pm_org_info poi
|
||||||
on per.dept_id = poi.id and poi.status = 1
|
on per.dept_id = poi.id and poi.status = 1
|
||||||
where per.is_active = 1
|
where per.evaluate_id = #{id}
|
||||||
and per.evaluate_id = #{id}
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getSubInfo" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.SubBean">
|
<select id="getSubInfo" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.SubBean">
|
||||||
select sub_id as subId,
|
select sub_id as subId,
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function initTable() {
|
function initTable() {
|
||||||
|
let loginUser = localStorage.getItem("loginUser");
|
||||||
|
let user = JSON.parse(loginUser);
|
||||||
//渲染表格
|
//渲染表格
|
||||||
table.render({
|
table.render({
|
||||||
elem: '#baseTable'
|
elem: '#baseTable'
|
||||||
|
|
@ -156,6 +158,11 @@
|
||||||
'<a lay-event="view" style="color: #009688;cursor: pointer;font-size: 15px"' +
|
'<a lay-event="view" style="color: #009688;cursor: pointer;font-size: 15px"' +
|
||||||
' id="view">查看</a>';
|
' id="view">查看</a>';
|
||||||
if (d.status === '待评价'){
|
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 +=
|
text +=
|
||||||
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px;margin-left: 10px"' +
|
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px;margin-left: 10px"' +
|
||||||
' id="view">编辑</a>';
|
' id="view">编辑</a>';
|
||||||
|
|
@ -203,6 +210,8 @@
|
||||||
view(data);
|
view(data);
|
||||||
} else if (obj.event === 'edit') {
|
} else if (obj.event === 'edit') {
|
||||||
edit(data);
|
edit(data);
|
||||||
|
}else if (obj.event === 'audit') {
|
||||||
|
audit(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -249,6 +258,40 @@
|
||||||
openPage('编辑评价', './InitiateEvaluationForm.html?id=' + data.id + '&type=edit');
|
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) {
|
function del(data) {
|
||||||
layer.confirm('确认删除吗?', function (index) {
|
layer.confirm('确认删除吗?', function (index) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue