Browse Source

调整打印接口

master
lilili 2 years ago
parent
commit
905c9f083c
  1. 50
      WMS-BS/NFine.Web/Areas/WMS/Controllers/PrintController.cs
  2. 37
      WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml

50
WMS-BS/NFine.Web/Areas/WMS/Controllers/PrintController.cs

@ -104,27 +104,47 @@ namespace NFine.Web.Areas.WMS.Controllers
where ID='{0}'";
sqlLableDataSource= string.Format(sqlLableDataSource, LableSourceID);
DataRow dr = SqlHelper.GetDataRowBySql(sqlLableDataSource);
string[] PrintParas = Parameter.Split('|');
foreach (var p in PrintParas)
//var PrintParas = Parameter.Replace(",","").Split('|').Distinct().ToArray();
//foreach (var p in PrintParas)
//{
// sqltxt = dr["SqlTxt"].ToString();
// if (dr["Paras"].ToString() != "")
// {
// string[] ps = dr["Paras"].ToString().Split(',');
// for (int i = 0; i < ps.Length; i++)
// {
// if (!string.IsNullOrEmpty(ps[i]))
// {
// sqltxt = sqltxt.Replace(ps[i], p.ToString());
// }
// }
// }
// if (sqltxt.Contains("[WorkPoint]"))
// {
// sqltxt = sqltxt.Replace("[WorkPoint]", WorkPoint);
// }
//}
var PrintParas = Parameter.Replace("|", "");
sqltxt = dr["SqlTxt"].ToString();
if(PrintParas!=null)
{
sqltxt = dr["SqlTxt"].ToString();
if (dr["Paras"].ToString() != "")
string[] ps = dr["Paras"].ToString().Split(',');
for (int i = 0; i < ps.Length; i++)
{
string[] ps = dr["Paras"].ToString().Split(',');
for (int i = 0; i < ps.Length; i++)
if (!string.IsNullOrEmpty(ps[i]))
{
if (!string.IsNullOrEmpty(ps[i]))
{
sqltxt = sqltxt.Replace(ps[i], p.ToString());
}
sqltxt = sqltxt.Replace(ps[i], PrintParas);
}
}
if (sqltxt.Contains("[WorkPoint]"))
{
sqltxt = sqltxt.Replace("[WorkPoint]", WorkPoint);
}
}
if (sqltxt.Contains("[WorkPoint]"))
{
sqltxt = sqltxt.Replace("[WorkPoint]", WorkPoint);
}
string strPrintFileName = Server.MapPath("/File/LablesFile/") + ""+ FileAddress + "";
PrintJson pJson = new PrintJson(Server.MapPath("./PrintTemp"), strPrintFileName);
pJson.CheckRegister("苏州智合诚信息科技有限公司", "56DD3B4C172D0D140841CAC98A58A819F4E28EDA5D6E45711DDD64F6A439F68B6A7870CD7DAFD69A919CB870207FE4BB206F92BE3D53C221B019E0797E739EBA4"); //注册信息

37
WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml

@ -447,12 +447,13 @@
function btnMaterial() {
debugger;
var objArr = '';
var arr = [];
mark = '拣料';
flag = '1';
var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
for (var i = 0; i < objList.length; i++) {
var objArr = '';
var rowId = objList[i];
var rowData = $("#gridList").jqGrid('getRowData', rowId);
if (rowData.IsNew == "已合并") {
@ -557,7 +558,7 @@
return;
}
if (mark == '合并拣料') {
var objArr = '';
var arr = [];
var obj_Item1 = $("#gridList2");
var rowIds_Item1 = obj_Item1.getDataIDs();
@ -566,18 +567,31 @@
if (rowIds_Item1.length > 0) {
debugger;
for (var i = 0; i < rowIds_Item1.length; i++) {
var RowData_Item1 = obj_Item1.getRowData(rowIds_Item1[0]);
var objArr = '';
var RowData_Item1 = obj_Item1.getRowData(rowIds_Item1[i]);
objArr += "'" + RowData_Item1.MergeID + "',";
objArr = objArr.slice(0, objArr.length - 1);
objArr = "" + objArr + "|";
arr.push(objArr);
}
//var arr = [];
//var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
//for (var i = 0; i < objList.length; i++) {
// var objArr = '';
// var rowId = objList[i];
// var rowData = $("#gridList").jqGrid('getRowData', rowId);
// objArr += "'" + rowData.Code + "',";
// objArr = objArr.slice(0, objArr.length - 1);
// objArr = "" + objArr + "|";
// arr.push(objArr);
//}
Arguments = arr;
mold = 'HBJL00001';
}
}
if (mark == '拣料') {
var objArr = '';
var arr = [];
var obj_Item1 = $("#gridList2");
var rowIds_Item1 = obj_Item1.getDataIDs();
@ -586,12 +600,25 @@
if (rowIds_Item1.length > 0) {
debugger;
for (var i = 0; i < rowIds_Item1.length; i++) {
var RowData_Item1 = obj_Item1.getRowData(rowIds_Item1[0]);
var objArr = '';
var RowData_Item1 = obj_Item1.getRowData(rowIds_Item1[i]);
objArr += "'" + RowData_Item1.Code + "',";
objArr = objArr.slice(0, objArr.length - 1);
objArr = "" + objArr + "|";
arr.push(objArr);
}
//var arr = [];
//var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
//for (var i = 0; i < objList.length; i++) {
// var objArr = '';
// var rowId = objList[i];
// var rowData = $("#gridList").jqGrid('getRowData', rowId);
// objArr += "'" + rowData.Code + "',";
// objArr = objArr.slice(0, objArr.length - 1);
// objArr = "" + objArr + "|";
// arr.push(objArr);
//}
Arguments = arr;
mold = 'JL00001';
}

Loading…
Cancel
Save