|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_GoodsDetailList2TemuSku.aspx.cs" Inherits="TradeManageNew.HuoWu.HW_GoodsDetailList2TemuSku" %>
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
|
<head>
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
|
<title>TemuSKU</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/MicrosoftAjax.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/jquery.min.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?a=1" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/DateBox.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/jquery.url.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/WindowLoad.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/jquery.cookies.min.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 src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
|
|
|
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></script>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
|
|
var Model = null
|
|
|
|
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
|
|
|
|
var datagrid2 = new nblf.ui.DataGrid("DataGrid2");
|
|
|
|
|
var WindowLoadModel = new WindowLoad();
|
|
|
|
|
var showDetailModel = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var id = 0;
|
|
|
|
|
var ScanState = 0;
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
|
|
|
WindowLoadModel.Isbgiframe = true;
|
|
|
|
|
WindowLoadModel.Load();
|
|
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
CreateDataGrid();
|
|
|
|
|
CreateDataGrid2();
|
|
|
|
|
ReadData();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 初始化DataGrid
|
|
|
|
|
//#region 初始化DataGrid
|
|
|
|
|
function CreateDataGrid() {
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "SKU";
|
|
|
|
|
col.CellTemplate = "<span>{Bind GoodsCode}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "分配的运营";
|
|
|
|
|
col.CellTemplate = "<span>{Bind Name}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "保本价";
|
|
|
|
|
col.CellTemplate = "<span>{Bind temuChengben}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "售价";
|
|
|
|
|
col.CellTemplate = "<span>{Bind JYPrice}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "毛利";
|
|
|
|
|
col.CellTemplate = "<a class='linka' onClick='showShopGrossProfitDialog({Bind GoodsId})'>{Bind GrossProfit}</a>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "前1天单量";
|
|
|
|
|
col.CellTemplate = "<span>{Bind SaleNum1}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "前2天单量";
|
|
|
|
|
col.CellTemplate = "<span>{Bind SaleNum2}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "前3天单量";
|
|
|
|
|
col.CellTemplate = "<span>{Bind SaleNum3}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "前7天单量";
|
|
|
|
|
col.CellTemplate = "<span>{Bind SaleNum7}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "前14天单量";
|
|
|
|
|
col.CellTemplate = "<span>{Bind SaleNum14}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "前一个月天单量";
|
|
|
|
|
col.CellTemplate = "<span>{Bind SaleNum30}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "总单量";
|
|
|
|
|
col.CellTemplate = "<span>{Bind GoodsHJNum}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "西仓库存";
|
|
|
|
|
col.CellTemplate = "<span>{Bind LeftNumW}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "东仓库存";
|
|
|
|
|
col.CellTemplate = "<span>{Bind LeftNumE}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "总库存";
|
|
|
|
|
col.CellTemplate = "<span>{Bind LeftNumAll}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "库龄";
|
|
|
|
|
col.CellTemplate = "<span>{Bind PositionAge}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
datagrid1.SetPageSize(50);
|
|
|
|
|
datagrid1.SetPageIndex(1);
|
|
|
|
|
|
|
|
|
|
datagrid1.SortExpression = "Id ";
|
|
|
|
|
datagrid1.ViewSortDirection = "desc";
|
|
|
|
|
datagrid1.IsFixHeader = false;
|
|
|
|
|
datagrid1.ShowIndexColumn = false;
|
|
|
|
|
datagrid1.AllowPaging = true;
|
|
|
|
|
datagrid1.AllowPaging2 = true;
|
|
|
|
|
datagrid1.ShowIndexColumn = true;
|
|
|
|
|
datagrid1.Width = "100%";
|
|
|
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
|
|
|
|
datagrid1.Init();
|
|
|
|
|
datagrid1.Sorting(function () {
|
|
|
|
|
ReadData();
|
|
|
|
|
});
|
|
|
|
|
datagrid1.add_PageIndexChanged(function () { ReadData(); });
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var PState = 0;
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
//#region 初始化DataGrid2
|
|
|
|
|
function CreateDataGrid2() {
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "店铺";
|
|
|
|
|
col.CellTemplate = "<span>{Bind ShopName}</span>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "毛利";
|
|
|
|
|
col.CellTemplate = "<span>{Bind GrossProfit}</span>";
|
|
|
|
|
Array.add(datagrid2.Columns, col);
|
|
|
|
|
|
|
|
|
|
datagrid2.SortExpression = "Id ";
|
|
|
|
|
datagrid2.ViewSortDirection = "desc";
|
|
|
|
|
datagrid2.IsFixHeader = false;
|
|
|
|
|
datagrid2.ShowIndexColumn = false;
|
|
|
|
|
datagrid2.AllowPaging = false;
|
|
|
|
|
datagrid2.AllowPaging2 = false;
|
|
|
|
|
datagrid2.ShowIndexColumn = true;
|
|
|
|
|
datagrid2.Width = "100%";
|
|
|
|
|
datagrid2.SelectMode = nblf.ui.SelectMode.None;
|
|
|
|
|
datagrid2.Init();
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
// 读取数据
|
|
|
|
|
//#region 读取数据
|
|
|
|
|
function ReadData() {
|
|
|
|
|
var param = {
|
|
|
|
|
PageSize: datagrid1.Get_PageSize(),
|
|
|
|
|
PageIndex: datagrid1.Get_PageIndex(),
|
|
|
|
|
GoodsCode: $('#txt_GoodsCode').val() || null,
|
|
|
|
|
Name: $('#txt_Name').val() || null,
|
|
|
|
|
IsNegative: $('#txt_IsNegative').is(':checked'),
|
|
|
|
|
}
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../OuterService/ShageService.ashx?UserCode=cs&Ver=1.0&Method=GetTemuSKUData&DeviceNo=HTTP/1.1",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
success: function (res) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
data = JSON.parse(res.Data)
|
|
|
|
|
datagrid1.Set_RowCount(res.rowCount);
|
|
|
|
|
datagrid1.DataBind(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
//#region 导出数据
|
|
|
|
|
function ExportData() {
|
|
|
|
|
var param = {
|
|
|
|
|
GoodsCode: $('#txt_GoodsCode').val() || null,
|
|
|
|
|
Name: $('#txt_Name').val() || null,
|
|
|
|
|
IsNegative: $('#txt_IsNegative').is(':checked'),
|
|
|
|
|
}
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../SysManageServiceNew.asmx/GetExcelTemuSKUData",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
async: false,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
if (data.d == "") {
|
|
|
|
|
alert("没有数据");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
params = { FilePath: data.d, FileName: "TemuSKU.xls" };
|
|
|
|
|
|
|
|
|
|
window.location = "../GlobalAshx/DownFile.ashx?" + jQuery.param(params);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
|
|
|
|
|
//#region 显示各店铺毛利
|
|
|
|
|
function showShopGrossProfitDialog(GoodsId) {
|
|
|
|
|
var param = { GoodsId }
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "../SysManageServiceNew.asmx/GetTemuShopGrossProfit",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
success: function (res) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
data = res.d
|
|
|
|
|
datagrid2.Set_RowCount(data.length);
|
|
|
|
|
datagrid2.DataBind(data);
|
|
|
|
|
$.fancybox({
|
|
|
|
|
'width': '40%',
|
|
|
|
|
'height': '',
|
|
|
|
|
'autoScale': false,
|
|
|
|
|
'transitionIn': 'elastic',
|
|
|
|
|
'transitionOut': 'elastic',
|
|
|
|
|
'href': '#mlDialog',
|
|
|
|
|
'onComplete': function () { }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
<body class="headbody">
|
|
|
|
|
<div class="title_ico">
|
|
|
|
|
TemuSKU
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="f1" style="width: 10%;">SKU:</td>
|
|
|
|
|
<td width="15%">
|
|
|
|
|
<input id="txt_GoodsCode" class="editTextbox" style="width: 150px;" type="text" />
|
|
|
|
|
</td>
|
|
|
|
|
<td class="f1" style="width: 10%;">运营人员:</td>
|
|
|
|
|
<td width="15%">
|
|
|
|
|
<input id="txt_Name" class="editTextbox" style="width: 150px;" type="text" />
|
|
|
|
|
</td>
|
|
|
|
|
<td class="f1" style="width: 10%;"><input id="txt_IsNegative" class="editTextbox" type="checkbox" />负毛利产品</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" onclick="ReadData();" />  
|
|
|
|
|
<input id="btn_dc3" onclick="ExportData();" class="btnClass btnClassExcelTemplate" type="button" value="导出" />
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="7">
|
|
|
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<!-- 各店铺毛利 -->
|
|
|
|
|
<div id="mlDialog" title="各店铺毛利" style="display:none;width: 700px; height: 500px;">
|
|
|
|
|
<div id="DataGrid2" class="DataGridStyle"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|