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.
322 lines
12 KiB
Plaintext
322 lines
12 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Shop_DataTJ.aspx.cs" Inherits="TradeManageNew.TongJi.Shop_DataTJ" %>
|
||
|
|
||
|
|
||
|
|
||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||
|
<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 UserId = "<%=Session["UserId"]%>";
|
||
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
||
|
var WindowLoadModel = new WindowLoad();
|
||
|
$(document).ready(function () {
|
||
|
WindowLoadModel.ApplicationPath = "../";
|
||
|
WindowLoadModel.ControlID = "WindowLoad";
|
||
|
WindowLoadModel.Isbgiframe = true;
|
||
|
WindowLoadModel.Load();
|
||
|
ajaxInit(WindowLoadModel);
|
||
|
CreateDataGrid();
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
jQuery.fn.rowspan = function (colIdx) {
|
||
|
return this.each(function () {
|
||
|
var that;
|
||
|
$('tr', this).each(function (row) {
|
||
|
$('td:eq(' + colIdx + ')', this).filter(':visible').each(function (col) {
|
||
|
if (that != null && $(this).html() == $(that).html()) {
|
||
|
rowspan = $(that).attr("rowSpan");
|
||
|
if (rowspan == undefined) {
|
||
|
$(that).attr("rowSpan", 1);
|
||
|
rowspan = $(that).attr("rowSpan");
|
||
|
}
|
||
|
rowspan = Number(rowspan) + 1;
|
||
|
$(that).attr("rowSpan", rowspan);
|
||
|
$(this).hide();
|
||
|
} else {
|
||
|
that = this;
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
function CreateDataGrid() {
|
||
|
|
||
|
var
|
||
|
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "店铺";
|
||
|
col.CellTemplate = "<a>{Bind shopname}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "平台";
|
||
|
col.CellTemplate = "<a>{Bind platname}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "国家";
|
||
|
col.CellTemplate = "<a>{Bind country}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "MY";
|
||
|
col.CellTemplate = "<a>{Bind MY}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "PH";
|
||
|
col.CellTemplate = "<a>{Bind PH}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "SG";
|
||
|
col.CellTemplate = "<a>{Bind SG}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "ID";
|
||
|
col.CellTemplate = "<a>{Bind ID}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "BR";
|
||
|
col.CellTemplate = "<a>{Bind BR}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "MX";
|
||
|
col.CellTemplate = "<a>{Bind MX}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "TH";
|
||
|
col.CellTemplate = "<a>{Bind TH}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "TW";
|
||
|
col.CellTemplate = "<a>{Bind TW}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
datagrid1.IsFixHeader = false;
|
||
|
datagrid1.ShowIndexColumn = false;
|
||
|
datagrid1.AllowPaging = false;
|
||
|
datagrid1.Width = "100%";
|
||
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
||
|
datagrid1.Init();
|
||
|
|
||
|
|
||
|
}
|
||
|
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>");
|
||
|
// return;
|
||
|
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>");
|
||
|
// return;
|
||
|
var param = new Object();
|
||
|
param.DeptId = $("#select_dept").val();
|
||
|
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;
|
||
|
}
|
||
|
var param = new Object();
|
||
|
|
||
|
param.platid = $("#select_pt").val();
|
||
|
|
||
|
param.SDate=$("#txt_SDate").val();
|
||
|
param.EDate=$("#txt_EDate").val();
|
||
|
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../DD_OrderServiceNew.asmx/GetShopDataTJ",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
//async: false,
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
if (data.d != null ) {
|
||
|
|
||
|
datagrid1.DataBind(data.d);
|
||
|
$("#DataGrid1_Table").rowspan(0);
|
||
|
// HB();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
function HB()
|
||
|
{
|
||
|
$("#tb1 tr").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 ExportData() {
|
||
|
if ($("#txt_SDate").val() == "") {
|
||
|
alert("请输入日期");
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
var param = new Object();
|
||
|
|
||
|
param.DeptId = $("#select_dept").val();
|
||
|
param.ShopId = $("#select_shop").val();
|
||
|
param.PlatId = $("#select_plat").val();
|
||
|
param.MoneyCode = $("#select_money").val();
|
||
|
param.Sort = $("#select_sort").val() + " " + $("#select_sort1").val();
|
||
|
param.InDate = $("#txt_SDate").val();
|
||
|
//param.EDate = $("#txt_EDate").val();
|
||
|
var fname ="报表.xls";
|
||
|
$.ajax({
|
||
|
url: "../SysManageServiceNew.asmx/GetReportExcel18",
|
||
|
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);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
</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="13%">平台:</td>
|
||
|
<td width="15%"> <select id="select_pt" class="selectClass" style="width: 120px" name="D1">
|
||
|
<option value="0">全部</option>
|
||
|
<option value="16">Shopee</option>
|
||
|
<option value="5">Lazada</option>
|
||
|
</select></td>
|
||
|
<td class="f1" width="13%">日期:</td>
|
||
|
<td width="35%">
|
||
|
<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="查询" onclick="ReadData();"/>
|
||
|
<input id="cmdOut" class="btnClass btnClassExcelTemplate" onclick="ExportData();" type="button" value="导出报表" style="display:none" /></td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td valign="top" colspan="5">
|
||
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</table>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|