<%@ page language="C#" autoeventwireup="true" inherits="ims.advSearch, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="advSearch">
<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">
</head>
<body runat="server" id="htmlBody">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="sm" runat="server" 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>
        <div class="headerZone" runat="server" id="divHeader">
            <table><tr><td runat="server" id="header">设置条件</td><td id="tdHelp" class="pconly blue" onclick="return showHelp();">帮助</td></tr></table>
        </div>
        <div class="inlineBlock autoWidth" id="condzone">
        <ul id="conds">
			<li Runat="server" id="Cond1">
			<asp:CheckBox runat="server" ID="cb1" Checked="true" />
                <asp:DropDownList Runat="server" ID="dplFileds1" CssClass="fn"></asp:DropDownList>
			<asp:DropDownList Runat="server" ID="dplOper1"></asp:DropDownList><span id="s1">
			<asp:DropDownList ID="dplYN1" Runat="server" CssClass="hide">
				<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
				<asp:ListItem Value="false">否</asp:ListItem>
			</asp:DropDownList><asp:TextBox ID="tb1_1" Runat="server" CssClass="tb"></asp:TextBox><span
			id="span1" class="hide">～<asp:TextBox id="tb2_1" Runat="server" CssClass="tb"></asp:TextBox></span></span>
                <asp:TextBox runat="server" ID="tb3_1" Width="24" Text="1" CssClass="hide"></asp:TextBox>
                <asp:DropDownList runat="server" ID="d_1" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond2">
				<asp:RadioButtonList Runat="server" ID="rbl1" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb2" />
                <asp:DropDownList Runat="server" ID="dplFileds2" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper2"></asp:DropDownList><span id="s2">
				<asp:DropDownList ID="dplYN2" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_2" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span2" class="hide">～<asp:TextBox id="tb2_2" Runat="server" CssClass="tb"></asp:TextBox></span></span>
                <asp:TextBox runat="server" ID="tb3_2" Width="24" Text="1" CssClass="hide"></asp:TextBox>
                <asp:DropDownList runat="server" ID="d_2" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond3" class="hide">
				<asp:RadioButtonList Runat="server" ID="rbl2" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb3" />
                <asp:DropDownList Runat="server" ID="dplFileds3" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper3"></asp:DropDownList><span id="s3">
				<asp:DropDownList ID="dplYN3" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_3" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span3" class="hide">～<asp:TextBox id="tb2_3" Runat="server" CssClass="tb"></asp:TextBox></span></span>
                <asp:TextBox runat="server" ID="tb3_3" Width="24" Text="1" CssClass="hide"></asp:TextBox>
                <asp:DropDownList runat="server" ID="d_3" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond4" class="hide">
				<asp:RadioButtonList Runat="server" ID="rbl3" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb4" />
                <asp:DropDownList Runat="server" ID="dplFileds4" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper4"></asp:DropDownList><span id="s4">
				<asp:DropDownList ID="dplYN4" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_4" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span4" class="hide">～<asp:TextBox id="tb2_4" Runat="server" CssClass="tb"></asp:TextBox></span></span>
                <asp:TextBox runat="server" ID="tb3_4" Width="24" Text="1" CssClass="hide"></asp:TextBox>
                <asp:DropDownList runat="server" ID="d_4" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond5" class="hide">
				<asp:RadioButtonList Runat="server" ID="rbl4" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb5" />
                <asp:DropDownList Runat="server" ID="dplFileds5" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper5"></asp:DropDownList><span id="s5">
				<asp:DropDownList ID="dplYN5" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_5" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span5" class="hide">～<asp:TextBox id="tb2_5" Runat="server" CssClass="tb"></asp:TextBox></span></span>
                <asp:TextBox runat="server" ID="tb3_5" Width="24" Text="1" CssClass="hide"></asp:TextBox>
                <asp:DropDownList runat="server" ID="d_5" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond6" class="hide">
				<asp:RadioButtonList Runat="server" ID="rbl5" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb6" />
                <asp:DropDownList Runat="server" ID="dplFileds6" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper6"></asp:DropDownList><span id="s6">
				<asp:DropDownList ID="dplYN6" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_6" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span6" class="hide">～<asp:TextBox id="tb2_6" Runat="server" CssClass="tb"></asp:TextBox></span></span>
                <asp:TextBox runat="server" ID="tb3_6" Width="24" Text="1" CssClass="hide"></asp:TextBox>
                <asp:DropDownList runat="server" ID="d_6" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond7" class="hide">
				<asp:RadioButtonList Runat="server" ID="rbl6" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb7" />
                <asp:DropDownList Runat="server" ID="dplFileds7" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper7"></asp:DropDownList><span id="s7">
				<asp:DropDownList ID="dplYN7" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_7" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span7" class="hide">～<asp:TextBox id="tb2_7" Runat="server" CssClass="tb"></asp:TextBox></span></span>
                <asp:TextBox runat="server" ID="tb3_7" Width="24" Text="1" CssClass="hide"></asp:TextBox>
                <asp:DropDownList runat="server" ID="d_7" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
			<li Runat="server" id="Cond8" class="hide">
				<asp:RadioButtonList Runat="server" ID="rbl7" RepeatLayout="Flow" RepeatDirection="Horizontal" CssClass="rblCond"></asp:RadioButtonList>
				<asp:CheckBox runat="server" ID="cb8" />
                <asp:DropDownList Runat="server" ID="dplFileds8" CssClass="fn"></asp:DropDownList>
				<asp:DropDownList Runat="server" ID="dplOper8"></asp:DropDownList><span id="s8">
				<asp:DropDownList ID="dplYN8" Runat="server" CssClass="hide">
					<asp:ListItem Value="true" Selected="True">是</asp:ListItem>
					<asp:ListItem Value="false">否</asp:ListItem>
				</asp:DropDownList><asp:TextBox ID="tb1_8" Runat="server" CssClass="tb"></asp:TextBox><span
				id="span8" class="hide">～<asp:TextBox id="tb2_8" Runat="server" CssClass="tb"></asp:TextBox></span></span>
                <asp:TextBox runat="server" ID="tb3_8" Width="24" Text="1" CssClass="hide"></asp:TextBox>
                <asp:DropDownList runat="server" ID="d_8" CssClass="hide"></asp:DropDownList><span class="topUnit">条记录</span>
			</li>
		</ul>
		<div class="right"><a href="#" onclick="return addCond();" title="添加条件" runat="server" id="addCond" class="f-rr"></a></div>
        </div>
        <asp:UpdatePanel ID="up" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Button ID="btnDoSearch" runat="server" OnClick="doSearch" CssClass="btn" Text="搜索" />
                <asp:Button runat="server" ID="btnSaveTempFilter" OnClick="btnSaveTempFilter_Click" OnClientClick="return preSave();" Text="确定" Visible="false" CssClass="btn" />
                <asp:Button runat="server" ID="btnCanel" OnClientClick="CancelFilter();" Text="取消" Visible="false" CssClass="btn" />
                <asp:Button ID="btnSave" OnClientClick="return showEleMenu('#btnSave', '#menuSave');" runat="server" CssClass="btn" Text="保存…" />
                <asp:Button ID="btnLayout" OnClientClick="return showEleMenu('#btnLayout', '#layouts');" runat="server" CssClass="btn" Text="版式" />
                <input type="button" runat="server" id="btnBack" onclick="back();" value="返回" class="btn pconly" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <div runat="server" id="divPrompt"><a href="#" onclick="What('CondVar');" title="查看关于使用代码的说明"><i class="f-idea fat orange"></i>可在条件中使用代码</a> <asp:DropDownList runat="server" ID="ddlVars" onchange="ddlVarsChanged(this);">
            </asp:DropDownList>：<span id="varName"></span>
            <asp:UpdatePanel runat="server" ID="upSc" UpdateMode="Conditional" RenderMode="Inline"><ContentTemplate><asp:ImageButton runat="server" ID="ibSavesc" OnClick="SaveasShortcut" CssClass="hide" /></ContentTemplate></asp:UpdatePanel>
        </div>
        <div class="menu" id="menuSave" runat="server">
            <a href="#" id="aFilter" onclick="return toSaveFilter();" title="将当前条件设置保存为公共的过滤器">保存为过滤器</a>
            <div></div>
            <a href="#" id="aLayout" onclick="return toSaveLayout();" title="保存为搜索版式，用于表格视图或快搜等">保存为版式</a>
            <div></div>
            <a href="#" id="aSc" onclick="return toPrompt('快捷方式名称：', toSavesc);" title="将条件设置保存为私有的快捷方式">保存为快捷方式</a>
        </div>
        <ims:Pop runat="server" ID="filterAttr" Title="保存过滤器" Width="350" OnOkClick="SaveFilter" OnOkClientClick="return toSave();" OkButtonText="保存" HideOnOkClientClick="false">
        <ContentTemplate>
            <table class="fixedLayout mtop_m">
                <tr><td class="right" style="width:4em">名称：</td><td><asp:TextBox ID="tbFilterName" runat="server" onkeydown="return enterTo(event,'filterAttr_btnOK');" Width="265"></asp:TextBox></td></tr>
                <tr><td></td><td style="padding-top:3px"><asp:CheckBox ID="cbFilterHide" Text="隐藏 (仅供引用)" runat="server" /></td></tr>
            </table>
        </ContentTemplate>
        </ims:Pop>

        <ims:Pop runat="server" ID="addl" OnOkClick="SaveLayout" Width="432" HelpSubject="searchLayout" OkButtonText="保存" OnOkClientClick="return preSaveLayout();" HideOnOkClientClick="false">
            <ContentTemplate>
                <table class="fixedLayout">
                    <tr><td class="center" style="width:5.5em">版式名称：</td><td><asp:TextBox runat="server" ID="tbTitle" Width="160"></asp:TextBox></td></tr>
                    <tr>
                        <td colspan="2">
                            <div class="msgarea mtop_m mbottom_s" id="pmt">以下条件，勾选的将由搜索时指定，其余按当前预设：</div>
                        </td>
                    </tr>
                    <tr><td class="center vtop" id="condKey">占位条件：</td><td class="vtop" id="condList"></td></tr>
                </table>
            </ContentTemplate>
        </ims:Pop>

        <ims:Pop runat="server" ID="manage" Title="版式管理" ShowOkButton="false" HelpSubject="searchLayoutManage" OnClientUpdated="initPoshytip();" CanelButtonText="关闭" Width="420">
            <ContentTemplate>
                <table class="fine" id="lays">
                    <tr><th>版式</th><th style="width:32px">默认</th><th style="width:32px">更名</th><th style="width:32px">删除</th></tr>
                    <asp:PlaceHolder runat="server" ID="phLayouts"></asp:PlaceHolder>
                </table>
                <fieldset class="mtop_n mbottom_s"><legend>默认版式规则</legend>
                    <div class="padbox">
                        <ol runat="server" id="olRules"></ol>
                        <div class="right"><a href="#" id="aAddRule" runat="server" onserverclick="ToAddRule">添加</a></div>
                    </div>
                </fieldset>
                <asp:CheckBox runat="server" ID="cbDisChange" Text="禁止普通用户切换版式" onclick="switchChange();" Visible="false" />
            </ContentTemplate>
        </ims:Pop>
        <ims:Pop runat="server" ID="rule" OnClientUpdated="setTimeout(initRule,0);" OnOkClick="SaveRule" HideOnOkClientClick="false">
            <ContentTemplate>
                <table class="fixedLayout">
                    <tr><td class="ruleKey">指定角色：</td><td><asp:TextBox runat="server" ID="tbRoles" TextMode="MultiLine" Rows="3" Width="97.5%" acfid="RoleName" chars=";；、,，" ToolTip="输入角色名。多项之间以逗号、分号或顿号分隔"></asp:TextBox></td></tr>
                    <tr><td class="ruleKey">默认版式：</td><td><asp:DropDownList runat="server" ID="ddlAll"></asp:DropDownList></td></tr>
                </table>
            </ContentTemplate>
        </ims:Pop>
        <asp:UpdatePanel ID="layouts" runat="server" UpdateMode="conditional" RenderMode="Block" class="menu" />
        <asp:Button runat="server" ID="btnOpera" CssClass="hide" OnClick="OperaLayout" />
    <script src="js/comm.js"></script>
    <script src="js/datepicker/WdatePicker.js"></script>
    <script src="js/advSearch.js"></script>
    </form>
</body>
</html>
