Browse Source

调整接口

master
lilili 2 years ago
parent
commit
da4da0c5de
  1. 48
      WMS-BS/NFine.Application/WMS/PickMaterialApp.cs
  2. 2
      WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml

48
WMS-BS/NFine.Application/WMS/PickMaterialApp.cs

@ -1954,30 +1954,30 @@ c.Sequence,
}
try
{
//#region 占料前增加验证,如果条码数量超出实际需要领料数量,直接报错。
//string chksql = @"select InvCode,WHCode,SUM(Quantity) as Quantity from ICSMOApply
// where ApplyCode in ({0}) and WorkPoint='{1}'
// GROUP BY InvCode,WHCode";
//chksql = string.Format(chksql, ID, WorkPoint);
//var chkdata = Repository().FindDataSetBySql(chksql);
//DataTable chktable = dataset.Tables[0];
//foreach (DataRow chkdr in chktable.Rows)
//{
// decimal ZLQty = 0;
// for (int i = 0; i < table.Rows.Count; i++)
// {
// if (table.Rows[i]["WarehouseCode"].ToString() == chkdr["WarehouseCode"].ToString()
// && table.Rows[i]["InvCode"].ToString() == chkdr["InvCode"].ToString())
// {
// ZLQty += Convert.ToDecimal(table.Rows[i]["SendQTY"].ToString());
// }
// }
// if (Convert.ToDecimal(chkdr["iQuantity"]) < ZLQty)
// {
// throw new Exception("物料:"+ chkdr["InvCode"].ToString() + "实际拣料数量大于单据需求数量,请尝试重新拣料。");
// }
//}
//#endregion
#region 占料前增加验证,如果条码数量超出实际需要领料数量,直接报错。
string chksql = @"select InvCode,WHCode,SUM(Quantity) as Quantity from ICSMOApply
where ApplyCode in ({0}) and WorkPoint='{1}'
GROUP BY InvCode,WHCode";
chksql = string.Format(chksql, ID, WorkPoint);
var chkdata = Repository().FindDataSetBySql(chksql);
DataTable chktable = dataset.Tables[0];
foreach (DataRow chkdr in chktable.Rows)
{
decimal ZLQty = 0;
for (int i = 0; i < table.Rows.Count; i++)
{
if (table.Rows[i]["WarehouseCode"].ToString() == chkdr["WHCode"].ToString()
&& table.Rows[i]["InvCode"].ToString() == chkdr["InvCode"].ToString())
{
ZLQty += Convert.ToDecimal(table.Rows[i]["SendQTY"].ToString());
}
}
if (Convert.ToDecimal(chkdr["Quantity"]) < ZLQty)
{
throw new Exception("物料:" + chkdr["InvCode"].ToString() + "实际拣料数量大于单据需求数量,请尝试重新拣料。");
}
}
#endregion
if (table.Rows.Count != 0)
{
#region 拣料时增加条码出入库记录,修改库存锁定数量,以作占料处理

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

@ -235,7 +235,7 @@
url: "/WMS/PickMaterial/GetGridJson?" + Math.random(),
postData: { queryJson: JSON.stringify(queryJson),Type:Type },
height: 280,
async: false,//取消异步请求
//async: false,//取消异步请求
width: $(window).width() - 500,
colModel: _Clos,
//colModel: [

Loading…
Cancel
Save