代码调试

This commit is contained in:
BianLzhaoMin 2025-02-19 16:56:45 +08:00
parent 095d0e78cc
commit f972b0eb88
2 changed files with 39 additions and 51 deletions

View File

@ -1,6 +1,5 @@
//form序列化为json
$.fn.serializeObject = function()
{
$.fn.serializeObject = function () {
var o = {};
var a = this.serializeArray();
$.each(a, function () {
@ -8,9 +7,9 @@ $.fn.serializeObject = function()
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
o[this.name].push(this.value || "");
} else {
o[this.name] = this.value || '';
o[this.name] = this.value || "";
}
});
return o;
@ -19,14 +18,21 @@ $.fn.serializeObject = function()
//获取url后的参数值
function getUrlParam(key) {
var href = window.location.href;
console.log("key+++++", key);
var url = href.split("?");
console.log("url+++++", url);
if (url.length <= 1) {
return "";
}
var params = url[1].split("&");
console.log("params+++++", params);
for (var i = 0; i < params.length; i++) {
var param = params[i].split("=");
console.log("param*****+++++", param);
if (key == param[0]) {
return param[1];
}

View File

@ -74,10 +74,10 @@
} else {
$("#btnGroup").hide();
}
// if (getUrlParam("type") == '1') {
// $("#btnGroup").hide();
// $("#txtTip").hide();
// }
if (getUrlParam("type") == '1') {
$("#btnGroup").hide();
$("#txtTip").hide();
}
}
})
}
@ -159,40 +159,22 @@
if (cellData.field === 'examineAndApprove') {
cellData.templet = function (d) {
//如果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>';
// }
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>';
let text = "";
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"' +
' id="pass">已通过</a>';
} else if (d.isThreeApprove == 2 && d.isTwoApprove == 1) {
text += '<a style="color: #a59e9e;cursor: pointer;font-size: 15px"' +
' id="reject">已驳回</a>';
} else {
noMessage++
return ''
}
}
return text;
}
}