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.
1224 lines
46 KiB
Plaintext
1224 lines
46 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserGoodsCount.aspx.cs" Inherits="TradeManage.TongJi.UserGoodsCount" %>
|
|
|
|
|
|
|
|
<!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/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" src="../Scripts/highcharts.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);
|
|
// CreateDataGrid();
|
|
GetBasePlat();
|
|
GetShopList();
|
|
GetGDFee();
|
|
ReadUser();
|
|
var UserId = $.url.param("UserId");
|
|
$("#select_name").val(UserId);
|
|
var SDate = $.url.param("SDate");
|
|
$("#txt_SDate").val(SDate);
|
|
var EDate = $.url.param("EDate");
|
|
$("#txt_EDate").val(EDate);
|
|
var GradeCode = $.url.param("GradeCode");
|
|
$("#txt_Code").val(GradeCode);
|
|
if ($("#txt_SDate").val() == "") {
|
|
var dd = new Date();
|
|
$("#txt_SDate").val(dd.getFullYear() + "-" + (dd.getMonth() + 1) + "-01");
|
|
$("#txt_EDate").val(dd.localeFormat("yyyy-MM-dd"));
|
|
}
|
|
ReadData();
|
|
GetChart();
|
|
$("#btn_sch").bind("click", function () {
|
|
SaveGDFee();
|
|
ReadData();
|
|
GetChart();
|
|
});
|
|
$("#select_sort,#select_sort1").bind("change", function () {
|
|
|
|
ReadData();
|
|
|
|
});
|
|
|
|
$("#select_plat").bind("change", function () {
|
|
|
|
GetShopList();
|
|
|
|
});
|
|
$("a[oid]").live("click", function () {
|
|
var oid = $(this).attr("oid");
|
|
var bjname = $(this).attr("soname");
|
|
if (bjname == "标记回看") {
|
|
UpdateOrderBJ(oid, '');
|
|
$("a[oid2=" + oid + "]").html("");
|
|
$(this).attr("soname", "");
|
|
}
|
|
else {
|
|
|
|
UpdateOrderBJ(oid, '标记回看');
|
|
$(this).attr("soname", "标记回看");
|
|
$("a[oid2=" + oid + "]").html("标记回看");
|
|
}
|
|
|
|
});
|
|
$("a[gid]").live("click", function () {
|
|
$("#DataGrid1").hide();
|
|
fopen2();
|
|
$("#txt_Price").val("");
|
|
GId = $(this).attr("gid");
|
|
var hcb = $(this).attr("gcb");
|
|
$("#a_GoodsPrice").html(hcb);
|
|
$("#a_GoodsCode").html($(this).html());
|
|
|
|
});
|
|
$("#Chk_all").bind("click", function () {
|
|
|
|
if ($(this).is(":checked") == true) {
|
|
$("#div_xz input").attr("checked", "checked");
|
|
}
|
|
else
|
|
$("#div_xz input").removeAttr("checked");
|
|
});
|
|
$("#" + datagrid1.TableID + " a[CommandName='cb']").live("click", function () {
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
Type = 3;
|
|
OrderCode = model.PlatOrderCode;
|
|
$("#tr1,#tr2").hide();
|
|
$("#tr3").show();
|
|
$("#txt_cb").val($(this).html());
|
|
sobj = $(this);
|
|
$("#DataGrid1").hide();
|
|
fopen1();
|
|
});
|
|
$("#" + datagrid1.TableID + " a[CommandName='yf']").live("click", function () {
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
Type = 1;
|
|
$("#tr3,#tr2").hide();
|
|
$("#tr1").show();
|
|
sobj = $(this);
|
|
OrderCode = model.PlatOrderCode;
|
|
$("#txt_yf").val($(this).html());
|
|
$("#DataGrid1").hide();
|
|
|
|
fopen1();
|
|
});
|
|
$("#" + datagrid1.TableID + " a[CommandName='tc']").live("click", function () {
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
Type = 2;
|
|
OrderCode = model.PlatOrderCode;
|
|
$("#txt_tc").val($(this).html());
|
|
$("#tr1,#tr3").hide();
|
|
$("#tr2").show();
|
|
sobj = $(this);
|
|
$("#DataGrid1").hide();
|
|
fopen1();
|
|
});
|
|
// UpdateDDTrackCode();
|
|
});
|
|
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>");
|
|
});
|
|
|
|
}
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
function GetShopList() {
|
|
$("#select_shop").empty();
|
|
$("#select_shop").append("<option value='0'>全部</option>");
|
|
var param = new Object();
|
|
|
|
param.DeptId = 0;
|
|
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) {
|
|
$(data.d).each(function (i) {
|
|
$("#select_shop").append("<option value='" + this.ShopId + "'>" + this.ShopName + "</option>");
|
|
});
|
|
|
|
}
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
function ReadUser() {
|
|
$("#select_name").append("<option value='0'>全部</option>");
|
|
|
|
$.ajax({
|
|
url: "../SysManage/SysManageService.asmx/GetAllListJC_UserInfo",
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
async: false,
|
|
success: function (data) {
|
|
|
|
|
|
$(data.d).each(function () {
|
|
|
|
$("#select_name").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
|
|
|
|
});
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
function UpdateDDTrackCode() {
|
|
|
|
$.ajax({
|
|
url: "TJ_CountServer.asmx/UpdateDDTrackCode",
|
|
//data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
function GetGDFee() {
|
|
|
|
$.ajax({
|
|
url: "TJ_CountServer.asmx/GetGDFee",
|
|
//data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
if (data.d != null) {
|
|
if (data.d.WeightRate != null)
|
|
$("#txt_YJ").val(data.d.WeightRate);
|
|
if (data.d.PersonFee != null)
|
|
$("#txt_GD").val(data.d.PersonFee);
|
|
}
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
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 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 UpdateOrderBJ(OId, OrderName) {
|
|
var param = new Object();
|
|
param.OrderId = OId;
|
|
param.OrderName = OrderName;
|
|
|
|
|
|
$.ajax({
|
|
url: "TJ_CountServer.asmx/UpdateOrderBJ",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
|
|
|
|
}
|
|
});
|
|
}
|
|
function CreateDataGrid() {
|
|
Array.clear(datagrid1.Columns);
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "平台|店铺";
|
|
col.CellTemplate = "<a oid='{Bind OrderId}' soname='{Bind BJState}'>{Bind PlatName}</a> <a style='color:red' oid2='{Bind OrderId}'>{Bind BJState}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "订单号";
|
|
col.Width = "180px";
|
|
col.Align = "left";
|
|
col.CellTemplate = "<a href='../Dingdan/DD_OrderGoodsMateForTM.aspx?Title=订单查询&OrderId={Bind OrderId}' target='_blank' class='linka'>{Bind PlatOrderCode}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
// col = new nblf.ui.DataGridColumn();
|
|
// col.HeaderText = "合并订单号";
|
|
// col.Width = "90px";
|
|
// col.CellTemplate = "<span>{Bind JoinOrderCode}</span>";
|
|
// //col.SortExpression = "b.GoodsNum";
|
|
// Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
if ($("#Chk_1").is(":checked") == true) {
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "订单状态";
|
|
col.CellTemplate = "<span>{Bind StateName}</span>";
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#Chk_2").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "说明";
|
|
col.CellTemplate = "<span>{Bind Remark}</span>";
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#Chk_3").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "国家";
|
|
col.CellTemplate = "<span>{Bind CountryName}</span>";
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#Chk_33").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "州省";
|
|
col.CellTemplate = "<span>{Bind RevProvince}</span>";
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#Chk_4").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "收件人";
|
|
col.CellTemplate = "<span>{Bind RevName}</span>";
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#Chk_5").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "订单日期";
|
|
col.CellTemplate = "<span>{Bind OrderDate}</span>";
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#Chk_6").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "发货日期";
|
|
col.CellTemplate = "<span>{Bind PostDate}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
|
|
if ($("#Chk_7").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "物流方式";
|
|
col.CellTemplate = "<span>{Bind PostInfo}</span>";
|
|
// col.SortExpression = "b.GoodsInNum";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#Chk_8").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "跟踪码";
|
|
col.CellTemplate = "<span>{Bind TrackCode}</span>";
|
|
col.Width = "120px";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#Chk_9").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "货物编号";
|
|
col.CellTemplate = "<span>{Bind GoodsCode}</span>";
|
|
// col.SortExpression = "b.LeftNum";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#Chk_10").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "货物数量";
|
|
col.CellTemplate = "<span>{Bind GoodsNum}</span>";
|
|
// col.SortExpression = "b.LeftNum";
|
|
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 YJPrice}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
if ($("#Chk_11").is(":checked") == true) {
|
|
col.HeaderText = "税费$";
|
|
col.CellTemplate = "<span>{Bind escrowFee}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "货物成本";
|
|
col.CellTemplate = "<a CommandName='cb'>{Bind GoodsFee}</a>";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
if ($("#Chk_12").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "关税";
|
|
col.CellTemplate = "<span>{Bind Fee1}</span>";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "头程费用";
|
|
col.CellTemplate = "<a CommandName='tc'>{Bind Fee3}</a>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "预估运费";
|
|
col.CellTemplate = "<span>{Bind Fee2}</span>";
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "运费";
|
|
col.CellTemplate = "<a CommandName='yf'>{Bind PostFee}</a>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "运费佣金";
|
|
col.CellTemplate = "<span>{Bind Fee4}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "我们承担的运费";
|
|
col.CellTemplate = "<a>{Bind BackPostFee}</a>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "赔款";
|
|
col.CellTemplate = "<a>{Bind BackMoney}</a>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
if ($("#Chk_13").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "固定成本";
|
|
col.CellTemplate = "<span>{Bind GDFee}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#chk_cc").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "仓储费";
|
|
col.CellTemplate = "<span>{Bind CCFee}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#chk_md").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "面单费";
|
|
col.CellTemplate = "<span>{Bind MDFee}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#chk_gg").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "广告费";
|
|
col.CellTemplate = "<span>{Bind GGFee}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#chk_th").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "退款费";
|
|
col.CellTemplate = "<span>{Bind GGFee}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#chk_yf").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "退货运费";
|
|
col.CellTemplate = "<span>{Bind GGFee}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
if ($("#chk_ss").is(":checked") == true) {
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "物流申诉费";
|
|
col.CellTemplate = "<span>{Bind GGFee}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
}
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "毛利润";
|
|
col.CellTemplate = "<span>{Bind LRFee}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
col = new nblf.ui.DataGridColumn();
|
|
col.HeaderText = "利润率";
|
|
col.CellTemplate = "<span>{Bind LRRate}</span>";
|
|
// col.SortExpression = "InPrice";
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
datagrid1.SetPageSize(200);
|
|
datagrid1.SetPageIndex(1);
|
|
// datagrid1.SortExpression = "b.GoodsCode,b.Indate";
|
|
// datagrid1.ViewSortDirection = "ASC";
|
|
datagrid1.IsFixHeader = true;
|
|
datagrid1.Height = 500;
|
|
datagrid1.ShowIndexColumn = false;
|
|
datagrid1.AllowPaging = true;
|
|
datagrid1.Width = "98%";
|
|
//datagrid1.Sorting(function () {
|
|
|
|
// ReadData();
|
|
//});
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.CheckBox;
|
|
datagrid1.Init();
|
|
datagrid1.add_PageIndexChanged(function () { ReadData(); });
|
|
|
|
}
|
|
function ReadData() {
|
|
CreateDataGrid();
|
|
if ($("#txt_SDate").val() == "") {
|
|
alert("请输入开始日期");
|
|
return;
|
|
}
|
|
if ($("#txt_EDate").val() == "") {
|
|
alert("请输入结束日期");
|
|
return;
|
|
}
|
|
var param = new Object();
|
|
param.BJState = 0;
|
|
if ($("#Chk_BJ").is(":checked") == true) {
|
|
param.BJState = 1;
|
|
}
|
|
param.PlatId = $("#select_plat").val();
|
|
param.ShopId = $("#select_shop").val();
|
|
|
|
param.UserId = $("#select_name").val();
|
|
param.GoodsCode = $("#txt_Code").val();
|
|
param.OrderCode = $("#txt_OrderCode").val();
|
|
param.TrackCode = $("#txt_TrackCode").val();
|
|
param.Name = $("#txt_Name").val();
|
|
param.OrderState = $("#select_state").val();
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
param.EDate = $("#txt_EDate").val();
|
|
if ($("#txt_GD").val() != "")
|
|
param.GDFee = $("#txt_GD").val();
|
|
else
|
|
param.GDFee = 0;
|
|
if ($("#txt_YJ").val() != "")
|
|
param.YJRate = $("#txt_YJ").val();
|
|
else
|
|
param.YJRate = 0;
|
|
param.OffType = $("#select_offtype").val();
|
|
if ($("#txt_OffPrice").val() == "")
|
|
param.Offfee = 0;
|
|
else
|
|
param.Offfee = $("#txt_OffPrice").val();
|
|
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "../SysManageServiceNew.asmx/GetUserOrderList2",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
//async: false,
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
if (data.d != null) {
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
}
|
|
else {
|
|
datagrid1.Set_RowCount(0);
|
|
datagrid1.DataBind(null);
|
|
|
|
}
|
|
// if (data.d != null && data.d != "") {
|
|
// $("#tb1").html(data.d);
|
|
// // HB();
|
|
// }
|
|
// else {
|
|
|
|
// $("#tb1").empty();
|
|
// }
|
|
}
|
|
});
|
|
|
|
}
|
|
function ExportData() {
|
|
if ($("#txt_SDate").val() == "") {
|
|
alert("请输入开始日期");
|
|
return;
|
|
}
|
|
if ($("#txt_EDate").val() == "") {
|
|
alert("请输入结束日期");
|
|
return;
|
|
}
|
|
var param = new Object();
|
|
param.PlatId = $("#select_plat").val();
|
|
param.ShopId = $("#select_shop").val();
|
|
param.OrderState = $("#select_state").val();
|
|
param.BJState = 0;
|
|
if ($("#Chk_BJ").is(":checked") == true) {
|
|
param.BJState = 1;
|
|
}
|
|
param.UserId = $("#select_name").val();
|
|
param.GoodsCode = $("#txt_Code").val();
|
|
param.OrderCode = $("#txt_OrderCode").val();
|
|
param.TrackCode = $("#txt_TrackCode").val();
|
|
param.Name = $("#txt_Name").val();
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
param.EDate = $("#txt_EDate").val();
|
|
if ($("#txt_GD").val() != "")
|
|
param.GDFee = $("#txt_GD").val();
|
|
else
|
|
param.GDFee = 0;
|
|
if ($("#txt_YJ").val() != "")
|
|
param.YJRate = $("#txt_YJ").val();
|
|
else
|
|
param.YJRate = 0;
|
|
param.OffType = $("#select_offtype").val();
|
|
if ($("#txt_OffPrice").val() == "")
|
|
param.Offfee =0;
|
|
else
|
|
param.Offfee = $("#txt_OffPrice").val();
|
|
var fname = "利润报表.xls";
|
|
$.ajax({
|
|
url: "../SysManageServiceNew.asmx/GetUserOrderExcel2",
|
|
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();
|
|
}
|
|
|
|
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
function getData() {
|
|
|
|
//var data = "[{name: '速卖通',data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]}, {name: '亚马逊',data: [5, 5.5, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5]}, {name: 'EBay',data: [3, 3, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0]}, {name: 'Wish',data: [3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8]}]";
|
|
var dataJsonobj = eval("(" + datas + ")"); //转换成json对象
|
|
|
|
return dataJsonobj;
|
|
|
|
}
|
|
function SetChart() {
|
|
|
|
$('#container').highcharts({
|
|
title: {
|
|
text: '人员货物销量走势图',
|
|
x: -20 //center
|
|
},
|
|
subtitle: {
|
|
text: '销量走势',
|
|
x: -20
|
|
},
|
|
xAxis: {
|
|
categories: cate
|
|
},
|
|
yAxis: {
|
|
|
|
|
|
minPadding: 0,
|
|
startOnTick: false,
|
|
title: {
|
|
text: '销量'
|
|
},
|
|
plotLines: [{
|
|
value: 0,
|
|
width: 1,
|
|
color: '#808080'
|
|
}]
|
|
},
|
|
tooltip: {
|
|
valueSuffix: '(个)'
|
|
},
|
|
legend: {
|
|
layout: 'vertical',
|
|
align: 'right',
|
|
verticalAlign: 'middle',
|
|
borderWidth: 0
|
|
},
|
|
series: getData()
|
|
});
|
|
|
|
}
|
|
function fopen1() {
|
|
|
|
$.fancybox({
|
|
'width': '40%',
|
|
'height': '40%',
|
|
'autoScale': false,
|
|
'transitionIn': 'elastic',
|
|
'transitionOut': 'elastic',
|
|
'href': '#test',
|
|
'onComplete': function () {
|
|
|
|
},
|
|
'onClosed': function () {
|
|
$("#DataGrid1").show();
|
|
}
|
|
});
|
|
|
|
}
|
|
function fopen2() {
|
|
|
|
$.fancybox({
|
|
'width': '40%',
|
|
'height': '40%',
|
|
'autoScale': false,
|
|
'transitionIn': 'elastic',
|
|
'transitionOut': 'elastic',
|
|
'href': '#test2',
|
|
'onComplete': function () {
|
|
|
|
},
|
|
'onClosed': function () {
|
|
$("#DataGrid1").show();
|
|
}
|
|
});
|
|
|
|
}
|
|
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();
|
|
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
var GId = 0;
|
|
function SaveGoodsFee() {
|
|
if ($("#txt_Price").val() == "") {
|
|
alert("请输入现单价");
|
|
return;
|
|
}
|
|
|
|
var param = new Object();
|
|
|
|
param.Id = GId;
|
|
param.GoodsFee = $("#txt_Price").val();
|
|
WindowLoadModel.Show();
|
|
$.ajax({
|
|
url: "TJ_CountServer.asmx/UpdateOrderCB",
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
//async: false,
|
|
success: function (data) {
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
alert("修改完成,请点查询刷新");
|
|
$.fancybox.close();
|
|
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
function JSFee() {
|
|
|
|
$.ajax({
|
|
url: "../SysManageServiceNew.asmx/GetModel_OrderFee2",
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
success: function (data) {
|
|
|
|
alert("计算完成");
|
|
}
|
|
});
|
|
|
|
}
|
|
</script>
|
|
|
|
<style type="text/css">
|
|
#div_xz
|
|
{
|
|
margin-top: 0px;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
<body class="headbody">
|
|
<div style="display: none">
|
|
|
|
<div id="test" title="物流折扣" style="width: 500px; height: 200px;">
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
<tr id="tr1">
|
|
|
|
<td style="width: 110px;" class="f1">运费:
|
|
</td>
|
|
<td>
|
|
|
|
<input id="txt_yf" type='text' min='0' max='1000000' precision='2' style='width: 100px;' class='editTextbox' value='' />美元
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
<tr id="tr2">
|
|
|
|
<td style="width: 110px;" class="f1">头程费用:
|
|
</td>
|
|
<td>
|
|
|
|
<input id="txt_tc" type='text' min='0' max='1000000' precision='2' style='width: 100px;' class='editTextbox' value='' />美元
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
<tr id="tr3">
|
|
|
|
<td style="width: 110px;" class="f1">货物成本:
|
|
</td>
|
|
<td>
|
|
|
|
<input id="txt_cb" type='text' min='0' max='1000000' precision='2' style='width: 100px;' class='editTextbox' value='' />美元
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td align="center" colspan="2">
|
|
<input id="btn_Save2" type="button" class="btnClass btnClassSave" value="保 存" onclick="SaveData();" />
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="test2" title="物流折扣" style="width: 500px; height: 200px;">
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
<tr>
|
|
|
|
<td style="width: 110px;" class="f1">编号
|
|
</td>
|
|
<td>
|
|
|
|
<a id="a_GoodsCode"></a>
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
<tr>
|
|
|
|
<td style="width: 110px;" class="f1">原单价:
|
|
</td>
|
|
<td>
|
|
<a id="a_GoodsPrice"></a>人民币/每个
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
<tr id="tr6">
|
|
|
|
<td style="width: 110px;" class="f1">现单价:
|
|
</td>
|
|
<td>
|
|
|
|
<input id="txt_Price" type='text' min='0' max='1000000' precision='2' style='width: 100px;' class='editTextbox' value='' />人民币/每个
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td align="center" colspan="2">
|
|
<input id="Button1" type="button" class="btnClass btnClassSave" value="保 存" onclick="SaveGoodsFee();" />
|
|
</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 class="f1" width="13%" >平台、店铺</td>
|
|
<td width="18%">
|
|
<select id="select_plat" class="selectClass" style="width: 120px" name="D6">
|
|
</select><select id="select_shop" class="selectClass" style="width: 120px"
|
|
name="D7">
|
|
</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" /></td>
|
|
<td>
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" />
|
|
<input id="cmdOut" class="btnClass btnClassExcelTemplate" onclick="ExportData();" type="button" value="导出报表" />
|
|
<input id="cmdJS" class="btnClass btnClassEdit"
|
|
onclick="JSFee();" type="button" value="计算费用" /></td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td class="f1" width="13%" >编号:</td>
|
|
<td width="18%">
|
|
<input id="txt_Code" class="editTextbox"
|
|
style="width: 200px;" type="text" /></td>
|
|
<td class="f1" width="13%">人员:</td>
|
|
<td width="35%">
|
|
<select id="select_name" class="selectClass" style="width: 200px" name="D1">
|
|
</select></td>
|
|
<td>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr >
|
|
<td class="f1" width="13%" >订单状态</td>
|
|
<td width="18%">
|
|
<select id="select_state" class="selectClass" style="width:200px;" name="D8">
|
|
<option value="-1">全部</option>
|
|
<option value="0">正常订单</option>
|
|
<option value="1">退货赔款订单</option>
|
|
</select></td>
|
|
<td class="f1" width="13%">订单号:</td>
|
|
<td width="35%">
|
|
<input id="txt_OrderCode" class="editTextbox"
|
|
style="width: 200px;" type="text" /></td>
|
|
<td>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td class="f1" width="13%" >跟踪码:</td>
|
|
<td width="18%">
|
|
<input id="txt_TrackCode" class="editTextbox"
|
|
style="width: 200px;" type="text" /></td>
|
|
<td class="f1" width="13%">收件人:</td>
|
|
<td width="35%">
|
|
<input id="txt_Name" class="editTextbox"
|
|
style="width: 100px;" type="text" />
|
|
<input id="Chk_BJ" type="checkbox" />只显示上次标记过的</td>
|
|
<td>
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td class="f1" width="13%" >fedex佣金比例</td>
|
|
<td width="18%">
|
|
<input id="txt_YJ" class="editTextbox"
|
|
style="width: 100px;" type="text" />%</td>
|
|
<td class="f1" width="13%">固定费用</td>
|
|
<td width="35%">
|
|
<input id="txt_GD" class="editTextbox"
|
|
style="width: 100px;" type="text" value="0"/>美元</td>
|
|
<td>
|
|
<select id="select_offtype" class="selectClass" style="width: 120px" name="D9">
|
|
<option value="1">预估比实际低</option>
|
|
<option value="2">预估比实际高</option>
|
|
</select><input id="txt_OffPrice" class="editTextbox"
|
|
style="width: 50px;" type="text" />$</td>
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td class="f1" width="13%" >显示列</td>
|
|
<td colspan="4">
|
|
<input id="Chk_all" type="checkbox" />全部
|
|
<div id="div_xz"> <input id="Chk_1" type="checkbox"/>订单状态 <input id="Chk_2" type="checkbox" />说明 <input id="Chk_3" type="checkbox" />国家 <input id="Chk_33" type="checkbox" />州省 <input id="Chk_4" type="checkbox" />收件人 <input id="Chk_5" type="checkbox" />订单日期 <input id="Chk_6" type="checkbox" />发货日期 <input id="Chk_7" type="checkbox" />物流方式 <input id="Chk_8" type="checkbox" />跟踪码 <input id="Chk_9" type="checkbox" checked=checked/>货物编号 <input id="Chk_10" type="checkbox" />货物数量 <input id="Chk_11" type="checkbox" />税费 <input id="Chk_12" type="checkbox" />关税 <input id="Chk_13" type="checkbox" />固定成本<input id="chk_cc" type="checkbox" />仓储费<input id="chk_md" type="checkbox" />面单费<input id="chk_gg" type="checkbox" />广告费
|
|
<input id="chk_th" type="checkbox" />订单退款<input id="chk_yf" type="checkbox" />退货运费<input id="chk_ss" type="checkbox" />物流申诉赔款 </div> </td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign="top" colspan="5">
|
|
<div style="width:100%"> <div id="DataGrid1" class="DataGridStyle"></div>
|
|
<%--<table class="DataGridTableStyle" style="width:100%" id="tb1"></table>--%>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
<td valign="top" colspan="5">
|
|
货物销量趋势图
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
|
|
<td valign="top" colspan="5">
|
|
<div id="container" style="height:310px;width:95%">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|