|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_GoodsDetailList_EN.aspx.cs" Inherits="TradeManageNew.Huowu.HW_GoodsDetailList_EN" %>
|
|
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
<head>
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
<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/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" type="text/javascript"></script>
|
|
|
<script src="../Scripts/DateBox.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/fancybox/jquery.fancybox-1.3.4.css"
|
|
|
media="screen" />
|
|
|
<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 src="../Scripts/DatePicker/WdatePicker.js" type="text/javascript"></script>
|
|
|
<script src="../Scripts/MaskedTextBox.js" type="text/javascript"></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();
|
|
|
GetStore();
|
|
|
ReadData();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#btn_sch").bind("click", function () {
|
|
|
datagrid1.SetPageIndex(1);
|
|
|
ReadData();
|
|
|
});
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
function GetStore() {
|
|
|
$("#select_ck").append("<option value='6'>RANCHO</option>");
|
|
|
$("#select_ck").append("<option value='9'>JD</option>");
|
|
|
$("#select_ck").append("<option value='11'>E(east)</option>");
|
|
|
|
|
|
return;
|
|
|
|
|
|
$("#select_ck").append("<option value='0'>全部</option>");
|
|
|
$.ajax({
|
|
|
url: "../CangKu/CangKuServer.asmx/GetUseStoreHouse",
|
|
|
// data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
success: function (data) {
|
|
|
if (data.d != null) {
|
|
|
$(data.d).each(function () {
|
|
|
$("#select_ck").append("<option value='" + this.StoreId + "'>" + this.StoreName + "</option>");
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function fopen() {
|
|
|
|
|
|
$.fancybox({
|
|
|
'width': '40%',
|
|
|
'height': '40%',
|
|
|
'autoScale': false,
|
|
|
'transitionIn': 'elastic',
|
|
|
'transitionOut': 'elastic',
|
|
|
'href': '#test',
|
|
|
'onComplete': function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 初始化DataGrid
|
|
|
function CreateDataGrid() {
|
|
|
|
|
|
var col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "StoreName";
|
|
|
col.CellTemplate = "<span>{Bind StoreName}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Storage Location";
|
|
|
col.CellTemplate = "<span>{Bind PostionCode}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Storage Location describe";
|
|
|
col.CellTemplate = "<span>{Bind PostionDesc}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Products name";
|
|
|
col.CellTemplate = "<span>{Bind GoodsName}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Products Code";
|
|
|
col.CellTemplate = "<a>{Bind GoodsCode}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Another Code";
|
|
|
col.CellTemplate = "<a>{Bind GoodsOldCode}</a>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Products TypeCode";
|
|
|
col.CellTemplate = "<span>{Bind TypeCode}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Products describe";
|
|
|
col.CellTemplate = "<span>{Bind TypeDesc}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Inventory";
|
|
|
col.CellTemplate = "<span>{Bind GoodsNum}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
col.HeaderText = "Match locking";
|
|
|
col.CellTemplate = "<span>{Bind LockNum}</span>";
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
//col = new nblf.ui.DataGridColumn();
|
|
|
//col.HeaderText = "剩余";
|
|
|
//col.CellTemplate = "<span>{Bind LeftNum}</span>";
|
|
|
//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(); });
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 读取数据
|
|
|
function ReadData() {
|
|
|
var param = new Object();
|
|
|
//param.SortId = SortId;
|
|
|
param.PostionCode = $("#txt_postion").val();
|
|
|
param.GoodsName = $("#txt_goodsname").val();
|
|
|
param.StoreId = $("#select_ck").val();
|
|
|
|
|
|
|
|
|
param.PageSize = datagrid1.Get_PageSize();
|
|
|
param.PageIndex = datagrid1.Get_PageIndex();
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetList_GoodsLeftForTM",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
success: function (data) {
|
|
|
WindowLoadModel.Hide();
|
|
|
datagrid1.Set_RowCount(data.d.RowCount);
|
|
|
datagrid1.DataBind(data.d.DataSource);
|
|
|
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
//#endregion
|
|
|
//#region 删除
|
|
|
function DelCol(obj) {
|
|
|
if (window.confirm('确定要删除吗?') == false) return;
|
|
|
var rowindex = $(obj).parent().parent().attr("index");
|
|
|
var param = new Object();
|
|
|
var model = datagrid1.Get_Model(rowindex);
|
|
|
param.GoodsId = model.GoodsId;
|
|
|
|
|
|
$.ajax({
|
|
|
url: "HuoWuService.asmx/DeleteGoodsInfo",
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
if (data.d == 0) {
|
|
|
alert("删除成功");
|
|
|
ReadData();
|
|
|
}
|
|
|
else {
|
|
|
alert("该货物有库存或者有订单匹配或者有采购单匹配,无法删除");
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
}
|
|
|
//#region 导出
|
|
|
function ExportData() {
|
|
|
// if ($("#txt_postion").val() == "" && $("#txt_goodsname").val()=="") {
|
|
|
// alert("请至少输入一个查询条件");
|
|
|
|
|
|
// return;
|
|
|
// }
|
|
|
var param = new Object();
|
|
|
//param.SortId = SortId;
|
|
|
param.PostionCode = $("#txt_postion").val();
|
|
|
param.GoodsName = $("#txt_goodsname").val();
|
|
|
param.StoreId = $("#select_ck").val();
|
|
|
var dd = new Date();
|
|
|
var fname = "盘库数据(" + dd.getFullYear() + "." + (dd.getMonth() + 1) + "." + dd.getDate() + ").xls";
|
|
|
$.ajax({
|
|
|
url: "../HuoWuServiceNew.asmx/GetList_GoodsLeftExcel",
|
|
|
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);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
//#endregion
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
<body class="headbody">
|
|
|
<div class="title_ico">
|
|
|
products inventory
|
|
|
</div>
|
|
|
<div style="display: none">
|
|
|
<div id="test" title="货物图片" style="width: 600px; height: 400px;">
|
|
|
<table width="95%" class="tableAll" border="1" ellspacing="0" cellpadding="2">
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="2" align="center">
|
|
|
<img src="../attached/images/1.jpg" width="280px" height="250px" id="img_1" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td style="width: 80px;" class="f1">图片:
|
|
|
</td>
|
|
|
<td align="left">
|
|
|
<div id="div_img">
|
|
|
<img src="../attached/images/1.jpg" width="100px" height="80px" />
|
|
|
<img src="../attached/images/2.jpg" width="100px" height="80px" />
|
|
|
<img src="../attached/images/3.jpg" width="100px" height="80px" />
|
|
|
<img src="../attached/images/4.jpg" width="100px" height="80px" />
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
<td align="center" colspan="2">
|
|
|
<input
|
|
|
id="btn_Cancel1" type="button" class="btnClass btnClassClose" value="关闭" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="f1" width="13%">products code/sku:</td>
|
|
|
<td>
|
|
|
<input id="txt_goodsname" class="editTextbox" style="width: 120px;" type="text" /></td>
|
|
|
<td class="f1" style="width: 10%; height: 15px;">Storage Location:</td>
|
|
|
<td>
|
|
|
<input id="txt_postion" class="editTextbox" style="width: 120px;" type="text" /></td>
|
|
|
<td style="width: 10%;">
|
|
|
Store:</td>
|
|
|
<td width="15%">
|
|
|
<select id="select_ck" class="selectClass" style="width: 100px" name="D1">
|
|
|
|
|
|
|
|
|
</select></td>
|
|
|
|
|
|
<td>
|
|
|
<input id="btn_sch" class="btnClass btnClassFind" type="button" value="Search" /></td>
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
<td colspan="7" class="auto-style1">
|
|
|
<input id="btn_add" class="btnClass btnClassExcelTemplate" type="button" value="导出盘库单" onclick="ExportData();"/>
|
|
|
<input id="btn_ckhd" class="btnClass btnClassEdit" type="button" value="库存核对" onclick="ExportData();"/> <input id="btn_kwtz" class="btnClass btnClassEdit" type="button" value="库位调整" onclick="ExportData();"/> <input id="btn_sdpp" class="btnClass btnClassEdit" type="button" value="锁定库存匹配" onclick="ExportData();"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td valign="top" colspan="7">
|
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</body>
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|