|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_GoodsCount3.aspx.cs" Inherits="TradeManageNew.Huowu.HW_GoodsCount3" %>
|
|
|
|
|
|
|
|
|
|
|
|
<!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);
|
|
|
|
|
|
|
|
var Type = $.url.param("Type");
|
|
|
|
$("#select_type").val(Type);
|
|
|
|
|
|
|
|
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 = "最后出单日期";
|
|
|
|
col.CellTemplate = "<a>{Bind LastOrderDate,yyyy-MM-dd}</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);
|
|
|
|
|
|
|
|
|
|
|
|
datagrid1.SetPageSize(20);
|
|
|
|
datagrid1.SetPageIndex(1);
|
|
|
|
datagrid1.IsFixHeader = false;
|
|
|
|
datagrid1.ShowIndexColumn = false;
|
|
|
|
datagrid1.AllowPaging = false;
|
|
|
|
datagrid1.Width = "100%";
|
|
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
|
|
|
datagrid1.Init();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
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() {
|
|
|
|
|
|
|
|
if ($("#txt_SDate").val() == "" || $("#txt_EDate").val() == "") {
|
|
|
|
|
|
|
|
alert("日期范围没填");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var param = new Object();
|
|
|
|
param.UserId = $("#select_name").val();
|
|
|
|
param.GoodsCode = $("#txt_Code").val();
|
|
|
|
|
|
|
|
|
|
|
|
param.Type = $("#select_type").val();
|
|
|
|
param.SDate = $("#txt_SDate").val();
|
|
|
|
param.EDate = $("#txt_EDate").val();
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
$.ajax({
|
|
|
|
url: "../HuoWuServiceNew.asmx/GetGoodsUser2",
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
success: function (data) {
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
|
|
datagrid1.DataBind(data.d);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</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 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="15%">
|
|
|
|
<input id="txt_Code" class="editTextbox"
|
|
|
|
style="width: 100px;" type="text" /></td>
|
|
|
|
<td class="f1" width="13%" > </td>
|
|
|
|
<td width="25%">
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" />
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="f1" width="13%" >类型:</td>
|
|
|
|
<td width="18%">
|
|
|
|
<select id="select_type" class="selectClass" style="width: 120px" name="D2">
|
|
|
|
<option value="0">全部</option>
|
|
|
|
<option value="1">出单编号</option>
|
|
|
|
<option value="2">未出单编号</option>
|
|
|
|
</select></td>
|
|
|
|
<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>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td valign="top" colspan="7">
|
|
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|