<%@ 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">
</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="normal noselect" id="main">
            <tbody runat="server" id="tbody"></tbody>
        </table>
        <table class="normal" 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" value="帮助" class="btn pconly" onclick="showHelp();" />
        </ContentTemplate>
        </asp:UpdatePanel>
        <ims:Pop runat="server" ID="scan" OnOkClick="SaveScanset" Title="设置扫码输入" HelpSubject="RowsScan">
            <ContentTemplate>
                扫码输入：<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 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>
        <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>
        <asp:Button runat="server" ID="btnLoad" CssClass="hide" OnClick="LoadOrImport" />
    <script src="js/comm.js"></script><script src="js/rows.js"></script>
    </form>
</body>
</html>