<%@ page language="C#" autoeventwireup="true" inherits="Zoomla.Website.manage.Shop.ProductManage, App_Web_i0yrs3js" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!DOCTYPE HTML>
<html>
<head id="Head1" runat="server">
<title>商品列表</title>
<link href="../../App_Themes/AdminDefaultTheme/Guide.css" type="text/css" rel="stylesheet" />
<link href="../../App_Themes/AdminDefaultTheme/index.css" type="text/css" rel="stylesheet" />
<link href="../../App_Themes/AdminDefaultTheme/main.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/JS/SelectCheckBox.js"></script>
<script type="text/javascript" src="/JS/Popmenu.js"></script>
<script type="text/javascript" src="../../js/Drag.js"></script>
<script type="text/javascript" src="../../js/Dialog.js"></script>
<script type="text/javascript" src="../../js/jquery.js"></script>
<script type="text/javascript">
    function CheckAll(spanChk)//CheckBox全选
    {
        var oItem = spanChk.children;
        var theBox = (spanChk.type == "checkbox") ? spanChk : spanChk.children.item[0];
        xState = theBox.checked;
        elm = theBox.form.elements;
        for (i = 0; i < elm.length; i++)
            if (elm[i].type == "checkbox" && elm[i].id != theBox.id) {
                if (elm[i].checked != xState)
                    elm[i].click();
            }
    }
    function openurls(url) {
        Dialog.open({ URL: url });
    }
    function open_title(ModelID, NodeID) {
        var diag = new Dialog();
        diag.Width = 800;
        diag.Height = 600;
        diag.Title = "添加" + "[ESC键退出当前操作]";
        diag.URL = "AddProduct.aspx?ModelID=" + ModelID + "&NodeID=" + NodeID;
        diag.show();
    }
    function opentitle(url, title) {
        var diag = new Dialog();
        diag.Width = 800;
        diag.Height = 600;
        diag.Title = title;
        diag.URL = url;
        diag.show();
    }
    function closdlg() {
        Dialog.close();
    }
    function getinfo(id, NodeID, ModelID) {
        location.href = "AddProduct.aspx?menu=edit&ModelID=" + ModelID + "&NodeID=" + NodeID + "&id=" + id + "";
    }
</script>
<style>
#viewtask{float:left;margin-top:5px;display:block; width:16px; height:16px; margin-right:5px;}
</style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="nav_box">
    <div class="r_navigation">
        <span style="float: right; padding-right:10px;">
            <a href="<%=CustomerPageAction.customPath2 %>Content/SchedTask.aspx" title="查看计划任务" id="viewtask"><img src="../../../Images/ModelIcon/taskview.gif" alt="" /></a>
            <a onclick='opentitle("../content/EditNode.aspx?NodeID=<%=this.NodeID %>","配置本节点[ESC键退出当前操作]")' href="javascript:void(0)" title="配置本节点">配置本节点</a>
        </span> 
        <div style="float:left">
        <span>后台管理</span>
        &gt;&gt; <span><a href="ProductManage.aspx">商城管理</a></span> &gt;&gt;
            <asp:Label ID="Label1" runat="server" Text="商品列表"></asp:Label>
            <asp:DropDownList ID="souchtable" runat="server">
                <asp:ListItem Value="0">请选择</asp:ListItem>
                <asp:ListItem Value="1" Selected="True">商品名称</asp:ListItem>
                <asp:ListItem Value="2">商品简介</asp:ListItem>
                <asp:ListItem Value="3">商品介绍</asp:ListItem>
                <asp:ListItem Value="4">厂商</asp:ListItem>
                <asp:ListItem Value="5">品牌/商标</asp:ListItem>
                <asp:ListItem Value="6">条形码</asp:ListItem>
            </asp:DropDownList>
        </div>
        <div style="float:left;margin-left:10px;margin-right:10px;" >
        <table  cellpadding="2" border="0" cellspacing="1" style="background:#fff;" class="l_input"><tr ><td> 
                    <asp:TextBox ID="souchkey" runat="server" BorderColor="#fff" CssClass="l_inpnon" /></td><td>
                    <asp:Button ID="souchok" runat="server" Text="" class="C_sch" OnClick="souchok_Click" />
                  <td></tr></table>
        </div>
        <%=lang.LF("m_ContentManage_Ucity")%>：  
        <select runat="server" id="selprovince" name="selprovince" onchange="javascript:area()"></select>
        <asp:DropDownList ID="selcity" runat="server" AutoPostBack="true" onselectedindexchanged="selcity_SelectedIndexChanged"></asp:DropDownList>
<script type="text/javascript">
    function area() {
        $.ajax({
            type: "POST",
            url: "ProductManage.aspx",
            data: "action=area&value=" + $("#selprovince option:selected").val(),
            success: function (msg) {
                var s = new Array();
                s = msg.split("|");
                var str = "";
                for (var i = 0; i < s.length; i++) {
                    if (s[i] != null && s[i] != "")
                        str += "<option>" + s[i] + "</option>"
                }
                $("#selcity").html(str);
            },
            Error: function (msg) {
                alert("地址获取失败");
            }
        });
    }
</script></div>
    </div>
    <div class="h_30"></div>
    <div class="divline">
        <ul style="cursor:pointer;">
            <li>&nbsp;&nbsp;</li>
            <li><a href="ProductManage.aspx?NodeID=<%=Request.QueryString["NodeID"] %>&quicksouch=1">商品列表</a></li>
            <li><a href="ProductManage.aspx?NodeID=<%=Request.QueryString["NodeID"] %>&flag=Elite">推荐商品</a></li>
            <li><a href="ProductManage.aspx?quicksouch=14">捆绑销售商品</a></li>
            <li><a href="ProductManage.aspx?quicksouch=15">所有礼品</a></li>
            <li><a href="ProductManage.aspx?quicksouch=16">已审核商品</a></li>
            <li><a href="ProductManage.aspx?quicksouch=17">待审核商品</a></li>
            <li><a href="ProGroupManage.aspx?NodeID=<%=Request.QueryString["NodeID"] %>&groupby=1">团购管理</a></li>
            <li><a href="PromotionBalance.aspx">推广管理</a></li>
        </ul>
    </div> 
    <div class="clearbox"></div>
    <table width="100%" cellpadding="2" cellspacing="1" class="border" style="background-color: white;">
        <tbody id="Tabs">
            <tr class="tdbg">
                <td  style="height:24px;" class="tdbgleft" style="width:150px; padding-left: 10px;">
                    <b>商品操作：</b><asp:Label ID="lblAddContent" runat="server" Text=""></asp:Label>
                </td>
               <td class="tdbgleft">
                   <div style=" height: 28px; float: left; padding-top:5px;">
                       <b>请选择排列顺序：</b>
                       <asp:DropDownList ID="txtbyfilde" runat="server"></asp:DropDownList>
                       <asp:DropDownList ID="txtbyOrder" runat="server"></asp:DropDownList>
                   </div>
                   <div style="height: 28px; padding-left:10px;   float: left; padding-top:5px; ">
                       快速查找：
                       <asp:DropDownList ID="quicksouch" runat="server" AutoPostBack="True">
                           <asp:ListItem Value="1">所有商品</asp:ListItem>
                           <asp:ListItem Value="2">正在销售的商品</asp:ListItem>
                           <asp:ListItem Value="3">未销售的商品</asp:ListItem>
                           <asp:ListItem Value="4">正常销售的商品</asp:ListItem>
                           <asp:ListItem Value="5">特价处理的商品</asp:ListItem>
                           <asp:ListItem Value="6">所有热销的商品</asp:ListItem>
                           <asp:ListItem Value="7">所有新品</asp:ListItem>
                           <asp:ListItem Value="8">所有精品商品</asp:ListItem>
                           <asp:ListItem Value="9">有促销活动的商品</asp:ListItem>
                           <asp:ListItem Value="10">实际库存报警的商品</asp:ListItem>
                           <asp:ListItem Value="11">预定库存报警的商品</asp:ListItem>
                           <asp:ListItem Value="12">已售完的商品</asp:ListItem>
                           <asp:ListItem Value="13">所有批发商品</asp:ListItem>
                           <asp:ListItem Value="14">所有捆绑销售商品</asp:ListItem>
                           <asp:ListItem Value="15">所有礼品</asp:ListItem>
                           <asp:ListItem Value="16">已审核商品</asp:ListItem>
                           <asp:ListItem Value="17">待审核商品</asp:ListItem>
                       </asp:DropDownList>
                   </div>
               </td>
            </tr>
        </tbody>
    </table>
    <% if (Request.QueryString["isDivImp"] != null && Request.QueryString["isDivImp"] == "1")
       { %>
    <div id="divImp" class="divline" style="padding-left: 10px; display: block">
        导入商城地址：<asp:FileUpload ID="FileUpload1" runat="server" Height="20px" Width="287px" />
        <asp:Button ID="btImport" runat="server" Text="导 入" OnClick="btImport_Click" />
        <asp:LinkButton ID="lbtnSaveTempter" runat="server" OnClick="lbtnSaveTempter_Click" CausesValidation="true">
            <font style="color:#0E529D;">下载[<%=getNodeName()%>]的<%=this.bmode.GetModelById(ZoomLa.Common.DataConverter.CLng(int.Parse(this.Request.QueryString["ModelID"]))).ItemName %>模型CSV导入模板</font>
        </asp:LinkButton>
            (下载后用EXCEL打开从第二行开始按规范填写并保存即可)
    </div>
    <%} %>
    <table width="100%" cellpadding="2" cellspacing="1" class="border" style="background-color: white;">
        <tbody id="Tabss">
            <tr class="title">
                <td width="3%" height="28" align="center"><asp:CheckBox ID="Checkall" onclick="javascript:CheckAll(this);" runat="server" /></td>
                <td width="3%" align="center"><span>ID</span></td>
                <td width="12%" align="center"><span>商品图片</span></td>
                <td width="17%" align="center"><span>商品名称</span></td>
                <td width="5%" align="center"><span>录入者</span></td>
                <td width="5%" align="center"><span>单位</span></td>
                <td width="5%" align="center"><span>库存</span></td>
                <td width="6%" align="center"><span>价格</span></td>
                <td width="6%" align="center"><span>类型</span></td>
                <td width="5%" align="center"><span>推荐</span></td>
                <td width="6%" align="center"><span>商品属性</span></td>
                <td width="6%" align="center"><span>销售中</span></td>
                <td width="7%" align="center"><span>排序</span></td>
                <td width="12%" align="center"><span>操作</span></td>
            </tr>
            <asp:Repeater ID="Productlist" runat="server">
                <ItemTemplate>
                    <tr class="tdbg" id="<%#Eval("id")%>" onmouseover="this.className='tdbgmouseover'" onmouseout="this.className='tdbg'" ondblclick="getinfo(this.id,<%#Eval("Nodeid") %>,<%#Eval("ModelID") %>)">
                        <td style="height:24px;" align="center">
                            <input name="Item" type="checkbox" value='<%# Eval("id")%>' />
                        </td>
                        <td style="height:24px;" align="center">
                            <%# Eval("id")%>
                        </td>
                        <td style="height:24px;" align="center" title="单击查看详情">
                            <a href="ShowProduct.aspx?menu=edit&ModelID=<%#Eval("ModelID") %>&NodeID=<%#Eval("Nodeid") %>&id=<%#Eval("id")%>"><%#getproimg(DataBinder.Eval(Container,"DataItem.Thumbnails","{0}"))%></a>
                        </td>
                        <td height="17" align="left" title="单击查看详情" style="cursor: pointer">
                            <a href="ShowProduct.aspx?menu=edit&ModelID=<%#Eval("ModelID") %>&NodeID=<%#Eval("Nodeid") %>&id=<%#Eval("id")%>" ondblclick="javascript:localhost.href('ShowProduct.aspx?menu=edit&ModelID={0}&NodeID={1}&id={2}'),<%#Eval("ModelID") %>,<%#Eval("Nodeid") %>,<%#Eval("id")%>"><%#(Eval("Priority", "{0}") == "1") && (Convert.ToInt32(Eval("Propeid","{0}")) > 0) ? "<font color=maroon>[绑]</font>  " : ""%><%#Eval("proname")%></a>
                        </td>
                        <td style="height:24px;" align="center" ><%#Eval("addUser")%></td>
                        <td style="height:24px;" align="center"><%#Eval("ProUnit")%></td>
                        <td style="height:24px;" align="center"><%#Stockshow(DataBinder.Eval(Container,"DataItem.id","{0}"))%></td>
                        <td style="height:24px;" align="center"><%#formatcs(DataBinder.Eval(Container, "DataItem.LinPrice", "{0}"), Eval("ProClass", "{0}"), Eval("PointVal","{0}"))%></td>
                        <td style="height:24px;" align="center"><%#formatnewstype(DataBinder.Eval(Container,"DataItem.ProClass","{0}"),Eval("id","{0}"))%></td>
                        <td style="height:24px;" align="center"><%#Eval("Dengji")%></td>
                        <td style="height:24px;" align="center">
                            <%#forisbest(DataBinder.Eval(Container,"DataItem.isbest","{0}"))%>
                            <%#forishot(DataBinder.Eval(Container,"DataItem.ishot","{0}"))%>
                            <%#forisnew(DataBinder.Eval(Container,"DataItem.isnew","{0}"))%>
                        </td>
                        <td style="height:24px;" align="center"><%#formattype(DataBinder.Eval(Container,"DataItem.Sales","{0}"))%></td>
                        <td align="center">
                            <%-- <a href="MtrlsMrktng.aspx?mmid=<%#Eval("id")%>"  onclick="return confirm('你确定将该商品推广吗？');">商品推广</a> --%>
                            <a href="ProductManage.aspx?menu=UpMove&NodeID=<%#Eval("Nodeid") %>&id=<%#Eval("id")%>">上移</a>
                            <a href="ProductManage.aspx?menu=DownMove&NodeID=<%#Eval("Nodeid") %>&id=<%#Eval("id")%>">下移</a>
                        </td>
                        <td style="height:24px;" align="center">
                            <%#GetStendCon(Eval("Nodeid", "{0}"), Eval("ModelID", "{0}"), Eval("id", "{0}"), Eval("isStand", "{0}"), Eval("UserShopID","{0}"))%>
                            <a href="AddProduct.aspx?menu=edit&ModelID=<%#Eval("ModelID") %>&NodeID=<%#Eval("Nodeid") %>&id=<%#Eval("id")%>">修改</a>
                            <a href="ProductManage.aspx?menu=delete&NodeID=<%#Eval("Nodeid") %>&id=<%#Eval("id")%>" <%#Eval("recycler").ToString()=="False"?" onclick=\"return confirm('不可恢复性删除数据,你确定将该数据删除吗？');\"":"style=\"color:#999999\" onclick=\"return false\"" %>>删除</a>
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
            <tr class="tdbg">
                <td style="height:24px;" colspan="14" align="center" class="tdbgleft">
                    <div style="text-align: center" class="tdbg">
                        <span style="text-align: center">共
                            <asp:Label ID="Allnum" runat="server" Text=""></asp:Label>
                            条数据
                            <asp:Label ID="Toppage" runat="server" Text="" />
                            <asp:Label ID="Nextpage" runat="server" Text="" />
                            <asp:Label ID="Downpage" runat="server" Text="" />
                            <asp:Label ID="Endpage" runat="server" Text="" />
                            页次：
                            <asp:Label ID="Nowpage" runat="server" Text="" />/
                            <asp:Label ID="PageSize" runat="server" Text="" />页
                            <asp:Label ID="pagess" runat="server" Text="" />
                            <asp:TextBox ID="txtPage" runat="server" AutoPostBack="true" class="l_input" Width="22px" OnTextChanged="txtPage_TextChanged"></asp:TextBox>
                            条数据/页 转到第
                            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"></asp:DropDownList>
                            页<asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtPage" ErrorMessage="只能输入数字" Type="Integer" MaximumValue="100000" MinimumValue="0"></asp:RangeValidator>
                        </span>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
    <br />
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td style="height: 21px">
                &nbsp;<asp:Button ID="Button1" runat="server" Text="开始销售" OnClick="Button1_Click" CssClass="C_input" Style="width: 100px;" />
                <asp:Button ID="Button2" runat="server" Text="设为热卖" OnClick="Button2_Click" CssClass="C_input" Style="width: 100px;" />
                <asp:Button ID="Button6" runat="server" Text="设为精品" OnClick="Button6_Click" CssClass="C_input" Style="width: 100px;" />
                <asp:Button ID="Button5" runat="server" Text="设为新品" OnClick="Button5_Click" CssClass="C_input" Style="width: 100px;" />
                <asp:Button ID="Button3" runat="server" Style="width: 100px;" Text="批量删除" CssClass="C_input" OnClick="Button3_Click" OnClientClick="return confirm('不可恢复性删除数据,你确定将该数据删除吗？'); " />
                <asp:Button ID="Button4" runat="server" Text="停止销售" OnClick="Button4_Click" CssClass="C_input" Style="width: 100px;" />
                <br />
                &nbsp;<asp:Button ID="Button7" runat="server" Text="取消热卖" OnClick="Button7_Click" CssClass="C_input" Style="width: 100px;" />
                <asp:Button ID="Button8" runat="server" Text="取消精品" OnClick="Button8_Click" CssClass="C_input" Style="width: 100px;" />
                <asp:Button ID="Button9" runat="server" Text="取消新品" OnClick="Button9_Click" CssClass="C_input" Style="width: 100px;" />
                <asp:Button ID="Button10" runat="server" Text="批量移动" OnClick="btnMove_Click" Style="width: 100px;" UseSubmitBehavior="true" CssClass="C_input" />
                <asp:Button ID="Button11" runat="server" Text="批量审核" UseSubmitBehavior="true" OnClick="Button11_Click" class="C_input" Style="width: 100px;" />
                <asp:Button ID="Button12" runat="server" Text="取消审核" UseSubmitBehavior="true" OnClick="Button12_Click" class="C_input" Style="width: 100px;" />
                <%--<asp:Button ID="MtrlsMrktng" runat="server" class="C_input" Text="商品推广" onclick="MtrlsMrktng_Click"/>--%>
            </td>
        </tr>
        <tr><td>
                <strong>商品属性中的各项含义：</strong><br />
                <span style="color:blue;">精</span>----推荐精品， 
                <span style="color:red;">热</span>----热门商品， 
                <span style="color:green;">新</span>----推荐新品， 
                <span style="color:blue;">图</span>----有商品缩略图， 
                <span style="color:maroon;">绑</span>----捆绑商品销售
            </td></tr>
    </table>
    <asp:HiddenField ID="HiddenField1" runat="server" />
    </form>
</body>
</html>