代码调试
This commit is contained in:
parent
095d0e78cc
commit
f972b0eb88
|
|
@ -1,6 +1,5 @@
|
||||||
//form序列化为json
|
//form序列化为json
|
||||||
$.fn.serializeObject = function()
|
$.fn.serializeObject = function () {
|
||||||
{
|
|
||||||
var o = {};
|
var o = {};
|
||||||
var a = this.serializeArray();
|
var a = this.serializeArray();
|
||||||
$.each(a, function () {
|
$.each(a, function () {
|
||||||
|
|
@ -8,9 +7,9 @@ $.fn.serializeObject = function()
|
||||||
if (!o[this.name].push) {
|
if (!o[this.name].push) {
|
||||||
o[this.name] = [o[this.name]];
|
o[this.name] = [o[this.name]];
|
||||||
}
|
}
|
||||||
o[this.name].push(this.value || '');
|
o[this.name].push(this.value || "");
|
||||||
} else {
|
} else {
|
||||||
o[this.name] = this.value || '';
|
o[this.name] = this.value || "";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return o;
|
return o;
|
||||||
|
|
@ -19,14 +18,21 @@ $.fn.serializeObject = function()
|
||||||
//获取url后的参数值
|
//获取url后的参数值
|
||||||
function getUrlParam(key) {
|
function getUrlParam(key) {
|
||||||
var href = window.location.href;
|
var href = window.location.href;
|
||||||
|
|
||||||
|
console.log("key+++++", key);
|
||||||
var url = href.split("?");
|
var url = href.split("?");
|
||||||
|
console.log("url+++++", url);
|
||||||
if (url.length <= 1) {
|
if (url.length <= 1) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
var params = url[1].split("&");
|
var params = url[1].split("&");
|
||||||
|
|
||||||
|
console.log("params+++++", params);
|
||||||
|
|
||||||
for (var i = 0; i < params.length; i++) {
|
for (var i = 0; i < params.length; i++) {
|
||||||
var param = params[i].split("=");
|
var param = params[i].split("=");
|
||||||
|
|
||||||
|
console.log("param*****+++++", param);
|
||||||
if (key == param[0]) {
|
if (key == param[0]) {
|
||||||
return param[1];
|
return param[1];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,10 +74,10 @@
|
||||||
} else {
|
} else {
|
||||||
$("#btnGroup").hide();
|
$("#btnGroup").hide();
|
||||||
}
|
}
|
||||||
// if (getUrlParam("type") == '1') {
|
if (getUrlParam("type") == '1') {
|
||||||
// $("#btnGroup").hide();
|
$("#btnGroup").hide();
|
||||||
// $("#txtTip").hide();
|
$("#txtTip").hide();
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -159,40 +159,22 @@
|
||||||
if (cellData.field === 'examineAndApprove') {
|
if (cellData.field === 'examineAndApprove') {
|
||||||
cellData.templet = function (d) {
|
cellData.templet = function (d) {
|
||||||
//如果d.isApprove == 1 去除当前行的编辑功能
|
//如果d.isApprove == 1 去除当前行的编辑功能
|
||||||
// let text = "";
|
let text = "";
|
||||||
// if (d.isTwoApprove == 1) {
|
if (d.isTwoApprove == 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>';
|
||||||
// }
|
}
|
||||||
// if (d.isTwoApprove == 2) {
|
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>';
|
||||||
// }
|
}
|
||||||
// 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>';
|
||||||
|
|
||||||
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;
|
return text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue