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.
254 lines
8.5 KiB
Plaintext
254 lines
8.5 KiB
Plaintext
2 months ago
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HW_GoodsCodePrint.aspx.cs" Inherits="TradeManageNew.Huowu.HW_GoodsCodePrint" %>
|
||
|
|
||
|
<!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 src="../Scripts/LodopFuncs.js" type="text/javascript"></script>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
var datagrid1 = new nblf.ui.DataGrid("DataGrid1");
|
||
|
var WindowLoadModel = new WindowLoad();
|
||
|
var Type = 1;
|
||
|
$(document).ready(function () {
|
||
|
WindowLoadModel.ApplicationPath = "../";
|
||
|
WindowLoadModel.ControlID = "WindowLoad";
|
||
|
WindowLoadModel.Isbgiframe = true;
|
||
|
WindowLoadModel.Load();
|
||
|
ajaxInit(WindowLoadModel);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
|
||
|
function Print() {
|
||
|
|
||
|
if ($("#txt_code").val()=="") {
|
||
|
alert("请填写要打印的编码");
|
||
|
return;
|
||
|
}
|
||
|
if ($("#txt_num").val()=="") {
|
||
|
alert("请填写要打印的数量");
|
||
|
return;
|
||
|
}
|
||
|
var param = new Object();
|
||
|
param.code = $("#txt_code").val();
|
||
|
param.num = $("#txt_num").val();
|
||
|
$.ajax({
|
||
|
url: "../HuoWuServiceNew.asmx/GetGoodsCodeLabel",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
|
||
|
if (data.d != "")
|
||
|
window.open("../DingDan/DD_DoneOrderListNew.aspx?url=" + data.d);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
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 = "货物名称";
|
||
|
col.CellTemplate = "<a>{Bind GoodsName}</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 = "<span>{Bind TypeCode}</span>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "描述";
|
||
|
col.CellTemplate = "<span>{Bind TypeDesc}</span>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "库位";
|
||
|
col.CellTemplate = "<span>{Bind PostionCode}</span>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "实际库存";
|
||
|
col.CellTemplate = "<span>{Bind GoodsNum}</span>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
col = new nblf.ui.DataGridColumn();
|
||
|
col.HeaderText = "打印数量";
|
||
|
col.CellTemplate = "<input type='text' min='0' max='10000' precision='0' style='width:50px;' class='editTextbox' ColName='PrintNum' value='{Bind PrintNum}'/>";
|
||
|
Array.add(datagrid1.Columns, col);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
datagrid1.IsFixHeader = false;
|
||
|
datagrid1.ShowIndexColumn = false;
|
||
|
datagrid1.AllowPaging = false;
|
||
|
datagrid1.Width = "100%";
|
||
|
datagrid1.SelectMode = nblf.ui.SelectMode.CheckBox;
|
||
|
datagrid1.Init();
|
||
|
|
||
|
|
||
|
}
|
||
|
//#endregion
|
||
|
//#region 读取数据
|
||
|
function ReadData() {
|
||
|
if (Type == 1 && $("#txt_Name1").val()=="")
|
||
|
{
|
||
|
alert("请输入货物编号");
|
||
|
return;
|
||
|
}
|
||
|
var param = new Object();
|
||
|
param.Type = Type;
|
||
|
param.Code = $("#txt_Name2").val();
|
||
|
param.Name = $("#txt_Name1").val();
|
||
|
param.SDate = null;
|
||
|
if ($("#txt_SDate").val() != "")
|
||
|
{
|
||
|
param.SDate = $("#txt_SDate").val();
|
||
|
|
||
|
}
|
||
|
param.EDate = null;
|
||
|
if ($("#txt_EDate").val() != "") {
|
||
|
param.EDate = $("#txt_EDate").val();
|
||
|
|
||
|
}
|
||
|
WindowLoadModel.Show();
|
||
|
$.ajax({
|
||
|
url: "HuoWuService.asmx/GetPrintGoods",
|
||
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
||
|
success: function (data) {
|
||
|
WindowLoadModel.Hide();
|
||
|
|
||
|
datagrid1.DataBind(data.d);
|
||
|
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//#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("该货物有库存或者有订单匹配或者有采购单匹配,无法删除");
|
||
|
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
//#endregion
|
||
|
</script>
|
||
|
|
||
|
</head>
|
||
|
<body class="headbody">
|
||
|
<form id="form1" runat="server">
|
||
|
<div class="title_ico">
|
||
|
货物打印
|
||
|
</div>
|
||
|
|
||
|
<table id="tb1" class="tableAll" style="width: 100%;">
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td class="f1" width="13%"><span id="sp1">货物编号:</span></td>
|
||
|
<td width="15%">
|
||
|
<input id="txt_code" class="editTextbox" style="width: 200px;" type="text" /></td>
|
||
|
<td class="f1" style="width: 10%;"> </td>
|
||
|
<td>
|
||
|
</td>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td class="f1" width="13%">打印数量:</td>
|
||
|
<td width="15%">
|
||
|
<input id="txt_num" class="editTextbox" style="width: 60px;" type="text" value="1"/></td>
|
||
|
<td class="f1" style="width: 10%;">
|
||
|
<input id="btn_print" class="btnClass btnClassEdit" type="button" value="打印" onclick="Print();" /></td>
|
||
|
<td>
|
||
|
</td>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
|
||
|
</table>
|
||
|
</form>
|
||
|
</body>
|
||
|
</html>
|