|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TJ_SaleMoneyAll.aspx.cs" Inherits="TradeManage.TongJi.TJ_SaleMoneyAll" %>
|
|
|
|
|
|
|
|
|
|
<!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>
|
|
|
|
|
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="../Scripts/fancybox2.1/source/jquery.fancybox.css?v=2.1.5"
|
|
|
|
|
media="screen" />
|
|
|
|
|
<script type="text/javascript" src="../Scripts/fancybox2.1/lib/jquery.mousewheel-3.0.6.pack.js"></script>
|
|
|
|
|
<script type="text/javascript" src="../Scripts/fancybox2.1/source/jquery.fancybox.js?v=2.1.5"></script>
|
|
|
|
|
<script type="text/javascript" src="../Scripts/highcharts.js"></script>
|
|
|
|
|
<script type="text/javascript" src="../Scripts/exporting.js"></script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
|
|
|
//var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
|
|
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
|
|
|
var Id = 0;
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
|
|
|
WindowLoadModel.Isbgiframe = true;
|
|
|
|
|
WindowLoadModel.Load();
|
|
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
CreateDataGrid();
|
|
|
|
|
// CreateDataGrid2();
|
|
|
|
|
//ReadOff();
|
|
|
|
|
//GetPersonFee();
|
|
|
|
|
$("#btn_sch").bind("click", function () {
|
|
|
|
|
if($("#rad_1").is(":checked")==true)
|
|
|
|
|
ReadData();
|
|
|
|
|
else if ($("#rad_2").is(":checked") == true)
|
|
|
|
|
ReadData2();
|
|
|
|
|
else if ($("#rad_3").is(":checked") == true)
|
|
|
|
|
ReadData3();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#cmdOut").bind("click", function () {
|
|
|
|
|
if ($("#rad_1").is(":checked") == true)
|
|
|
|
|
ExportData();
|
|
|
|
|
else if ($("#rad_2").is(":checked") == true)
|
|
|
|
|
ExportData2();
|
|
|
|
|
else if ($("#rad_3").is(":checked") == true)
|
|
|
|
|
ExportData3();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#rad_1,#rad_2,#rad_3").bind("click", function () {
|
|
|
|
|
if ($("#rad_1").is(":checked") == true)
|
|
|
|
|
{
|
|
|
|
|
$("#tr_1").show();
|
|
|
|
|
$("#tr_2").hide();
|
|
|
|
|
$("#select_dept").show();
|
|
|
|
|
$("#select_plat").show();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if ($("#rad_2").is(":checked") == true) {
|
|
|
|
|
$("#tr_1").hide();
|
|
|
|
|
$("#tr_2").show();
|
|
|
|
|
$("#select_dept").show();
|
|
|
|
|
$("#select_plat").show();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if ($("#rad_3").is(":checked") == true) {
|
|
|
|
|
$("#tr_1").hide();
|
|
|
|
|
$("#tr_2").hide();
|
|
|
|
|
$("#select_dept").hide();
|
|
|
|
|
$("#select_plat").hide();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//$("#txt_ptyj,#txt_sjyf,#txt_gnyf,#txt_jhj").MaskedTextBox();
|
|
|
|
|
//$("#btn_Edit").bind("click", function () {
|
|
|
|
|
// fopen();
|
|
|
|
|
//});
|
|
|
|
|
//$("#btn_Cancel,#btn_Cancel2").bind("click", $.fancybox.close);
|
|
|
|
|
GetDepartMent();
|
|
|
|
|
GetBasePlat();
|
|
|
|
|
//GetShopList();
|
|
|
|
|
//$("#" + datagrid1.TableID + " input[CommandName='cmdEdit']").live("click", function () {
|
|
|
|
|
// var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
|
|
// var model = datagrid1.Get_Model(RowIndex);
|
|
|
|
|
// if (model.TrackCode == "合计")
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
|
|
// alert("合计列不能修改");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// Id = model.Id;
|
|
|
|
|
// $("#txt_ptyj").val(model.escrowFee);
|
|
|
|
|
// $("#txt_sjyf").val(model.PostFee);
|
|
|
|
|
// $("#txt_gnyf").val(model.GNPostFee);
|
|
|
|
|
// $("#txt_jhj").val(model.GoodsFee);
|
|
|
|
|
// fopen1();
|
|
|
|
|
//});
|
|
|
|
|
$("#select_dept,#select_plat").bind("change", function () {
|
|
|
|
|
GetShopList();
|
|
|
|
|
});
|
|
|
|
|
$("#chk_all").live("click", function () {
|
|
|
|
|
if ($(this).is(":checked") == true)
|
|
|
|
|
$("#div_shop input").attr("checked", "checked");
|
|
|
|
|
else
|
|
|
|
|
$("#div_shop input").removeAttr("checked");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
function fopen1() {
|
|
|
|
|
|
|
|
|
|
$.fancybox({
|
|
|
|
|
'width': '40%',
|
|
|
|
|
'height': '40%',
|
|
|
|
|
'autoScale': false,
|
|
|
|
|
'transitionIn': 'elastic',
|
|
|
|
|
'transitionOut': 'elastic',
|
|
|
|
|
'href': '#test1',
|
|
|
|
|
'onComplete': function () {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function UpdateOrderSale() {
|
|
|
|
|
//$("#select_dept").append("<option value='0'>全部</option>");
|
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
|
|
|
|
|
param.Id = Id;
|
|
|
|
|
param.PostFee = $("#txt_sjyf").val();
|
|
|
|
|
param.escrowFee = $("#txt_ptyj").val();
|
|
|
|
|
param.GNPostFee = $("#txt_gnyf").val();
|
|
|
|
|
param.Price = $("#txt_jhj").val();
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "TJ_CountServer.asmx/UpdateOrderSale",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
success: function (data) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alert("修改成功");
|
|
|
|
|
$.fancybox.close();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
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>");
|
|
|
|
|
$("#div_dept").append("<input type='checkbox' do='" + this.DeptId + "' dn='" + this.DeptName + "' /><span>" + this.DeptName + "</span>");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function GetBasePlat() {
|
|
|
|
|
|
|
|
|
|
$("#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),
|
|
|
|
|
success: function (data) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
|
|
|
|
if (data.d != null) {
|
|
|
|
|
$(data.d).each(function () {
|
|
|
|
|
$("#select_plat").append("<option value='" + this.SortNo + "'>" + this.Name + "</option>");
|
|
|
|
|
});
|
|
|
|
|
GetShopList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function fopen() {
|
|
|
|
|
|
|
|
|
|
$.fancybox({
|
|
|
|
|
'width': '40%',
|
|
|
|
|
'height': '40%',
|
|
|
|
|
'autoScale': false,
|
|
|
|
|
'transitionIn': 'elastic',
|
|
|
|
|
'transitionOut': 'elastic',
|
|
|
|
|
'href': '#test',
|
|
|
|
|
'onComplete': function () {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
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 OrderDate}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "单量";
|
|
|
|
|
col.CellTemplate = "<a>{Bind OrderNum}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "销售额";
|
|
|
|
|
col.CellTemplate = "<span>{Bind TotalPrice}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "国际运费";
|
|
|
|
|
col.CellTemplate = "<span>{Bind PostFee}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "采购成本";
|
|
|
|
|
col.CellTemplate = "<span>{Bind GoodsFee}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "国内运费";
|
|
|
|
|
col.CellTemplate = "<span>{Bind GnPostFee}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "赔款";
|
|
|
|
|
col.CellTemplate = "<span>{Bind BackPrice}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "利润";
|
|
|
|
|
col.CellTemplate = "<span>{Bind SalePrice}</span>";
|
|
|
|
|
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 GetShopList() {
|
|
|
|
|
$("#div_shop").empty();
|
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
|
|
|
|
|
param.DeptId = $("#select_dept").val();
|
|
|
|
|
param.PlatType = $("#select_plat").val();
|
|
|
|
|
|
|
|
|
|
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 + "' sn='" + this.ShopName + "' /><span>" + this.ShopName + "</span>");
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function ReadData() {
|
|
|
|
|
if ($("#txt_SDate").val() == "") {
|
|
|
|
|
alert("请输入发货日期范围");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_EDate").val() == "") {
|
|
|
|
|
alert("请输入发货日期范围");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("input[no]:checked").length == 0) {
|
|
|
|
|
alert("请至少选择一家店铺");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
var list = new Array();
|
|
|
|
|
$("input[no]:checked").each(function () {
|
|
|
|
|
// $(this).attr("no") + ",";
|
|
|
|
|
var md = new Object();
|
|
|
|
|
md.ShopId = $(this).attr("no");
|
|
|
|
|
md.ShopName = $(this).attr("sn");
|
|
|
|
|
Array.add(list, md);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
param.list = list;
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
|
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
|
// param.ShopIds = shopids;
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "TJ_CountServer.asmx/GetShopDayCount",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
//async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
datagrid1.DataBind(data.d);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function ReadData2() {
|
|
|
|
|
if ($("#txt_SDate").val() == "") {
|
|
|
|
|
alert("请输入发货日期范围");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_EDate").val() == "") {
|
|
|
|
|
alert("请输入发货日期范围");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("input[do]:checked").length == 0) {
|
|
|
|
|
alert("请至少选择一个部门");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
var list = new Array();
|
|
|
|
|
$("input[do]:checked").each(function () {
|
|
|
|
|
// $(this).attr("no") + ",";
|
|
|
|
|
var md = new Object();
|
|
|
|
|
md.DeptId = $(this).attr("do");
|
|
|
|
|
md.DeptName = $(this).attr("dn");
|
|
|
|
|
Array.add(list, md);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
param.list = list;
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
|
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
|
// param.ShopIds = shopids;
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "TJ_CountServer.asmx/GetDeptDayCount",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
//async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
datagrid1.DataBind(data.d);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function ReadData3() {
|
|
|
|
|
if ($("#txt_SDate").val() == "") {
|
|
|
|
|
alert("请输入发货日期范围");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_EDate").val() == "") {
|
|
|
|
|
alert("请输入发货日期范围");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
|
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
|
// param.ShopIds = shopids;
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "TJ_CountServer.asmx/GetCompanyDayCount",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
//async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
datagrid1.DataBind(data.d);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function ReadOff() {
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "TJ_CountServer.asmx/GetExpressOff",
|
|
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
datagrid2.DataBind(data.d);
|
|
|
|
|
$("input[eid]").MaskedTextBox();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function GetPersonFee() {
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "TJ_CountServer.asmx/GetPersonFee",
|
|
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
$("#a_PersonFee").html(data.d);
|
|
|
|
|
$("#txt_PersonFee").val(data.d);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function ExportData() {
|
|
|
|
|
if ($("#txt_SDate").val() == "") {
|
|
|
|
|
alert("请输入发货日期范围");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_EDate").val() == "") {
|
|
|
|
|
alert("请输入发货日期范围");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("input[no]:checked").length == 0) {
|
|
|
|
|
alert("请至少选择一家店铺");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var param = new Object();
|
|
|
|
|
var list = new Array();
|
|
|
|
|
$("input[no]:checked").each(function () {
|
|
|
|
|
// $(this).attr("no") + ",";
|
|
|
|
|
var md = new Object();
|
|
|
|
|
md.ShopId = $(this).attr("no");
|
|
|
|
|
md.ShopName = $(this).attr("sn");
|
|
|
|
|
Array.add(list, md);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
param.list = list;
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
|
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
|
// param.ShopIds = shopids;
|
|
|
|
|
var fname ="店铺合计利润报表.xls";
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "TJ_CountServer.asmx/ExcelShopDayCount",
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
if ($("input[do]:checked").length == 0) {
|
|
|
|
|
alert("请至少选择一个部门");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
var list = new Array();
|
|
|
|
|
$("input[do]:checked").each(function () {
|
|
|
|
|
// $(this).attr("no") + ",";
|
|
|
|
|
var md = new Object();
|
|
|
|
|
md.DeptId = $(this).attr("do");
|
|
|
|
|
md.DeptName = $(this).attr("dn");
|
|
|
|
|
Array.add(list, md);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
param.list = list;
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
|
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
|
var fname = "部门合计利润报表.xls";
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "TJ_CountServer.asmx/ExcelDeptDayCount",
|
|
|
|
|
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 ExportData3() {
|
|
|
|
|
if ($("#txt_SDate").val() == "") {
|
|
|
|
|
alert("请输入发货日期范围");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_EDate").val() == "") {
|
|
|
|
|
alert("请输入发货日期范围");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
|
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
|
var fname = "公司合计利润报表.xls";
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "TJ_CountServer.asmx/ExcelCompanyDayCount",
|
|
|
|
|
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 SetOffNum() {
|
|
|
|
|
var list = datagrid2.GetSelectListModel();
|
|
|
|
|
if (list == null || list.length == 0) {
|
|
|
|
|
alert("请选择要修改的物流渠道");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($("#txt_OffNum").val() == "") {
|
|
|
|
|
alert("请输入批量修改的折扣");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$(list).each(function () {
|
|
|
|
|
var id = this.ExpressPostID;
|
|
|
|
|
$("input[eid='" + id + "']").val($("#txt_OffNum").val());
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function SaveOffNum() {
|
|
|
|
|
if ($("#txt_PersonFee").val() == "") {
|
|
|
|
|
alert("请填写人工费");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
datagrid2.UpdateDataSource();
|
|
|
|
|
var error = "";
|
|
|
|
|
$(datagrid2.DataSource).each(function () {
|
|
|
|
|
if (this.OffNum == null || this.OffNum == "")
|
|
|
|
|
error += this.Name + "折扣没填";
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
if (error != "") {
|
|
|
|
|
alert(error);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var param = new Object();
|
|
|
|
|
|
|
|
|
|
param.list = datagrid2.DataSource;
|
|
|
|
|
param.PersonFee = -1;
|
|
|
|
|
if ($("#txt_PersonFee").val() != $("#a_PersonFee").html())
|
|
|
|
|
param.PersonFee = $("#txt_PersonFee").val();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "TJ_CountServer.asmx/SaveExpressOff",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
alert("修改完成");
|
|
|
|
|
$("#txt_OffNum").val("");
|
|
|
|
|
ReadOff();
|
|
|
|
|
$("#a_PersonFee").html($("#txt_PersonFee").val())
|
|
|
|
|
$.fancybox.close();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
<body class="headbody">
|
|
|
|
|
<div style="display: none">
|
|
|
|
|
<div id="test" title="物流折扣" style="width: 500px; height: 350px;">
|
|
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="width: 110px;" class="f1">
|
|
|
|
|
</td>
|
|
|
|
|
<td colspan="2">
|
|
|
|
|
<a id="a_PersonFee" style="display: none"></a>
|
|
|
|
|
<input id="txt_PersonFee" type='text' min='1' max='10' precision='2' style='width: 100px;display: none' class='editTextbox' value='' />
|
|
|
|
|
<input id="Button1" type="button" value="确定" class="btnClass btnClassEdit" onclick="SetOffNum();" style="display: none" />
|
|
|
|
|
<font color="red">例如:85折就填8.5</font>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="left" colspan="3">
|
|
|
|
|
<div style="height: 280px; overflow: auto">
|
|
|
|
|
<div id="DataGrid2"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="center" colspan="3">
|
|
|
|
|
<input id="btn_Save" type="button" class="btnClass btnClassSave" value="保 存" onclick="SaveOffNum();" /> <input
|
|
|
|
|
id="btn_Cancel" type="button" class="btnClass btnClassClose" value="关 闭" />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="test1" title="物流折扣" style="width: 500px; height: 350px;">
|
|
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="width: 110px;" class="f1">平台佣金:
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<input id="txt_ptyj" type='text' min='0' max='1000000' precision='2' style='width: 100px;' class='editTextbox' value='' />
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
<td style="width: 110px;" class="f1">实际运费:
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<input id="txt_sjyf" type='text' min='0' max='1000000' precision='2' style='width: 100px;' class='editTextbox' value='' />元
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="width: 110px;" class="f1">进货价:
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<input id="txt_jhj" type='text' min='0' max='1000000' precision='2' style='width: 100px;' class='editTextbox' value='' />元
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
<td style="width: 110px;" class="f1">国内运费:
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<input id="txt_gnyf" type='text' min='0' max='1000000' precision='2' style='width: 100px;' class='editTextbox' value='' />元
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td align="center" colspan="4">
|
|
|
|
|
<input id="btn_Save2" type="button" class="btnClass btnClassSave" value="保 存" onclick="UpdateOrderSale();" /> <input
|
|
|
|
|
id="btn_Cancel2" type="button" class="btnClass btnClassClose" value="关 闭" />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="title_ico">
|
|
|
|
|
利润报表
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" align="center" class="tableAll">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
|
|
<td colspan="5">
|
|
|
|
|
<input id="rad_1" type="radio" value="" name="tj" checked="checked"/><label for="rad_1">按店铺统计</label> <input id="rad_2" name="tj" type="radio" value="" /><label for="rad_2">按事业部统计</label> <input id="rad_3" name="tj" type="radio" value="" /><label for="rad_3">整个公司统计</label></td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" width="13%">部门/平台:</td>
|
|
|
|
|
<td width="35%">
|
|
|
|
|
<select id="select_dept" class="selectClass" style="width: 120px" name="D8">
|
|
|
|
|
|
|
|
|
|
</select><select id="select_plat" 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()" 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="查询" />
|
|
|
|
|
<input id="cmdOut" class="btnClass btnClassExcelTemplate" type="button" value="导出报表" /></td>
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
<tr id="tr_1">
|
|
|
|
|
|
|
|
|
|
<td class="f1" width="13%">店铺:</td>
|
|
|
|
|
<td colspan="4">
|
|
|
|
|
<div id="div_shop">
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
<tr id="tr_2" style="display:none">
|
|
|
|
|
|
|
|
|
|
<td class="f1" width="13%">事业部:</td>
|
|
|
|
|
<td colspan="4">
|
|
|
|
|
<div id="div_dept">
|
|
|
|
|
</div></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="5">
|
|
|
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|