<%@ page language="C#" masterpagefile="~/Admin/MasterPage/Main.master" autoeventwireup="true" inherits="admin_product_AddproInfo, App_Web_sluubwuv" title="无标题页" %>
<%@ Register Src="~/Admin/Controls/CurrTool_Panel.ascx" TagName="CurrTool" TagPrefix="html" %>
<%@ Register Src="~/Admin/Controls/CurrImage_Panel.ascx" TagName="CurrImage" TagPrefix="html" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
  <link rel="stylesheet" href="../../kindeditor/themes/default/default.css" />
  <link rel="stylesheet" href="../../kindeditor/plugins/code/prettify.css" />
  <script type="text/javascript" charset="utf-8" src="../../kindeditor/kindeditor.js"></script>
  <script type="text/javascript" charset="utf-8" src="../../kindeditor/lang/zh_CN.js"></script>
  <script type="text/javascript" charset="utf-8" src="../../kindeditor/plugins/code/prettify.js"></script>
    <script src="../../Js/ajax.js" type="text/javascript"></script>
    <script src="../../Js/returnValue.js" type="text/javascript"></script>
  <script type="text/javascript">

    jQuery(function() {

       jQuery("#trProAtt").click(function() {
           jQuery("#tbodyProAtt").toggle();
       });
//       jQuery("#trUserPrice").click(function() {
//            jQuery("#tbodyUserPrice").toggle();
//       });
    });
    </script>
  <script type="text/javascript">
    function ShowOrHideDiv(checked,targetDiv){
        var _ClientID = "ctl00_ContentPlaceHolder1_";
        targetDiv = _ClientID + targetDiv;
        document.getElementById(targetDiv).style.display = checked ? "block" : "none";
    }
    </script>
  <script type="text/javascript">
        KindEditor.ready(function(K) {
			var editor1 = K.create('#txtproContent', {
				cssPath : '../../kindeditor/plugins/code/prettify.css',
				uploadJson : '../../kindeditor/upload_json.ashx',
				fileManagerJson : '../../kindeditor/file_manager_json.ashx',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
  <div class="divTools">
    <div class="tool-nav">
      <div class="title"> 导航栏</div>
      <asp:HyperLink ID="hy_add" Text="[添加新商品]" runat="server"/>
      <asp:HyperLink ID="hy_list" Text="[商品列表]" runat="server"/>
      <asp:HyperLink ID="hy_Group" Text="[商品类别]" runat="server"/>
    </div>
    <div class="clear"> </div>
    <html:CurrTool ID="CurrTool1" Title="添加新商品" Version="120402" runat="server"/>
    <html:CurrImage ID="CurrImage1" Title="添加新商品" 
            Tips="在这里您可以新增商品信息。" runat="server" />
  </div>
  <div class="clear"> </div>
  <div class="divContent">
      <table width="100%" border="0" cellspacing="1" cellpadding="0" class="content-table">
      <tbody>
        <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="troneId">
          <td width="100"><asp:Literal runat="server" ID="litoneId" Text="类别名称"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtoneId" runat="server" Enabled="false"></asp:TextBox>
            <input type="hidden" id="hidoneId" runat='server' />
            <asp:DropDownList runat="server" ID="DroponeId" DataTextField="oneTitle" DataValueField="Uid" AutoPostBack="true" OnSelectedIndexChanged="DropBrandId_SelectedIndexChanged"></asp:DropDownList>
            <asp:Button ID="AllClass" runat="server" Text="..." OnClick="AllClass_Click" />
            <input type="hidden" id="hidoneId2" runat='server' value="" onpropertychange="GetoneId()" />
            <asp:Button runat="server" ID="butCode" CssClass="Transparent" />
            <script type='text/javascript'>
              function GetoneId()
              {
                var hidoneId2 = document.getElementById("ctl00_ContentPlaceHolder1_hidoneId2");
                var droponeId = document.getElementById("ctl00_ContentPlaceHolder1_DroponeId");
                for (var i = 0; i < droponeId.options.length; i++)
                {
                    if (droponeId.options[i].value == hidoneId2.value)
                    {
                        droponeId.options[i].selected=true;
                    }
                    else
                    {
                        droponeId.options[i].selected=false;
                    }
                }
                JsServer("ctl00_ContentPlaceHolder1_butCode");
              }
            </script>
            </td>
        </tr>
        <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trBrandAtt" visible="false">
                <td width="100"><asp:Literal runat="server" ID="LitBrandAtt" Text="类别属性"></asp:Literal></td>
                <td>
                    <asp:Literal runat="server" ID="lbBrandAtt"></asp:Literal>
                </td>
              </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trStatus">
          <td width="100"><asp:Literal runat="server" ID="litStatus" Text="是否上架"></asp:Literal></td>
          <td>&nbsp;
            <asp:CheckBox runat="server" ID="chkStatus" Text="是" Checked="true" /></td>
        </tr>
      </tbody>
      </table>
    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="content-table" style="margin-top:-1px;">
      <tbody>        
        <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trproTitle">
          <td width="100"><asp:Literal runat="server" ID="litproTitle" Text="标题"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtproTitle" runat="server" MaxLength="100" Width="200px"></asp:TextBox>
            <span class="spanTipsRed">*</span></td>
        </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trsubTitle">
          <td width="100"><asp:Literal runat="server" ID="litsubTitle" Text="产品副标题"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtsubTitle" runat="server" MaxLength="100"></asp:TextBox></td>
        </tr>
        </tbody>
      </table>
      <asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="content-table" style="margin-top:-1px;">
              <tbody >
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trIsGroup">
          <td width="100"><asp:Literal runat="server" ID="litIsGroup" Text="是否组合产品"></asp:Literal></td>
          <td>&nbsp;
            <asp:CheckBox runat="server" ID="chkIsGroup" Text="是" OnCheckedChanged="chkIsGroup_CheckedChanged" AutoPostBack="true" /></td>
        </tr>
                <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)" visible="false" runat="server" id="trGroupId">
                  <td colspan="2" style="padding:10px;">
                    <span class="spanTipsRed">已选中的产品：<asp:Literal runat="server" ID="LitGroupId"></asp:Literal></span><br />
                    <input runat='server' id="hidProUid" type="hidden" />
                    参数:<asp:DropDownList runat="server" ID="DropSeachBrand" DataTextField="BName" DataValueField="UId"></asp:DropDownList>
                    类别:<asp:DropDownList runat="server" ID="DropSeachOneId" DataTextField="oneTitle" DataValueField="Uid"></asp:DropDownList>
                    <asp:TextBox runat="server" ID="txtSeach"></asp:TextBox>
                    <asp:Button runat="server" ID="BtnSeach" Text=" 搜 索 " CssClass="button" OnClick="BtnSeach_Click" />
                    <asp:CheckBoxList runat="server" RepeatColumns="10" RepeatDirection="Horizontal" ID="chkGroupId"
                     DataTextField="proTitle" DataValueField="Uid" AutoPostBack="true" OnSelectedIndexChanged="chkGroupId_SelectedIndexChanged"></asp:CheckBoxList>
                  </td>
                </tr>
              </tbody>
          </table>
              </ContentTemplate> 
              </asp:UpdatePanel> 
          <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
    <table width="100%" border="0" cellspacing="1" cellpadding="0" class="content-table" style="margin-top:-1px;">
          <tbody>
            <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trproImg">
              <td width="100"><asp:Literal runat="server" ID="litproImg" Text="产品图片"></asp:Literal></td>
              <td><asp:label runat="server" ID="lbproImg" Visible="false"></asp:label>
                <asp:Literal runat="server" ID="Img"></asp:Literal>
                <input id="fileproImg" type="file" runat="server" /></td>
            </tr>
            <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trproImgs">
              <td width="100"><asp:Literal runat="server" ID="litproImgs" Text="产品多图片"></asp:Literal></td>
              <td><asp:label runat="server" ID="lbproImgs" Visible="false"></asp:label>
                <asp:Literal runat="server" ID="Imgs"></asp:Literal>
                <span runat="server" id="spanproImgs"></span>
                <asp:Button runat="server" ID="butimgs" Text="+" OnClick="butimgs_Click" />
                <asp:Button runat="server" ID="butimgs2" Text="-" OnClick="butimgs2_Click" /></td>
            </tr>
          </tbody>
          </table> 
              </ContentTemplate> 
              </asp:UpdatePanel> <table width="100%" border="0" cellspacing="1" cellpadding="0" class="content-table" style="margin-top:-1px;">
      <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trSimpContent">
        <td width="100"><asp:Literal runat="server" ID="litSimpContent" Text="产品简介"></asp:Literal></td>
        <td>&nbsp;
          <asp:TextBox ID="txtSimpContent" runat="server" TextMode="MultiLine" Width="300px" Height="50px" MaxLength="250"></asp:TextBox></td>
      </tr>
      
      <tr visible="false" runat="server" id="troldPrice">
      	<td colspan="2" style="padding:0px;">
        <table width="100%" border="0" cellspacing="1" cellpadding="0" class="Child">
              <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                <td width="100"><asp:Literal runat="server" ID="litoldPrice" Text="产品原价"></asp:Literal></td>
                <td>&nbsp;
                  <asp:TextBox ID="txtoldPrice" runat="server" onkeyup="onlyNumAndD(this)"></asp:TextBox>
                  <span class="spanTipsRed">*</span>
                </td>
              </tr>
              <!-- 会员价 start -->
              <tr style="display: none" onmouseover="setbg2(this)" onmouseout="setbg1(this)" id="trUserPrice" title="点击设置会员价">
                <th colspan="2" class="thleft none"> <a href="#trUserPrice">会员价 ▽</a> </th>
              </tr>
              <tbody style="display: none" id="tbodyUserPrice">
                <tr style="background: #F2F2F2;" onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                  <td colspan="2" style="padding:10px;">
                    <asp:Literal runat="server" ID="LitUserPrice"></asp:Literal><br />
                    <span class="spanTipsRed">注：以上为折扣价，如普通会员9折，请输入0.9；如不打折请输入1</span>
                  </td>
                </tr>
              </tbody>
              <!-- 会员价 end -->
            </table></td>
      </tr>
      <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trNowPrice">
        <td width="100"><asp:Literal runat="server" ID="litNowPrice" Text="产品会员价"></asp:Literal></td>
        <td>&nbsp;
          <asp:TextBox ID="txtNowPrice" runat="server" onkeyup="onlyNumAndD(this)"></asp:TextBox></td>
      </tr>
      <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trVipPrice">
        <td width="100"><asp:Literal runat="server" ID="litVipPrice" Text="成本价"></asp:Literal></td>
        <td>&nbsp;
          <asp:TextBox ID="txtVipPrice" runat="server" onkeyup="onlyNumAndD(this)"></asp:TextBox></td>
      </tr>
      <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trIntegral">
        <td width="100"><asp:Literal runat="server" ID="litIntegral" Text="单件赠送积分"></asp:Literal></td>
        <td>&nbsp;
          <asp:TextBox ID="txtIntegral" runat="server" onkeyup="onlyNumAndD(this)"></asp:TextBox>
          <span class="spanTipsRed">注：如<%=litIntegral.Text %>为空，则等于<%=litoldPrice.Text %></span>
        </td>
      </tr>
      <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trnorms">
        <td width="100"><asp:Literal runat="server" ID="litnorms" Text="产品规格"></asp:Literal></td>
        <td>&nbsp;
          <asp:TextBox ID="txtnorms" runat="server"  MaxLength="50"></asp:TextBox></td>
      </tr>
      <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trproPay">
        <td width="100"><asp:Literal runat="server" ID="litproPay" Text="卖出数量"></asp:Literal></td>
        <td>&nbsp;
          <asp:TextBox ID="txtproPay" runat="server" onkeyup="Onlynumber(this)"></asp:TextBox></td>
      </tr>
      <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trsurplus">
        <td width="100"><asp:Literal runat="server" ID="litsurplus" Text="产品剩余量"></asp:Literal></td>
        <td>&nbsp;
          <asp:TextBox ID="txtsurplus" runat="server" onkeyup="Onlynumber(this)"></asp:TextBox></td>
      </tr>
      <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trunit">
        <td width="100"><asp:Literal runat="server" ID="litunit" Text="产品单位"></asp:Literal></td>
        <td>&nbsp;
          <asp:DropDownList runat="server" ID="Dropunit" DataTextField="BaseName"></asp:DropDownList>
          <a href="../base/BaseTable.aspx?Type=09">新增产品单位</a>
          </td>
      </tr>
      <tbody>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trproNo">
          <td width="100"><asp:Literal runat="server" ID="litproNo" Text="产品编号"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtproNo" runat="server" MaxLength="50"></asp:TextBox></td>
        </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trNO">
          <td width="100"><asp:Literal runat="server" ID="litNO" Text="货号"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtNO" runat="server" MaxLength="50"></asp:TextBox></td>
        </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trHits">
          <td width="100"><asp:Literal runat="server" ID="litHits" Text="产品浏览量"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtHits" runat="server" onkeyup="Onlynumber(this)"></asp:TextBox></td>
        </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trspare1">
          <td width="100"><asp:Literal runat="server" ID="litspare1" Text="备用字段1"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtspare1" runat="server" MaxLength="100"></asp:TextBox></td>
        </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trspare2">
          <td width="100"><asp:Literal runat="server" ID="litspare2" Text="备用字段2"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtspare2" runat="server" MaxLength="100"></asp:TextBox></td>
        </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trspare3">
          <td width="100"><asp:Literal runat="server" ID="litspare3" Text="备用字段3"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtspare3" runat="server" MaxLength="100"></asp:TextBox></td>
        </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trspare4">
          <td width="100"><asp:Literal runat="server" ID="litspare4" Text="备用字段4"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtspare4" runat="server" MaxLength="100"></asp:TextBox></td>
        </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trspare5">
          <td width="100"><asp:Literal runat="server" ID="litspare5" Text="备用字段5"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtspare5" runat="server" MaxLength="100"></asp:TextBox></td>
        </tr>
        <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trshow" visible="false">
          <td width="100"><asp:Literal runat="server" ID="litshow" Text="显示的位置"></asp:Literal></td>
          <td>&nbsp;
            <asp:CheckBoxList runat="server" ID="chkshow" RepeatColumns="10" RepeatDirection="Horizontal" DataTextField="BaseName" DataValueField="BaseNo" /></td>
        </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" id="trSort" runat="server">
          <td width="100"><asp:Literal runat="server" ID="litsort" Text="排序"></asp:Literal></td>
          <td>&nbsp;
            <asp:TextBox ID="txtsort" runat="server" onkeyup="Onlynumber(this)" Text="50"></asp:TextBox>
            <span class="spanTipsRed">数值越小越靠前</span></td>
        </tr>
        <tr visible="false" onmouseover="setbg2(this)" onmouseout="setbg1(this)" runat="server" id="trproContent">
          <td width="100"><asp:Literal runat="server" ID="litproContent" Text="内容"></asp:Literal></td>
          <td><asp:Label runat="server" ID="lbproContent" Visible="false"></asp:Label>
            <textarea name="txtproContent" id="txtproContent" style="width: 670px; height: 300px; visibility: hidden;">
            <%=lbproContent.Text %>
           </textarea>
            <span class="spanTipsRed">*</span></td>
        </tr>
        <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
          <td align="center" colspan="2"><asp:Button ID="BtnArchive" Text="存 档" runat="server" CssClass="button" onclick="BtnArchive_Click" />
            <asp:Button ID="BtnLeave" Text="离 开" runat="server" CssClass="button" onclick="BtnLeave_Click" /></td>
        </tr>
      </tbody>
    </table>
  </div>
</asp:Content>
