You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
398 lines
14 KiB
Plaintext
398 lines
14 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DD_GoodsDataCount.aspx.cs" Inherits="TradeManageNew.TongJi.DD_GoodsDataCount" %>
|
||
|
|
||
|
<!DOCTYPE html>
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head id="Head1">
|
||
|
<title>分析</title>
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/icon.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/New.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="../themes/DataGrid.css" />
|
||
|
<script src="../Scripts/jquery.min.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/jquery.easyui.min.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/DataGrid.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/FixTable.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/DataPager.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/jquery.bgiframe.min.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/jquery.url.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/Global.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
||
|
<script src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
|
||
|
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript" src="../Scripts/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
|
||
|
<script type="text/javascript" src="../Scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
||
|
<script type="text/javascript" src="../Scripts/highcharts.js"></script>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
||
|
var WindowLoadModel = new WindowLoad();
|
||
|
var UserId = "<%=Session["UserId"]%>";
|
||
|
$(document).ready(function () {
|
||
|
WindowLoadModel.ApplicationPath = "../";
|
||
|
WindowLoadModel.ControlID = "WindowLoad";
|
||
|
WindowLoadModel.Isbgiframe = true;
|
||
|
WindowLoadModel.Load();
|
||
|
ajaxInit(WindowLoadModel);
|
||
|
CreateDataGrid();
|
||
|
GetShopList();
|
||
|
GetGoodsList();
|
||
|
$("#listShopId").change(function () {
|
||
|
GetGoodsList();
|
||
|
});
|
||
|
$("#btn_sch").bind("click", function () {
|
||
|
|
||
|
GetChart();
|
||
|
ReadData();
|
||
|
});
|
||
|
var dd = new Date();
|
||
|
$("#txt_SDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-01");
|
||
|
$("#txt_EDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-" + dd.getDate());
|
||
|
if ($("#txt_SDate").val() != "" && $("#txt_EDate").val() != "" && $("#select_goods").val() != "-1")
|
||
|
GetChart();
|
||
|
$("#DataGrid1 [CommandName]").live("click", function () {
|
||
|
var CommandName = $(this).attr("CommandName");
|
||
|
var index = $(this).parentsUntil("tr").parent().attr("index");
|
||
|
var Model = datagrid1.Get_Model(index);
|
||
|
if (CommandName == "cmdLook") {
|
||
|
window.open("Report41.aspx?SName=" + Model.ShopName + "&SDate=" + Model.OrderDate.localeFormat("yyyy-MM-dd"));
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
function GetShopList() {
|
||
|
$("#listShopId").empty();
|
||
|
//$("#listShopId").append("<option value='-1'>-选择-</option>");
|
||
|
var param = new Object();
|
||
|
|
||
|
param.PlatType = 0;
|
||
|
|
||
|
|
||
|
$.ajax({
|
||
|
url: "../BaseDataNew.asmx/GetShopListForTM",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
|
||
|
|
||
|
if (data.d != null) {
|
||
|
$(data.d).each(function (i) {
|
||
|
$("#listShopId").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function GetGoodsList() {
|
||
|
$("#select_goods").empty();
|
||
|
if(UserId==1)
|
||
|
$("#select_goods").append("<option value='-1'>-全部-</option>");
|
||
|
var param = new Object();
|
||
|
|
||
|
param.ShopId = $("#listShopId").val();
|
||
|
|
||
|
|
||
|
$.ajax({
|
||
|
url: "../DD_OrderServiceNew.asmx/GetListGoods3",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
async: false,
|
||
|
success: function (data) {
|
||
|
|
||
|
|
||
|
if (data.d != null) {
|
||
|
$(data.d).each(function (i) {
|
||
|
$("#select_goods").append("<option value='" + this.GoodsId + "'>" + this.GoodsCode + "</option>");
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
var cate = new Array();
|
||
|
var datas = "";
|
||
|
function GetChart() {
|
||
|
if ($("#txt_SDate").val() == "") {
|
||
|
alert("请输入开始日期");
|
||
|
return;
|
||
|
}
|
||
|
if ($("#txt_EDate").val() == "") {
|
||
|
alert("请输入结束日期");
|
||
|
return;
|
||
|
}
|
||
|
if ($("#select_goods").val() == "-1") {
|
||
|
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var param = new Object();
|
||
|
|
||
|
|
||
|
param.GoodsId = $("#select_goods").val();
|
||
|
param.IsGG = 0;
|
||
|
if ($("#chk_ggf").is(":checked") == true) {
|
||
|
param.IsGG =1;
|
||
|
}
|
||
|
param.IsDJL = 0;
|
||
|
if ($("#chk_ddj").is(":checked") == true)
|
||
|
param.IsDJL = 1;
|
||
|
param.XL = 0;
|
||
|
if ($("#chk_cjl").is(":checked") == true)
|
||
|
param.XL = 1;
|
||
|
param.XSJE = 0;
|
||
|
if ($("#chk_cjje").is(":checked") == true)
|
||
|
param.XSJE = 1;
|
||
|
|
||
|
param.DLPM = 0;
|
||
|
if ($("#chk_dlpm").is(":checked") == true)
|
||
|
param.DLPM = 1;
|
||
|
param.XLPM = 0;
|
||
|
if ($("#chk_xlpm").is(":checked") == true)
|
||
|
param.XLPM = 1;
|
||
|
|
||
|
param.SDate = $("#txt_SDate").val();
|
||
|
param.EDate = $("#txt_EDate").val();
|
||
|
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../SysManageServiceNew.asmx/GetCountGoodsData",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
//async: false,
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
if (data.d != null) {
|
||
|
|
||
|
cate = data.d.categories;
|
||
|
datas = data.d.Data;
|
||
|
SetChart();
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
function ReadData() {
|
||
|
if ($("#txt_SDate").val() == "") {
|
||
|
alert("请输入开始日期");
|
||
|
return;
|
||
|
}
|
||
|
if ($("#txt_EDate").val() == "") {
|
||
|
alert("请输入结束日期");
|
||
|
return;
|
||
|
}
|
||
|
// if ($("#select_goods").val() == "-1") {
|
||
|
// alert("请选择货物编号");
|
||
|
// return;
|
||
|
// }
|
||
|
|
||
|
var param = new Object();
|
||
|
|
||
|
|
||
|
param.GoodsId = $("#select_goods").val();
|
||
|
param.IsGG = 0;
|
||
|
param.IsDJL = 0;
|
||
|
param.XL = 0;
|
||
|
param.XSJE = 0;
|
||
|
|
||
|
param.SDate = $("#txt_SDate").val();
|
||
|
param.EDate = $("#txt_EDate").val();
|
||
|
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../SysManageServiceNew.asmx/GetCountGoodsDataList",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
//async: false,
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
datagrid1.DataBind(data.d);
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
function CreateDataGrid() {
|
||
|
|
||
|
var col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "店铺";
|
||
|
col.CellTemplate = "<a style='color:blue' CommandName='cmdLook'>{Bind ShopName}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "编号";
|
||
|
col.CellTemplate = "<a style='color:blue' CommandName='cmdLook'>{Bind GoodsCode}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "日期";
|
||
|
col.CellTemplate = "<a>{Bind OrderDate,yyyy-MM-dd}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "广告费";
|
||
|
col.CellTemplate = "<a>{Bind Dec1}$</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "点击数";
|
||
|
col.CellTemplate = "<a>{Bind Int1}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "大类排名";
|
||
|
col.CellTemplate = "<a>{Bind Int2}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "小类排名";
|
||
|
col.CellTemplate = "<a>{Bind Int3}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "成交量";
|
||
|
col.CellTemplate = "<a>{Bind Int4}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "成交金额";
|
||
|
col.CellTemplate = "<a>{Bind Dec2}$</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
datagrid1.IsFixHeader = false;
|
||
|
//datagrid1.Height = "400px";
|
||
|
datagrid1.ShowIndexColumn = false;
|
||
|
datagrid1.AllowPaging = false;
|
||
|
//datagrid1.Width = "100%";
|
||
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
||
|
datagrid1.Init();
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
function getData() {
|
||
|
|
||
|
//var data = "[{name: '速卖通',data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]}, {name: '亚马逊',data: [5, 5.5, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]}, {name: 'EBay',data: [3, 3, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]}, {name: 'Wish',data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]}]";
|
||
|
var dataJsonobj = eval("(" + datas + ")"); //转换成json对象
|
||
|
|
||
|
return dataJsonobj;
|
||
|
|
||
|
}
|
||
|
function SetChart() {
|
||
|
|
||
|
$('#container').highcharts({
|
||
|
title: {
|
||
|
text: '货物数据走势图',
|
||
|
x: -20 //center
|
||
|
},
|
||
|
subtitle: {
|
||
|
text: '数据走势图',
|
||
|
x: -20
|
||
|
},
|
||
|
xAxis: {
|
||
|
categories: cate
|
||
|
},
|
||
|
yAxis: {
|
||
|
|
||
|
|
||
|
minPadding: 0,
|
||
|
startOnTick: false,
|
||
|
title: {
|
||
|
text: '销量'
|
||
|
},
|
||
|
plotLines: [{
|
||
|
value: 0,
|
||
|
width: 1,
|
||
|
color: '#808080'
|
||
|
}]
|
||
|
},
|
||
|
tooltip: {
|
||
|
valueSuffix: '(个)'
|
||
|
},
|
||
|
legend: {
|
||
|
layout: 'vertical',
|
||
|
align: 'right',
|
||
|
verticalAlign: 'middle',
|
||
|
borderWidth: 0
|
||
|
},
|
||
|
series: getData()
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
</head>
|
||
|
<body class="headbody">
|
||
|
|
||
|
<div class="title_ico">
|
||
|
货物销量列表
|
||
|
</div>
|
||
|
|
||
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" align="center" class="tableAll">
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td class="f1" width="10%" >店铺</td>
|
||
|
<td width="15%">
|
||
|
<select id="listShopId" class="selectClass" style="width: 150px" name="D3">
|
||
|
|
||
|
</select></td>
|
||
|
<td class="f1" width="10%" >编号</td>
|
||
|
<td width="15%">
|
||
|
<select id="select_goods" class="selectClass" style="width: 150px" name="D4">
|
||
|
|
||
|
</select></td>
|
||
|
<td class="f1" width="10%" >统计日期:</td>
|
||
|
<td width="25%"> <input id="txt_SDate" class="editTextbox" onfocus="WdatePicker()" style="width: 100px;" type="text" />-<input id="txt_EDate" class="editTextbox" onfocus="WdatePicker()" style="width: 100px;" type="text" /></td>
|
||
|
|
||
|
<td>
|
||
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" />
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td class="f1" width="10%" >统计内容:</td>
|
||
|
<td colspan="6"><input id="chk_ggf" type="checkbox" checked="checked" />广告费<input id="chk_ddj" type="checkbox" checked="checked" />点击量<input id="chk_cjl" type="checkbox" checked="checked" />成交量<input id="chk_cjje" type="checkbox" checked="checked" />成交金额<input id="chk_dlpm" type="checkbox" checked="checked" />大类排名<input id="chk_xlpm" type="checkbox" checked="checked" />小类排名
|
||
|
</td>
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td valign="top" colspan="7">
|
||
|
<div id="container" style="height:310px;width:95%"></div><br />
|
||
|
<div id="DataGrid1">
|
||
|
</div>
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</table>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|