|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report406.aspx.cs" Inherits="TradeManageNew.TongJi.Report406" %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!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/FixTable.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();
|
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
|
|
|
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
|
|
|
WindowLoadModel.Isbgiframe = true;
|
|
|
|
|
WindowLoadModel.Load();
|
|
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
// UpdateGoodsDays();
|
|
|
|
|
GetBasePlat();
|
|
|
|
|
ReadUser();
|
|
|
|
|
//if (UserId == 1 || UserId ==53) {
|
|
|
|
|
// $("#div_yc").show();
|
|
|
|
|
//}
|
|
|
|
|
if (UserId != 1 && UserId != 51 && UserId != 53) {
|
|
|
|
|
iszj = 1;
|
|
|
|
|
$("#a_hjjf,#a_hj,#cmdOut,#cmdOut2").hide();
|
|
|
|
|
}
|
|
|
|
|
var dd = new Date();
|
|
|
|
|
$("#txt_SDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-01");
|
|
|
|
|
$("#txt_EDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-" + dd.getDate());
|
|
|
|
|
CreateDataGrid();
|
|
|
|
|
CreateDataGrid2();
|
|
|
|
|
$("#btn_sch").bind("click", function () {
|
|
|
|
|
|
|
|
|
|
ReadData();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
function GetBasePlat() {
|
|
|
|
|
// $("#select_plat").empty();
|
|
|
|
|
|
|
|
|
|
$("#select_plat").append("<option value='2'>亚马逊</option>");
|
|
|
|
|
$("#select_plat").append("<option value='3'>eBay</option>");
|
|
|
|
|
$("#select_plat").append("<option value='6'>沃尔玛</option>");
|
|
|
|
|
$("#select_plat").append("<option value='15'>Shopify</option>");
|
|
|
|
|
$("#select_plat").append("<option value='18'>wayfair</option>");
|
|
|
|
|
$("#select_plat").append("<option value='21'>SheIn</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 UpdateGoodsDays() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../HuoWuServiceNew.asmx/UpdateGoodsDays",
|
|
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
dataType: "json",
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var iszj = 0;
|
|
|
|
|
function ReadUser() {
|
|
|
|
|
if(UserId==1||UserId==51||UserId==53)
|
|
|
|
|
$("#select_name").append("<option value='0'>全部</option>");
|
|
|
|
|
var param = new Object();
|
|
|
|
|
|
|
|
|
|
param.deptid = 1;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../SysManageServiceNew.asmx/GetListUserInfoFromDept",
|
|
|
|
|
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 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 CreateDataGrid() {
|
|
|
|
|
|
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "缩略图";
|
|
|
|
|
col.CellTemplate = "<a CommandName='cmdImg' class='linka'><img src='{Bind FirstImgUrl}' alt='' width='50px' height='50px'/></a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "货号";
|
|
|
|
|
col.CellTemplate = "<a>{Bind GoodsCode}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "人员";
|
|
|
|
|
col.CellTemplate = "<a>{Bind Name}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "组长";
|
|
|
|
|
col.CellTemplate = "<a>{Bind GroupName}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "7Days|14Days|21Days销售额$";
|
|
|
|
|
col.CellTemplate = "<a jeweek1=1>{Bind amzonzjeweek1}</a>|<a jeweek2=1>{Bind amzonzjeweek2}</a>|<a jeweek3=1>{Bind amzonzjeweek3}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "Month销售额$";
|
|
|
|
|
col.CellTemplate = "<a>{Bind amzonzje}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "7Days|14Days|21Days利润$";
|
|
|
|
|
col.CellTemplate = "<a mlweek1=1>{Bind amzonmlweek1}</a>|<a mlweek1=1>{Bind amzonmlweek2}</a>|<a mlweek1=1>{Bind amzonmlweek3}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "Month利润$";
|
|
|
|
|
col.CellTemplate = "<a>{Bind amzonml}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "7Days|14Days|21Days润率";
|
|
|
|
|
col.CellTemplate = "<a>{Bind amzonmllweek1}</a>|<a>{Bind amzonmllweek2}</a>|<a>{Bind amzonmllweek3}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "Month利润率";
|
|
|
|
|
col.CellTemplate = "<a>{Bind amzonmll}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
if (iszj == 0) {
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "计分";
|
|
|
|
|
col.CellTemplate = "<a>{Bind amzonjf}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
datagrid1.IsFixHeader = true;
|
|
|
|
|
datagrid1.Height = $(document).height() -350;
|
|
|
|
|
datagrid1.ShowIndexColumn = false;
|
|
|
|
|
datagrid1.AllowPaging = true;
|
|
|
|
|
datagrid1.SetPageSize(100);
|
|
|
|
|
datagrid1.Width = "100%";
|
|
|
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
|
|
|
|
datagrid1.Init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function CreateDataGrid2() {
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "人员";
|
|
|
|
|
col.CellTemplate = "<a>{Bind Name}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "产品个数";
|
|
|
|
|
col.Width = "50px";
|
|
|
|
|
|
|
|
|
|
col.CellTemplate = "<a>{Bind Num}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "考核个数";
|
|
|
|
|
col.Width = "50px";
|
|
|
|
|
col.CellTemplate = "<a>{Bind KHNum}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "断货个数";
|
|
|
|
|
col.Width = "50px";
|
|
|
|
|
col.CellTemplate = "<a>{Bind DHNum}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "未到个数";
|
|
|
|
|
col.Width = "50px";
|
|
|
|
|
col.CellTemplate = "<a>{Bind WDNum}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "通过率%";
|
|
|
|
|
col.CellTemplate = "<a tgl=1>{Bind TGRate}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "前1/2/3月通过率%";
|
|
|
|
|
col.CellTemplate = "<a>{Bind Last3MonthRate}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "小于500$";
|
|
|
|
|
col.CellTemplate = "<a>{Bind Num1}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "500-1000$";
|
|
|
|
|
col.CellTemplate = "<a>{Bind Num2}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "1000-10000$";
|
|
|
|
|
col.CellTemplate = "<a>{Bind Num3}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "10000-100000$";
|
|
|
|
|
col.CellTemplate = "<a>{Bind Num4}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "大于100000$";
|
|
|
|
|
col.CellTemplate = "<a>{Bind Num5}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
if (iszj == 0) {
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "积分";
|
|
|
|
|
col.CellTemplate = "<a>{Bind HJ}</a>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
}
|
|
|
|
|
datagrid2.IsFixHeader = false;
|
|
|
|
|
datagrid2.ShowIndexColumn = false;
|
|
|
|
|
datagrid2.AllowPaging = false;
|
|
|
|
|
datagrid2.Width = "100%";
|
|
|
|
|
datagrid2.SelectMode = nblf.ui.SelectMode.None;
|
|
|
|
|
datagrid2.Init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
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.platid = $("#select_plat").val();
|
|
|
|
|
|
|
|
|
|
param.sdate = $("#txt_SDate").val();
|
|
|
|
|
param.edate = $("#txt_EDate").val();
|
|
|
|
|
param.SNum = -1;
|
|
|
|
|
param.ENum = -1;
|
|
|
|
|
if ($("#txt_SNum").val() != "") {
|
|
|
|
|
param.SNum = $("#txt_SNum").val();
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_ENum").val() != "") {
|
|
|
|
|
param.ENum = $("#txt_ENum").val();
|
|
|
|
|
}
|
|
|
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
|
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../HuoWuServiceNew.asmx/GetUserGoodsScore",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
//async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
|
|
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
|
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
|
|
|
if (data.d.DataSource != null && data.d.DataSource.length > 0)
|
|
|
|
|
datagrid2.DataBind(data.d.DataSource[0].Data2);
|
|
|
|
|
$("a[jeweek1]").each(function () {
|
|
|
|
|
if (parseFloat($(this).html()) < 250)
|
|
|
|
|
$(this).css("color", "red");
|
|
|
|
|
});
|
|
|
|
|
$("a[jeweek2]").each(function () {
|
|
|
|
|
if (parseFloat($(this).html()) < 500)
|
|
|
|
|
$(this).css("color", "red");
|
|
|
|
|
});
|
|
|
|
|
$("a[jeweek3]").each(function () {
|
|
|
|
|
if (parseFloat($(this).html()) < 750)
|
|
|
|
|
$(this).css("color", "red");
|
|
|
|
|
});
|
|
|
|
|
$("a[mlweek1]").each(function () {
|
|
|
|
|
if (parseFloat($(this).html()) < 0)
|
|
|
|
|
$(this).css("color", "red");
|
|
|
|
|
});
|
|
|
|
|
$("a[tgl=1]").each(function () {
|
|
|
|
|
if (parseFloat($(this).html()) < 60)
|
|
|
|
|
$(this).css("color", "red");
|
|
|
|
|
});
|
|
|
|
|
var ulist = new Array();
|
|
|
|
|
|
|
|
|
|
var hj = 0;
|
|
|
|
|
var num = 0;
|
|
|
|
|
var num1 = 0;
|
|
|
|
|
var num2 = 0;
|
|
|
|
|
var num3 = 0;
|
|
|
|
|
var num4 = 0;
|
|
|
|
|
var num5 = 0;
|
|
|
|
|
var khNum = 0;
|
|
|
|
|
var wdNum = 0;
|
|
|
|
|
var dhNum = 0;
|
|
|
|
|
$("#a_ry").html($("#select_name").find("option:selected").text());
|
|
|
|
|
if (data.d.DataSource != null && data.d.DataSource.length > 0) {
|
|
|
|
|
$(data.d.DataSource[0].Data2).each(function () {
|
|
|
|
|
|
|
|
|
|
num = this.Num + num;
|
|
|
|
|
num1 = this.Num1 + num1;
|
|
|
|
|
num2 = this.Num2 + num2;
|
|
|
|
|
num3 = this.Num3 + num3;
|
|
|
|
|
num4 = this.Num4 + num4;
|
|
|
|
|
num5 = this.Num5 + num5;
|
|
|
|
|
hj = this.HJ + hj;
|
|
|
|
|
|
|
|
|
|
khNum = this.KHNum + khNum;
|
|
|
|
|
wdNum = this.WDNum + wdNum;
|
|
|
|
|
dhNum = this.DHNum + dhNum;
|
|
|
|
|
});
|
|
|
|
|
$("#a_num").html(num);
|
|
|
|
|
$("#a_num1").html(num1);
|
|
|
|
|
$("#a_num2").html(num2);
|
|
|
|
|
$("#a_num3").html(num3);
|
|
|
|
|
$("#a_num4").html(num4);
|
|
|
|
|
$("#a_num5").html(num5);
|
|
|
|
|
$("#a_hj").html(hj.toFixed(2));
|
|
|
|
|
}
|
|
|
|
|
var lastRow = $('#DataGrid2_Table tr:last');
|
|
|
|
|
|
|
|
|
|
var hjRow = $('<tr style="text-align: center;"></tr>');
|
|
|
|
|
hjRow.append($('<td></td>').text('合计:'));
|
|
|
|
|
hjRow.append($('<td></td>').text(num));
|
|
|
|
|
hjRow.append($('<td></td>').text(khNum));
|
|
|
|
|
|
|
|
|
|
hjRow.append($('<td></td>').text(dhNum));
|
|
|
|
|
hjRow.append($('<td></td>').text(wdNum));
|
|
|
|
|
hjRow.append($('<td></td>').text(((num3 + num4 + num5) * 100 / khNum).toFixed(0)));
|
|
|
|
|
hjRow.append($('<td></td>').text(""));
|
|
|
|
|
hjRow.append($('<td></td>').text(num1));
|
|
|
|
|
hjRow.append($('<td></td>').text(num2));
|
|
|
|
|
hjRow.append($('<td></td>').text(num3));
|
|
|
|
|
hjRow.append($('<td></td>').text(num4));
|
|
|
|
|
hjRow.append($('<td></td>').text(num5));
|
|
|
|
|
hjRow.append($('<td></td>').text(hj.toFixed(2)));
|
|
|
|
|
|
|
|
|
|
lastRow.after(hjRow);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_EDate").val() == "") {
|
|
|
|
|
alert("请输入结束日期");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
if ($("#select_name").val() == "")
|
|
|
|
|
return;
|
|
|
|
|
param.platid = $("#select_plat").val();
|
|
|
|
|
param.UserId = $("#select_name").val();
|
|
|
|
|
//param.GoodsCode = $("#txt_Code").val();
|
|
|
|
|
|
|
|
|
|
param.sdate = $("#txt_SDate").val();
|
|
|
|
|
param.edate = $("#txt_EDate").val();
|
|
|
|
|
param.SNum = -1;
|
|
|
|
|
param.ENum = -1;
|
|
|
|
|
if ($("#txt_SNum").val() != "") {
|
|
|
|
|
param.SNum = $("#txt_SNum").val();
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_ENum").val() != "") {
|
|
|
|
|
param.ENum = $("#txt_ENum").val();
|
|
|
|
|
}
|
|
|
|
|
var fname = "积分报表.xls";
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../HuoWuServiceNew.asmx/GetUserGoodsScoreExcel",
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function ExportData2() {
|
|
|
|
|
if ($("#txt_SDate").val() == "") {
|
|
|
|
|
alert("请输入开始日期");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_EDate").val() == "") {
|
|
|
|
|
alert("请输入结束日期");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
if ($("#select_name").val() == "")
|
|
|
|
|
return;
|
|
|
|
|
param.platid = $("#select_plat").val();
|
|
|
|
|
param.UserId = $("#select_name").val();
|
|
|
|
|
//param.GoodsCode = $("#txt_Code").val();
|
|
|
|
|
|
|
|
|
|
param.sdate = $("#txt_SDate").val();
|
|
|
|
|
param.edate = $("#txt_EDate").val();
|
|
|
|
|
param.SNum = -1;
|
|
|
|
|
param.ENum = -1;
|
|
|
|
|
if ($("#txt_SNum").val() != "") {
|
|
|
|
|
param.SNum = $("#txt_SNum").val();
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_ENum").val() != "") {
|
|
|
|
|
param.ENum = $("#txt_ENum").val();
|
|
|
|
|
}
|
|
|
|
|
var fname = "人员货号统计报表.xls";
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../HuoWuServiceNew.asmx/GetUserGoodsScoreExcel2",
|
|
|
|
|
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="12%" >人员:</td>
|
|
|
|
|
<td width="15%">
|
|
|
|
|
<select id="select_name" class="selectClass" style="width: 120px" name="D1">
|
|
|
|
|
</select></td>
|
|
|
|
|
<td class="f1" width="13%">统计日期:</td>
|
|
|
|
|
<td width="25%">
|
|
|
|
|
<input id="txt_SDate" class="editTextbox" onfocus="WdatePicker()" autocomplete="off" style="width: 100px;" type="text" />-<input
|
|
|
|
|
id="txt_EDate" class="editTextbox" autocomplete="off" onfocus="WdatePicker()"
|
|
|
|
|
style="width: 100px;" type="text" /> </td>
|
|
|
|
|
<td class="f1" width="12%" >平台:</td>
|
|
|
|
|
<td width="15%">
|
|
|
|
|
<select id="select_plat" class="selectClass" style="width: 120px" name="D1">
|
|
|
|
|
</select></td>
|
|
|
|
|
<td>
|
|
|
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" />
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="12%" >积分:</td>
|
|
|
|
|
<td width="15%">
|
|
|
|
|
<input id="txt_SNum" class="editTextbox"
|
|
|
|
|
style="width: 60px;" type="text" />---<input id="txt_ENum" class="editTextbox"
|
|
|
|
|
style="width: 60px;" type="text" /></td>
|
|
|
|
|
<td class="f1" width="13%"> </td>
|
|
|
|
|
<td width="25%">
|
|
|
|
|
</td>
|
|
|
|
|
<td class="f1" width="12%" > </td>
|
|
|
|
|
<td width="15%">
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
</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 colspan="6" style="font-size:15pt;">人员:<a style="font-size:15pt;color:red" id="a_ry"></a> 产品个数:<a style="font-size:15pt;color:red" id="a_num"></a> 小于500$:<a style="font-size:15pt;color:red" id="a_num1"></a> 500-1000$:<a style="font-size:15pt;color:red" id="a_num2"></a> 1000-10000$:<a style="font-size:15pt;color:red" id="a_num3"></a> 10000-10000$:<a style="font-size:15pt;color:red" id="a_num4"></a> 大于100000$:<a style="font-size:15pt;color:red" id="a_num5"></a><a id="a_hjjf" style="font-size:15pt;"> 合计积分:</a> <a style="font-size:15pt;color:red" id="a_hj"></a> </td> <td align="right"> <input id="cmdOut" class="btnClass btnClassExcelTemplate" onclick="ExportData();" type="button" value="导出报表" /> </td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="7">
|
|
|
|
|
<div style="width:100%"> <div id="DataGrid1" class="DataGridStyle" style="-webkit-overflow-scrolling: touch;
|
|
|
|
|
overflow: auto;"></div></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr><td colspan="7" align="right"> <input id="cmdOut2" class="btnClass btnClassExcelTemplate" onclick="ExportData2();" type="button" value="导出报表" /></td></tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="7">
|
|
|
|
|
<div style="width:100%"> <div id="DataGrid2" class="DataGridStyle" style="-webkit-overflow-scrolling: touch;
|
|
|
|
|
overflow: auto;"></div></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|