<%@ page language="C#" autoeventwireup="true" inherits="ims.rows, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="rows">
<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 class="waiting" onbeforeunload="confirmExit(event);" runat="server" id="body">
    <div class="hide"><div class="loadbar"><div></div><div></div><div></div><div></div><div></div></div></div>
    <div runat="server" id="loadLink" class="center mtop_m gray" visible="false"></div>
    <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>
        <asp:HiddenField runat="server" ID="keyValue" />
        <div runat="server" id="tname"></div>
        <table class="fine noselect" id="main">
            <tbody runat="server" id="tbody"></tbody>
        </table>
        <table class="fine" id="helper" runat="server">
            <tr>
                <td id="tdNew" onclick="addRow(1);" oncontextmenu="return showToolMenu(event);" title="单击添加新行，右键弹出菜单"></td>
                <td id="tdGet" runat="server" title="选取/导入"></td>
                <td id="tdScan" class="hide">
                    <div class="middle" id="scanArea">
                        <span id="switcher"> </span>
                        <input type="text" id="tbScan" autocomplete="off" /><div id="scanTotal"><i>总计：</i><i id="total">0</i><i id="priceUnit">元</i></div>
                    </div>
                </td>
            </tr>
        </table>
        <div runat="server" id="divMore" class="center mtop_s mbottom_s" visible="false"></div>
        <asp:UpdatePanel ID="upBtns" runat="server" RenderMode="Block" UpdateMode="conditional">
        <ContentTemplate>
            <asp:Button ID="btnSave" runat="server" OnClientClick="return toSave(this);" Text="保存" OnClick="Save" ToolTip="快捷键：Ctrl+S" CssClass="btn" />
            <asp:Button ID="btnSave_Back" runat="server" OnClientClick="return toSave(this);" Text="保存并返回" OnClick="Save" CssClass="btn" />
            <asp:Button ID="btnSave_New" runat="server" OnClientClick="return toSave(this);" Text="保存并继续" OnClick="Save" CssClass="btn pconly" />
            <input type="button" runat="server" id="btnLayout" value="版式" onclick="showEleMenu('#btnLayout','#layouts');" class="btn" />
            <input type="button" onclick="MarkAndBack();" value="返回" class="btn pconly" />
        </ContentTemplate>
        </asp:UpdatePanel>
        <ims:Pop runat="server" ID="scan" OnOkClick="SaveScanset" Title="设置扫码输入" HelpSubject="RowsScan">
            <ContentTemplate>
                <div class="sparse2 ml_m">
                扫码输入：<asp:DropDownList runat="server" ID="ddlScan"></asp:DropDownList><br />
                数量字段：<asp:DropDownList runat="server" ID="ddlCount"></asp:DropDownList><br />
                单价字段：<asp:DropDownList runat="server" ID="ddlPrice"></asp:DropDownList><br />
                系数字段：<asp:DropDownList runat="server" ID="ddlCoeff"></asp:DropDownList><i title="说明" onclick="What('coeff')" class="what"></i>
                </div>
                <div class="sepline"></div>
                <asp:CheckBox runat="server" id="cbDefault" Text="默认启用扫码输入" />
            </ContentTemplate>
        </ims:Pop>
        <ims:Pop runat="server" ID="p" Visible="false" Title="选择要显示的列" CustomCss="withline" Width="430" OnOkClick="SaveCols" HideOnOkClientClick="false">
        <ContentTemplate>
            <asp:CheckBoxList ID="fs" runat="server" RepeatLayout="Table" RepeatColumns="2" RepeatDirection="Horizontal"></asp:CheckBoxList>
        </ContentTemplate>
        </ims:Pop>
        <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>
        <div class="menu" id="tools" runat="server">
            <a id="aPaste" href="#" onclick="return pasteAsNew();">粘贴</a>
            <div></div>
            <a href="#" onclick="return addRow(3);">添加 3 行</a>
            <a href="#" onclick="return addRow(10);">添加10行</a>
            <a href="#" onclick="return addRow(50);">添加50行</a>
        </div>
        <div class="menu" id="rowMenu">
            <a id="aCopy" href="#" onclick="return setSource('copy');">复制</a>
            <a id="aCut" runat="server" href="#" onclick="return setSource('cut');">剪切</a>
            <a id="aDel" runat="server" class="delete" href="#" onclick="return del();">删除</a>
            <a id="aClear" href="#" onclick="return clearData();">清空</a>
            <div id="sep"></div>
            <a id="aClone" href="#" onclick="return pasteRows(false);">粘贴</a>
            <a id="aInsert" runat="server" href="#" onclick="return pasteRows(true);">插入到此处</a>
        </div>
        <div class="menu" id="genMenu" runat="server">
            <label class="f-xls">导入Excel<input id="xlsToUpload" runat="server" multiple="multiple" type="file" name="xlsToUpload" onchange="xlsUpload()" /></label>
            <asp:PlaceHolder runat="server" ID="phGen"></asp:PlaceHolder>
        </div>
        <div class="menu" id="layouts" runat="server"></div>
        <asp:UpdatePanel ID="upLoad" runat="server" UpdateMode="conditional" class="hide">
        <ContentTemplate>
            <table>
                <tbody runat="server" id="tbody1"></tbody>
            </table>
        </ContentTemplate>
        </asp:UpdatePanel>
        <div id="filler" title="拖动填充。数字值按住Ctrl填充序列"></div>
        <asp:HiddenField runat="server" ID="condvals" />
        <asp:Button runat="server" ID="btnAdvac" OnClick="ShowAdvAc" CausesValidation="false" CssClass="hide" />
        <asp:Button runat="server" ID="btnLoad" CssClass="hide" OnClick="LoadOrImport" />
        <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/rows.js"></script>
    </form>
</body>
</html>