承包商页面按钮修改,消息中心按钮修改
This commit is contained in:
parent
30c40198f5
commit
1ad50338ef
|
|
@ -7,7 +7,6 @@ layui.use(['table', 'form'], function () {
|
|||
|
||||
let table = layui.table;
|
||||
let form = layui.form;
|
||||
$("#auditResult").append("<option>111</option>")
|
||||
form.render();
|
||||
//表格初始化
|
||||
table.render({
|
||||
|
|
@ -25,7 +24,7 @@ layui.use(['table', 'form'], function () {
|
|||
, {type: 'numbers', title: '序号', width: "10%"}//序号列
|
||||
, {
|
||||
field: 'messageTheme', title: '消息内容', width: "60%", style: 'text-align: left', templet: d => {
|
||||
let text = "";
|
||||
let text;
|
||||
if (d.status === "1" || d.status === 1) {
|
||||
text = "<span style='margin-left: 3px; text-align: left;'>" + d.messageTheme + "</span>";
|
||||
} else {
|
||||
|
|
@ -36,14 +35,13 @@ layui.use(['table', 'form'], function () {
|
|||
}
|
||||
, {
|
||||
field: 'auditResult', title: '审核状态', templet: d => {
|
||||
let text = "";
|
||||
let text;
|
||||
let message = d.messageTheme;
|
||||
if (d.auditResult === "1") {
|
||||
text = "<span style='color:#70e070;cursor: pointer;' >通过</span>";
|
||||
} else if (d.auditResult === "2") {
|
||||
text = "<span style='color:orange;cursor: pointer;' >待审核</span>";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
text = "<span style='color:#ce2332;cursor: pointer;' >未通过</span>";
|
||||
if (message.indexOf("撤回") > 0) {
|
||||
text = "<span style='color:#928c8d;cursor: pointer;' >已撤回</span>";
|
||||
|
|
@ -100,7 +98,7 @@ layui.use(['table', 'form'], function () {
|
|||
|
||||
//checkbox 点击事件
|
||||
table.on('checkbox(table-temp)', function (obj) {
|
||||
var is_all= obj.type === 'all' ? true : false;//是否全选
|
||||
var is_all = obj.type === 'all';//是否全选
|
||||
if (is_all) {
|
||||
checkList = allCheckList;
|
||||
nameList = allNameList;
|
||||
|
|
@ -120,7 +118,7 @@ layui.use(['table', 'form'], function () {
|
|||
table.on('toolbar(table-temp)', obj => {
|
||||
switch (obj.event) {
|
||||
case "searchBt":
|
||||
oldYear = $("#auditResult").val();
|
||||
oldYear = $('#auditResult').val();
|
||||
table.reload('menuTable', {
|
||||
url: ctxPath + '/subIndex/getMsgContent'
|
||||
, method: 'post' //方式默认是get
|
||||
|
|
@ -156,24 +154,6 @@ layui.use(['table', 'form'], function () {
|
|||
}
|
||||
});
|
||||
|
||||
$('#allmessage').on('click', function () {
|
||||
var type = $(this).data('type');
|
||||
active[type] ? active[type].call(this) : '';
|
||||
});
|
||||
var active = {
|
||||
reload: function () {
|
||||
table.reload('lay-table', {
|
||||
page: {
|
||||
curr: 1 //重新从第一页开始
|
||||
},
|
||||
where: {
|
||||
'type': type, // 在表格中进行搜索
|
||||
}
|
||||
});
|
||||
table.reload('')
|
||||
},
|
||||
};
|
||||
|
||||
function updateTableData(type, id) {
|
||||
$('#' + id + '').on('click', function () {
|
||||
var type = $(this).data('type');
|
||||
|
|
@ -181,7 +161,7 @@ layui.use(['table', 'form'], function () {
|
|||
});
|
||||
var active = {
|
||||
reload: function () {
|
||||
table.reload('lay-table', {
|
||||
table.reload('menuTable', {
|
||||
page: {
|
||||
curr: 1 //重新从第一页开始
|
||||
},
|
||||
|
|
@ -201,7 +181,7 @@ layui.use(['table', 'form'], function () {
|
|||
* 标记已读
|
||||
*/
|
||||
function batchRead() {
|
||||
if (checkList.length == 0) {
|
||||
if (checkList.length === 0) {
|
||||
return layer.msg("请勾选要标记已读的数据", {icon: 2, time: 2000});
|
||||
} else {
|
||||
var data = {
|
||||
|
|
@ -216,7 +196,7 @@ function batchRead() {
|
|||
data: JSON.stringify(data),
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.resMsg = '删除成功') {
|
||||
if (data.resMsg === '删除成功') {
|
||||
layer.msg('标记已读成功');
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
|
@ -231,7 +211,7 @@ function batchRead() {
|
|||
* 批量删除
|
||||
*/
|
||||
function batchDel() {
|
||||
if (checkList.length == 0) {
|
||||
if (checkList.length === 0) {
|
||||
return layer.msg("请勾选要批量删除的数据", {icon: 2, time: 2000});
|
||||
} else {
|
||||
var data = {
|
||||
|
|
@ -245,7 +225,7 @@ function batchDel() {
|
|||
data: JSON.stringify(data),
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
if (data.resMsg = '删除成功') {
|
||||
if (data.resMsg === '删除成功') {
|
||||
layer.msg('删除成功');
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
|
@ -256,19 +236,6 @@ function batchDel() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构建对象
|
||||
* @param id
|
||||
* @param value
|
||||
*/
|
||||
function setCheckUNData(id, value) {
|
||||
var obj = {};
|
||||
obj.id = id;
|
||||
obj.value = value;
|
||||
return obj;
|
||||
}
|
||||
|
||||
//自定义方法,根据值去移除
|
||||
function removeByValue(arr, val) {
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
|
|
|
|||
|
|
@ -55,19 +55,17 @@
|
|||
<script type="text/javascript" src="../../../js/select.js"></script>
|
||||
<script type="text/javascript" src="../../../js/work/newSub/contractorModuleList.js" defer="defer"></script>
|
||||
<script type="text/html" id="toolsBar">
|
||||
<a lay-event="details" style="color: #009688;cursor: pointer;font-size: 16px">详情</a>
|
||||
|
||||
<!-- {{# if(d.auditStatus !== null && d.auditStatus !== 'null' && d.auditStatus !== ''){ }}-->
|
||||
<!-- <a lay-event="approvalProcess" style="color: #009688;cursor: pointer;font-size: 16px">流程</a>-->
|
||||
<!-- {{# } }}-->
|
||||
|
||||
{{# if(d.auditStatus == '2'){ }}
|
||||
<a lay-event="details" style="color: #009688;cursor: pointer;font-size: 16px">详情</a>
|
||||
{{# } }}
|
||||
<!-- <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>-->
|
||||
<!-- 条件待确认-->
|
||||
{{# if((d.auditStatus === null || d.auditStatus === 'null' || d.auditStatus === '') && (d.proName !== null && d.proName !== 'null' && d.proName !== '')){ }}
|
||||
<span> | </span>
|
||||
<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 16px">编辑</a>
|
||||
{{# } }}
|
||||
{{# if((d.proName === null || d.proName === 'null' || d.proName === '') && (d.subStatus == '2')){ }}
|
||||
<span> | </span>
|
||||
<a lay-event="update" style="color: #009688;cursor: pointer;font-size: 16px">分包修改</a>
|
||||
{{# } }}
|
||||
<!-- {{# if((d.proName === null || d.proName === 'null' || d.proName === '') && (d.subStatus !== '2')){ }}-->
|
||||
|
|
@ -75,7 +73,6 @@
|
|||
<!-- <a lay-event="view_sub" style="color: #009688;cursor: pointer;font-size: 16px">查看</a>-->
|
||||
<!-- {{# } }}-->
|
||||
{{# if(d.auditStatus === '5' || d.auditStatus === '1'){ }}
|
||||
<span> | </span>
|
||||
<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 16px">修改</a>
|
||||
{{# } }}
|
||||
<!-- {{# if(d.auditStatus === '0' || d.auditStatus === '2' || d.auditStatus === '3' || d.auditStatus === '4'){ }}-->
|
||||
|
|
@ -84,11 +81,9 @@
|
|||
<!-- {{# } }}-->
|
||||
<!-- <a class="layui-btn layui-btn-xs" lay-event="recall">撤回</a>-->
|
||||
{{# if(d.auditStatus != '' && d.auditStatus != '2' && d.auditStatus != '5' && d.auditStatus != '3'){ }}
|
||||
<span> | </span>
|
||||
<a lay-event="recall" style="color: #E81D58;cursor: pointer;font-size: 16px">撤回</a>
|
||||
{{# } }}
|
||||
{{# if(d.auditStatus == '6'){ }}
|
||||
<span> | </span>
|
||||
<a lay-event="tempStorage" style="color: #009688;cursor: pointer;font-size: 16px">编辑</a>
|
||||
{{# } }}
|
||||
<!-- {{# if(d.auditStatus == '2' && d.consApplyStatus != '2'){ }}-->
|
||||
|
|
|
|||
Loading…
Reference in New Issue