天津投入产出系统后端
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.
 
 
 
 
 
 

143 lines
5.1 KiB

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" Inherits="System.Web.Mvc.ViewPage<QMAPP.Web.Models.Sys.UserEntrustModel>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
编辑委托授权信息
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<%=Html.QPEdit("委托授权信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%>
<table id="editTable">
<tr>
<th nowrap=nowrap><%=Html.QV(p=>p.ENTRUSTUSERID) %></th>
<td>
<table>
<tr>
<td>
<%=Html.QMyPerceptTextboxFor(p => p.ENTRUSTUSER, p => p.ENTRUSTUSERNAME, "userlist", "SelectEntrustUser", null)%>
</td>
<td>
<%=Html.QReadOnlyTextboxFor(p=>p.ENTRUSTUSERNAME) %>
</td>
</tr>
</table>
<%=Html.HiddenFor(p=>p.ENTRUSTUSERID) %>
</td>
<th nowrap=nowrap><%=Html.QV(p=>p.AGENTUSERID) %></th>
<td>
<table>
<tr>
<td>
<%=Html.QMyPerceptTextboxFor(p => p.AGENTUSER, p => p.AGENTUSERNAME, "userlist", "SelectAgentUser", null)%>
</td>
<td>
<%=Html.QReadOnlyTextboxFor(p=>p.AGENTUSERNAME) %>
</td>
</tr>
</table>
<%=Html.HiddenFor(p => p.AGENTUSERID)%>
</td>
</tr>
<tr>
<th nowrap=nowrap><%=Html.QV(p=>p.STARTTIME) %></th>
<td><%=Html.QC(p=>p.STARTTIME) %></td>
<th><%=Html.QV(p=>p.ENDTIME) %></th>
<td><%=Html.QC(p=>p.ENDTIME) %></td>
</tr>
<tr>
<th><%=Html.QV(p=>p.ENTRUSTREASON) %></th>
<td colspan=3><%=Html.QC(p=>p.ENTRUSTREASON) %></td>
</tr>
<tr>
<td colspan=4>
<div id="tab_set" style="width:520px;height:310px;">
<div title="委托权限" style="padding:5px;" align="left">
<%=Html.QTreeView("TreePowers", "/Entrust/GetTreePowers?userID=" + Model.ENTRUSTUSERID+"&id="+Model.PID)%>
</div>
</div>
</td>
</tr>
</table>
<%=Html.HiddenFor(p=>p.PID) %>
<%=Html.HiddenFor(p=>p.FLGDEL) %>
<%=Html.HiddenFor(p=>p.CREATEUSER) %>
<%=Html.HiddenFor(p=>p.CREATEDATE) %>
<%=Html.HiddenFor(p=>p.UPDATEDATE) %>
<%=Html.Hidden("SelectedPowers")%>
<%=Html.QPEnd() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server">
<table width="100%" cellpadding=0 cellspacing=0>
<tr>
<td>
<%=Html.QTButtonSave("Entrust", "Save", "return Save();")%>
<%=Html.QTButton("close", "Entrust", "close", "parent.closeAppWindow1();return false;", (s, f) => { return true; })%>
</td>
</tr>
</table>
<script type="text/javascript">
$(function () {
$('#tab_set').tabs({
});
});
//选择委托用户
function SelectEntrustUser(data) {
var ops = $('#TreePowers').tree('options');
if (data != null) {
if (data.id == document.getElementById("ENTRUSTUSERID").value)
return;
document.getElementById("ENTRUSTUSERID").value = data.id;
ops.url = "/Entrust/GetTreePowers?userID=" + data.id;
}
else {
if (document.getElementById("ENTRUSTUSERID").value == "")
return;
document.getElementById("ENTRUSTUSERID").value = "";
ops.url = "/Entrust/GetTreePowers";
}
$('#TreePowers').tree('reload');
}
//选择代理用户
function SelectAgentUser(data) {
if (data != null) {
if (data.id == document.getElementById("AGENTUSERID").value)
return;
document.getElementById("AGENTUSERID").value = data.id;
}
else {
if (document.getElementById("AGENTUSERID").value == "")
return;
document.getElementById("AGENTUSERID").value = "";
}
}
//保存
function Save() {
if (isValidate() == false) {
return false;
}
if ($('#STARTTIME').val() == "") {
MSI("提示","起始日期不能为空。");
return false;
}
if ($('#ENDTIME').val() == "") {
MSI("提示", "结束日期不能为空。");
return false;
}
if ($("#STARTTIME").val() != "" && $("#ENDTIME").val() != "") {
var minDays = DateDiff($("#STARTTIME").val(), $("#ENDTIME").val());
if (minDays < 0) {
MSI("提示", "结束时间不能早于开始时间!");
return false;
}
}
document.getElementById("SelectedPowers").value = getTreeIDTreePowers();
submitByButton("Save");
}
</script>
</asp:Content>