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.

668 lines
21 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DD_SendGoodsCount.aspx.cs" Inherits="TradeManageNew.TongJi.DD_SendGoodsCount" %>
<!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/DataPager.js" type="text/javascript"></script>
<script src="../Scripts/jquery.bgiframe.min.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" src="../Scripts/exporting.js"></script>
<script type="text/javascript">
var WindowLoadModel = new WindowLoad();
$(document).ready(function () {
WindowLoadModel.ApplicationPath = "../";
WindowLoadModel.ControlID = "WindowLoad";
WindowLoadModel.Isbgiframe = true;
WindowLoadModel.Load();
ajaxInit(WindowLoadModel);
// GetBasePlat();
// GetShopList();
GetStore();
//ReadData();
// GetDepartMent();
$("#btn_sch").bind("click", function () {
ReadData();
});
});
function GetStore() {
$("#select_ck").append('<option value="0">全部</option>');
$.ajax({
url: "../CangKu/CangKuServer.asmx/GetUseStoreHouse",
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
dataType: "json",
async: false,
success: function (data) {
if (data.d != null) {
$(data.d).each(function () {
if (this.StoreId == 6)
$("#select_ck").append('<option value="' + this.StoreId + '" selected="selected">' + this.StoreName + ' </option>');
else
$("#select_ck").append('<option value="' + this.StoreId + '">' + this.StoreName + ' </option>');
});
}
}
});
//$("#select_ck").append("<option value='0'>不限</option>");
}
function fopen() {
$.fancybox({
'width': '40%',
'height': '40%',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#test',
'onComplete': function () {
}
});
}
var chart;
function SetChart() {
chart = new Highcharts.Chart({
//常规图表选项设置
chart: {
renderTo: 'container',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: '类目销量国家分布'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
size: 180,
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
color: '#000000',
connectorColor: '#000000',
format: '<b>{point.name}</b>: {point.percentage:.1f} %'
}
}
},
series: [{
type: 'pie',
name: '类目销量分布'
}]
});
}
function ReadSort() {
WindowLoadModel.Show();
$.ajax({
url: "../HuoWu/HuoWuService.asmx/GetGoodsSortListOne",
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
$(data.d).each(function () {
$("#select_sort").append("<option value='" + this.SortId + "'>" + this.SortName + "</option>");
});
}
}
});
}
function ReadCount1() {
SetChart();
if ($("#txt_SDate").val() == "") {
alert("请输入日期范围");
return;
}
if ($("#txt_EDate").val() == "") {
alert("请输入日期范围");
return;
}
//if ($("#txt_GoodsCode").val() == "") {
// alert("请输入编号");
// return;
//}
var param = new Object();
param.SDate = $("#txt_SDate").val();
param.EDate = $("#txt_EDate").val();
param.SortId = $("#select_sort").val();
param.ShopId = $("#select_shop").val();
param.PlatId = $("#select_plat").val();
WindowLoadModel.Show();
$.ajax({
url: "TJ_CountServer.asmx/GetReportChart26",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
browsers = [];
//迭代,把异步获取的数据放到数组中
//设置数据
var hj = 0;
$(data.d).each(function () {
hj += this.GoodsNum;
});
$(data.d).each(function () {
tjn1 = this.CountryName + "【" + this.GoodsNum + "个】";
tjd1 = this.GoodsNum / hj;
browsers.push([tjn1, tjd1]);
});
chart.series[0].setData(browsers);
}
}
});
}
function GetBasePlat() {
$("#select_plat").empty();
$("#select_plat").append("<option value='0'>全部</option>");
var param = new Object();
param.CompanyID = 0;
param.KeyName = "ptlx";
WindowLoadModel.Show();
$.ajax({
url: "../UserService.asmx/GetPlatBaseCode",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
$(data.d).each(function () {
$("#select_plat").append("<option value='" + this.SortNo + "'>" + this.Name + "</option>");
});
}
}
});
}
function GetShopList() {
$("#select_shop").empty();
$("#select_shop").append("<option value='0'>全部</option>");
var param = new Object();
param.DeptId = 0;
param.PlatType = $("#select_plat").val();
WindowLoadModel.Show();
$.ajax({
url: "../BaseData.asmx/GetShopList",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
$(data.d).each(function (i) {
$("#select_shop").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
});
}
}
});
}
function GetMoneyCode() {
$("#select_money").append("<option value='0'>全部</option>");
WindowLoadModel.Show();
$.ajax({
url: "../SysManage/SysManageService.asmx/GetMoneyList",
//data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
$(data.d).each(function () {
$("#select_money").append("<option value='" + this.MCode + "'>" + this.MName + "</option>");
})
}
}
});
}
function GetDepartMent() {
$("#select_dept").append("<option value='0'>全部</option>");
var param = new Object();
param.DeptType = "事业部";
WindowLoadModel.Show();
$.ajax({
url: "../SysManage/SysManageService.asmx/GetDepartList",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
$(data.d).each(function () {
$("#select_dept").append("<option value='" + this.DeptId + "'>" + this.DeptName + "</option>");
});
}
}
});
}
function fopen() {
$.fancybox({
'width': '40%',
'height': '40%',
'autoScale': false,
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'href': '#test',
'onComplete': function () {
}
});
}
function GetBasePlat() {
$("#select_plat").empty();
$("#select_plat").append("<option value='0'>全部</option>");
var param = new Object();
param.CompanyID = 0;
param.KeyName = "ptlx";
WindowLoadModel.Show();
$.ajax({
url: "../UserService.asmx/GetPlatBaseCode",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
$(data.d).each(function () {
$("#select_plat").append("<option value='" + this.SortNo + "'>" + this.Name + "</option>");
});
}
}
});
}
function GetShopList() {
$("#select_shop").empty();
$("#select_shop").append("<option value='0'>全部</option>");
var param = new Object();
param.DeptId = 0;
param.PlatType = $("#select_plat").val();
WindowLoadModel.Show();
$.ajax({
url: "../BaseData.asmx/GetShopList",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null) {
$(data.d).each(function (i) {
$("#select_shop").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
});
}
}
});
}
function ReadData() {
if ($("#txt_SDate").val() == "") {
alert("请输入日期范围");
return;
}
if ($("#txt_EDate").val() == "") {
alert("请输入日期范围");
return;
}
//if ($("#txt_GoodsCode").val() == "") {
// alert("请输入编号");
// return;
//}
var param = new Object();
param.SDate = $("#txt_SDate").val();
param.EDate = $("#txt_EDate").val();
param.StoreId = 0; // $("#select_ck").val();
param.Type = $("#select_type").val();
WindowLoadModel.Show();
$.ajax({
url: "../SysManageServiceNew.asmx/GetReportTable27",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
//async: false,
success: function (data) {
WindowLoadModel.Hide();
if (data.d != null && data.d != "") {
$("#tb1").html(data.d);
//HB();
}
}
});
GetChart();
}
function HB() {
Rowsp(1);
return;
//var param = new Object();
//param.ReportId = 2;
//WindowLoadModel.Show();
//$.ajax({
// url: "TJ_CountServer.asmx/GetReportCols",
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
// //async: false,
// success: function (data) {
// WindowLoadModel.Hide();
// }
//});
$("#tb1 td[rowindex=1]").each(function (i) {
if (i == 1)
$(this).find("td[rowindex=1]").attr("rowspan", "2");
else if (i == 2)
$(this).find("td[rowindex=1]").hide();
});
}
function Rowsp(rowindex) {
var content = "";
var rowspan = 1;
var trindx = -1;
$("#tb1 td[rowindex=" + rowindex + "]").each(function (i) {
if (content == $(this).html()) {
rowspan++;
$(this).hide();
}
else {
if (rowspan > 1 && trindx > -1)
$("#tb1 td[rowindex=" + rowindex + "][rowtr=" + trindx + "]").attr("rowspan", rowspan);
trindx = $(this).attr("rowtr");
rowspan = 1;
}
content = $(this).html();
});
if (rowspan > 1 && trindx > -1)
$("#tb1 td[rowindex=" + rowindex + "][rowtr=" + trindx + "]").attr("rowspan", rowspan);
}
function ExportData() {
if ($("#txt_SDate").val() == "") {
alert("请输入日期范围");
return;
}
if ($("#txt_EDate").val() == "") {
alert("请输入日期范围");
return;
}
//if ($("#txt_GoodsCode").val() == "") {
// alert("请输入编号");
// return;
//}
var param = new Object();
param.SDate = $("#txt_SDate").val();
param.EDate = $("#txt_EDate").val();
param.StoreId = 0; // $("#select_ck").val();
param.Type = $("#select_type").val();
var fname = "订单立方.xls";
$.ajax({
url: "../SysManageServiceNew.asmx/GetExcelTable27",
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
async: false,
success: function (data) {
params = { FilePath: data.d, FileName: fname };
window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params);
}
});
}
var cate = new Array();
var datas = "";
function GetChart() {
var param = new Object();
param.SDate = $("#txt_SDate").val();
param.EDate = $("#txt_EDate").val();
param.StoreId = 0; // $("#select_ck").val();
param.Type = $("#select_type").val();
WindowLoadModel.Show();
$.ajax({
url: "../SysManageServiceNew.asmx/GetOrderCountGoodsSoild",
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 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="22%">
<select id="select_type" class="selectClass" style="width: 150px" name="D3">
<option value="2">发货订单总立方</option>
<option value="1">订单总立方</option>
</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 class="f1" width="10%" >&nbsp;</td>
<td width="12%">
&nbsp;</td>
<td>
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" />&nbsp;
<input id="cmdOut" class="btnClass btnClassExcelTemplate" onclick="ExportData();" type="button" value="导出报表" /></td>
</tr>
<tr>
<td valign="top" colspan="7">
<div style="width:100%"><table class="DataGridTableStyle" style="width:100%" id="tb1"></table></div>
</td>
</tr>
<tr>
<td valign="top" colspan="7">
<div id="container" style="height:310px;width:95%"></div>
</td>
</tr>
</table>
</body>
</html>