<%@ page language="C#" autoeventwireup="true" inherits="WebAdmin_ShopLPadd, LebiMall" %>
<!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 id="Head1" runat="server">
    <title>添加店铺价格</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/checked.js"></script>
    <script type="text/javascript" src="../images/js/My97DatePicker/WdatePicker.js"></script>
    <link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>
    <script src="js/topHead.js" type="text/javascript"></script>
    <script type="text/javascript">
        function validate(){
            var flag=true;
            if(document.getElementById("txt_name").value==""){
                document.getElementById("msg_n").innerHTML="<span class='msg_submit'>价格名称不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_n").innerHTML="";
            }
            if(document.getElementById("txt_dmax").value==""){
                document.getElementById("msg_d").innerHTML="<span class='msg_submit'>使用天数不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_d").innerHTML="";
            }
            if(document.getElementById("txt_day").value==""){
                document.getElementById("msg_day").innerHTML="<span class='msg_submit'>产品上架天数不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_day").innerHTML="";
            }
            return flag;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server" onsubmit="return validate()">
      <script>header(1,1,"images/");</script>
   
    <!--面包屑-->
    <div class="blank clearfix"></div>
    
    <!--功能区-->
   <div class="tabmenus mainwidth">
            <ul>
                <li class="current"><a href="ShopLevellist.aspx"><span>店铺类型设置</span></a></li>
                <li><a href="ShopLeveladd.aspx"><span>店铺类型添加</span></a></li>
            </ul>
        </div>
    <div class="tab-mainbody">
        <div class="tab-mainbody2">
        <div class="functionHandleArea clearfix">
                <input id="Button2" type="button"  runat="server" class="btn-app" onserverclick="Button1_ServerClick" />
                <input type="image" name="Submit" title=" 重填 " onClick="reset();return false;" src="images/bt_res.gif" align="absmiddle" />
                <input type="image" border="0" title=" 返回 " onclick="history.back();return false;" src="images/bt_bak.gif" align="absmiddle" />
        </div>
        <div id="datalist">
            <table cellpadding="0" cellspacing="0" width="100%" border="0" id="list">
                <tr>
                    <th style="height: 27px; width: 204px;">添加店铺等级</th><th><span class="title_r" id="msg_sub"></span></th>
                        <script type="text/javascript">
                            var i = 2;
                            var f="<%=returnValue %>";
                            if(f=="true"){
                                document.getElementById("msg_sub").innerHTML="操作成功！";
                                document.getElementById("msg_sub").style.visibility="visible";
                                setInterval("fun()", 1000);
                            }
                            if(f=="false"){
                                document.getElementById("msg_sub").innerHTML="操作失败！";
                                document.getElementById("msg_sub").style.visibility="visible";
                            }
                            function fun() {
                                if (i == 1) {
                                    window.location.href="ShopLPlist.aspx?pid="+<%=pid %>;
                                }
                                i--;
                            }
                        </script>
                </tr>
                <tr class="row">
                    <td  class="row" style="width: 204px">
                        价格名称：
                    </td>
                    <td  class="row">
                        <input type="text" runat="server" id="txt_name" class="input" />&nbsp;<span id="msg_n"></span>
                    </td>
                </tr>
                <tr class="row">
                    <td  class="row" style="width: 204px">
                        使用天数：
                    </td>
                    <td  class="row">
                        <input type="text" runat="server" id="txt_dmax" class="input" onkeyup="value=value.replace(/[^\d]/g,'')"
                            onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />&nbsp;
                            <span id="msg_d"></span>
                    </td>
                </tr>
                <tr class="row">
                    <td  class="row" style="width: 204px">
                        销售价：
                    </td>
                    <td  class="row">
                        <input type="text" runat="server" id="txt_sj" class="input" style="width:50px"  value="0" />
                        <em>元 注意0代表免费</em>
                    </td>
                </tr>
                <tr class="row">
                    <td  class="row" style="width: 204px">
                        优惠价：
                    </td>
                    <td  class="row">
                        <input type="text" runat="server" id="txt_vipj" class="input" style="width:50px" value="0" />
                        <em>元</em>
                    </td>
                </tr>
                <tr class="row">
                    <td  class="row" style="width: 204px">
                        排序：
                    </td>
                    <td  class="row">
                        <input type="text" runat="server" id="txt_sort" class="input" style="width:50px" value="0" onblur="value=value.replace(/[^\d]/g,'')" onkeyup="value=value.replace(/[^\d]/g,'')"
                            onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
                    </td>
                </tr>
                <tr class="row">
                    <td  class="row" style="width: 204px">
                        商品上架天数：
                    </td>
                    <td  class="row">
                        <input type="text" runat="server" id="txt_day" class="input" style="width:50px" value="14" onblur="value=value.replace(/[^\d]/g,'')" onkeyup="value=value.replace(/[^\d]/g,'')"
                            onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />&nbsp;<span id="msg_day"></span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" class="list-foot">
                        <input id="Button1" type="button"  runat="server"  class="btn-app" onserverclick="Button1_ServerClick" />
                    </td>
                </tr>
            </table>
            <script type="text/javascript">tdshowm("list");</script>
            </div>
        </div></div>
    </form>
</body>
</html>
