<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_DPTodayPromotAdd.aspx.cs" Inherits="TW.UI.Admin.Admin_DPTodayPromotAdd" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
<link href="css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="../js/jquery-1.10.2.min.js"></script>
    <script src="/js/public.js" type="text/javascript"></script>
    <script src="/js/artDialog/artDialog.js?skin=default" type="text/javascript"></script>
    <script src="/js/artDialog/plugins/iframeTools.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            var hidThumb = $("#hidThumb").val();
            if (hidThumb != "") {
                UpReturn(hidThumb, "hidThumb");
            }
            var hidDPMSThumb = $("#hidDPMSThumb").val();
            if (hidDPMSThumb != "") {
                UpReturn(hidDPMSThumb, "hidDPMSThumb");
            }
            var proId = $("#hidProId").val();
            var proTit = $("#hidProTit").val();
            if (proId != "" && proTit != "") {
                $('#<%=mainpara %>').html("<a onclick=\"remv(this);$('#hidProId').val('');$('#hidProTit').val('');\" id=\"pro" + proId + "\" class=\"probtn\">" + proTit + "</a><input type=\"hidden\" name=\"<%=mainpara %>\" value=\"" + proId + "\"/>");
            }
            var rechartype = $("input[name='rdlRecharType']:checked").val();
            if (rechartype == 0) {
                $("#IsRegionServerMFillTr").hide()
            }
            $("input[name='rdlRecharType']").click(function () {
                var rechartype = $("input[name='rdlRecharType']:checked").val();
                if (rechartype == 0) {
                    $("#IsRegionServerMFillTr").hide()
                } else {
                    $("#IsRegionServerMFillTr").show()
                }
            });
        });
        function addsssp() {
            var inhtmlcont = $.trim($('#<%=mainpara %>').html());
            if (inhtmlcont != "") {
                alert("只可添加一个商品");
                return false;
            }
            KyoWin('添加所属商品', '/admin/Admin_ProductList.aspx?act=addcxsssp&inhtml=<%=mainpara %>');
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
<div class="select clearfix">
    <div>
    </div>
    <table class="table2">
        <tr>
		    <th valign="top">所属商品：</th>
            <td>
                <asp:HiddenField ID="hidProId" runat="server" />
                <asp:HiddenField ID="hidProTit" runat="server" />
                <div id="<%=mainpara %>">

                </div>
                <input type="button" id="btn_SelectPro" value="选择"onclick="addsssp();" />
            </td>
        </tr>
        <tr>
		    <th>商品点卡编码：</th>
            <td>
                <asp:TextBox ID="txtGoodsNo" runat="server" Enabled="False"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                Display="Dynamic" ErrorMessage="*" SetFocusOnError="True" 
                ControlToValidate="txtGoodsNo"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
		    <th><asp:Literal ID="litCXOrMSTit" runat="server"></asp:Literal>：</th>
            <td>
                <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                Display="Dynamic" ErrorMessage="*" SetFocusOnError="True" 
                ControlToValidate="txtTitle"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <asp:PlaceHolder ID="phMSRQ" runat="server" Visible="False">
        <tr>
		    <th>秒杀日期：</th>
            <td>
                <asp:TextBox ID="txtSpikeDate" runat="server" CssClass="Wdate" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                Display="Dynamic" ErrorMessage="*" SetFocusOnError="True" 
                ControlToValidate="txtSpikeDate"></asp:RequiredFieldValidator>秒杀日期必须为今日
            </td>
        </tr>
        <tr>
		    <th>首页秒杀缩略图：</th>
            <td>
                建议尺寸：像素 宽x高=230x230<br />
                <asp:HiddenField ID="hidDPMSThumb" runat="server" />
		    	<iframe src="../inc/upload.aspx?dir=image&input=hidDPMSThumb" id="Iframe2" 
                width="200" height="25" scrolling="no" frameborder="0" allowtransparency="true"></iframe>
		    	<span id="hidDPMSThumb_Preview"></span>
            </td>
        </tr>
        </asp:PlaceHolder>
        <tr>
            <th>充值类型：</th>
            <td>
                <asp:RadioButtonList ID="rdlRecharType" runat="server" RepeatDirection="Horizontal" 
                    RepeatLayout="Flow">
                    <asp:ListItem Value="0" Selected="True">卡密</asp:ListItem>
                    <asp:ListItem Value="1">直充</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr id="IsRegionServerMFillTr">
            <th>大区必填：</th>
            <td>
                <asp:CheckBox ID="chkIsRegionServerMFill" runat="server" Text="大区/服务器是否需要显示并必填" />&nbsp;<font color=red>注：直充商品需要</font>
            </td>
        </tr>
        <tr>
		    <th>缩略图：</th>
            <td>
                建议尺寸：像素 宽x高=500x300<br />
                <asp:HiddenField ID="hidThumb" runat="server" />
		    	<iframe src="../inc/upload.aspx?dir=image&input=hidThumb" id="Iframe1" 
                width="200" height="25" scrolling="no" frameborder="0" allowtransparency="true"></iframe>
		    	<span id="hidThumb_Preview"></span>
            </td>
        </tr>
        <tr>
		    <th>点卡面值：</th>
            <td>
                <TW:ReplaceBox ID="txtParVal" runat="server" Width="50" autoComplete="off" ></TW:ReplaceBox>元
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                Display="Dynamic" ErrorMessage="*" SetFocusOnError="True" 
                ControlToValidate="txtParVal"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ErrorMessage="面值必须为整数" Display="Dynamic" SetFocusOnError="True" 
                ControlToValidate="txtParVal" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
		    <th>VIP价：</th>
            <td>
                <TW:ReplaceBox ID="txtVIPPrice" runat="server" ReplaceType="2" Width="50" autoComplete="off" ></TW:ReplaceBox>元
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                Display="Dynamic" ErrorMessage="*" SetFocusOnError="True" 
                ControlToValidate="txtVIPPrice"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
		    <th><asp:Literal ID="litCXOrMSPrcTit" runat="server"></asp:Literal>：</th>
            <td>
                <TW:ReplaceBox ID="txtPTPrice" runat="server" ReplaceType="2" Width="50" autoComplete="off" ></TW:ReplaceBox>元
                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                Display="Dynamic" ErrorMessage="*" SetFocusOnError="True" 
                ControlToValidate="txtPTPrice"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
		    <th>原价：</th>
            <td>
                <TW:ReplaceBox ID="txtOrgPrice" runat="server" ReplaceType="2" Width="50" autoComplete="off" ></TW:ReplaceBox>元
                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                Display="Dynamic" ErrorMessage="*" SetFocusOnError="True" 
                ControlToValidate="txtOrgPrice"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
		    <th>手续费比例：</th>
            <td>
                <TW:ReplaceBox ID="txtFeeProp" runat="server" Width="50" autoComplete="off" ></TW:ReplaceBox>%
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                ErrorMessage="手续费比例必须为0-99" Display="Dynamic" SetFocusOnError="True" 
                ControlToValidate="txtFeeProp" ValidationExpression="^(0|[1-9]\d?)$"></asp:RegularExpressionValidator>
                留空或为0没有手续费
            </td>
        </tr>
        <tr>
		    <th>库存数量：</th>
            <td>
                <TW:ReplaceBox ID="txtStockNum" runat="server" autoComplete="off" ></TW:ReplaceBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                Display="Dynamic" ErrorMessage="*" SetFocusOnError="True" 
                ControlToValidate="txtStockNum"></asp:RequiredFieldValidator>库存为0点卡将不可被购买
            </td>
        </tr>
        <tr>
		    <th>销量：</th>
            <td>
                <asp:Literal ID="litSaleNum" runat="server"></asp:Literal>
            </td>
        </tr>

        <tr>
            <th></th>
            <td class="abtn"><asp:Button ID="btnAdd" runat="server" Text="提交" 
                    onclick="btnAdd_Click" /></td>
        </tr>
    </table>
</div>
    </form>
</body>
</html>
