需求开发

This commit is contained in:
liang.chao 2025-09-05 18:09:40 +08:00
parent d0ac01ec86
commit fc71ed727a
6 changed files with 329 additions and 312 deletions

View File

@ -78,7 +78,7 @@
left join pj_evaluate_details ped on ped.evaluate_id = per.evaluate_id left join pj_evaluate_details ped on ped.evaluate_id = per.evaluate_id
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 = 1
<!-- <if test="deptId == null or deptId == ''">--> <!-- <if test="deptId == null or deptId == ''">-->
<!-- and poi1.user_id = #{userId}--> <!-- and poi1.user_id = #{userId}-->

View File

@ -453,6 +453,11 @@
subTotals = (subArr.reduce((a, b) => a + b, 0) / subArr.length).toFixed(2); subTotals = (subArr.reduce((a, b) => a + b, 0) / subArr.length).toFixed(2);
} else if (twoLevelCountType === '最低分') { } else if (twoLevelCountType === '最低分') {
subTotals = Math.min(...subArr).toFixed(2); subTotals = Math.min(...subArr).toFixed(2);
} else if (twoLevelCountType === '累加') {
subTotals = subArr.reduce((a, b) => a + b, 0).toFixed(2);
} else if (twoLevelCountType === '累减') {
const sumOfDifferences = subArr.reduce((sum, value) => sum + (10 - value), 0);
subTotals = (10 - sumOfDifferences).toFixed(2);
} }
} else { } else {
subTotals = "0.00"; subTotals = "0.00";

View File

@ -252,6 +252,11 @@
subTotals = (subArr.reduce((a, b) => a + b, 0) / subArr.length).toFixed(2); subTotals = (subArr.reduce((a, b) => a + b, 0) / subArr.length).toFixed(2);
} else if (twoLevelCountType === '最低分') { } else if (twoLevelCountType === '最低分') {
subTotals = Math.min(...subArr).toFixed(2); subTotals = Math.min(...subArr).toFixed(2);
} else if (twoLevelCountType === '累加') {
subTotals = subArr.reduce((a, b) => a + b, 0).toFixed(2);
} else if (twoLevelCountType === '累减') {
const sumOfDifferences = subArr.reduce((sum, value) => sum + (10 - value), 0);
subTotals = (10 - sumOfDifferences).toFixed(2);
} }
} else { } else {
subTotals = "0.00"; subTotals = "0.00";

View File

@ -155,7 +155,7 @@
text += text +=
'<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 === '评价'){
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>';

View File

@ -4,23 +4,23 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>汇总审核查看审批</title> <title>汇总审核查看审批</title>
<link rel="stylesheet" href="../../../layui/css/layui.css" /> <link rel="stylesheet" href="../../../layui/css/layui.css"/>
</head> </head>
<body> <body>
<div style="padding: 10px;"> <div style="padding: 10px;">
<div class="layui-btn-container" id="auditBtnGroup"> <div class="layui-btn-container" id="auditBtnGroup">
</div> </div>
<table class="layui-table" id="baseTable" lay-filter="test"></table> <table class="layui-table" id="baseTable" lay-filter="test"></table>
</div> </div>
<script src="../../../js/publicJs.js"></script> <script src="../../../js/publicJs.js"></script>
<script src="../../../js/common_methon.js"></script> <script src="../../../js/common_methon.js"></script>
<script type="text/javascript" src="../../../js/common.js"></script> <script type="text/javascript" src="../../../js/common.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-3.6.0.js"></script> <script type="text/javascript" src="../../../js/libs/jquery-3.6.0.js"></script>
<script src="../../../layui/layui.js"></script> <script src="../../../layui/layui.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script> <script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script> <script type="text/javascript" src="../../../js/my/permission.js"></script>
<script> <script>
let headerRows; let headerRows;
let layer, laydate, table; let layer, laydate, table;
let tableLoading; let tableLoading;
@ -31,7 +31,7 @@
laydate = layui.laydate; laydate = layui.laydate;
table = layui.table; table = layui.table;
//自定义loading //自定义loading
tableLoading = layer.load(2, { shade: [0.1, '#fff'] }); tableLoading = layer.load(2, {shade: [0.1, '#fff']});
getAuditBtn(); getAuditBtn();
initTable(); initTable();
bindToolbarEvents(); bindToolbarEvents();
@ -73,9 +73,9 @@
if (localStorage.getItem("AllAuditTitle") == '审核') { if (localStorage.getItem("AllAuditTitle") == '审核') {
let isHide = getHide(data[i].id) let isHide = getHide(data[i].id)
if(isHide){ if (isHide) {
btn = `<button class="layui-btn layui-btn-sm" onclick="openPage('${data[i].id}', '${data[i].name}','0')">${data[i].name}</button>`; btn = `<button class="layui-btn layui-btn-sm" onclick="openPage('${data[i].id}', '${data[i].name}','0')">${data[i].name}</button>`;
}else{ } else {
btn = `<button class="layui-btn layui-btn-primary layui-border layui-btn-sm" onclick="openPage('${data[i].id}', '${data[i].name}','0')">${data[i].name}</button>`; btn = `<button class="layui-btn layui-btn-primary layui-border layui-btn-sm" onclick="openPage('${data[i].id}', '${data[i].name}','0')">${data[i].name}</button>`;
} }
// btn = `<button class="layui-btn layui-btn-sm" onclick="openPage('${data[i].id}', '${data[i].name}','0')">${data[i].name}</button>`; // btn = `<button class="layui-btn layui-btn-sm" onclick="openPage('${data[i].id}', '${data[i].name}','0')">${data[i].name}</button>`;
@ -257,15 +257,20 @@
} }
}); });
//计算小计 //计算小计
if (subArr.length > 0){ if (subArr.length > 0) {
if (twoLevelCountType === '最高分') { if (twoLevelCountType === '最高分') {
subTotals = Math.max(...subArr).toFixed(2); subTotals = Math.max(...subArr).toFixed(2);
} else if (twoLevelCountType === '平均分') { } else if (twoLevelCountType === '平均分') {
subTotals = (subArr.reduce((a, b) => a + b, 0) / subArr.length).toFixed(2); subTotals = (subArr.reduce((a, b) => a + b, 0) / subArr.length).toFixed(2);
} else if (twoLevelCountType === '最低分') { } else if (twoLevelCountType === '最低分') {
subTotals = Math.min(...subArr).toFixed(2); subTotals = Math.min(...subArr).toFixed(2);
} else if (twoLevelCountType === '累加') {
subTotals = subArr.reduce((a, b) => a + b, 0).toFixed(2);
} else if (twoLevelCountType === '累减') {
const sumOfDifferences = subArr.reduce((sum, value) => sum + (10 - value), 0);
subTotals = (10 - sumOfDifferences).toFixed(2);
} }
}else { } else {
subTotals = "0.00"; subTotals = "0.00";
} }
itemData[item + '-subtotal'] = subTotals; itemData[item + '-subtotal'] = subTotals;
@ -558,12 +563,12 @@
} }
function getHide(id){ function getHide(id) {
let isHide = false; let isHide = false;
$.ajax({ $.ajax({
url: ctxPath + '/outsourcer/isCheckOneIsAudit', url: ctxPath + '/outsourcer/isCheckOneIsAudit',
type: 'get', type: 'get',
async:false, async: false,
data: { data: {
templateId: getUrlParam('templateId'), templateId: getUrlParam('templateId'),
evaluateId: getUrlParam('evaluateId'), evaluateId: getUrlParam('evaluateId'),
@ -577,7 +582,7 @@
$.ajax({ $.ajax({
url: ctxPath + '/outsourcer/isCheckThreeIsAudit', url: ctxPath + '/outsourcer/isCheckThreeIsAudit',
type: 'get', type: 'get',
async:false, async: false,
data: { data: {
templateId: getUrlParam('templateId'), templateId: getUrlParam('templateId'),
evaluateId: getUrlParam('evaluateId'), evaluateId: getUrlParam('evaluateId'),
@ -587,20 +592,20 @@
}, },
success: function (res) { success: function (res) {
if (res.res == '1') { if (res.res == '1') {
isHide =false; isHide = false;
}else{ } else {
isHide = true; isHide = true;
} }
} }
}) })
} else { } else {
isHide =false; isHide = false;
} }
} }
}) })
return isHide; return isHide;
} }
</script> </script>
</body> </body>
</html> </html>

View File

@ -136,6 +136,8 @@
<input type="radio" name="sub_5161" value="最高分" title="最高分" checked> <input type="radio" name="sub_5161" value="最高分" title="最高分" checked>
<input type="radio" name="sub_5161" value="最低分" title="最低分"> <input type="radio" name="sub_5161" value="最低分" title="最低分">
<input type="radio" name="sub_5161" value="平均分" title="平均分"> <input type="radio" name="sub_5161" value="平均分" title="平均分">
<input type="radio" name="sub_5161" value="累加" title="累加">
<input type="radio" name="sub_5161" value="累减" title="累减">
</div> </div>
</div> </div>
</div> </div>