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.
334 lines
11 KiB
Plaintext
334 lines
11 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report22.aspx.cs" Inherits="TradeManage.TongJi.Report22" %>
|
||
|
|
||
|
<!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);
|
||
|
|
||
|
//ReadData();
|
||
|
// GetDepartMent();
|
||
|
var dd = new Date();
|
||
|
$("#txt_SDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-" + dd.getDate());
|
||
|
$("#txt_EDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-" + dd.getDate());
|
||
|
|
||
|
|
||
|
$("#btn_sch").bind("click", function () {
|
||
|
|
||
|
ReadData();
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
GetDepartMent();
|
||
|
GetShopList();
|
||
|
$("#select_dept").bind("change", function () {
|
||
|
GetShopList();
|
||
|
});
|
||
|
|
||
|
});
|
||
|
function GetDepartMent() {
|
||
|
|
||
|
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>");
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
$("#select_dept").append("<option value='0'>全部</option>");
|
||
|
|
||
|
|
||
|
}
|
||
|
function GetShopList() {
|
||
|
$("#div_shop").empty();
|
||
|
|
||
|
var param = new Object();
|
||
|
|
||
|
param.DeptId = $("#select_dept").val();
|
||
|
param.PlatType =0;
|
||
|
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../BaseData.asmx/GetDeptShopList",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
|
||
|
if (data.d != null) {
|
||
|
//$("#div_shop").append("<input type='checkbox' id='chk_all' />全选<br/>");
|
||
|
$(data.d).each(function () {
|
||
|
|
||
|
$("#div_shop").append("<input type='checkbox' no='" + this.ShopId + "'/><span>" + this.ShopName + "</span>");
|
||
|
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
function ReadData() {
|
||
|
if ($("#txt_SDate").val() == "") {
|
||
|
alert("请输入日期");
|
||
|
return;
|
||
|
}
|
||
|
var shopids = "";
|
||
|
$("input[no]:checked").each(function () {
|
||
|
shopids += $(this).attr("no") + ",";
|
||
|
|
||
|
});
|
||
|
if ($("#select_dept").val() != "0" && shopids == "") {
|
||
|
alert("请选择店铺,或者部门选择全部");
|
||
|
return;
|
||
|
}
|
||
|
var param = new Object();
|
||
|
//param.PlatId = $("#select_plat").val();
|
||
|
param.SDate = $("#txt_SDate").val();
|
||
|
param.Supplier = $("#txt_Supplier").val();
|
||
|
param.GoodsCode = $("#txt_GoodsCode").val();
|
||
|
param.TopNum = $("#txt_snum").val();
|
||
|
if ($("#txt_snum").val() == "")
|
||
|
param.TopNum = 300;
|
||
|
param.ShopIds = shopids;
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "TJ_CountServer.asmx/GetReportTable22",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
//async: false,
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
if (data.d != null && data.d != "") {
|
||
|
$("#tb1").html(data.d);
|
||
|
HB();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
function HB()
|
||
|
{
|
||
|
|
||
|
var param = new Object();
|
||
|
param.ReportId = 20;
|
||
|
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "TJ_CountServer.asmx/GetReportCols",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
//async: false,
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
|
||
|
if (data.d != null)
|
||
|
{
|
||
|
$(data.d).each(function (i) {
|
||
|
|
||
|
if (this.IsHB == 1)
|
||
|
{
|
||
|
var rowindex = i + 1;
|
||
|
Rowsp(rowindex);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
function Rowsp(rowindex)
|
||
|
{
|
||
|
var content = "";
|
||
|
var rowspan = 1;
|
||
|
var trindx = -1;
|
||
|
$("#tb1 td[rowindex=" + rowindex + "]").each(function (i) {
|
||
|
if ($(this).html()!=""&&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;
|
||
|
}
|
||
|
var shopids = "";
|
||
|
$("input[no]:checked").each(function () {
|
||
|
shopids += $(this).attr("no") + ",";
|
||
|
|
||
|
});
|
||
|
if ($("#select_dept").val()!="0"&&shopids== "") {
|
||
|
alert("请选择店铺,或者部门选择全部");
|
||
|
return;
|
||
|
}
|
||
|
var param = new Object();
|
||
|
//param.PlatId = $("#select_plat").val();
|
||
|
param.SDate = $("#txt_SDate").val();
|
||
|
param.Supplier = $("#txt_Supplier").val();
|
||
|
param.GoodsCode = $("#txt_GoodsCode").val();
|
||
|
param.ShopIds = shopids;
|
||
|
param.TopNum = $("#txt_snum").val();
|
||
|
if ($("#txt_snum").val() == "")
|
||
|
param.TopNum = 300;
|
||
|
|
||
|
var fname ="备货参考报表.xls";
|
||
|
$.ajax({
|
||
|
url: "TJ_CountServer.asmx/GetExcelTable22",
|
||
|
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="16%">
|
||
|
<select id="select_dept" class="selectClass" style="width: 100px" name="D3">
|
||
|
</select></td>
|
||
|
<td class="f1" width="10%">日期:</td>
|
||
|
<td width="12%">
|
||
|
<input id="txt_SDate" class="editTextbox" onfocus="WdatePicker()" style="width: 100px;" type="text" /></td>
|
||
|
<td class="f1" width="10%">供应商:</td>
|
||
|
<td width="10%">
|
||
|
<input id="txt_Supplier" class="editTextbox" style="width: 100px;" type="text" /></td>
|
||
|
<td class="f1" width="10%">货物编号:</td>
|
||
|
<td width="10%">
|
||
|
<input id="txt_GoodsCode" class="editTextbox" style="width: 100px;" type="text" /></td>
|
||
|
<td>
|
||
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" />
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td colspan="8" align="right">
|
||
|
列出销量最高的<input id="txt_snum" min='0' max='1000000' precision='0' class="editTextbox" style="width: 50px;" type="text" value="300"/>款型号</td>
|
||
|
<td>
|
||
|
<input id="cmdOut" class="btnClass btnClassExcelTemplate" onclick="ExportData();" type="button" value="导出报表" /></td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td class="f1" width="13%" >店铺:</td>
|
||
|
<td colspan="8">
|
||
|
<div id="div_shop"></div></td>
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td valign="top" colspan="9">
|
||
|
|
||
|
<div style="width:100%"><table class="DataGridTableStyle" style="width:100%" id="tb1"></table></div>
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</table>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|