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.

403 lines
15 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report410.aspx.cs" Inherits="TradeManageNew.TongJi.Report410" %>
<!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 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/GetReportTable401",
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() {
$("#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>
</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">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input id="btn_hw1" class="btnClass btnClassAdd3" type="button" value="商品信息" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input id="btn_hw2" class="btnClass btnClassAdd2" type="button" value="智能库存" />&nbsp;&nbsp;
<input id="btn_hw3" class="btnClass btnClassAdd4" type="button" value="人员分配的编号" />&nbsp;&nbsp;
<input id="btn_hw4" class="btnClass btnClassAdd5" type="button" value="人员销量统计" />&nbsp;&nbsp;<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" />&nbsp;&nbsp; 美金汇率:<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="查询" />&nbsp;
注意:运费赔款(返还) 算毛利的时候是加的</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">点击人员或者数字查询订单明细
&nbsp;</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>