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.
448 lines
15 KiB
Plaintext
448 lines
15 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FeeReport2.aspx.cs" Inherits="TradeManage.TongJi.FeeReport2" %>
|
|
|
|
|
|
<!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="../css2/icon.css">
|
|
<link rel="stylesheet" type="text/css" href="../css2/DataGrid.css" />
|
|
<link href="../css2/gray/easyui.css" rel="stylesheet" type="text/css" />
|
|
<link rel="stylesheet" href="../font-awesome/css/font-awesome.min.css" />
|
|
<link href="../css2/New.css" rel="stylesheet" type="text/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/FixTable.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/jquery.url.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">
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
var WindowLoadModel = new WindowLoad();
|
|
var CompanyId = "<%=Session["CompanyId"]%>";
|
|
$(document).ready(function () {
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
WindowLoadModel.Isbgiframe = true;
|
|
WindowLoadModel.Load();
|
|
ajaxInit(WindowLoadModel);
|
|
CreateDataGrid();
|
|
GetCompanyList();
|
|
var dd = new Date();
|
|
$("#txt_SDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-01");
|
|
$("#txt_EDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-" + dd.getDate());
|
|
|
|
|
|
$("#DataGrid1 [CommandName]").live("click", function () {
|
|
var CommandName = $(this).attr("CommandName");
|
|
var index = $(this).parentsUntil("tr").parent().attr("index");
|
|
Model = datagrid1.Get_Model(index);
|
|
if (CommandName == "cmdEdit") {
|
|
|
|
window.open("FeeReport.aspx?CompanyId="+Model.CompanyId+"&SDate="+$("#txt_SDate").val()+"&EDate="+$("#txt_EDate").val());
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
// GetFeeModel();
|
|
ReadData();
|
|
});
|
|
|
|
function ShowFancybox() {
|
|
$.fancybox({
|
|
'autoScale': false,
|
|
'transitionIn': 'elastic',
|
|
'transitionOut': 'elastic',
|
|
'href': '#test',
|
|
'onStart': function () {
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
function GetCompanyList() {
|
|
if(CompanyId==1)
|
|
$("#select_company").append("<option value='0'>全部</option>")
|
|
|
|
$.ajax({
|
|
url: "../SysManageServiceNew.asmx/GetListCompany3",
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
dataType: "json",
|
|
async: false,
|
|
success: function (data) {
|
|
if (data.d != null) {
|
|
$(data.d).each(function () {
|
|
$("#select_company").append("<option value='" + this.ID + "'>" + this.Name + "</option>")
|
|
|
|
});
|
|
}
|
|
|
|
|
|
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
//#region 初始化DataGrid
|
|
function CreateDataGrid() {
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "客户单位";
|
|
col.CellTemplate = "<a>{Bind CompanyName}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "仓储费";
|
|
col.CellTemplate = "<a>{Bind Fee1}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "发货费";
|
|
col.CellTemplate = "<a>{Bind Fee2}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "FBA操作费";
|
|
col.CellTemplate = "<a>{Bind Fee3}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "运费";
|
|
col.CellTemplate = "<a>{Bind Fee4}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "头程费";
|
|
col.CellTemplate = "<a>{Bind Fee5}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "入库接收费";
|
|
col.CellTemplate = "<a>{Bind Fee6}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "其它费用";
|
|
col.CellTemplate = "<a>{Bind Fee9}</a>";
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "合计";
|
|
col.CellTemplate = "<span>{Bind HJFee}</span>";
|
|
// col.SortExpression = "b.LeftNum";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
col.HeaderText = "操作";
|
|
col.Width = "80px";
|
|
col.CellTemplate = "<a CommandName='cmdEdit' style='color: #23527c;cursor:pointer'>查看明细</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
datagrid1.SetPageSize(20);
|
|
datagrid1.SetPageIndex(1);
|
|
// datagrid1.SortExpression = "b.GoodsCode,b.Indate";
|
|
// datagrid1.ViewSortDirection = "ASC";
|
|
// datagrid1.IsFixHeader = true;
|
|
// datagrid1.Height = $(document).height() - 230;
|
|
datagrid1.ShowIndexColumn = false;
|
|
datagrid1.AllowPaging = false;
|
|
datagrid1.Width = "100%";
|
|
//datagrid1.Sorting(function () {
|
|
|
|
// ReadData();
|
|
//});
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
|
datagrid1.Init();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function SaveGDFee() {
|
|
|
|
var param = new Object();
|
|
if ($("#txt_YJ").val() != "")
|
|
param.Rate = $("#txt_YJ").val();
|
|
else
|
|
param.Rate = 0;
|
|
param.GDFee = 0;
|
|
if ($("#txt_GD").val() != "")
|
|
param.GDFee = $("#txt_GD").val();
|
|
$.ajax({
|
|
url: "TJ_CountServer.asmx/SaveGDFee",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
function fopen() {
|
|
|
|
$.fancybox({
|
|
'width': '40%',
|
|
'height': '40%',
|
|
'autoScale': false,
|
|
'transitionIn': 'elastic',
|
|
'transitionOut': 'elastic',
|
|
'href': '#test',
|
|
'onComplete': function () {
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
function GetFeeModel() {
|
|
var param = new Object();
|
|
param.CompanyID = $("#select_company").val();
|
|
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "../SysManage/SysManageService.asmx/Get_JC_CompanyModel2",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
|
|
if (data.d != null && data.d.NowFee != null) {
|
|
$("#a_NowFee").html(data.d.NowFee + "$");
|
|
|
|
}
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
function ReadData() {
|
|
|
|
if ($("#txt_SDate").val() == "") {
|
|
alert("请输入开始日期");
|
|
return;
|
|
}
|
|
if ($("#txt_EDate").val() == "") {
|
|
alert("请输入结束日期");
|
|
return;
|
|
}
|
|
var param = new Object();
|
|
param.CompanyId = $("#select_company").val();
|
|
param.FeeType = 0;// $("#select_fee").val();
|
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "../CangKuServerNew.asmx/GetListFeeReportNew2",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
//async: false,
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
datagrid1.DataBind(data.d);
|
|
}
|
|
});
|
|
|
|
}
|
|
function ExportData() {
|
|
if ($("#txt_SDate").val() == "") {
|
|
alert("请输入开始日期");
|
|
return;
|
|
}
|
|
if ($("#txt_EDate").val() == "") {
|
|
alert("请输入结束日期");
|
|
return;
|
|
}
|
|
var param = new Object();
|
|
param.CompanyId = $("#select_company").val();
|
|
param.FeeType = $("#select_fee").val();
|
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
var fname = "利润报表.xls";
|
|
$.ajax({
|
|
url: "TJ_CountServer.asmx/GetUserOrderExcel",
|
|
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 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 GetChart() {
|
|
if ($("#txt_SDate").val() == "") {
|
|
alert("请输入开始日期");
|
|
return;
|
|
}
|
|
if ($("#txt_EDate").val() == "") {
|
|
alert("请输入结束日期");
|
|
return;
|
|
}
|
|
var param = new Object();
|
|
|
|
param.UserId = $("#select_name").val();
|
|
param.GoodsCode = $("#txt_Code").val();
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "TJ_CountServer.asmx/GetMyOrderCount",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
//async: false,
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
if (data.d != null) {
|
|
|
|
cate = data.d.categories;
|
|
datas = data.d.Data;
|
|
SetChart();
|
|
}
|
|
|
|
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
var Type = 1;
|
|
var OrderCode = "";
|
|
var sobj = null;
|
|
function SaveData() {
|
|
if ($("#txt_yf").val() == "" && $("#txt_tc").val() == "" && $("#txt_cb").val() == "") {
|
|
alert("请输入费用");
|
|
return;
|
|
}
|
|
|
|
var param = new Object();
|
|
|
|
param.Type = Type;
|
|
param.OrderCode = OrderCode;
|
|
if (Type == 1)
|
|
param.Fee = $("#txt_yf").val();
|
|
else if (Type == 2)
|
|
param.Fee = $("#txt_tc").val();
|
|
else if (Type == 3)
|
|
param.Fee = $("#txt_cb").val();
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "TJ_CountServer.asmx/SaveFee",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
//async: false,
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
|
|
if (Type == 1)
|
|
sobj.html($("#txt_yf").val());
|
|
else if (Type == 2)
|
|
sobj.html($("#txt_tc").val());
|
|
else if (Type == 3)
|
|
sobj.html($("#txt_cb").val());
|
|
|
|
|
|
$.fancybox.close();
|
|
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
<body class="headbody">
|
|
<div class="title_ico">
|
|
费用报表
|
|
</div>
|
|
<div style="display: none;">
|
|
<div id="test" title="编辑" style="width: 550px; height: 300px;">
|
|
<table class="tableAll" style="width: 99%;">
|
|
|
|
<tr>
|
|
<td class="f1">费用详情:
|
|
</td>
|
|
<td colspan="3">
|
|
<div id="div_feedesc"></div>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" align="center"
|
|
class="tableAll">
|
|
<tr>
|
|
<td class="f1" width="13%">
|
|
客户单位
|
|
</td>
|
|
<td width="18%">
|
|
|
|
<select id="select_company" class="selectClass" style="width: 200px" 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="查询" onclick="ReadData();"/>
|
|
<input id="cmdOut" class="btnClass btnClassExcelTemplate" onclick="ExportData();"
|
|
type="button" value="导出报表" style="display:none" />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="5"> </td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" colspan="5">
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|