专责审批代码调试

This commit is contained in:
BianLzhaoMin 2025-02-19 14:29:45 +08:00
parent eb0bc28afd
commit 8759bde930
3 changed files with 370 additions and 363 deletions

View File

@ -1,18 +1,22 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo</title> <title>Demo</title>
<link rel="stylesheet" href="../../../layui/css/layui.css"/> <link rel="stylesheet" href="../../../layui/css/layui.css" />
</head> </head>
<body> <body>
<div class="layui-btn-group" style="margin-top: 10px;display: flex;justify-content: flex-end; margin-right: 10px;" id="btnGroup"> <div class="layui-btn-group" style="margin-top: 10px;display: flex;justify-content: flex-end; margin-right: 10px;"
<button class="layui-btn layui-btn-sm" onclick="allAudit(1)" >全部通过</button> id="btnGroup">
<button class="layui-btn layui-btn-sm" onclick="allAudit(2)" >全部驳回</button> <button class="layui-btn layui-btn-sm" onclick="allAudit(1)">全部通过</button>
</div> <button class="layui-btn layui-btn-sm" onclick="allAudit(2)">全部驳回</button>
<div id="txtTip" style="margin-top: 10px;display: flex;justify-content: flex-end;width: 99%;">注:如无审核按钮,则表示当前评价停留在一级审核处</div> </div>
<form class="layui-form layui-form-pane fromData" action=""> <div id="txtTip" style="margin-top: 10px;display: flex;justify-content: flex-end;width: 99%;">
注:如无审核按钮,则表示当前评价停留在一级审核处</div>
<form class="layui-form layui-form-pane fromData" action="">
<div style="width: 100%;overflow:auto"> <div style="width: 100%;overflow:auto">
<table class="layui-table" id="baseTable" lay-filter="test"> <table class="layui-table" id="baseTable" lay-filter="test">
</table> </table>
@ -23,15 +27,15 @@
</button> </button>
</div> </div>
</div> </div>
</form> </form>
<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 src="../../../js/common.js"></script> <script src="../../../js/common.js"></script>
<script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="../../../js/libs/jquery-2.1.1.min.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 src="../../../layui/layui.js"></script> <script src="../../../layui/layui.js"></script>
<script> <script>
let noMessage = 0 let noMessage = 0
let headerRows; let headerRows;
let layer, laydate, table, form; let layer, laydate, table, form;
@ -42,7 +46,7 @@
laydate = layui.laydate; laydate = layui.laydate;
table = layui.table; table = layui.table;
form = layui.form; form = layui.form;
tableLoading = layer.load(2, {shade: [0.1, '#fff']}); tableLoading = layer.load(2, { shade: [0.1, '#fff'] });
let deptId = getUrlParam('deptId'); let deptId = getUrlParam('deptId');
isCheckOneIsAudit(deptId); isCheckOneIsAudit(deptId);
initTable(deptId); initTable(deptId);
@ -70,7 +74,7 @@
} else { } else {
$("#btnGroup").hide(); $("#btnGroup").hide();
} }
if (getUrlParam("type") == '1'){ if (getUrlParam("type") == '1') {
$("#btnGroup").hide(); $("#btnGroup").hide();
$("#txtTip").hide(); $("#txtTip").hide();
} }
@ -105,7 +109,7 @@
if (cellData.title === '序号') { if (cellData.title === '序号') {
cellData.type = 'numbers'; cellData.type = 'numbers';
} }
if (!['审核', '序号', '施工业务外包商', '工程名称','评价人','审批'].includes(cellData.title)) { if (!['审核', '序号', '施工业务外包商', '工程名称', '评价人', '审批'].includes(cellData.title)) {
if (cellData.field.split('-').length === 1) { if (cellData.field.split('-').length === 1) {
cellData.title = cellData.title =
`${cellData.title}<i class="layui-icon layui-icon-tips layui-font-14" lay-event="checkTips" `${cellData.title}<i class="layui-icon layui-icon-tips layui-font-14" lay-event="checkTips"
@ -117,26 +121,26 @@
} else if (cellData.mergeType === "rowspan") { } else if (cellData.mergeType === "rowspan") {
cellData.rowspan = cellData.num; cellData.rowspan = cellData.num;
} }
if (getUrlParam("type") != '1'){ if (getUrlParam("type") != '1') {
if (cellData.field === 'examineAndApprove') { if (cellData.field === 'examineAndApprove') {
cellData.templet = function (d) { cellData.templet = function (d) {
console.log("ddddd:",d) console.log("ddddd:", d)
//如果d.isApprove == 1 去除当前行的编辑功能 //如果d.isApprove == 1 去除当前行的编辑功能
let text = ""; let text = "";
if (d.isTwoApprove == 0 && d.isApprove == 1 ) { if (d.isTwoApprove == 0 && d.isApprove == 1) {
text += '<a lay-event="pass" style="color: #009688;cursor: pointer;font-size: 15px"' + text += '<a lay-event="pass" style="color: #009688;cursor: pointer;font-size: 15px"' +
' id="pass">通过</a>'; ' id="pass">通过</a>';
text += text +=
'<a lay-event="reject" style="color: #a59e9e;cursor: pointer;font-size: 15px;margin-left: 10px"' + '<a lay-event="reject" style="color: #a59e9e;cursor: pointer;font-size: 15px;margin-left: 10px"' +
' id="reject">驳回</a>'; ' id="reject">驳回</a>';
}else{ } else {
if (d.isTwoApprove == 1 && d.isApprove == 1 ) { if (d.isTwoApprove == 1 && d.isApprove == 1) {
text += '<a style="color: #009688;cursor: pointer;font-size: 15px"' + text += '<a style="color: #009688;cursor: pointer;font-size: 15px"' +
' id="pass">已通过</a>'; ' id="pass">已通过</a>';
}else if (d.isTwoApprove == 2 && d.isApprove == 1 ) { } else if (d.isTwoApprove == 2 && d.isApprove == 1) {
text += '<a style="color: #a59e9e;cursor: pointer;font-size: 15px"' + text += '<a style="color: #a59e9e;cursor: pointer;font-size: 15px"' +
' id="reject">已驳回</a>'; ' id="reject">已驳回</a>';
}else{ } else {
noMessage++ noMessage++
return '' return ''
} }
@ -151,7 +155,7 @@
return text; return text;
} }
} }
}else{ } else {
if (cellData.field === 'examineAndApprove') { if (cellData.field === 'examineAndApprove') {
cellData.templet = function (d) { cellData.templet = function (d) {
//如果d.isApprove == 1 去除当前行的编辑功能 //如果d.isApprove == 1 去除当前行的编辑功能
@ -218,15 +222,15 @@
} }
function allAudit(type) { function allAudit(type) {
if (noMessage > 0){ if (noMessage > 0) {
layer.msg("当前页面评价驳回数据或者一级审核未通过数据,无法进行全部通过或者全部驳回操作 ") layer.msg("当前页面评价驳回数据或者一级审核未通过数据,无法进行全部通过或者全部驳回操作 ")
return return
} }
let title = type === 1 ? '全部通过' : '全部驳回'; let title = type === 1 ? '全部通过' : '全部驳回';
layer.confirm('确定'+title+'吗?', function (index) { layer.confirm('确定' + title + '吗?', function (index) {
if(type === 1){ if (type === 1) {
$.ajax({ $.ajax({
url: ctxPath + '/outsourcer/allAudit', url: ctxPath + '/outsourcer/dedicatedAllAudit',
type: 'post', type: 'post',
async: false, async: false,
data: { data: {
@ -248,7 +252,7 @@
} }
}, },
}); });
}else{ } else {
let content = '<div style="padding: 20px 100px;"><span style="color: red">*</span>' + title + let content = '<div style="padding: 20px 100px;"><span style="color: red">*</span>' + title +
@ -266,7 +270,7 @@
return; return;
} }
$.ajax({ $.ajax({
url: ctxPath + '/outsourcer/allAudit', url: ctxPath + '/outsourcer/dedicatedAllAudit',
type: 'post', type: 'post',
async: false, async: false,
data: { data: {
@ -299,10 +303,10 @@
function audit(obj, type, status) { function audit(obj, type, status) {
let title = type === 1 ? '通过' : '驳回'; let title = type === 1 ? '通过' : '驳回';
if(type == 1){ if (type == 1) {
layer.confirm('确定'+title+'吗?', function (index) { layer.confirm('确定' + title + '吗?', function (index) {
$.ajax({ $.ajax({
url: ctxPath + '/outsourcer/audit', url: ctxPath + '/outsourcer/dedicatedAudit',
type: 'post', type: 'post',
async: false, async: false,
data: { data: {
@ -326,7 +330,7 @@
} }
}); });
}); });
}else { } else {
let content = '<div style="padding: 20px 100px;"><span style="color: red">*</span>' + title + let content = '<div style="padding: 20px 100px;"><span style="color: red">*</span>' + title +
@ -344,7 +348,7 @@
return; return;
} }
$.ajax({ $.ajax({
url: ctxPath + '/outsourcer/audit', url: ctxPath + '/outsourcer/dedicatedAudit',
type: 'post', type: 'post',
data: { data: {
templateId: getUrlParam('templateId'), templateId: getUrlParam('templateId'),
@ -429,4 +433,4 @@
parent.search(1) parent.search(1)
parent.layer.close(index); // 再执行关闭 parent.layer.close(index); // 再执行关闭
} }
</script> </script>

View File

@ -127,7 +127,7 @@
console.log("ddddd:", d) console.log("ddddd:", d)
//如果d.isApprove == 1 去除当前行的编辑功能 //如果d.isApprove == 1 去除当前行的编辑功能
let text = ""; let text = "";
if (d.isTwoApprove == 0 && d.isApprove == 1) { if (d.isTwoApprove == 1 && d.isApprove == 1) {
text += '<a lay-event="pass" style="color: #009688;cursor: pointer;font-size: 15px"' + text += '<a lay-event="pass" style="color: #009688;cursor: pointer;font-size: 15px"' +
' id="pass">通过</a>'; ' id="pass">通过</a>';
text += text +=

View File

@ -142,4 +142,7 @@
}; };
$("#dt-table").treetable(option); $("#dt-table").treetable(option);
// 递归函数
</script> </script>