<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductStatisticsDetail.aspx.cs" Inherits="XpShop.Supplier.ProductStatisticsDetail" %>
<%@ Register TagPrefix="dcwc" Namespace="Dundas.Charting.WebControl" Assembly="DundasWebChart" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="SupplierMenu" Src="Modules/SupplierMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.ascx" %>
<!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>
		<!--#include file="inc/head.inc"-->
		<title>商家中心 <%=config.SiteTitle%></title>
        <script type="text/javascript" src="inc/commond.js"></script>
		<script src="inc/ui.datepicker.cn.js" type="text/javascript"></script>
		<link type="text/css" rel="stylesheet" href="style/ui.datepicker.css" />
		<script type="text/javascript">
            $(document).ready(function() {
                $("#txtStartTime").datepicker().click(function(){$(this).blur()});
                $("#txtEndTime").datepicker().click(function(){$(this).blur()});
                
 
                
                  //查询时，判断查询条件格式是否正确
                  $("#btnSearch").click(function(){
                    var st_time =$("#txtStartTime").val();
                    var ed_time =$("#txtEndTime").val();
                    var lt_time ="<%= Request.QueryString["lastTime"]%>";
                    var date_error='';
                    if(ed_time!='' && st_time>ed_time){
                      date_error='时间区间的开始时间大于结束时间';
                      $("#date_error").css("display","block");
                      $("#date_error").html(date_error);
                      return false;        
                    }
                    if(st_time!=''&&st_time<lt_time){
                        date_error='时间区间的开始时间不小于'+lt_time;
                      $("#date_error").css("display","block");
                      $("#date_error").html(date_error);
                      return false;
                    }
                    if(st_time==''||ed_time==''){
                      date_error='开始时间与结束时间必填!';
                      $("#date_error").css("display","block");
                      $("#date_error").html(date_error);
                      return false;
                    }
                  });
                  
                  $('#txtStartTime').focus(function(){
                    $("#date_error").empty();
                    $("#date_error").hide();
                  });
                  $('#txtEndTime').focus(function(){
                    $("#date_error").empty();
                    $("#date_error").hide();
                  });

                
   	            //给跳转按钮绑定onclick事件
	            $("#go").bind("click",function(){
		            var pageNum = $("#gopage").val();
		            var totalpage =  parseInt($("#totalpage").text());
		            if(pageNum.replace(new RegExp("(^[\\s]*)|([\\s]*$)", "g"), "") != "" ){
                        if(pageNum != "0"& !isNaN(parseInt(pageNum,10))){
                            if(pageNum > totalpage){
                                alert("输入的数字大于总页数");
                                $("#gopage").attr("value","");
                                return false;
                            }
                        }
                        else{  
                            alert("输入错误！");
                            $("#gopage").attr("value","");
                            return false;
                        }
                    }
                    else{
                        alert("请输入要跳转到的页面");
                        $("#gopage").attr("value","");
                        return false;
                    }
	            });
            });        
        </script>
	</head>
	<body>

			<uc1:Header id="Header1" runat="server"></uc1:Header>
			 <!--位置导航开始-->
			 <div class="path"><a href="<%=webSite %>supplier/default.<%=config.html%>">商家桌面</a> > 统计报表 > 商品统计</div>
			<!--位置导航结束-->
			<div class="xp-w clear">
				<div class="content-left">
					<!--会员中心导航开始-->
					<uc1:SupplierMenu id="SupplierMenu1" runat="server"></uc1:SupplierMenu>
					<!--会员中心导航结束-->
				</div>
				<div class="content-middle">	
                    <div class="rframe">
                        <div class="tm">商品统计</div>
                        <div class="mm clear">
                            <form id="Form1" method="post" runat="server" >
						        <div>商品基本信息：</div>
						        <div>
                                    <table>
                                        <tr>
	                                        <td width="100px" class="right">商品ID：</td>
	                                        <td>
                                            </td>
	                                        <td width="100px" class="right">店内分类：</td>
	                                        <td >
                                            </td> 
                                        </tr>
                                        <tr>
	                                        <td width="100px" class="right">商品名称：</td>
	                                        <td colspan=3>
                                            
                                            </td> 
                                        </tr>
                                        <tr>
	                                        <td width="100px" class="right">市场价：</td>
	                                        <td>
                                            </td>
	                                        <td width="100px" class="right">会员价：</td>
	                                        <td >
                                            </td> 
                                        </tr>
                                    </table>
       						    </div>
                                
                                <hr class="itemhr" />
                                
                                <div>商品详情：</div>
						        <div>
                                    <table>
                                        <tr>
	                                        <td width="100px" class="right">时间区间</td>
	                                        <td>
	                                            <asp:TextBox ID=txtStartTime runat=server></asp:TextBox>-<asp:TextBox ID=txtEndTime runat=server></asp:TextBox>（最近3个月以内）
                                            </td>
	                                        <td>
                                                <asp:Button  id="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" ></asp:Button>
                                            </td> 
                                            <td><span style="display: none;color:Red" class="red" id="date_error"></span></td>
                                        </tr>

                                    </table>
       						    </div>
           						
                                <hr class="itemhr" />
                                <div style="clear:right"></div>
                                <div class="frame">
		                            <div class="frame_title">统计图表</div>
		                            <div class="frame_content">
		                                <table class="tableBorder" cellSpacing="0" cellPadding="0" width="95%" align="center" border="0">
				                            <tr>
					                            <td class="forumRowHighlight" align="center" colSpan="2" height="23">
					                                <DCWC:CHART id="Chart1" runat="server" Width="700px" ImageType="Png" Palette="Pastel" Color="DarkCyan" BackHatchStyle="WideDownwardDiagonal" BackColor="AliceBlue" TitleFont="SimSun, 18px, style=Bold" Height="494px">
							                            <Series>
								                            <dcwc:Series BackGradientEndColor="0, 192, 192" BackGradientType="VerticalCenter" ShowInLegend="False" Name="OrderAnalysis" Color="DarkCyan" ShadowOffset="2"></dcwc:Series>
								                            <dcwc:Series BackGradientEndColor="LightSalmon" BackGradientType="VerticalCenter" ShowInLegend="False" Name="SellAnalysis" Color="Crimson" ShadowOffset="2"></dcwc:Series>
								                            <dcwc:Series BackGradientEndColor="LightSalmon" BackGradientType="VerticalCenter" ShowInLegend="False" Name="TimeAnalysis" Color="Crimson" ShadowOffset="1"></dcwc:Series>
							                            </Series>
							                            <Legend BorderWidth="0" BackGradientEndColor="DarkCyan" LegendStyle="Table" BackGradientType="LeftRight" InsideChartArea="Default">
							                            </Legend>
							                            <BorderSkin FrameBackGradientType="LeftRight" FrameBackColor="Turquoise" FrameBackGradientEndColor="DarkTurquoise" SkinStyle="FrameTitle5"></BorderSkin>
							                            <ChartAreas>
								                            <dcwc:ChartArea BorderColor="Transparent" BackGradientEndColor="LightBlue" ShadowOffset="2" Name="Default" BackColor="LightBlue" ShadowColor="DarkGray" BorderWidth="0"></dcwc:ChartArea>
							                            </ChartAreas>
						                            </DCWC:CHART>
						                        </td>
				                            </tr>
			                            </table>
		                            </div>
	                          </div>

     
		                </form>
                        </div>
                    </div>
			    </div>
			</div>
		<uc1:Helper id="Helper" runat="server"></uc1:Helper>
		<uc1:Footer id="Footer" runat="server"></uc1:Footer>

	</body>
</html>