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.
662 lines
23 KiB
Plaintext
662 lines
23 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FeeReport.aspx.cs" Inherits="TradeManageNew.TongJi.FeeReport" %>
|
|
|
|
<!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();
|
|
$(document).ready(function () {
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
WindowLoadModel.Isbgiframe = true;
|
|
WindowLoadModel.Load();
|
|
ajaxInit(WindowLoadModel);
|
|
Id = $.url.param("Id");
|
|
if (Id == undefined) {
|
|
Id = 0;
|
|
}
|
|
var CompanyId = $.url.param("CompanyId");
|
|
if (CompanyId == undefined) {
|
|
CompanyId = 0;
|
|
}
|
|
var SDate = $.url.param("SDate");
|
|
if (SDate == undefined) {
|
|
SDate = "";
|
|
}
|
|
var EDate = $.url.param("EDate");
|
|
if (EDate == undefined) {
|
|
EDate = "";
|
|
}
|
|
GetCompanyList();
|
|
if (CompanyId > 0)
|
|
$("#select_company").val(CompanyId);
|
|
var dd = new Date();
|
|
$("#txt_SDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-01");
|
|
$("#txt_EDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-" + dd.getDate());
|
|
if (SDate != "")
|
|
$("#txt_SDate").val(SDate);
|
|
if (EDate != "")
|
|
$("#txt_EDate").val(EDate);
|
|
$("#a_FeeList").click(function () {
|
|
|
|
window.location = "../SysManage/CompanyFeeList.aspx?CompanyId=" + $("#select_company").val();
|
|
});
|
|
$("div[fdesc]").live("click", function () {
|
|
$("#div_feedesc").html($(this).attr("fdesc"));
|
|
ShowFancybox();
|
|
});
|
|
$("#select_company").change(function () {
|
|
|
|
GetLeftFee();
|
|
GetFee1();
|
|
GetFee2();
|
|
GetFee4();
|
|
GetFee5();
|
|
});
|
|
|
|
GetLeftFee();
|
|
GetFee1();
|
|
GetFee2();
|
|
GetFee4();
|
|
GetFee5();
|
|
ReadData();
|
|
});
|
|
|
|
function ShowFancybox() {
|
|
$.fancybox({
|
|
'autoScale': false,
|
|
'transitionIn': 'elastic',
|
|
'transitionOut': 'elastic',
|
|
'href': '#test',
|
|
'onStart': function () {
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
function GetCompanyList() {
|
|
|
|
//$("#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>")
|
|
|
|
});
|
|
}
|
|
|
|
|
|
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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 GetLeftFee() {
|
|
var param = new Object();
|
|
param.CompanyId = $("#select_company").val();
|
|
|
|
|
|
$.ajax({
|
|
url: "../CangKuServerNew.asmx/GetLeftFee",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
async: false,
|
|
success: function (data) {
|
|
}
|
|
});
|
|
}
|
|
var Fee1 = 0;
|
|
var Fee2 = 0;
|
|
function GetFee1() {
|
|
var param = new Object();
|
|
param.CompanyId = $("#select_company").val();
|
|
|
|
|
|
$.ajax({
|
|
url: "../CangKuServerNew.asmx/GetInFee",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
async: false,
|
|
success: function (data) {
|
|
|
|
|
|
if (data.d != null) {
|
|
$("#a_NowFee2").html(data.d + "$");
|
|
Fee2 = data.d;
|
|
}
|
|
else
|
|
$("#a_NowFee2").html("0$");
|
|
|
|
}
|
|
});
|
|
}
|
|
function GetFee2() {
|
|
var param = new Object();
|
|
param.CompanyId = $("#select_company").val();
|
|
param.FeeType = 7;
|
|
|
|
|
|
$.ajax({
|
|
url: "../CangKuServerNew.asmx/GetOutFeeType",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
async: false,
|
|
success: function (data) {
|
|
|
|
|
|
if (data.d != null) {
|
|
$("#a_NowFee1").html(data.d + "$");
|
|
Fee1 = data.d;
|
|
}
|
|
else
|
|
$("#a_NowFee1").html("0$");
|
|
$("#a_NowFee3").html((parseFloat(Fee2) - parseFloat(Fee1)).toFixed(2) + "$");
|
|
}
|
|
});
|
|
}
|
|
function GetFee4() {
|
|
var param = new Object();
|
|
param.CompanyId = $("#select_company").val();
|
|
param.FeeType = 4;
|
|
|
|
|
|
$.ajax({
|
|
url: "../CangKuServerNew.asmx/GetOutFeeType",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
async: false,
|
|
success: function (data) {
|
|
|
|
|
|
if (data.d != null) {
|
|
$("#a_NowFee4").html(data.d + "$");
|
|
|
|
}
|
|
else
|
|
$("#a_NowFee4").html("0$");
|
|
|
|
}
|
|
});
|
|
}
|
|
function GetFee5() {
|
|
var param = new Object();
|
|
param.CompanyId = $("#select_company").val();
|
|
|
|
|
|
$.ajax({
|
|
url: "../CangKuServerNew.asmx/GetOutFeeCount",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
async: false,
|
|
success: function (data) {
|
|
|
|
|
|
if (data.d != null) {
|
|
$("#a_NowFee5").html(data.d.Num);
|
|
$("#a_NowFee6").html(data.d.Num2);
|
|
}
|
|
else {
|
|
$("#a_NowFee5").html("0");
|
|
$("#a_NowFee6").html("0");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
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 = $("#select_fee").val();
|
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
param.EDate = $("#txt_EDate").val();
|
|
param.PageSize = 1000;
|
|
param.PageIndex = 1;
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "../CangKuServerNew.asmx/GetListFeeReport4",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
//async: false,
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
$("#div1").html(data.d);
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
function ExportData() {
|
|
|
|
if ($("#txt_SDate").val() == "") {
|
|
alert("请输入开始日期");
|
|
return;
|
|
}
|
|
if ($("#txt_EDate").val() == "") {
|
|
alert("请输入结束日期");
|
|
return;
|
|
}
|
|
var param = new Object();
|
|
param.CompanyName = $("#select_company").find("option:selected").text();
|
|
param.CompanyId = $("#select_company").val();
|
|
param.FeeType = $("#select_fee").val();
|
|
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
var fname = param.CompanyName + "费用报表.xls";
|
|
$.ajax({
|
|
url: "../CangKuServerNew.asmx/GetListFeeReportExcel",
|
|
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>
|
|
<style type="text/css">
|
|
.bghd
|
|
{
|
|
font-size: 14pt;
|
|
font-weight: bolder;
|
|
|
|
color: Gray;
|
|
}
|
|
.bg1
|
|
{
|
|
color: #888888;
|
|
|
|
text-align: center;
|
|
}
|
|
.af
|
|
{
|
|
font-size: 15pt;
|
|
text-align: center;
|
|
color: #FFFFFF;
|
|
background-color: #3399FF;
|
|
width: 100px;
|
|
height: 25px;
|
|
}
|
|
.af2
|
|
{
|
|
font-size: 15pt;
|
|
text-align: center;
|
|
color: #FFFFFF;
|
|
background-color: #FF9900;
|
|
width: 100px;
|
|
height: 25px;
|
|
}
|
|
.af3
|
|
{
|
|
font-size: 15pt;
|
|
text-align: center;
|
|
color: #FFFFFF;
|
|
background-color: #FF6666;
|
|
width: 100px;
|
|
height: 25px;
|
|
}
|
|
.tb
|
|
{
|
|
border:0;
|
|
cellpadding:0;
|
|
cellspacing:0;
|
|
}
|
|
.style1
|
|
{
|
|
height: 42px;
|
|
}
|
|
</style>
|
|
</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 class="f1" width="13%">
|
|
费用类型
|
|
</td>
|
|
<td width="18%">
|
|
<select id="select_fee" class="selectClass" style="width: 200px" name="D2">
|
|
<option value="0">全部</option>
|
|
<option value="7">预估运费</option>
|
|
<option value="1">仓储费</option>
|
|
<option value="2">发货操作费</option>
|
|
<option value="3">FBA操作费</option>
|
|
<option value="4">头程费</option>
|
|
<option value="5">运费</option>
|
|
<option value="6">其他费用</option>
|
|
</select>
|
|
</td>
|
|
<td class="f1" width="13%">
|
|
|
|
</td>
|
|
<td width="25%">
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<input id="btn_Excel" class="btnClass" type="button" value="导出账单"
|
|
onclick="ExportData();" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="5" class="style1"> <span style="color: #888888; font-size: 16pt">预估运费:</span><span id="a_NowFee1" class="af3">0$</span>
|
|
<span style="color: #888888; font-size: 16pt">累计充值:</span><span id="a_NowFee2" class="af3">0$</span>
|
|
<span style="color: #888888; font-size: 16pt">当前余额:</span><span id="a_NowFee3" class="af3">0$</span><span style="color: #888888; font-size: 16pt">已出账单运费:</span><span id="a_NowFee4" class="af3">0$</span><span style="color: #888888; font-size: 16pt">总订单数:</span><span id="a_NowFee5" class="af3">0</span><span style="color: #888888; font-size: 16pt">未出账单订单数:</span><span id="a_NowFee6" class="af3">0</span>
|
|
<a id="a_FeeList" style="color: #3399FF; cursor: pointer">查看充值记录</a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" colspan="5">
|
|
<div id="div1">
|
|
|
|
<table width="85%" class="tb" >
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="4">
|
|
<div class="bghd">
|
|
2018年08月19日 费用 合计:<span class="af2">0$</span></div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<br />
|
|
<table width="85%" class="tb">
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="4">
|
|
<div class="bghd">
|
|
2018年08月18日 费用 合计:<span class="af2">0$</span></div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table><br />
|
|
<table width="85%" class="tb">
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="4">
|
|
<div class="bghd">
|
|
2018年08月17日 费用 合计:<span class="af2">122.5000$</span></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" class="bg1">
|
|
仓储费:
|
|
</td>
|
|
<td width="35%">
|
|
<div fdesc="库存立方16.0000">
|
|
<span >122.5000$</span> [库存立方16.0000]
|
|
</div>
|
|
</td>
|
|
<td width="35%">
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table><br />
|
|
<table class="tb" width="85%">
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="4">
|
|
<div class="bghd">
|
|
2018年08月15日 费用 合计:<span>2.0000$</span></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="15%" class="bg1">
|
|
发货操作费:
|
|
</td>
|
|
<td width="35%">
|
|
<div fdesc="发货单数2">
|
|
<span>122.5000$</span> [发货单数2]</div>
|
|
</td>
|
|
<td width="35%">
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
|