<%@ page language="C#" autoeventwireup="true" inherits="ims.edit, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="edit">
<head runat="server"><title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <script src="js/comm.js"></script>
    <script src="Ckeditor/ckeditor.js"></script>
    <script src="Ckeditor/Ckfinder/ckfinder.js"></script>
    <script src="js/datepicker/WdatePicker.js"></script>
    <script src="js/signature.js"></script>
    <script src="js/edit.js"></script>
</head>
<body class="waiting" onbeforeunload="confirmExit(event);">
    <div class="hide"><div class="loadbar"><div></div><div></div><div></div><div></div><div></div></div></div>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="sm" runat="server" AsyncPostBackTimeout="250" EnablePageMethods="true" OnAsyncPostBackError="AsyncError">
            <CompositeScript Path="js/msajax.js" ScriptMode="Release">
                <Scripts>
                    <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" /><asp:ScriptReference Name="MicrosoftAjax.js" /><asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />
                </Scripts>
            </CompositeScript>
        </asp:ScriptManager>
        <asp:HiddenField runat="server" ID="skipgen" />
        <asp:ValidationSummary ID="ValSum" runat="server" ShowMessageBox="True" ShowSummary="False" />
        <div runat="server" id="custabs" class="ui-tabs noborder mbottom_l" visible="false"></div>
        <table><tr><td runat="server" id="pageTitle"></td><td id="tools" runat="server">
            <label class="forFile">导入Excel<input id="xlsfile" name="xlsfile" type="file" onchange="return ShowPop('importMode_popup');" /></label>&nbsp;
            <asp:LinkButton runat="server" ID="lbFill" CausesValidation="false" OnClick="ShowSelectPop" OnClientClick="curAcTextbox='';" ToolTip="选择一条记录来填充表单" Text="导入"></asp:LinkButton>
        </td></tr></table>
        <asp:UpdatePanel ID="up" runat="server" ChildrenAsTriggers="false" OnPreRender="InitEditArea" RenderMode="Block" UpdateMode="conditional">
        <ContentTemplate>
        <div runat="server" id="editZone" visible="false"></div>
        <div id="editArea" runat="server"></div>
        <div id="fixedArea" runat="server">
            <table class="r">
	            <tr>
		            <td class="h"><i class="f-lockfill lightgreen fb1"></i>保密级别</td>
		            <td class="e"><asp:DropDownList ID="ddlSecLevel" runat="server"></asp:DropDownList><asp:LinkButton runat="server" ID="defSecLevel" CausesValidation="false" OnClientClick="return defalutLevel(event);" OnClick="SetDefault" ToolTip="将当前保密级别设为默认" CssClass="f-check2 setdefault" /></td>
	            </tr>
            </table>
            <table class="r" runat="server" id="rDir">
	            <tr>
		            <td class="h"><i class="f-dir0 yellow fb1"></i>保存目录</td>
		            <td class="e">
	                    <asp:UpdatePanel ID="upDir" runat="server" RenderMode="Inline" UpdateMode="conditional">
                            <ContentTemplate><a id="aDir" runat="server" href="#" title="点击选择目录" CausesValidation="false" onclick="return showDirTree(true);" onserverclick="DirChanged"></a><asp:LinkButton runat="server" ID="defDir" CausesValidation="false" CssClass="f-check2 setdefault" OnClick="SetDefault" ToolTip="将当前指定的保存目录设为默认" /></ContentTemplate>
                            <Triggers><asp:AsyncPostBackTrigger ControlID="defSecLevel" EventName="Click" /></Triggers>
                        </asp:UpdatePanel>
                    </td>
	            </tr>
            </table>
        </div>
        <div runat="server" id="wfArea" visible="false">
        <table class="r" runat="server" id="subject">
	        <tr>
		        <td class="h"><i class="f-zhuti greenish fb1"></i>主题<span class="required">*</span></td>
		        <td class="e"><asp:TextBox runat="server" ID="tbSubject"></asp:TextBox><i onclick="doClean();" title="清除主题" id="cleaner"></i></td>
	        </tr>
        </table>
        <table class="r" runat="server" id="endTime">
	        <tr>
		        <td class="h"><i class="f-rili orange fb1"></i>计划完成时间</td>
		        <td class="e"><asp:TextBox runat="server" ID="tbEndTime" onfocus="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm'});"></asp:TextBox></td>
	        </tr>
        </table>
        <table class="r" runat="server" id="idenArea" visible="false">
	        <tr>
		        <td class="h"><i class="f-user skyblue fb1"></i>我的身份</td>
		        <td class="e"><asp:RadioButtonList runat="server" ID="rblIdens" RepeatLayout="Flow" RepeatDirection="Horizontal"></asp:RadioButtonList></td>
	        </tr>
        </table>
	<asp:UpdatePanel ID="upNext" runat="server" RenderMode="Block" UpdateMode="conditional">
        <ContentTemplate>
            <table class="r" runat="server" id="nextArea" visible="false">
	            <tr>
		            <td class="h"><i class="f-dbarrow skyblue fb1"></i>下一步<span class="required">*</span></td>
		            <td class="e"><asp:RadioButtonList runat="server" ID="rblNext" RepeatLayout="Flow" RepeatDirection="Horizontal"></asp:RadioButtonList><asp:CheckBoxList runat="server" ID="cblNext" RepeatLayout="Flow" RepeatDirection="Horizontal"></asp:CheckBoxList></td>
	            </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
        </div>
        <div id="subs" runat="server" class="mtop_l" visible="false"></div>
        <div runat="server" id="divMent" visible="false"></div>
        <asp:PlaceHolder ID="phHelpers" runat="server"></asp:PlaceHolder>
        </ContentTemplate>
        </asp:UpdatePanel>
        <table><tr><td id="tdAction" runat="server">
            <span class="vmiddle">保存后： </span><asp:CheckBoxList ID="cblAction" RepeatLayout="Flow" RepeatDirection="Horizontal" runat="server">
                <asp:ListItem Value="New" Selected="True">新建</asp:ListItem>
                <asp:ListItem Value="Back">返回</asp:ListItem>
                <asp:ListItem Value="Browse">浏览</asp:ListItem>
            </asp:CheckBoxList>
        </td><td id="showAttr" class="hide2" runat="server">
            <span onclick="toggleAttrs();" class="r2" runat="server" id="toggler"></span>
        </td></tr></table>
        <asp:UpdatePanel ID="upBtns" runat="server" RenderMode="Block" UpdateMode="conditional">
        <ContentTemplate>
        <asp:Button ID="btnSubmit" Visible="false" CausesValidation="false" runat="server" OnClientClick="return doValidate();" Text="提交" ToolTip="快捷键 Ctrl+S" OnClick="Save" CssClass="btn" />
        <asp:Button ID="save" CausesValidation="false" runat="server" OnClientClick="return doValidate();" Text="保存" ToolTip="快捷键 Ctrl+S" OnClick="Save" CssClass="btn" />
        <asp:Button ID="saveas" CausesValidation="false" runat="server" OnClientClick="return doValidate();" Text="另存" ToolTip="将当前编辑的记录另存为一条新的记录" OnClick="Save" CssClass="btn" />
        <input type="button" runat="server" id="btnLayout" title="切换版式" value="版式" onclick="showEleMenu('#btnLayout', '#layouts');" class="btn" />
        <asp:Button ID="toNew" runat="server" CausesValidation="false" OnClientClick="return toExit();" ToolTip="新建一条记录" Text="新建" OnClick="New" CssClass="btn" />
        <input type="button" id="btnBack" onclick="MarkAndBack();" value="返回" class="btn pconly" />
        <span runat="server" id="phoneCtrl" visible="false"><input runat="server" type="button" value="接听" id="telOn" onclick="OffHook();" class="btn sec" /> <input type="button" runat="server" value="挂断" id="telOff" onclick="Disconnect();" class="btn sec" /></span>
        </ContentTemplate>
        </asp:UpdatePanel>
        <div class="lightarea mtop_x" runat="server" id="nearby" visible="false">
            <table><tr><td><asp:HyperLink runat="server" ID="prev" ToolTip="编辑上一条" Visible="false"></asp:HyperLink></td><td class="right"><asp:HyperLink runat="server" ID="next" ToolTip="编辑下一条" Visible="false"></asp:HyperLink></td></tr></table>
        </div>
        <ims:Pop runat="server" ID="ff" OnOkClientClick="return resultSelected(this);" OnClientUpdated="showDetail();" ShowOkButton="false" ShowCancelButton="false" HideOnOkClientClick="false" Width="545">
        <ContentTemplate>
            <fieldset runat="server" id="conditions">
                <legend>选取 <asp:DropDownList runat="server" ID="ddlTemplets" AutoPostBack="true" OnSelectedIndexChanged="ddlTempletsChanged"></asp:DropDownList> <asp:DropDownList runat="server" ID="srcFields" AutoPostBack="true" OnSelectedIndexChanged="GenerateValuesList"></asp:DropDownList></legend>
                <div class="padbox mtop_s" title="设置筛选条件">
                    <div class="liItem"><asp:DropDownList runat="server" ID="ddlFields1" AutoPostBack="true" OnSelectedIndexChanged="ddlFieldsChanged" /> <asp:Label runat="server" ID="l1" /><asp:DropDownList AutoPostBack="true" OnSelectedIndexChanged="GenerateValuesList" runat="server" ID="ddl1" /><asp:RadioButtonList AutoPostBack="true" OnSelectedIndexChanged="GenerateValuesList" runat="server" ID="rbl1" RepeatLayout="Flow" RepeatDirection="Horizontal"><asp:ListItem Value="true" Selected="True">是</asp:ListItem><asp:ListItem Value="false">否</asp:ListItem></asp:RadioButtonList><asp:TextBox runat="server" Width="108" ID="tb1_1" AutoPostBack="true" OnTextChanged="GenerateValuesList" onchange="return keychg(this);" /><span runat="server" id="span1">～<asp:TextBox runat="server" ID="tb2_1" Width="108" CssClass="tb" AutoPostBack="true" OnTextChanged="GenerateValuesList" onchange="return keychg(this);" /></span><asp:LinkButton runat="server" ID="ibAddCond1" ToolTip="添加条件" CommandArgument="cond2" OnClick="AddCond" CausesValidation="false" /></div>
                    <div id="cond2" class="liItem" runat="server" visible="false"><asp:DropDownList runat="server" ID="ddlFields2" AutoPostBack="true" OnSelectedIndexChanged="ddlFieldsChanged" /> <asp:Label runat="server" ID="l2" /><asp:DropDownList AutoPostBack="true" OnSelectedIndexChanged="GenerateValuesList" runat="server" ID="ddl2" /><asp:RadioButtonList AutoPostBack="true" OnSelectedIndexChanged="GenerateValuesList" runat="server" ID="rbl2" RepeatLayout="Flow" RepeatDirection="Horizontal"><asp:ListItem Value="true" Selected="True">是</asp:ListItem><asp:ListItem Value="false">否</asp:ListItem></asp:RadioButtonList><asp:TextBox runat="server" Width="108" ID="tb1_2" AutoPostBack="true" OnTextChanged="GenerateValuesList" onchange="return keychg(this);" /><span runat="server" id="span2">～<asp:TextBox runat="server" ID="tb2_2" Width="108" CssClass="tb" AutoPostBack="true" OnTextChanged="GenerateValuesList" onchange="return keychg(this);" /></span><asp:LinkButton runat="server" ID="ibAddCond2" ToolTip="添加条件" CommandArgument="cond3" OnClick="AddCond" CausesValidation="false" /></div>
                    <div id="cond3" class="liItem" runat="server" visible="false"><asp:DropDownList runat="server" ID="ddlFields3" AutoPostBack="true" OnSelectedIndexChanged="ddlFieldsChanged" /> <asp:Label runat="server" ID="l3" /><asp:DropDownList AutoPostBack="true" OnSelectedIndexChanged="GenerateValuesList" runat="server" ID="ddl3" /><asp:RadioButtonList AutoPostBack="true" OnSelectedIndexChanged="GenerateValuesList" runat="server" ID="rbl3" RepeatLayout="Flow" RepeatDirection="Horizontal"><asp:ListItem Value="true" Selected="True">是</asp:ListItem><asp:ListItem Value="false">否</asp:ListItem></asp:RadioButtonList><asp:TextBox runat="server" Width="108" ID="tb1_3" AutoPostBack="true" OnTextChanged="GenerateValuesList" onchange="return keychg(this);" /><span runat="server" id="span3">～<asp:TextBox runat="server" ID="tb2_3" Width="108" CssClass="tb" AutoPostBack="true" OnTextChanged="GenerateValuesList" onchange="return keychg(this);" /></span></div>
                </div>
            </fieldset>
            <div runat="server" id="valList">
                <table runat="server" id="values" class="hr seprow rowhover"></table>
                <div class="padcenter mtop_n gray" runat="server" id="divMsg"></div>
            </div>
        </ContentTemplate>
        </ims:Pop>
        <ims:Pop runat="server" ID="au" Title="指定处理者/处理时限" Visible="false" OnClientUpdated="assignShown();" OnClientCanel="$('#upBtns').removeClass('hidden');" Width="575" HideOnOkClientClick="false" OnOkClientClick="return preSave();" OnOkClick="SubmitFlow">
            <ContentTemplate>
                <fieldset runat="server" id="exersArea"><legend><asp:DropDownList runat="server" ID="ddlNodes" onfocus="return SaveExecutor();" onchange="initExecutor();"></asp:DropDownList> 处理者：</legend>
                    <div id="modeFull" class="padbox sparse2">
                        <input type="checkbox" id="cbUser" /><label for="cbUser">用户：</label><asp:TextBox runat="server" id="tbUsers" acfid="UserName" chars=";；、,，" ondblclick="showUserTree(this.id);" ToolTip="双击弹出用户选择窗口。多项之间以逗号、分号或顿号分隔" /><br />
                        <input type="checkbox" id="cbRole" /><label for="cbRole">角色：</label><asp:TextBox runat="server" id="tbRoles" acfid="RoleName" chars=";；、,，" ToolTip="多项之间以逗号、分号或顿号分隔" /><br />
                        <input type="checkbox" id="cbUnit" /><label for="cbUnit">机构：</label><asp:TextBox runat="server" id="tbUnits" acfid="UnitNameWithID" chars=";；、,，" ondblclick="showUserTree(this.id,true);" ToolTip="双击弹出机构选择窗口。多项之间以逗号、分号或顿号分隔" />
                        <span id="spanUnits"><input type="checkbox" class="hide" /><input type="checkbox" id="cbRector" value="1" checked="checked" /><label for="cbRector">负责人</label> <input type="checkbox" id="cbDirectly" value="2" /><label for="cbDirectly">直属成员</label> <input type="checkbox" id="cbIndirect" value="4" /><label for="cbIndirect">非直属成员</label></span>
                        <div id="related">
                            <input type="checkbox" id="cbRel" /><select id="ddlRel"><option value="1">交办人的</option><option value="2">发起人的</option></select>： <span id="spanRel"><span><input class="hide" type="checkbox" /></span><input type="checkbox" id="cbSelf" value="1" /><label for="cbSelf">本人</label> <input type="checkbox" id="cbLateral" value="2" /><label for="cbLateral">平级</label> <input type="checkbox" id="cbSuperior" value="4" /><label for="cbSuperior">上级</label> <input type="checkbox" id="cbDirectUnderling" value="8" /><label for="cbDirectUnderling">直接下级</label> <input type="checkbox" id="cbUnderling" value="16" /><label for="cbUnderling">所有下级</label></span>
                            <div runat="server" id="spanLevels"><input type="checkbox" class="hidden" /><input type="checkbox" id="cbLevel" value="32" /><asp:DropDownList runat="server" ID="ddlLevels"></asp:DropDownList><span class="subItems">的： <input type="checkbox" id="cbLevelRector" value="1" checked="checked" class="levelMember" /><label for="cbLevelRector">负责人</label> <input type="checkbox" class="levelMember" id="cbLevelDirectly" value="2" /><label for="cbLevelDirectly">直属成员</label></span><i title="相关说明" onclick="What('Colleague')" class="what hide1"></i></div>
                        </div>
                        <div class="sepline"></div>
                        <div id="exclude" class="mtop_s hide2"><b>排除：</b><span class="inner"><input type="checkbox" id="cbHandover" value="1" /><label for="cbHandover">交办人</label><input type="checkbox" id="cbStarter" value="2" /><label for="cbStarter">发起人</label></span><input type="checkbox" id="cbFixed" value="4" /><label for="cbFixed">指定用户：</label><asp:TextBox runat="server" id="tbNoUsers" acfid="UserName" ToolTip="双击弹出用户选择窗口。多项之间以逗号、分号或顿号分隔" chars=";；、,，" ondblclick="showUserTree(this.id);" /></div>
                    </div>
                    <div id="inUsers" class="hide">用户：<input type="text" id="tbInUsers" title="可输入多个用户，以逗号、分号或顿号分隔" /></div>
                </fieldset>
                <fieldset runat="server" id="timeArea" class="mtop_n"><legend>处理时限</legend>
                    <ul runat="server" id="ulTime" class="dot"></ul>
                </fieldset>
            </ContentTemplate>
        </ims:Pop>
        <ims:Pop runat="server" ID="importMode" ShowCancelButton="false" ShowOkButton="false" Title="导入Excel" Width="350">
            <ContentTemplate>
                <div class="center mtop_l">
                    <input type="button" value="导入数据" title="将Excel中的数据追加进来" class="btn" onclick="xlsUpload(false);HideDialog(this);" />
                    <input type="button" value="更新数据" title="用Excel中的数据更新现有记录" class="btn" onclick="xlsUpload(true);HideDialog(this);" />
                    <input type="button" runat="server" ID="xlsHeader" value="下载Excel表单" title="下载Excel表单，用以录入数据供导入" CausesValidation="false" onserverclick="MakeExcelTemplet" class="btn" />
                </div>
            </ContentTemplate>
        </ims:Pop>
        <asp:Button runat="server" ID="btnAdvac" OnClick="ShowAdvAc" CausesValidation="false" CssClass="hide" />
        <asp:HiddenField runat="server" ID="condvals" />
        <div class="menu" runat="server" id="layouts"></div>
    </form>
</body>
</html>