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.
316 lines
11 KiB
Plaintext
316 lines
11 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_GoodsCount2.aspx.cs" Inherits="TradeManageNew.Huowu.HW_GoodsCount2" %>
|
||
|
|
||
|
|
||
|
|
||
|
<!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>
|
||
|
<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 src="../Scripts/jquery.url.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript" src="../Scripts/exporting.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
var WindowLoadModel = new WindowLoad();
|
||
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
||
|
$(document).ready(function () {
|
||
|
WindowLoadModel.ApplicationPath = "../";
|
||
|
WindowLoadModel.ControlID = "WindowLoad";
|
||
|
WindowLoadModel.Isbgiframe = true;
|
||
|
WindowLoadModel.Load();
|
||
|
ajaxInit(WindowLoadModel);
|
||
|
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);
|
||
|
|
||
|
CreateDataGrid();
|
||
|
|
||
|
$("#btn_sch").bind("click", function () {
|
||
|
|
||
|
ReadData();
|
||
|
|
||
|
});
|
||
|
|
||
|
$("#select_name").bind("change", function () {
|
||
|
|
||
|
ReadData();
|
||
|
|
||
|
});
|
||
|
$("#btn_hw2").bind("click", function () {
|
||
|
|
||
|
|
||
|
window.location = "HW_GoodsDetailList2.aspx";
|
||
|
|
||
|
});
|
||
|
$("#btn_hw3").bind("click", function () {
|
||
|
|
||
|
|
||
|
window.location = "HW_GoodsCount.aspx";
|
||
|
|
||
|
});
|
||
|
$("#btn_hw4").bind("click", function () {
|
||
|
|
||
|
|
||
|
window.location = "../tongji/Report40.aspx";
|
||
|
});
|
||
|
|
||
|
$("#btn_hw5").bind("click", function () {
|
||
|
|
||
|
|
||
|
window.location = "HW_GoodsCount2.aspx";
|
||
|
|
||
|
});
|
||
|
|
||
|
ReadData();
|
||
|
});
|
||
|
function ReadUser() {
|
||
|
$("#select_name").append("<option value='0'>全部</option>");
|
||
|
|
||
|
$.ajax({
|
||
|
url: "../SysManage/SysManageService.asmx/GetAllListJC_UserInfo",
|
||
|
async:false,
|
||
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
|
||
|
|
||
|
$(data.d).each(function () {
|
||
|
|
||
|
$("#select_name").append("<option value='" + this.UserId + "'>" + this.Name + "</option>");
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//#endregion
|
||
|
//#region 初始化DataGrid
|
||
|
function CreateDataGrid() {
|
||
|
|
||
|
var col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "姓名";
|
||
|
col.CellTemplate = "<a>{Bind Name}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "账号";
|
||
|
col.CellTemplate = "<a>{Bind UserName}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "编号";
|
||
|
col.CellTemplate = "<a>{Bind GoodsCode}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "库存";
|
||
|
col.CellTemplate = "<a>{Bind GoodsNum}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "累计销量";
|
||
|
col.CellTemplate = "<a CommandName='cmdtj' class='linka'>{Bind GoodsHJNum}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "最近10|20|30天销量";
|
||
|
col.CellTemplate = "<span>{Bind GoodsHJNum3}</span>|<span>{Bind GoodsHJNum4}</span>|<span>{Bind GoodsHJNum2}</span>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "最后出单日期";
|
||
|
col.CellTemplate = "<a>{Bind LastOrderDate,yyyy-MM-dd}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "未出单天数";
|
||
|
col.CellTemplate = "<a>{Bind Days}</a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "缩略图";
|
||
|
col.CellTemplate = "<a CommandName='cmdImg' class='linka'><img src='{Bind FirstImgUrl}' alt='' width='50px' height='50px'/></a>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "操作";
|
||
|
col.Width = "150px";
|
||
|
col.CellTemplate = "<input onclick='Delobj(this)' class='btnClass dgbtnDel' type='button' value='删除'></input>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
datagrid1.SetPageSize(20);
|
||
|
datagrid1.SetPageIndex(1);
|
||
|
datagrid1.IsFixHeader = false;
|
||
|
datagrid1.ShowIndexColumn = false;
|
||
|
datagrid1.AllowPaging = true;
|
||
|
datagrid1.Width = "100%";
|
||
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
||
|
datagrid1.Init();
|
||
|
datagrid1.add_PageIndexChanged(function () { ReadData(); });
|
||
|
|
||
|
}
|
||
|
|
||
|
function UpdateGoodsDays() {
|
||
|
|
||
|
|
||
|
$.ajax({
|
||
|
url: "../HuoWuServiceNew.asmx/UpdateGoodsDays",
|
||
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
function Delobj(obj) {
|
||
|
|
||
|
if (window.confirm('确定要删除吗?') == false) return;
|
||
|
datagrid1.UpdateDataSource();
|
||
|
var rowindex = $(obj).parent().parent().attr("index");
|
||
|
var param = new Object();
|
||
|
var model = datagrid1.Get_Model(rowindex);
|
||
|
param.Id = model.Id;
|
||
|
if (model.Id > 0) {
|
||
|
$.ajax({
|
||
|
url: "HuoWuService.asmx/Delete_GoodsUser",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
dataType: "json",
|
||
|
success: function (data) {
|
||
|
|
||
|
alert("删除成功");
|
||
|
datagrid1.Del_Row(rowindex);
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
//#endregion
|
||
|
//#region 读取数据
|
||
|
function ReadData() {
|
||
|
var param = new Object();
|
||
|
param.UserId = $("#select_name").val();
|
||
|
param.GoodsCode = $("#txt_Code").val();
|
||
|
param.Days = 0;
|
||
|
if ($("#txt_Days").val() != "")
|
||
|
param.Days = $("#txt_Days").val();
|
||
|
param.ShopId = 0;
|
||
|
param.grade="0"
|
||
|
param.PageSize = datagrid1.Get_PageSize();
|
||
|
param.PageIndex = datagrid1.Get_PageIndex();
|
||
|
param.Sort = "d.GoodsCode";
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "../HuoWuServiceNew.asmx/GetGoodsUser22",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
datagrid1.Set_RowCount(data.d.RowCount);
|
||
|
datagrid1.DataBind(data.d.DataSource);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
</script>
|
||
|
</head>
|
||
|
<body class="headbody">
|
||
|
|
||
|
<div class="title_ico">
|
||
|
报表
|
||
|
</div>
|
||
|
|
||
|
<table border="1" cellpadding="0" cellspacing="0" style="width: 99%;" align="center" class="tableAll">
|
||
|
<tr>
|
||
|
|
||
|
<td colspan="7">
|
||
|
|
||
|
<input id="btn_hw1" class="btnClass btnClassAdd3" type="button" value="商品信息" />
|
||
|
<input id="btn_hw2" class="btnClass btnClassAdd2" type="button" value="智能库存" />
|
||
|
<input id="btn_hw3" class="btnClass btnClassAdd4" type="button" value="人员分配的编号" />
|
||
|
<input id="btn_hw4" class="btnClass btnClassAdd5" type="button" value="人员销量统计" /> <input
|
||
|
id="btn_hw5" class="btnClass btnClassAdd5" type="button" value="人员编号销量" /> </td>
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td class="f1" width="13%" >人员:</td>
|
||
|
<td width="18%">
|
||
|
<select id="select_name" class="selectClass" style="width: 120px" name="D1">
|
||
|
</select></td>
|
||
|
<td class="f1" width="13%">编号:</td>
|
||
|
<td width="20%">
|
||
|
<input id="txt_Code" class="editTextbox"
|
||
|
style="width: 100px;" type="text" /></td>
|
||
|
<td class="f1" width="13%" >未出单天数:</td>
|
||
|
<td width="18%">大于
|
||
|
<input id="txt_Days" class="editTextbox"
|
||
|
style="width: 70px;" type="text" />天</td>
|
||
|
<td>
|
||
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" />
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td class="f1" width="13%" >日期</td>
|
||
|
<td colspan=3>
|
||
|
<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 class="f1" width="13%" > </td>
|
||
|
<td width="18%"> </td>
|
||
|
<td>
|
||
|
</td>
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
<td valign="top" colspan="7">
|
||
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</table>
|
||
|
|
||
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
|