|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CG_ChasePrint.aspx.cs" Inherits="TradeManage.CaiGou.CG_ChasePrint" %>
|
|
|
|
|
|
|
|
|
|
<!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;
|
|
|
|
|
var ChaseId = 0;
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
WindowLoadModel.ApplicationPath = "../";
|
|
|
|
|
WindowLoadModel.ControlID = "WindowLoad";
|
|
|
|
|
WindowLoadModel.Isbgiframe = true;
|
|
|
|
|
WindowLoadModel.Load();
|
|
|
|
|
ajaxInit(WindowLoadModel);
|
|
|
|
|
ChaseId = $.url.param("ChaseId");
|
|
|
|
|
if (ChaseId == undefined) {
|
|
|
|
|
ChaseId = 0;
|
|
|
|
|
}
|
|
|
|
|
//CheckIsInstall();
|
|
|
|
|
CreateDataGrid();
|
|
|
|
|
ReadData();
|
|
|
|
|
$("#" + datagrid1.TableID + " a[CommandName='cmdImg']").live("click", function () {
|
|
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
|
|
if (model.GoodsImageIds != null && model.GoodsImageIds != "")
|
|
|
|
|
GetImage(model.GoodsImageIds);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#" + datagrid1.TableID + " a[CommandName='cmdLook']").live("click", function () {
|
|
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
|
|
//window.location.href = "HW_GoodsAdd.aspx?GoodsId=" + model.GoodsId;
|
|
|
|
|
window.parent.addTab("货物编辑", "HuoWu/HW_GoodsAddForTM.aspx?Title=货物信息&GoodsId=" + model.GoodsId, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#" + datagrid1.TableID + " input[CommandName='cmdEdit']").live("click", function () {
|
|
|
|
|
var RowIndex = $(this).parentsUntil("tr").parent().attr("index");
|
|
|
|
|
var model = datagrid1.Get_Model(RowIndex);
|
|
|
|
|
// window.location.href = "HW_GoodsAdd.aspx?GoodsId=" + model.GoodsId;
|
|
|
|
|
window.parent.addTab("货物编辑", "HuoWu/HW_GoodsAddForTM.aspx?Title=货物信息&GoodsId=" + model.GoodsId, true);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#btn_print").bind("click", function () {
|
|
|
|
|
Print2();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#Rad_1,#Rad_2,#Rad_3,#Rad_4").bind("click", function () {
|
|
|
|
|
if ($("#Rad_1").is(":checked") == true) {
|
|
|
|
|
$("#sp1").html("货物编号");
|
|
|
|
|
$("#sp2").html("型号");
|
|
|
|
|
$("#sp2").show();
|
|
|
|
|
$("#txt_Name2").show();
|
|
|
|
|
$("#txt_SDate").hide();
|
|
|
|
|
$("#txt_EDate").hide();
|
|
|
|
|
$("#span_0").hide();
|
|
|
|
|
Type = 1;
|
|
|
|
|
}
|
|
|
|
|
else if ($("#Rad_2").is(":checked") == true) {
|
|
|
|
|
$("#sp1").html("批次号");
|
|
|
|
|
$("#sp2").hide();
|
|
|
|
|
$("#txt_Name2").hide();
|
|
|
|
|
$("#txt_SDate").hide();
|
|
|
|
|
$("#txt_EDate").hide();
|
|
|
|
|
$("#span_0").hide();
|
|
|
|
|
Type = 2;
|
|
|
|
|
}
|
|
|
|
|
else if ($("#Rad_3").is(":checked") == true) {
|
|
|
|
|
$("#sp1").html("入库点");
|
|
|
|
|
$("#sp2").html("时间");
|
|
|
|
|
$("#sp2").show();
|
|
|
|
|
$("#txt_SDate").show();
|
|
|
|
|
$("#txt_EDate").show();
|
|
|
|
|
$("#span_0").show();
|
|
|
|
|
$("#txt_Name2").hide();
|
|
|
|
|
Type = 3;
|
|
|
|
|
}
|
|
|
|
|
else if ($("#Rad_4").is(":checked") == true) {
|
|
|
|
|
$("#sp1").html("订单号");
|
|
|
|
|
$("#sp2").hide();
|
|
|
|
|
$("#txt_Name2").hide();
|
|
|
|
|
$("#txt_SDate").hide();
|
|
|
|
|
$("#txt_EDate").hide();
|
|
|
|
|
$("#span_0").hide();
|
|
|
|
|
Type = 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#btn_sch").bind("click", function () {
|
|
|
|
|
|
|
|
|
|
ReadData();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#chk_1").bind("click", function () {
|
|
|
|
|
if ($(this).is(":checked") == true)
|
|
|
|
|
{
|
|
|
|
|
$("#chk_2,#chk_3,#chk_4").removeAttr("checked");
|
|
|
|
|
$("input[ColName = 'PrintNum']").val("0");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#chk_2").bind("click", function () {
|
|
|
|
|
if ($(this).is(":checked") == true) {
|
|
|
|
|
$("#chk_1,#chk_3,#chk_4").removeAttr("checked");
|
|
|
|
|
|
|
|
|
|
$("input[ColName = 'PrintNum']").each(function()
|
|
|
|
|
{
|
|
|
|
|
$(this).val($(this).attr("cgnum"));
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#chk_3").bind("click", function () {
|
|
|
|
|
if ($(this).is(":checked") == true) {
|
|
|
|
|
$("#chk_1,#chk_2,#chk_4").removeAttr("checked");
|
|
|
|
|
$("input[ColName = 'PrintNum']").each(function () {
|
|
|
|
|
if ($(this).attr("cgnum") - $(this).attr("yjnum") > 0)
|
|
|
|
|
$(this).val($(this).attr("cgnum") - $(this).attr("yjnum"));
|
|
|
|
|
else
|
|
|
|
|
$(this).val("0");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
$("#chk_4").bind("click", function () {
|
|
|
|
|
if ($(this).is(":checked") == true) {
|
|
|
|
|
$("#chk_1,#chk_2,#chk_3").removeAttr("checked");
|
|
|
|
|
$("input[ColName = 'PrintNum']").each(function () {
|
|
|
|
|
$(this).val($(this).attr("yjnum"));
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Print() {
|
|
|
|
|
window.open("../PrintTemplate/GoodBatchPrint.aspx");
|
|
|
|
|
return;
|
|
|
|
|
datagrid1.UpdateDataSource();
|
|
|
|
|
var list = datagrid1.GetSelectListModel();
|
|
|
|
|
//if (list == null || list.length == 0) {
|
|
|
|
|
// alert("请选择要打印的sku");
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
var Detail = "";
|
|
|
|
|
var wareno = "";
|
|
|
|
|
|
|
|
|
|
if (Type == 3)
|
|
|
|
|
wareno = $("#txt_Name1").val();
|
|
|
|
|
var wlist = new Array();
|
|
|
|
|
$(list).each(function () {
|
|
|
|
|
var pcode = '仓库';
|
|
|
|
|
if (this.PostionCode != null && this.PostionCode != "")
|
|
|
|
|
pcode = this.PostionCode;
|
|
|
|
|
//Detail += this.GoodsCode + "-" + this.GoodsOldCode + "-" + this.TypeCode + "-" + this.TypeDesc.replace("#", "").replace("&", "") + "-" + this.GoodsName.replace("#", "").replace("&", "") + "-" + this.PrintNum + "-" + pcode + ",";
|
|
|
|
|
if (this.PrintNum > 0) {
|
|
|
|
|
for (var i = 0; i < this.PrintNum; i++) {
|
|
|
|
|
var md = new Object();
|
|
|
|
|
md.WareNo = pcode;
|
|
|
|
|
if (this.GoodsCode != null && this.GoodsCode != "")
|
|
|
|
|
md.GoodNo = this.GoodsCode + "-" + this.TypeCode;
|
|
|
|
|
else
|
|
|
|
|
if (this.GoodsOldCode != null && this.GoodsOldCode != "")
|
|
|
|
|
md.GoodNo = this.GoodsOldCode + "-" + this.TypeCode;
|
|
|
|
|
md.Descript = this.TypeDesc.replace("#", "").replace("&", "") + " " + this.GoodsName.replace("#", "").replace("&", "");
|
|
|
|
|
Array.add(wlist, md);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.list = wlist;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "HuoWuService.asmx/GoodsCodePrint",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
//window.parent.addTab("打印", "PrintTemplate/GoodBatchPrint.aspx?Title=货物打印", true);
|
|
|
|
|
window.open("../PrintTemplate/GoodBatchPrint.aspx");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//&Detail=" + Detail + "&wareno=" + wareno
|
|
|
|
|
//datagrid1.UpdateDataSource();
|
|
|
|
|
//LODOP.PRINT_INITA(0, 0, 189, 76, "GoodsCode");
|
|
|
|
|
//LODOP.SET_PRINT_PAGESIZE(1, 500, 200, "GoodsCodePage");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//$(list).each(function (i) {
|
|
|
|
|
|
|
|
|
|
// if (i > 0) LODOP.NewPage();
|
|
|
|
|
// for (var j = 0; j < this.PrintNum; j++) {
|
|
|
|
|
// if (j > 0) LODOP.NewPage();
|
|
|
|
|
// PrintCode(this.GoodsCode + "-" + this.TypeCode, this.GoodsName + " " + this.TypeDesc);
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
//});
|
|
|
|
|
//LODOP.PREVIEW();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function Print2() {
|
|
|
|
|
datagrid1.UpdateDataSource();
|
|
|
|
|
|
|
|
|
|
var wlist = new Array();
|
|
|
|
|
$(datagrid1.DataSource).each(function () {
|
|
|
|
|
var pcode = '临时';
|
|
|
|
|
|
|
|
|
|
//Detail += this.GoodsCode + "-" + this.GoodsOldCode + "-" + this.TypeCode + "-" + this.TypeDesc.replace("#", "").replace("&", "") + "-" + this.GoodsName.replace("#", "").replace("&", "") + "-" + this.PrintNum + "-" + pcode + ",";
|
|
|
|
|
if (this.PrintNum > 0) {
|
|
|
|
|
for (var i = 0; i < this.PrintNum; i++) {
|
|
|
|
|
var md = new Object();
|
|
|
|
|
md.WareNo = pcode;
|
|
|
|
|
md.GoodBatch = this.ChaseId + "-" + this.DetailId + "-" + GetCode(this.YPrintNum+i+1);
|
|
|
|
|
if (this.GoodsCode != null && this.GoodsCode != "")
|
|
|
|
|
md.GoodNo = this.GoodsCode + "-" + this.TypeCode;
|
|
|
|
|
else
|
|
|
|
|
if (this.GoodsOldCode != null && this.GoodsOldCode != "")
|
|
|
|
|
md.GoodNo = this.GoodsOldCode + "-" + this.TypeCode;
|
|
|
|
|
md.Descript = this.TypeDesc.replace("#", "").replace("&", "") + " " + this.GoodsName.replace("#", "").replace("&", "");
|
|
|
|
|
Array.add(wlist, md);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.list = wlist;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "CaiGouService.asmx/GoodsCodePrint",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
window.open("../PrintTemplate/GoodBatchPrint.aspx?Title=货物打印");
|
|
|
|
|
//$("#APrint").click();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function GetCode(Code)
|
|
|
|
|
{
|
|
|
|
|
if (Code < 10)
|
|
|
|
|
return "00" + Code;
|
|
|
|
|
else
|
|
|
|
|
if (Code < 100)
|
|
|
|
|
return "0" + Code;
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
return Code;
|
|
|
|
|
}
|
|
|
|
|
function PrintCode(Code, Name) {
|
|
|
|
|
|
|
|
|
|
LODOP.ADD_PRINT_BARCODE(3, 9, 176, 45, "Code39", Code);
|
|
|
|
|
LODOP.SET_PRINT_STYLEA(0, "Horient", 3);
|
|
|
|
|
LODOP.SET_PRINT_STYLEA(0, "Vorient", 3);
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(49, 6, 178, 25, Name);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function PrintCode2(Code, Name) {
|
|
|
|
|
LODOP.ADD_PRINT_BARCODE(12, 10, 130, 45, "Code39", Code);
|
|
|
|
|
LODOP.SET_PRINT_STYLEA(0, "Horient", 3);
|
|
|
|
|
LODOP.SET_PRINT_STYLEA(0, "Vorient", 3);
|
|
|
|
|
LODOP.ADD_PRINT_TEXT(61, 10, 100, 20, Name);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//#region 检测是否安装过打印机控件
|
|
|
|
|
function CheckIsInstall() {
|
|
|
|
|
try {
|
|
|
|
|
LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
|
|
|
|
|
if (LODOP != null) { return true; }
|
|
|
|
|
else { return false; }
|
|
|
|
|
} catch (err) {
|
|
|
|
|
//alert("Error:本机未安装或需要升级!");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 GoodsNum}</span>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
col = new nblf.ui.DataGridColumn();
|
|
|
|
|
col.HeaderText = "已打印数量";
|
|
|
|
|
col.CellTemplate = "<span>{Bind YPrintNum}</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}' yjnum='{Bind YPrintNum}' cgnum='{Bind GoodsNum}'/>";
|
|
|
|
|
Array.add(datagrid1.Columns, col);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
datagrid1.IsFixHeader = false;
|
|
|
|
|
datagrid1.ShowIndexColumn = false;
|
|
|
|
|
datagrid1.AllowPaging = false;
|
|
|
|
|
datagrid1.Width = "100%";
|
|
|
|
|
datagrid1.SelectMode = nblf.ui.SelectMode.None;
|
|
|
|
|
datagrid1.Init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
//#region 读取数据
|
|
|
|
|
function ReadData() {
|
|
|
|
|
if (ChaseId == 0 && $("#txt_Name1").val() == "")
|
|
|
|
|
return;
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.Type = 1;
|
|
|
|
|
param.Code = $("#txt_Name1").val();
|
|
|
|
|
param.ChaseId = ChaseId;
|
|
|
|
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "CaiGouService.asmx/GetPrintGoodsCode",
|
|
|
|
|
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("该货物有库存或者有订单匹配或者有采购单匹配,无法删除");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
function SaveBarCodeNum() {
|
|
|
|
|
datagrid1.UpdateDataSource();
|
|
|
|
|
var list = new Array();
|
|
|
|
|
$(datagrid1.DataSource).each(function () {
|
|
|
|
|
var md = new Object();
|
|
|
|
|
md.ChaseDetailId = this.Id;
|
|
|
|
|
md.DetailId = this.DetailId;
|
|
|
|
|
md.Num = this.PrintNum;
|
|
|
|
|
md.ChaseId = this.ChaseId;
|
|
|
|
|
Array.add(list, md);
|
|
|
|
|
});
|
|
|
|
|
var param = new Object();
|
|
|
|
|
param.list = list;
|
|
|
|
|
|
|
|
|
|
WindowLoadModel.Show();
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "CaiGouService.asmx/SaveBarCodeNum",
|
|
|
|
|
data: Sys.Serialization.JavaScriptSerializer.serialize(param),
|
|
|
|
|
success: function (data) {
|
|
|
|
|
WindowLoadModel.Hide();
|
|
|
|
|
|
|
|
|
|
alert("保存成功");
|
|
|
|
|
ReadData();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//#endregion
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
<body class="headbody">
|
|
|
|
|
<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_Name1" class="editTextbox" style="width: 120px;" type="text" /></td>
|
|
|
|
|
<td class="f1" style="width: 10%;">货物信息:</td>
|
|
|
|
|
<td>
|
|
|
|
|
<input id="txt_Name2" class="editTextbox" style="width: 120px;" type="text" /> <input id="txt_SDate" class="editTextbox" onfocus="WdatePicker()" style="width: 90px;display:none" type="text" /><span id="span_0" style="display:none">-</span><input id="txt_EDate" class="editTextbox" onfocus="WdatePicker()" style="width: 90px;display:none" type="text" /> <input id="btn_sch" class="btnClass btnClassFind" type="button" value="查询" /></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="4" align="right"> <input id="chk_1" type="checkbox"/>全部清0 <input id="chk_2" type="checkbox"/>根据采购数量<input id="chk_3" type="checkbox"/>采购数量减去已打印数量<input id="chk_4" type="checkbox"/>已经打印数量
|
|
|
|
|
<input id="btn_print" class="btnClass btnClassEdit" type="button" value="打印" /> <input id="btn_print2" class="btnClass btnClassEdit" type="button" value="确定打印" onclick="SaveBarCodeNum();"/>
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<td valign="top" colspan="4">
|
|
|
|
|
<div id="DataGrid1" class="DataGridStyle"></div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|