代码优化
This commit is contained in:
parent
bedfe05015
commit
c0269c0f03
|
|
@ -157,17 +157,47 @@
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (cellData.field === 'examineAndApprove') {
|
if (cellData.field === 'examineAndApprove') {
|
||||||
|
|
||||||
|
|
||||||
cellData.templet = function (d) {
|
cellData.templet = function (d) {
|
||||||
//如果d.isApprove == 1 去除当前行的编辑功能
|
//如果d.isApprove == 1 去除当前行的编辑功能
|
||||||
|
// let text = "";
|
||||||
|
// if (d.isTwoApprove == 1) {
|
||||||
|
// text += '<a style="color: #009688;cursor: pointer;font-size: 15px"' +
|
||||||
|
// ' id="pass">已通过</a>';
|
||||||
|
// }
|
||||||
|
// if (d.isTwoApprove == 2) {
|
||||||
|
// text += '<a style="color: #a59e9e;cursor: pointer;font-size: 15px"' +
|
||||||
|
// ' id="reject">已驳回</a>';
|
||||||
|
// }
|
||||||
|
// text += '<a lay-event="pass" style="color: #009688;cursor: pointer;font-size: 15px"' +
|
||||||
|
// ' id="pass">通过</a>';
|
||||||
|
// text +=
|
||||||
|
// '<a lay-event="reject" style="color: #a59e9e;cursor: pointer;font-size: 15px;margin-left: 10px"' +
|
||||||
|
// ' id="reject">驳回</a>';
|
||||||
|
// return text;
|
||||||
|
|
||||||
let text = "";
|
let text = "";
|
||||||
if (d.isTwoApprove == 1) {
|
if (d.isTwoApprove == 1 && d.isApprove == 1 && d.isThreeApprove == 0) {
|
||||||
|
text += '<a lay-event="pass" style="color: #009688;cursor: pointer;font-size: 15px"' +
|
||||||
|
' id="pass">通过</a>';
|
||||||
|
text +=
|
||||||
|
'<a lay-event="reject" style="color: #a59e9e;cursor: pointer;font-size: 15px;margin-left: 10px"' +
|
||||||
|
' id="reject">驳回</a>';
|
||||||
|
} else {
|
||||||
|
if (d.isTwoApprove == 1 && d.isApprove == 1 && d.isThreeApprove == 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.isThreeApprove == 2 && d.isTwoApprove == 1) {
|
||||||
if (d.isTwoApprove == 2) {
|
|
||||||
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 {
|
||||||
|
noMessage++
|
||||||
|
return ''
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 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 +=
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<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">
|
||||||
|
|
@ -544,4 +546,5 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue