<%@ Page language="c#" Codebehind="Product.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.Product" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
		<title>Product</title>
	    <!--#include file="../inc/head2.inc"-->
		<script type="text/javascript" src="../../inc/overlib.js"></script>
		<script type="text/javascript" src="../inc/PageBar.js"></script>
		<script type="text/javascript" src="../inc/Product.js"></script>
		<script type="text/javascript" src="../inc/commond.js"></script>
		<script type="text/javascript" src="../inc/ui.datepicker.cn.js"></script>
		<link type="text/css" rel="stylesheet" href="../inc/ui.datepicker.css" />
		<style type="text/css" >
		    .c1{width:4%;}
            .c2{width:18%;}
            .c3{width:8%;margin:0px;padding:0px;}
            .c4{width:8%;margin:0px;padding:0px;}
            .c5{width:10%;}
            .c6{width:5%;}
            .c7{width:4%;}
            .c8{width:7%;margin:0px;padding:0px;}
            .c9{width:4%;}
            .c10{width:4%;}
            .c11{width:4%;}
            .c12{width:4%;}
            .c13{width:4%;}
            .c14{width:6%;}
            .c15{width:10%;}
            .batch
            {
                position:absolute; 
                left:0px; 
                top:13px; 
                width:350px; 
                height:240px; 
                background:#eeeeee; 
                border:1px solid #999999; 
                padding-left:20px;
                padding-right:20px;
                padding-bottom:20px;
                display:none;
            }
		</style>
		<script type="text/javascript" language="javascript">
		    var extend = '<%=config.html %>';
		    var baseUrl="/<%=ShopFolder%>products/product-";
		    var catID = "<%=Request.QueryString["CatID"] %>";
            var CanBatchModifyProduct="<%=CanBatchModifyProduct%>";
            var CanDeleteProduct="<%=CanDeleteProduct%>";
            var CanSortProduct="<%=CanSortProduct%>";
            var CanExportProduct="<%=CanExportProduct%>";
            var CanAuditProduct="<%=CanAuditProduct%>";
            var CanSaleProduct="<%=CanSaleProduct %>";
            var CanModifyProduct="<%=CanModifyProduct%>";		    
		    //是否搜索运营商自已的商品，-2查找所有的商家的商品，-1查找非自营的商品 0查找自营商品 其它值就是查找对应的商家
		    var sid="<%=Request.QueryString["sid"]%>";
		</script>
	</HEAD>
	<body>
		<div id="overDiv" style="Z-INDEX: 1000; VISIBILITY: hidden; POSITION: absolute"></div>
		<iframe id="frmModify" style="width:100%;height:0px;display:none" scrolling="no"></iframe>
		<input type="hidden" id="frmHeight" /><%--记录窗口高度--%>
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="../images/admin_title.jpg" height=9px width=8px align="absmiddle" />商品列表</div>
		<form id="Form1" method="post" runat="server">
		<div class="sub_container_operation">
		    <table width="100%">
		        <tr>
			        <td>
			            <input type="button" id="btnBatch" name="btnBatch" value="批量操作" class="inputbtn" />
				        <input type="button" id="btnDelete" name="btnDelete" value="删除商品" class="inputbtn" />
				        <input type="button" id="btnSavePrice" name="btnSavePrice" value="修改价格" class="inputbtn" style="display:none;" />
				        <input type="button" id="btnSaveSort" name="btnSaveSort" value="修改排序" class="inputbtn" style="display:none;" /><div id="tip" style="float:left;"></div>
				        <input type="button" id="btnReuse" name="btnReuse" value="还原" style="display:none" class="inputbtn" />
						<asp:Button id="btnOutput" OnClick="btnOutput_Click" runat="server" Text="导出勾选商品" CssClass="inputbtn" style="display:none;"></asp:Button>
						<asp:Button id="btnOutputAll" OnClick="btnOutputAll_Click" runat="server" Text="导出筛选商品" CssClass="inputbtn" style="display:none;"></asp:Button>
						<div style="position:relative; width:415px;_width:423px ;width:405px\9;">
			                <div id="Operate" style="position:absolute; left:0px; top:0px; width:100%; background:#eeeeee; border:1px solid #999999; padding:0px;" class="advContent">
			                    <div id="OperateArea" style="display:none; padding-left:10px;">
			                        <br />
			                        <div>
			                            <input type="button" id="btnShelves" name="btnShelves" value="商品批量上架" class="inputbtn" /><input type="radio" id="rbsChecked" name="sframe" value="1" />更新选中的商品<input type="radio" id="rbsSearch" name="sframe" value="2" />更新筛选出来的商品
                                        <a id="operateClose" href="#" style="margin-left:25px;color:Red;">关闭</a><br /><br />
			                            <input type="button" id="btnOutOfStock" name="btnOutOfStock" value="商品批量下架" class="inputbtn" /><input type="radio" id="rbxChecked" name="xframe" value="1" />更新选中的商品<input type="radio" id="rbxSearch" name="xframe" value="2" />更新筛选出来的商品<br /><br />
                                        <div>
                                            <input type="button" id="btnmodifiPrice" name="btnmodifiPrice" value="批量修改价格" class="inputbtn" /><br />
                                            <div id="modifiPrice" class="batch">
                                                <div style="margin-left:320px;">
                                                    <a id="priceClose" href="#" style="color:Red;">关闭</a>
                                                </div> 
                                                <input type="radio" id="rbPriceChecked" name="batch" value="1" />更新选中的商品
                                                <input type="radio" id="rbPriceSearch" name="batch" value="2" />更新筛选出来的商品<br /><br />
			                                    <input type="radio" id="rbmarket" checked="checked" value="1" name="rbpric" />统一修改价格为&nbsp;&nbsp;&nbsp;<input type="text" id="txtPriceAll" /><br /><br />
                                                <input type="radio" id="rbMarketPrice" name="rbpric" value="2" />市场价&nbsp;
                                                <select id="ddlMarketPrice" name="ddlMarketPrice">
                                                    <option value="1">+</option>
                                                    <option value="2">-</option>
                                                    <option value="3">*</option>
                                                    <option value="4">/</option>
                                                </select>
                                                &nbsp;&nbsp;&nbsp;<input type="text" id="txtMarketPrice" name="txtMarketPrice" /><br /><br />
                                                <input type="radio" id="rbMemberPrice" name="rbpric" value="3" />会员价&nbsp;
                                                <select id="ddlMemberPrice" name="ddlMemberPrice">
                                                    <option value="1">+</option>
                                                    <option value="2">-</option>
                                                    <option value="3">*</option>
                                                    <option value="4">/</option>
                                                </select>
                                                &nbsp;&nbsp;&nbsp;<input type="text" id="txtMemberPrice" name="txtMemberPrice" /><br /><br />
                                                <input type="button" id="btnSubmitPrice" name="btnSubmitPrice" value="提 交" style="margin-left:100px;" />
                                            </div>
                                        </div><br />
                                        <div>
                                            <input id="btnModifiName" name="btnModifiName" value="修改商品名称" type="button" class="inputbtn" /><br />
                                            <div id="modifiName" class="batch">
                                                <div style="margin-left:320px;">
                                                    <a id="nameClose" href="#" style="color:Red;">关闭</a>
                                                </div>
                                                <input type="radio" id="rbNameChecked" name="rbProductName" value="1" />更新选中的商品
                                                <input type="radio" id="rbNameSearch" name="rbProductName" value="2" />更新筛选出来的商品<br /><br />
                                                
                                                <input type="radio" id="rdoModifilAll" checked="checked" name="rbprdname" value="1" />全部修改<input type="text" id="txtProductName" name="txtProductName" /><br /><br />
                                                <input type="radio" id="rbPrefix" name="rbprdname" value="2" />添加前缀<input type="text" id="txtPrefix" name="txtPrefix" /><br /><br />
                                                <input type="radio" id="rbSuffix" name="rbprdname" value="3" />添加后缀<input type="text" id="txtSuffix" name="txtSuffix" /><br /><br />
                                                <input type="radio" id="rbNamefind" name="rbprdname" value="4" />查找并替换<br />
                                                查找<input type="text" id="txtNameFind" name="txtNameFind" />替换成<input type="text" id="txtNameReplace" name="txtNameReplace" /><br /><br />
                                                <input type="button" id="btnSubmitName" name="btnSubmitName" value="提 交" style="margin-left:100px;" />
                                            </div>
                                        </div><br />
                                        <div>
                                            <input type="button" id="btnModifiWeight" name="btnModefiWeight" value="修改商品重量" class="inputbtn" /><br />
                                            <div id="modifiWeight" class="batch">
                                                <div style="margin-left:320px;">
                                                    <a id="weightClose" href="#" style="color:Red;">关闭</a>
                                                </div>
                                                <input type="radio" id="rbWeightChecked" name="batchWeight" value="1" />更新选中的商品
                                                <input type="radio" id="rbWeightSearch" name="batchWeight" value="2" />更新筛选出来的商品<br /><br />
                                                
			                                    <input type="radio" id="rbWeightAll" checked="checked" name="rbweight" value="1" />统一修改为&nbsp;&nbsp;&nbsp;<input type="text" id="txtAllWeight" name="txtAllWeight" /><br /><br />
                                                <input type="radio" id="rbWeightFormula" name="rbweight" value="2" />公式调重量<br />
                                                调整后重量=当前重量
                                                <select id="ddlWeight" name="ddlWeight">
                                                    <option value="1">+</option>
                                                    <option value="2">-</option>
                                                    <option value="3">*</option>
                                                    <option value="4">/</option>
                                                </select>&nbsp;&nbsp;&nbsp;<input type="text" id="txtWeight" name="txtWeight" /><br /><br />
                                                <input type="button" id="btnSubmitWeight" name="btnSubmitWeight" value="提 交" style="margin-left:100px;" />
                                            </div>
                                        </div><br />
                                        <div>
                                            <input type="button" id="btnModifiBrand" name="btnModefiBrand" value="修改商品品牌" class="inputbtn" /><br />
                                            <div id="modifiBrand" class="batch">
                                                <div style="margin-left:320px;">
                                                    <a id="brandClose" href="#" style="color:Red;">关闭</a>
                                                </div>
                                                <input type="radio" id="rbBranChecked" name="batchBrand" value="1" />更新选中的商品
                                                <input type="radio" id="rbBrandSearch" name="batchBrand" value="2" />更新筛选出来的商品<br /><br />
                                                
                                                全部改为<asp:DropDownList ID="ddlBrand" runat="server">
                                                </asp:DropDownList>&nbsp;品牌<br /><br />
                                                <input type="button" id="btnSubmitBrand" name="btnSubmitBrand" value="提 交" style="margin-left:100px;" />
                                            </div>
                                        </div><br />
                                        <div>
                                            <input type="button" id="btnModifiDesc" name="btnModefiDesc" value="修改商品简介" class="inputbtn" /><br />
                                            <div id="modifiDesc" class="batch">
                                                <div style="margin-left:320px;">
                                                    <a id="descClose" href="#" style="color:Red;">关闭</a>
                                                </div>
                                                <input type="radio" id="rbDescChecked" name="batDesc" value="1" />更新选中的商品
                                                <input type="radio" id="rbDescSearch" name="batDesc" value="2" />更新筛选出来的商品<br /><br />
			                                    
			                                    <input type="radio" id="rbDescAll" name="rbprddesc" checked="checked" value="1" />全部修改&nbsp;&nbsp;&nbsp;<input type="text" id="txtDescAll" name="txtDescAll" /><br />
			                                    <input type="radio" id="rbDescFront" name="rbprddesc" value="2" />添加前缀&nbsp;&nbsp;&nbsp;<input type="text" id="txtDescPrefix" name="txtDescPrefix" /><br />
			                                    <input type="radio" id="rbDescBehind" name="rbprddesc" value="3" />添加后缀&nbsp;&nbsp;&nbsp;<input type="text" id="txtDescSuffix" name="txtDescSuffix" /><br />
			                                    <input type="radio" id="rbDescFind" name="rbprddesc" value="4" />查找并替换&nbsp;&nbsp;&nbsp;<br />
                                                查找<input type="text" id="txtDescFind" name="txtDescFind" />替换<input type="text" id="txtDescReplace" name="txtDescReplace" />
                                                <input type="button" id="btnSubmitDesc" name="btnSubmitDesc" value="提 交" style="margin-left:100px;" />
                                            </div>
                                        </div>
                                    </div>
			                    </div>
			                </div>
			            </div>
			        </td>
			        <td align="left" style="vertical-align:top;">
				        <div style="position:relative; width:365px;_width:373px ;width:355px\9;">
				            <div id="advContent" class="advContent">
				                <div id="searchDetails" style="display:none;">
				                    <div>
				                        <table>
				                            <tr>
				                                <td>商品类别</td>
				                                <td>品牌</td>
				                                <td>标签</td>
				                            </tr>
				                            <tr>
				                                <td>
				                                    <select id="sel_category" name="sel_category" size="10" multiple="multiple" class="searchvalue"><%=BindCategories() %></select>
				                                </td>
				                                <td>
				                                    <select id="sel_brand" name="sel_brand" size="10" multiple="multiple"><%=BindBrand("0")%></select>
				                                </td>
				                                <td>
				                                    <select id="sel_tag" name="sel_tag" size="10" multiple="multiple" class="searchvalue">
                                                        <option value="0">所有标签</option>
                                                        <option value="1">特价专区</option>
                                                        <option value="2">热卖商品</option>
                                                        <option value="3">特别推荐</option>
                                                        <option value="4">清仓商品</option>
                                                        <option value="5">疯狂抢购</option>
                                                        <option value="6">新品上架</option>
                                                    </select>
				                                </td>
				                            </tr>
				                        </table>
                                    </div>
                                    <div>价格区间：<input type="text" id="txtLowPrice" name="txtLowPrice" size="10" class="searchvalue" />≤商品价格≤<input type="text" id="txtHighPrice" name="txtHighPrice" size="10" class="searchvalue" /></div>
                                    <div>库存区间：<input type="text" id="txtLowStorage" name="txtLowStorage" size="10" class="searchvalue" />≤商品库存≤<input type="text" id="txtHighStorage" name="txtHighStorage" size="10" class="searchvalue" /></div>
                                    <div>添加时间：<input type="text" id="txtLowDate" name="txtLowDate" size="10" class="searchvalue" />≤添加时间≤<input type="text" id="txtHighDate" name="txtHighDate" size="10" class="searchvalue" /></div>
                                    <div>发布状态：<input type="radio" name="rdIsForSale" value="-1" checked="checked" class="searchvalue" />不限制<input type="radio" name="rdIsForSale" value="1" class="searchvalue" />发布<input type="radio" name="rdIsForSale" value="0" class="searchvalue" />未发布</div>
                                    <div>审核状态：<input type="radio" name="rdStatus" value="-2" checked="checked" class="searchvalue" />不限制<input type="radio" name="rdStatus" value="1" class="searchvalue" />审核<input type="radio" name="rdStatus" value="0" class="searchvalue" />未审核<input type="radio" name="rdStatus" value="-1" class="searchvalue" />审核未通过</div>
				                </div>
				                <div class="clear">
				                    <select id="sel_searchType" name="sel_searchType" class="searchvalue">
				                        <option value="0">搜索内容</option>
                                        <option value="2">商品名称</option>
                                        <option value="1">商品编号</option>
                                        <option value="3">商品关键词</option>
                                        <option value="4">商家编号</option>
                                        <option value="5">商家名称</option>
				                    </select>
				                    <input type="text" id="txtKeyword" name="txtKeyword" class="searchvalue" />
				                    <input type="button" id="btnSearch" name="btnSearch" value="搜索" class="inputbtn" />
				                    <input type="button" id="btnSearchAdv" value="高级搜索" class="inputbtn"/>    
				                </div>
				            </div>
				        </div>
				    </td>
		        </tr>
		    </table>
		</div>
		<div class="sub_container_listhead" style="padding:0px;">
            <table cellSpacing="0" cellPadding="0" class="llist">
                <tr id="listhead"><%--id="listhead不能少"--%>
	                <th class="c1"><input type="checkbox" id="chkAll" name="chkAll" /></th>
	                <th class="c2">商品名称</th>
	                <th class="c7 ThumbnailImg">缩图</th>
	                <th class="c3">市场价格</th>
	                <th class="c4">会员价格</th>
	                <th class="c5">商品代码</th>
	                <th class="c6">库存量</th>
	                <th class="c8">排序</th>
	                <th class="c15 Status">审核</th>
	                <th class="c9 IsForSale">发布</th>
	                <th class="c13 Modify">修改</th>
	                <th class="c14">删除</th>	                
	            </tr>
            </table>           
        </div>
		<div class="sub_container_content" style="padding:0px;">
			<table id="datas" cellSpacing="0" cellPadding="0" class="llist">
				<tr id="template" style="display:none;"><%--id="template"不能少--%>
					<td class="c1 ccenter" id="checkbox"></td>
					<td class="c2" id="Name"></td>
					<td class="c7 ccenter" id="ThumbnailImg"></td>
					<td class="c3 ccenter" id="MarketPrice"><input type="text" class="inputstyle" size="9" maxlength="10"  disabled=disabled/></td>
					<td class="c4 ccenter" id="MemberPrice"><input type="text" class="inputstyle" size="9" maxlength="10"  disabled=disabled /></td>
					<td class="c5" id="ProductNo"></td>
					<td class="c6" id="Storage"></td>
					<td class="c8 ccenter" id="Sort"><input type="text" class="inputstyle" size="9" maxlength="10"/></td>
					<td class="c15 ccenter" id="Status"><select class="sedit" style="cursor:pointer;"><option value="0">未审核</option><option value="1">已审核</option><option value="-1">审核未通过</option></select></td>
					<td class="c9 ccenter" id="IsForSale"></td>
					<td class="c13 ccenter" id="Modify"></td>
					<td class="c14 ccenter" id="Delete"></td>
				</tr>
			</table>
		</div>
		<div class="sub_container_page" id="pageDataList1_Pager">
	        <!-- 翻页-->
	        <!-- 翻页结束-->
		</div>
		</form>
		</div>
		</div>
	</body>
</HTML>
