<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Shop_Add.aspx.cs" Inherits="TopWinCMS.WebUI.Admin.Shop.Goods_Add" %>

<%@ Register TagPrefix="ce" Namespace="CuteEditor" Assembly="CuteEditor" %>
<%@ Register TagPrefix="cc1" Namespace="TopWinCMS.WebControls" Assembly="TopWinCMS.WebControls" %>
<!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>
        <%= AutoTitle() %></title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta content="no-cache" http-equiv="Pragma" />

    <script language="javascript" type="text/javascript" src="../TopWin.js"></script>

    <link rel="stylesheet" type="text/css" href="../Style.css" />

    <script language="javascript" type="text/javascript" src="../../Images/skysoft.js"></script>

    <script language="javascript" type="text/javascript" src="Shop_Add.js"></script>

    <style type="text/css">
        .RowStyle
        {
            width: 100px;
            font-weight: bold;
            text-align: right;
        }
        #B, #C, #D, #E
        {
            display: none;
        }
    </style>
    <style type="text/css">
        #dhtmltooltip
        {
            font-size: 9pt;
            border-right: gray 1px solid;
            padding-right: 4px;
            border-top: gray 1px solid;
            padding-left: 4px;
            z-index: 100;
            filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=120);
            visibility: hidden;
            padding-bottom: 4px;
            border-left: gray 1px solid;
            width: 150px;
            padding-top: 4px;
            border-bottom: gray 1px solid;
            position: absolute;
            background-color: #cccccc;
        }
    </style>
</head>
<body>
    <div id='dhtmltooltip'>
        <img src="" /></div>

    <script language="javascript" type="text/javascript" src="../showimg.js"></script>

    <form id="Form1" method="post" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="tabs">
        <ul>
            <li id="current" onclick="return HideAndDisplay(0);"><a href="#"><span>常规属性</span></a></li>
            <% 
                if (tr_PicUrl.Visible == true)
                {
            %>
            <li onclick="return HideAndDisplay(1);"><a href="#"><span>高级属性</span></a></li>
            <% 
                }

                if (this.TB_Brief.Visible == true)
                {
            %>
            <li onclick="return HideAndDisplay(2);"><a href="#"><span>摘要</span></a></li>
            <%
                }
            %>
            <li onclick="return HideAndDisplay(3);" runat="server" id="li_KuoZhanShuXing" visible="false">
                <a href="#"><span>扩展属性</span></a></li>
            <li onclick="return HideAndDisplay(4);"><a href="#"><span>图片</span></a></li>
            <!--
            <li onclick="if( window.confirm('确定转向“批量录入”？')){window.location='Goods_Excel.aspx';}return false;">
                <a href="#"><span>批量录入</span></a></li>
                -->
        </ul>
    </div>
    <div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <table width="100%" border="0" cellpadding="2" cellspacing="1" id="A">
                    <tr runat="server" id="tr_GoodsNum">
                        <td class="RowStyle">
                            编号：
                        </td>
                        <td>
                            <asp:TextBox ID="TB_GoodsNum" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr runat="server" id="tr_BarCode">
                        <td class="RowStyle">
                            条形码：
                        </td>
                        <td>
                            <asp:TextBox ID="TB_BarCode" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="RowStyle">
                            名称：
                        </td>
                        <td>
                            <asp:TextBox ID="TB_GoodsName" runat="server" Width="250px"></asp:TextBox>
                            <font color="#ff0000">*</font>
                            <asp:DropDownList ID="DDL_FontStyle" runat="server">
                                <asp:ListItem Selected="True" Value="">常规</asp:ListItem>
                                <asp:ListItem Value="font-weight:bold;">粗体</asp:ListItem>
                                <asp:ListItem Value="font-style:italic;">斜体</asp:ListItem>
                                <asp:ListItem Value="text-decoration: underline;">下划线</asp:ListItem>
                                <asp:ListItem Value="font-weight:bold;font-style:italic;">粗体+斜体</asp:ListItem>
                                <asp:ListItem Value="font-weight:bold;text-decoration: underline;">粗体+下划线</asp:ListItem>
                                <asp:ListItem Value="font-style:italic;text-decoration: underline;">斜体+下划线</asp:ListItem>
                            </asp:DropDownList>
                            <span style="display: none">
                                <asp:TextBox ID="TB_ColorStyle" runat="server" Width="80px"></asp:TextBox>
                            </span>
                            <img id="imgColorStyle" runat="server" alt="" onclick="ColorPalette();" src="../Images/拾色器.gif"
                                style="cursor: pointer; background-color: #000000; width: 18px; height: 17px;
                                border: 0px;" title="选取颜色" />
                            <asp:Button ID="TB_CheckGoodsName" runat="server" CssClass="btn" OnClick="TB_CheckGoodsName_Click"
                                Text="重名检测" />
                        </td>
                    </tr>
                    <tr runat="server" id="tr_PriceMarket">
                        <td class="RowStyle">
                            市场价格：
                        </td>
                        <td>
                            <cc1:NumericTextBox ID="NTB_PriceMarket" runat="server" Width="250px">0</cc1:NumericTextBox>
                        </td>
                    </tr>
                    <tr runat="server" id="tr_PriceMember">
                        <td class="RowStyle">
                            会员价格：
                        </td>
                        <td>
                            <cc1:NumericTextBox ID="NTB_PriceMember" runat="server" Width="250px">0</cc1:NumericTextBox>
                        </td>
                    </tr>
                    <tr runat="server" id="tr_Unit">
                        <td class="RowStyle">
                            单位：
                        </td>
                        <td>
                            <asp:TextBox ID="TB_Unit" runat="server" Width="70px"></asp:TextBox>
                            <a href="#" onclick="return ToUnit('个')">个</a>
                            
<a href="#" onclick="return ToUnit('瓶')">瓶</a>
<a href="#" onclick="return ToUnit('台')">台</a>
<a href="#" onclick="return ToUnit('箱')">箱</a>
<a href="#" onclick="return ToUnit('套')">套</a>
<a href="#" onclick="return ToUnit('盒')">盒</a>
<a href="#" onclick="return ToUnit('件')">件</a>
<a href="#" onclick="return ToUnit('本')">本</a>
<a href="#" onclick="return ToUnit('部')">部</a>
<a href="#" onclick="return ToUnit('公斤')">公斤</a>
<a href="#" onclick="return ToUnit('斤')">斤</a>
<a href="#" onclick="return ToUnit('克')">克</a>
                        </td>
                    </tr>
                    <tr runat="server" id="tr_Key">
                        <td class="RowStyle">
                            关 键 字：
                        </td>
                        <td>
                            <asp:TextBox ID="TB_Key" runat="server" BackColor="#FFFFC0" ToolTip="该控件可根据输入自动列出相似项"
                                Width="250px"></asp:TextBox>
                            <img src="../../Images/help.gif" alt="" width="16" height="16" title="如果要输入多关键字请用“|”分割" />
                            &nbsp;
                            <input id="BT_GetTag" type="button" onclick="GetTag()" class="btn" value="现有Tags" /><ajaxToolkit:AutoCompleteExtender
                                runat="server" ID="AutoCompleteExtender2" TargetControlID="TB_Key" ServicePath="WS_FindHistTory.asmx"
                                ServiceMethod="GetKeyList" MinimumPrefixLength="2" CompletionInterval="1000"
                                EnableCaching="true" CompletionSetCount="20" DelimiterCharacters=";, :">
                            </ajaxToolkit:AutoCompleteExtender>
                        </td>
                    </tr>
                    <tr runat="server" id="tr_Stocks">
                        <td class="RowStyle">
                            库存：
                        </td>
                        <td>
                            <cc1:NumericTextBox ID="NTB_Stocks" runat="server" Text="1"></cc1:NumericTextBox>
                        </td>
                    </tr>
                    <tr runat="server" id="tr_AlarmNum">
                        <td class="RowStyle">
                            库存下限警告：
                        </td>
                        <td>
                            <cc1:NumericTextBox ID="NTB_AlarmNum" runat="server" Text="0"></cc1:NumericTextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="RowStyle">
                            设置：
                        </td>
                        <td>
                            <asp:CheckBox ID="CB_IncludePic" runat="server" Text='含图' Width="80px" />
                            <asp:CheckBox ID="CB_OnTop" runat="server" Text='置顶' Width="80px" />
                            <asp:CheckBox ID="CB_Elite" runat="server" Text='推荐' Width="80px" />
                            <asp:CheckBox ID="CB_IsSlide" runat="server" Text="幻灯片" Width="80px" />
                            <asp:CheckBox ID="CB_AllowComment" runat="server" Text='允许评论' Checked="True" Width="80px" />
                            <asp:CheckBox ID="CB_Pass" runat="server" Text='审核摘要' Width="80px" />
                            <asp:CheckBox ID="CB_ContentPass" runat="server" Text="审核内容" Width="80px" />
                            <asp:CheckBox ID="CB_IsDraft" runat="server" Text="稿件" Width="80px" Visible="False" />
                        </td>
                    </tr>
                </table>
                <div id="B">
                    <table width="100%" border="0" cellpadding="2" cellspacing="1">
                        <tr runat="server" id="tr_Producer">
                            <td class="RowStyle">
                                品牌：
                            </td>
                            <td>
                                <asp:DropDownList ID="DDL_BrandID" runat="server">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr runat="server" id="tr_Standard">
                            <td class="RowStyle">
                                规格：
                            </td>
                            <td>
                                <asp:TextBox ID="TB_Standard" runat="server" Width="250px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr runat="server" id="tr_Packaging">
                            <td class="RowStyle">
                                包装：
                            </td>
                            <td>
                                <asp:TextBox ID="TB_Packaging" runat="server" Width="250px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr runat="server" id="tr_SpecialID">
                            <td class="RowStyle">
                                专题栏目：
                            </td>
                            <td>
                                <asp:DropDownList ID="DDL_SpecialID" runat="server">
                                    <asp:ListItem Value="0">不属于任何专题</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr runat="server" id="tr_Stars">
                            <td class="RowStyle">
                                评级：
                            </td>
                            <td>
                                <asp:DropDownList ID="DDL_Stars" runat="server">
                                    <asp:ListItem Value="1">★</asp:ListItem>
                                    <asp:ListItem Value="2">★★</asp:ListItem>
                                    <asp:ListItem Value="3" Selected="True">★★★</asp:ListItem>
                                    <asp:ListItem Value="4">★★★★</asp:ListItem>
                                    <asp:ListItem Value="5">★★★★★</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr runat="server" id="tr_Hits">
                            <td class="RowStyle">
                                初始点击数：
                            </td>
                            <td>
                                <cc1:NumericTextBox ID="NTB_Hits" runat="server" Width="85px">0</cc1:NumericTextBox>
                                &nbsp;
                            </td>
                        </tr>
                        <tr runat="server" id="tr_UpDateTime">
                            <td class="RowStyle">
                                更新时间：
                            </td>
                            <td>
                                <asp:TextBox ID="TB_UpDateTime" runat="server" Width="141px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr runat="server" id="tr_TemplateFileName">
                            <td class="RowStyle">
                                网页模板：
                            </td>
                            <td>
                                <asp:TextBox ID="TB_TemplateFileName" runat="server" Width="250px"></asp:TextBox>
                                <input id="Button1" type="button" value="网页模板" onclick='GetTemplate();' class="btn" />
                            </td>
                        </tr>
                        <tr runat="server" id="tr_PresentExp">
                            <td class="RowStyle">
                                购买赠送积分：
                            </td>
                            <td>
                                <cc1:NumericTextBox ID="NTB_PresentExp" runat="server"></cc1:NumericTextBox>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="C">
                    <table width="100%" border="0" cellpadding="2" cellspacing="1">
                        <tr>
                            <td class="RowStyle">
                                摘要：
                                <div style="text-align: left; line-height: 180%; font-weight: normal;">
                                    摘要将用于栏目页的简介里面。如留空系统将自动取内容里面的若干长度的文字。</div>
                            </td>
                            <td style="vertical-align: top;">
                                <asp:TextBox ID="TB_Brief" runat="server" Height="150px" TextMode="MultiLine" Width="98%"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="D">
                    <asp:Table ID="T_DefinedFile" BorderWidth="0" CellPadding="2" CellSpacing="1" runat="server"
                        EnableViewState="true">
                    </asp:Table>
                </div>
                <div id="E">
                    <table>
                        <tr runat="server" id="tr_PicUrl">
                            <td class="RowStyle" valign="top">
                                缩略图地址：
                            </td>
                            <td>
                                <asp:TextBox ID="TB_PicUrl" runat="server" Width="250px"></asp:TextBox>
                                <input id="现有图片" type="button" value="现有图片" onclick='GetImage();' class="btn" style="display: none" /><asp:Button
                                    ID="BT_UpLoad" runat="server" CssClass="btn" Text="本地上传" />&nbsp; &nbsp;
                                <ce:Uploader ID="FileUploader1" OnFileUploaded="FileUploader1_FileUploaded" runat="server"
                                    TempDirectory="~/UpLoadFolder" CancelText="取消" InsertText="上传" FileTypeNotSupportMsg="不允许上传该格式文件"
                                    InsertButtonID="BT_UpLoad" ProgressTextTemplate="%F%.. %P% %SEND%/%SIZE%">
                                    <ProgressPanelStyle Direction="NotSet" HorizontalAlign="NotSet" ScrollBars="None"
                                        Wrap="True"></ProgressPanelStyle>
                                    <CancelButtonStyle CssClass="btn" />
                                    <InsertButtonStyle CssClass="btn" />
                                </ce:Uploader>
                                <hr />
                                <asp:TextBox ID="TB_YC" runat="server" Width="250px"></asp:TextBox>
                                <asp:Button ID="BT_UpLoad0" runat="server" CssClass="btn" OnClick="BT_UpLoad0_Click"
                                    Text="远程抓取" />
                                <hr />
                                缩略图大小：
                                <asp:TextBox ID="TB_PicW" runat="server" Width="60px" Text="240"></asp:TextBox>
                                *
                                <asp:TextBox ID="TB_PicH" runat="server" Width="60px" Text="180"></asp:TextBox>
                                <asp:CheckBox ID="CB_BiLi" runat="server" Checked="True" Text="按比例缩小" />
                                <asp:Label ID="LB_BigPicUrl" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="RowStyle" valign="top">
                                多图：
                            </td>
                            <td>
                                <asp:GridView ID="GV_ShopImgs" runat="server" AutoGenerateColumns="False" Width="90%">
                                    <Columns>
                                        <asp:TemplateField HeaderText="图片">
                                            <ItemTemplate>
                                                <img onmouseover="javascript:ddrivetip('<img src=<%# Eval("PicUrl") %>  />','#ffffff')"
                                                    onmouseout="hideddrivetip()" src="../Images/FileICO/jpg.gif" hasbox="2" alt="" />
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="Title" HeaderText="图片描述" />
                                        <asp:CommandField ShowDeleteButton="True">
                                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                                        </asp:CommandField>
                                    </Columns>
                                    <HeaderStyle CssClass="HeaderStyle" />
                                </asp:GridView>
                                图片描述：<asp:TextBox ID="TB_ShopImgsTitle" runat="server"></asp:TextBox>
                                图片：<asp:TextBox ID="TB_ShopImgsPicUrl" runat="server"></asp:TextBox>
                                &nbsp;<asp:Button ID="BT_ShopImgsAdd" runat="server" CssClass="btn" OnClick="BT_ShopImgsAdd_Click"
                                    Text="添加" /><asp:Button ID="BT_ShopImgs_UP" runat="server" CssClass="btn" Text="本地上传" />
                                &nbsp; &nbsp;
                                <ce:Uploader ID="UL_ShopImgs_Uploader" runat="server" TempDirectory="~/UpLoadFolder/ShopImgs"
                                    CancelText="取消" InsertText="上传" FileTypeNotSupportMsg="不允许上传该格式文件" InsertButtonID="BT_ShopImgs_UP"
                                    ProgressTextTemplate="%F%.. %P% %SEND%/%SIZE%" OnFileUploaded="UL_ShopImgs_Uploader_FileUploaded">
                                    <ProgressPanelStyle Direction="NotSet" HorizontalAlign="NotSet" ScrollBars="None"
                                        Wrap="True"></ProgressPanelStyle>
                                    <CancelButtonStyle CssClass="btn" />
                                    <InsertButtonStyle CssClass="btn" />
                                </ce:Uploader>
                            </td>
                        </tr>
                    </table>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <table width="100%" border="0" cellpadding="2" cellspacing="1" id="t_Content">
        <tr>
            <td class="RowStyle" style="vertical-align: text-top">
                内容：<br />
                <div style="font-weight: normal; text-align: left">
                    <asp:CheckBox ID="CB_DownPic" runat="server" Text="下载站外图片"></asp:CheckBox>
                    <br />
                    <asp:CheckBox ID="CB_DrawWatherMark" runat="server" Text='图片加水印' /></div>
            </td>
            <td>
                <ce:Editor ID="CE_Content" runat="server" ThemeType="Office2003" Height="500px" Width="100%">
                    <FrameStyle Height="100%" BorderWidth="1px" BorderStyle="Solid" BorderColor="#DDDDDD"
                        Width="100%" BackColor="White"></FrameStyle>
                </ce:Editor>
            </td>
        </tr>
    </table>
    <table border="0" cellpadding="2" cellspacing="1">
        <tr>
            <td style="width: 180px">
                &nbsp;
            </td>
            <td>
                <asp:Button ID="BT_Add" runat="server" Text=" 添加 " OnClientClick="return CheckForm();"
                    CssClass="btn" OnClick="BT_Add_Click"></asp:Button>
                <asp:Button ID="BT_Edit" runat="server" Text=" 修改 " OnClientClick="return CheckForm();"
                    CssClass="btn" OnClick="BT_Edit_Click"></asp:Button>
                <img src="../../Images/help.gif" alt="" width="16" height="16" title="如果要进行长分页，那么就选择“代码片断”里的“分页符”。" />
            </td>
        </tr>
        <tr>
            <td colspan="4">
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
