|
|
@@ -29,16 +29,15 @@ var bootstrap = function ($, learun) { |
|
|
|
$('#CompanyId').lrCompanySelect({ type: 'multiple' }); |
|
|
|
$('#DeptId').lrDepartmentSelect({ type: 'treemultiple' }); |
|
|
|
$('#PostId').lrPostSelect({ type: 'treemultiple' }); |
|
|
|
$('#RoleId').lrRoleSelect({ type: 'treemultiple' }); |
|
|
|
$('#ReceiverUserId').lrUserSelect({ type: '1' }); |
|
|
|
$('#SendType').lrDataItemSelect({ |
|
|
|
code: 'FileSendType', select: function (item) { |
|
|
|
if (item != null && item != undefined) { |
|
|
|
if (item.id === 1 || item.id === "1") { |
|
|
|
$("#CompanyIddiv").show(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
|
//$("#CompanyId").attr("isvalid", "yes"); |
|
|
|
//$("#CompanyId").attr("checkexpession", "NotNull"); |
|
|
|
$("#CompanyId").attr("isvalid", "yes"); |
|
|
|
$("#CompanyId").attr("checkexpession", "NotNull"); |
|
|
|
$("#DeptIddiv").hide(); |
|
|
|
$("#DeptId").removeAttr("isvalid"); |
|
|
|
$("#DeptId").removeAttr("NotNull"); |
|
|
@@ -48,21 +47,25 @@ var bootstrap = function ($, learun) { |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else if (item.id === 2 || item.id === "2") { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
|
$("#DeptIddiv").show(); |
|
|
|
$("#DeptId").removeAttr("isvalid"); |
|
|
|
$("#DeptId").removeAttr("NotNull"); |
|
|
|
//$("#DeptId").attr("isvalid", "yes"); |
|
|
|
//$("#DeptId").attr("checkexpession", "NotNull"); |
|
|
|
$("#DeptId").attr("isvalid", "yes"); |
|
|
|
$("#DeptId").attr("checkexpession", "NotNull"); |
|
|
|
$("#ReceiverIddiv").hide(); |
|
|
|
$("#ReceiverUserId").removeAttr("isvalid"); |
|
|
|
$("#ReceiverUserId").removeAttr("NotNull"); |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else if (item.id === 3 || item.id === "3") { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
@@ -76,7 +79,10 @@ var bootstrap = function ($, learun) { |
|
|
|
$("#PostIddiv").show(); |
|
|
|
$("#PostId").attr("isvalid", "yes"); |
|
|
|
$("#PostId").attr("checkexpession", "NotNull"); |
|
|
|
} else { |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else if (item.id === 4 || item.id === "4") { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
@@ -89,6 +95,25 @@ var bootstrap = function ($, learun) { |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
|
$("#DeptIddiv").hide(); |
|
|
|
$("#DeptId").removeAttr("isvalid"); |
|
|
|
$("#DeptId").removeAttr("NotNull"); |
|
|
|
$("#ReceiverIddiv").hide(); |
|
|
|
$("#ReceiverUserId").removeAttr("isvalid"); |
|
|
|
$("#ReceiverUserId").removeAttr("NotNull"); |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#RoleIddiv").show(); |
|
|
|
$("#RoleId").attr("isvalid", "yes"); |
|
|
|
$("#RoleId").attr("checkexpession", "NotNull"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@@ -107,12 +132,10 @@ var bootstrap = function ($, learun) { |
|
|
|
} |
|
|
|
else { |
|
|
|
$('[data-table="' + id + '"]').lrSetFormData(data[id]); |
|
|
|
if (data[id].SendType === 1 || data[id].SendType == "1") { |
|
|
|
if (item.id === 1 || item.id === "1") { |
|
|
|
$("#CompanyIddiv").show(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
|
//$("#CompanyId").attr("isvalid", "yes"); |
|
|
|
//$("#CompanyId").attr("checkexpession", "NotNull"); |
|
|
|
$("#CompanyId").attr("isvalid", "yes"); |
|
|
|
$("#CompanyId").attr("checkexpession", "NotNull"); |
|
|
|
$("#DeptIddiv").hide(); |
|
|
|
$("#DeptId").removeAttr("isvalid"); |
|
|
|
$("#DeptId").removeAttr("NotNull"); |
|
|
@@ -122,24 +145,26 @@ var bootstrap = function ($, learun) { |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#CompanyId").lrselectSet(data[id].ReceiverId); |
|
|
|
} else if (data[id].SendType === 2 || data[id].SendType == "2") { |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else if (item.id === 2 || item.id === "2") { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
|
$("#DeptIddiv").show(); |
|
|
|
$("#DeptId").removeAttr("isvalid"); |
|
|
|
$("#DeptId").removeAttr("NotNull"); |
|
|
|
//$("#DeptId").attr("isvalid", "yes"); |
|
|
|
//$("#DeptId").attr("checkexpession", "NotNull"); |
|
|
|
$("#DeptId").attr("isvalid", "yes"); |
|
|
|
$("#DeptId").attr("checkexpession", "NotNull"); |
|
|
|
$("#ReceiverIddiv").hide(); |
|
|
|
$("#ReceiverUserId").removeAttr("isvalid"); |
|
|
|
$("#ReceiverUserId").removeAttr("NotNull"); |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#DeptId").lrselectSet(data[id].ReceiverId); |
|
|
|
} else if (data[id].SendType === 3 || data[id].SendType === "3") { |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else if (item.id === 3 || item.id === "3") { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
@@ -152,8 +177,10 @@ var bootstrap = function ($, learun) { |
|
|
|
$("#PostIddiv").show(); |
|
|
|
$("#PostId").attr("isvalid", "yes"); |
|
|
|
$("#PostId").attr("checkexpession", "NotNull"); |
|
|
|
$("#PostId").lrselectSet(data[id].ReceiverId); |
|
|
|
} else { |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else if (item.id === 4 || item.id === "4") { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
@@ -161,14 +188,30 @@ var bootstrap = function ($, learun) { |
|
|
|
$("#DeptId").removeAttr("isvalid"); |
|
|
|
$("#DeptId").removeAttr("NotNull"); |
|
|
|
$("#ReceiverIddiv").show(); |
|
|
|
$("#ReceiverUserId").attr("isvalid", "yes"); |
|
|
|
$("#ReceiverUserId").attr("checkexpession", "NotNull"); |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
|
$("#DeptIddiv").hide(); |
|
|
|
$("#DeptId").removeAttr("isvalid"); |
|
|
|
$("#DeptId").removeAttr("NotNull"); |
|
|
|
$("#ReceiverIddiv").hide(); |
|
|
|
$("#ReceiverUserId").removeAttr("isvalid"); |
|
|
|
$("#ReceiverUserId").removeAttr("NotNull"); |
|
|
|
//$("#ReceiverUserId").attr("isvalid", "yes"); |
|
|
|
//$("#ReceiverUserId").attr("checkexpession", "NotNull"); |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); |
|
|
|
$("#RoleIddiv").show(); |
|
|
|
$("#RoleId").attr("isvalid", "yes"); |
|
|
|
$("#RoleId").attr("checkexpession", "NotNull"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@@ -190,7 +233,7 @@ var bootstrap = function ($, learun) { |
|
|
|
keyValue = data[id].SFileId; |
|
|
|
} |
|
|
|
$('[data-table="' + id + '"]').lrSetFormData(data[id]); |
|
|
|
if (data[id].SendType === 1 || data[id].SendType == "1") { |
|
|
|
if (item.id === 1 || item.id === "1") { |
|
|
|
$("#CompanyIddiv").show(); |
|
|
|
$("#CompanyId").attr("isvalid", "yes"); |
|
|
|
$("#CompanyId").attr("checkexpession", "NotNull"); |
|
|
@@ -203,8 +246,10 @@ var bootstrap = function ($, learun) { |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#CompanyId").lrselectSet(data[id].ReceiverId); |
|
|
|
} else if (data[id].SendType === 2 || data[id].SendType == "2") { |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else if (item.id === 2 || item.id === "2") { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
@@ -217,8 +262,10 @@ var bootstrap = function ($, learun) { |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#DeptId").lrselectSet(data[id].ReceiverId); |
|
|
|
} else if (data[id].SendType === 3 || data[id].SendType === "3") { |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else if (item.id === 3 || item.id === "3") { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
@@ -231,8 +278,10 @@ var bootstrap = function ($, learun) { |
|
|
|
$("#PostIddiv").show(); |
|
|
|
$("#PostId").attr("isvalid", "yes"); |
|
|
|
$("#PostId").attr("checkexpession", "NotNull"); |
|
|
|
$("#PostId").lrselectSet(data[id].ReceiverId); |
|
|
|
} else { |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else if (item.id === 4 || item.id === "4") { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
@@ -245,7 +294,25 @@ var bootstrap = function ($, learun) { |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#ReceiverUserId").lrformselectSet(data[id].ReceiverId); |
|
|
|
$("#RoleIddiv").hide(); |
|
|
|
$("#RoleId").removeAttr("isvalid"); |
|
|
|
$("#RoleId").removeAttr("NotNull"); |
|
|
|
} else { |
|
|
|
$("#CompanyIddiv").hide(); |
|
|
|
$("#CompanyId").removeAttr("isvalid"); |
|
|
|
$("#CompanyId").removeAttr("NotNull"); |
|
|
|
$("#DeptIddiv").hide(); |
|
|
|
$("#DeptId").removeAttr("isvalid"); |
|
|
|
$("#DeptId").removeAttr("NotNull"); |
|
|
|
$("#ReceiverIddiv").hide(); |
|
|
|
$("#ReceiverUserId").removeAttr("isvalid"); |
|
|
|
$("#ReceiverUserId").removeAttr("NotNull"); |
|
|
|
$("#PostIddiv").hide(); |
|
|
|
$("#PostId").removeAttr("isvalid"); |
|
|
|
$("#PostId").removeAttr("NotNull"); |
|
|
|
$("#RoleIddiv").show(); |
|
|
|
$("#RoleId").attr("isvalid", "yes"); |
|
|
|
$("#RoleId").attr("checkexpession", "NotNull"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@@ -280,9 +347,12 @@ var bootstrap = function ($, learun) { |
|
|
|
} else if (sendtype == "3") { |
|
|
|
formData.ReceiverId = $("#PostId").lrselectGet(); |
|
|
|
formData.Receiver = $("#PostId").find(".lr-select-placeholder").text(); |
|
|
|
} else { |
|
|
|
} else if (sendtype == "4") { |
|
|
|
formData.ReceiverId = $("#ReceiverUserId").lrformselectGet(); |
|
|
|
formData.Receiver = $("#ReceiverUserId").find("span").text(); |
|
|
|
} else { |
|
|
|
formData.ReceiverId = $("#RoleId").lrselectGet(); |
|
|
|
formData.Receiver = $("#RoleId").find(".lr-select-placeholder").text(); |
|
|
|
} |
|
|
|
if (!!processId) { |
|
|
|
formData.SProcessId = processId; |
|
|
|