You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
137 lines
6.1 KiB
137 lines
6.1 KiB
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" Inherits="System.Web.Mvc.ViewPage<QMAPP.Web.Models.Sys.UserOrgaizationModel>" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
|
|
组织机构人员信息编辑
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
|
|
<%=Html.QPList() %>
|
|
<table>
|
|
<tr>
|
|
<td align=center colspan="4"><font size="5"><%=Model.OrgaDESC%></font></td>
|
|
</tr>
|
|
<tr>
|
|
<td width="20%" style="border:solid 1px #add9c0;" valign="top">
|
|
<%=Html.QSubMenuTree("OrgaizationTreeData", "/Orgaization/GetTreeData", "/Orgaization/DefaultUserList", "orgaID", "CurrentOrgaID:'" + Model.CurrentOrgaID+"'")%>
|
|
</td>
|
|
<td valign="top" height="400" width="20%" style="border:solid 1px #add9c0;" bgcoler="#E5EEFF;" align=center >
|
|
<span id="defaultUser" ></span>
|
|
</td>
|
|
<td width="8%" align="center">
|
|
<input type="button" name="Submit" value=">" style="WIDTH:45px" onclick="javascript:add()" />
|
|
<br />
|
|
<br />
|
|
<input type="button" name="Submit1" value="<" style="WIDTH:45px" onclick="javascript:remove()" />
|
|
</td>
|
|
<td valign="top" height="400" width="20%" style="border:solid 1px #add9c0;" align=center >
|
|
<span id="optionUser" ></span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<%=Html.QPEnd() %>
|
|
<%=Html.Hidden("CurrentOrgaID",Model.CurrentOrgaID) %>
|
|
<%=Html.Hidden("orgaID")%>
|
|
<script type="text/javascript">
|
|
$(document).ready(function () {
|
|
$("#optionUser").load("/Orgaization/OptionUserList", {
|
|
CurrentOrgaID: document.getElementById("CurrentOrgaID").value
|
|
});
|
|
});
|
|
function add() {
|
|
var ids = "";
|
|
var aryRows = document.getElementById('defaultUserList').tBodies[0].rows;
|
|
for (i = 0; i < aryRows.length; i++) {
|
|
if (aryRows[i].cells[0].getElementsByTagName("input")[0] && aryRows[i].cells[0].getElementsByTagName("input")[0].checked) {
|
|
|
|
ids += aryRows[i].cells[1].innerText.replace(" ", "") + ",";
|
|
|
|
}
|
|
}
|
|
if (ids == "") {
|
|
alert("请选择想要移动的用户!");
|
|
return false;
|
|
}
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/Orgaization/OrgaizationAddUser",
|
|
cache: false,
|
|
data: {
|
|
UserList: ids.substring(0, ids.length - 1),
|
|
CurrentOrgaID: document.getElementById("CurrentOrgaID").value,
|
|
ORGAID: document.getElementById("orgaID").value
|
|
},
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data == "1") {
|
|
alert("添加成功!")
|
|
$("#defaultUser").load("/Orgaization/DefaultUserList", {
|
|
ORGAID: document.getElementById("orgaID").value,
|
|
CurrentOrgaID: document.getElementById("CurrentOrgaID").value
|
|
});
|
|
|
|
$("#optionUser").load("/Orgaization/OptionUserList", {
|
|
ORGAID: document.getElementById("orgaID").value,
|
|
CurrentOrgaID: document.getElementById("CurrentOrgaID").value
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
});
|
|
|
|
}
|
|
function remove() {
|
|
var ids = "";
|
|
|
|
var aryRows = document.getElementById('optionUserList').tBodies[0].rows;
|
|
for (i = 0; i < aryRows.length; i++) {
|
|
if (aryRows[i].cells[0].getElementsByTagName("input")[0] && aryRows[i].cells[0].getElementsByTagName("input")[0].checked) {
|
|
|
|
ids += aryRows[i].cells[1].innerText.replace(" ", "") + ";";
|
|
|
|
}
|
|
}
|
|
if (ids == "") {
|
|
alert("请选择要移除的本机构的用户!");
|
|
return false;
|
|
}
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/Orgaization/OrgaizationDeleteUser",
|
|
cache: false,
|
|
data: {
|
|
UserList: ids.substring(0, ids.length - 1),
|
|
CurrentOrgaID: document.getElementById("CurrentOrgaID").value,
|
|
ORGAID: document.getElementById("orgaID").value
|
|
},
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data == "1") {
|
|
alert("删除成功!")
|
|
$("#defaultUser").load("/Orgaization/DefaultUserList", {
|
|
ORGAID: document.getElementById("orgaID").value,
|
|
CurrentOrgaID: document.getElementById("CurrentOrgaID").value
|
|
});
|
|
|
|
$("#optionUser").load("/Orgaization/OptionUserList", {
|
|
ORGAID: document.getElementById("orgaID").value,
|
|
CurrentOrgaID: document.getElementById("CurrentOrgaID").value
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
|
|
<table width="100%" cellpadding=0 cellspacing=0>
|
|
<tr>
|
|
<td align="center">
|
|
<%=Html.QTButton("close", "OrgaizationList", "parent.closeAppWindow1();return false;", (s, f) => { return true; })%>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</asp:Content>
|
|
|