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.
525 lines
21 KiB
Plaintext
525 lines
21 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report401_New.aspx.cs" Inherits="TradeManageNew.TongJi.Report401_New" %>
|
|
|
|
<!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" src="https://cdn.jsdelivr.net/npm/echarts@5.1.1/dist/echarts.min.js"></script>
|
|
<script type="text/javascript">
|
|
var UserId = "<%=Session["UserId"]%>";
|
|
var WindowLoadModel = new WindowLoad();
|
|
$(document).ready(function () {
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
WindowLoadModel.Isbgiframe = true;
|
|
WindowLoadModel.Load();
|
|
ajaxInit(WindowLoadModel);
|
|
UpdateGoodsDays();
|
|
ReadUser();
|
|
if (UserId == 1 || UserId == 53) {
|
|
$("#div_yc").show();
|
|
}
|
|
$("#btn_sch").bind("click", function () {
|
|
|
|
ReadData();
|
|
|
|
});
|
|
$("#select_sort,#select_sort1").bind("change", function () {
|
|
|
|
ReadData();
|
|
|
|
});
|
|
$("#btn_hw2").bind("click", function () {
|
|
|
|
|
|
window.location = "../Huowu/HW_GoodsDetailList2.aspx";
|
|
|
|
});
|
|
$("#btn_hw3").bind("click", function () {
|
|
|
|
|
|
window.location = "../Huowu/HW_GoodsCount.aspx";
|
|
|
|
});
|
|
$("#btn_hw1").bind("click", function () {
|
|
|
|
|
|
window.location = "../Huowu/HW_GoodsInfoForTM2.aspx";
|
|
|
|
});
|
|
$("#btn_hw5").bind("click", function () {
|
|
|
|
|
|
window.location = "../Huowu/HW_GoodsCount2.aspx";
|
|
|
|
});
|
|
var dd = new Date();
|
|
// $("#txt_SDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-01");
|
|
$("#txt_SDate,#txt_EDate").val(dd.localeFormat("yyyy-MM-dd"));
|
|
// ReadData();
|
|
$("td[rowindex=8] a[uid]").live("click", function () {
|
|
var uid = $(this).attr("uid");
|
|
|
|
window.open("UserGoodsCount.aspx?UserId=" + uid + "&SDate=" + $("#txt_SDate").val() + "&EDate=" + $("#txt_EDate").val() + "&GradeCode=" + $("#txt_Code").val());
|
|
});
|
|
$("td[rowindex=3] a[uid]").live("click", function () {
|
|
var uid = $(this).attr("uid");
|
|
window.open("../Huowu/HW_GoodsCount3.aspx?Type=0&UserId=" + uid + "&SDate=" + $("#txt_SDate").val() + "&EDate=" + $("#txt_EDate").val() + "&GradeCode=" + $("#txt_Code").val());
|
|
//window.open("UserGoodsCount.aspx?UserId=" + uid + "&SDate=" + $("#txt_SDate").val() + "&SDate=" + $("#txt_SDate").val() + "&EDate=" + $("#txt_EDate").val() + "&GradeCode=" + $("#txt_Code").val());
|
|
});
|
|
$("td[rowindex=4] a[uid]").live("click", function () {
|
|
var uid = $(this).attr("uid");
|
|
window.open("../Huowu/HW_GoodsCount3.aspx?Type=1&UserId=" + uid + "&SDate=" + $("#txt_SDate").val() + "&EDate=" + $("#txt_EDate").val() + "&GradeCode=" + $("#txt_Code").val());
|
|
//window.open("UserGoodsCount.aspx?UserId=" + uid + "&SDate=" + $("#txt_SDate").val() + "&SDate=" + $("#txt_SDate").val() + "&EDate=" + $("#txt_EDate").val() + "&GradeCode=" + $("#txt_Code").val());
|
|
});
|
|
$("td[rowindex=5] a[uid]").live("click", function () {
|
|
var uid = $(this).attr("uid");
|
|
window.open("../Huowu/HW_GoodsCount3.aspx?Type=2&UserId=" + uid + "&SDate=" + $("#txt_SDate").val() + "&EDate=" + $("#txt_EDate").val() + "&GradeCode=" + $("#txt_Code").val());
|
|
//window.open("UserGoodsCount.aspx?UserId=" + uid + "&SDate=" + $("#txt_SDate").val() + "&SDate=" + $("#txt_SDate").val() + "&EDate=" + $("#txt_EDate").val() + "&GradeCode=" + $("#txt_Code").val());
|
|
});
|
|
});
|
|
|
|
|
|
function UpdateGoodsDays() {
|
|
|
|
|
|
$.ajax({
|
|
url: "../HuoWuServiceNew.asmx/UpdateGoodsDays",
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
success: function (data) {
|
|
|
|
|
|
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
function ReadUser() {
|
|
if (UserId == 1 || UserId == 51 || UserId == 53)
|
|
$("#select_name").append("<option value='0'>全部</option>");
|
|
|
|
$.ajax({
|
|
url: "../SysManage/SysManageService.asmx/GetAllListJC_UserInfo",
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
|
|
|
|
$(data.d).each(function () {
|
|
if (UserId != 1 && UserId != 51 && this.UserId == UserId && UserId != 53)
|
|
$("#select_name").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
|
|
else
|
|
if (UserId == 1 || UserId == 51 || UserId == 53)
|
|
$("#select_name").append("<option value='" + this.UserId + "'>" + this.Name + "</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 = $("#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();
|
|
if ($("#select_name").val() == "")
|
|
return;
|
|
param.UserId = $("#select_name").val();
|
|
param.GoodsCode = $("#txt_Code").val();
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
param.EDate = $("#txt_EDate").val();
|
|
param.moneyrate = $("#txt_rate").val();
|
|
param.isyc = 0;
|
|
if ($("#chk_isyc").is(":checked") == true)
|
|
param.isyc = 1;
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "../SysManageServiceNew.asmx/GetReportTable410",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
//async: false,
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
if (data.d != null && data.d != "") {
|
|
$("#tb1").html(data.d);
|
|
$('.DataGridTableStyle tr').each(function (index) {
|
|
if (index === 0) {
|
|
$(this).append('<th>趋势图</th>');
|
|
} else {
|
|
$(this).append('<td class="chart-cell"></td>');
|
|
}
|
|
});
|
|
|
|
var data = [
|
|
{ name: 'A', value: 10 },
|
|
{ name: 'B', value: 20 },
|
|
{ name: 'C', value: 30 },
|
|
{ name: 'D', value: 40 },
|
|
{ name: 'E', value: 50 },
|
|
{ name: 'F', value: 60 },
|
|
{ name: 'G', value: 70 },
|
|
{ name: 'H', value: 80 },
|
|
{ name: 'I', value: 90 },
|
|
{ name: 'J', value: 100 }
|
|
];
|
|
|
|
|
|
$('.chart-cell').each(function (index) {
|
|
var chart = echarts.init(this);
|
|
var chartData = [];
|
|
|
|
for (var i = 0; i <= index; i++) {
|
|
chartData.push(data[i].value);
|
|
}
|
|
|
|
//var option = {
|
|
// xAxis: {
|
|
// type: 'category',
|
|
// data: data.slice(0, index + 1).map(function (item) {
|
|
// return item.name;
|
|
// })
|
|
// },
|
|
// yAxis: {
|
|
// type: 'value'
|
|
// },
|
|
// series: [{
|
|
// type: 'line',
|
|
// data: chartData
|
|
// }]
|
|
//};
|
|
|
|
|
|
var option = {
|
|
grid: {
|
|
left: 5,
|
|
right: 5,
|
|
top: 5,
|
|
bottom: 5,
|
|
containLabel: true
|
|
},
|
|
tooltip: {
|
|
trigger: 'axis'
|
|
},
|
|
xAxis: {
|
|
type: 'category',
|
|
data: data.slice(0, index + 1).map(function (item) {
|
|
return item.name;
|
|
}),
|
|
axisLabel: {
|
|
show: false // 隐藏 x 轴标签
|
|
},
|
|
axisTick: {
|
|
show: false // 隐藏 x 轴刻度线
|
|
},
|
|
axisLine: {
|
|
show: false // 隐藏 x 轴线
|
|
}
|
|
},
|
|
yAxis: {
|
|
type: 'value',
|
|
axisLabel: {
|
|
show: false // 隐藏 y 轴标签
|
|
},
|
|
axisTick: {
|
|
show: false // 隐藏 y 轴刻度线
|
|
},
|
|
axisLine: {
|
|
show: false // 隐藏 y 轴线
|
|
}
|
|
},
|
|
series: [
|
|
{
|
|
type: 'line',
|
|
data: chartData,
|
|
lineStyle: {
|
|
width: 1 // 短线宽度
|
|
},
|
|
itemStyle: {
|
|
borderWidth: 0.5, // 点边框宽度
|
|
borderColor: 'black' // 点边框颜色
|
|
},
|
|
symbolSize: 2 // 点大小
|
|
}
|
|
]
|
|
};
|
|
// 设置容器尺寸
|
|
chart.resize({
|
|
width: 200,
|
|
height: 30
|
|
});
|
|
|
|
chart.setOption(option);
|
|
});
|
|
}
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
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: "TJ_CountServer.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>
|
|
<style type="text/css">
|
|
table {
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
td, th {
|
|
border: 1px solid black;
|
|
padding: 8px;
|
|
}
|
|
|
|
.chart-cell {
|
|
width: 200px;
|
|
height: 30px;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<body class="headbody">
|
|
|
|
<div class="title_ico">
|
|
报表
|
|
</div>
|
|
|
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" align="center" class="tableAll">
|
|
|
|
<tr style="display:none">
|
|
<td colspan="5">
|
|
|
|
<input id="btn_hw1" class="btnClass btnClassAdd3" type="button" value="商品信息" />
|
|
<input id="btn_hw2" class="btnClass btnClassAdd2" type="button" value="智能库存" />
|
|
<input id="btn_hw3" class="btnClass btnClassAdd4" type="button" value="人员分配的编号" />
|
|
<input id="btn_hw4" class="btnClass btnClassAdd5" type="button" value="人员销量统计" /> <input
|
|
id="btn_hw5" class="btnClass btnClassAdd5" type="button" value="人员编号销量" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="f1" width="13%" >人员:</td>
|
|
<td width="18%">
|
|
<select id="select_name" class="selectClass" style="width: 120px" name="D1">
|
|
</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" /> 美金汇率:<input
|
|
id="txt_rate" class="editTextbox"
|
|
style="width: 100px;" type="text" value="6.5"/><div style="display:none" id="div_yc"><input id="chk_isyc" type="checkbox" checked="checked" />隐藏部分列</div></td>
|
|
<td>
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" />
|
|
注意:运费赔款(返还) 算毛利的时候是加的</td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr style="display:none">
|
|
<td class="f1" width="13%" >编号:</td>
|
|
<td width="18%">
|
|
<input id="txt_Code" class="editTextbox"
|
|
style="width: 100px;" type="text" /></td>
|
|
|
|
<td colspan="3">点击人员或者数字查询订单明细
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign="top" colspan="5">
|
|
<div style="width:100%"><table class="DataGridTableStyle" style="width:100%" id="tb1"></table></div>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|