From cc9fb0fe046e0c24507f93f7ceb6ac76a2206303 Mon Sep 17 00:00:00 2001 From: Juj <1005539536@qq.com> Date: Thu, 8 Jun 2023 16:32:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=A0=E6=96=99=E5=8F=8D=E5=90=91=E5=88=A0?= =?UTF-8?q?=E9=99=A4=20=20=E9=94=81=E5=AE=9A=E6=95=B0=E9=87=8F=E6=B2=A1?= =?UTF-8?q?=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NFine.Application/WMS/PickMaterialApp.cs | 4 +- .../Views/PickMaterial/ICSMOPickMerge.cshtml | 48 ++++++++++++++++--- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs index 0a1421e..5fcc73c 100644 --- a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs +++ b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs @@ -3026,11 +3026,11 @@ b.InvUnit, objCode = objCode.Substring(1, objCode.Length - 2); string sql = string.Empty; - sql += string.Format(@" delete dbo.ICSWareHouseLotInfoLog where TransCode in({0}) and TransType='15' and WorkPoint='{1}'", objCode.TrimEnd(','), WorkPoint); - sql += string.Format(@"update b set b.LockQuantity=b.LockQuantity-a.Quantity + sql += string.Format(@"update b set b.LockQuantity=convert(decimal(18,6),b.LockQuantity)-convert(decimal(18,6),a.Quantity ) from dbo.ICSWareHouseLotInfoLog a left join dbo.ICSWareHouseLotInfo b on a.LotNo=b.LotNo and a.WorkPoint=b.WorkPoint where a.TransCode in ({0}) and a.TransType='15' and a.WorkPoint='{1}'", objCode.TrimEnd(','), WorkPoint); + sql += string.Format(@" delete dbo.ICSWareHouseLotInfoLog where TransCode in({0}) and TransType='15' and WorkPoint='{1}'", objCode.TrimEnd(','), WorkPoint); try { if (SqlHelper.CmdExecuteNonQueryLi(sql) > 0) diff --git a/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml b/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml index a29feab..f102eeb 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml @@ -10,6 +10,7 @@ var flag = '1'; var mark = ''; var Arguments = ''; + //var PickID = ''; $(function () { SetCols(); @@ -230,6 +231,16 @@ shrinkToFit: false,//宽度自适应 autowidth: true, gridComplete: function () { + // debugger; + //var PickID = $("#PickID").val(); + // if (PickID!='') { + // var PickID = PickID.split(','); + // for (var i = 0; i < PickID.length; i++) { + // //$("#gridList").jqGrid('setSelection', PickID[i]); + // $("#gridList").jqGrid('setSelection', PickID[i]); + + // } + // } }, rowNum: 10000, autoScroll: true, @@ -238,6 +249,7 @@ viewrecords: true, multiselect: true, subGrid: true, // (1)开启子表格支持 + subGridRowExpanded: function (subgrid_id, rowid) { // (2)子表格容器的id和需要展开子表格的行id,将传入此事件函数 $("#gridList").jqGrid("setSelection", rowid, false); bindSubGrid(subgrid_id, rowid) @@ -570,6 +582,7 @@ //var ISFlag = false; var sign = ''; var objCode = ''; + var PickIDs = ''; var arr = []; mark = '拣料'; flag = '1'; @@ -582,6 +595,7 @@ $.modalAlertNew("WMS00091"); return; } + PickIDs += "'" + rowId + "',"; objCode += "'" + rowData.Code + "',"; objArr += "'" + rowData.Code + "',"; objArr = objArr.slice(0, objArr.length - 1); @@ -598,6 +612,8 @@ } }); if (sign == '0') { + // PickID = PickIDs; + //$("#PickID").val(PickIDs); gridList2(flag); } if (sign == '1') { @@ -605,10 +621,11 @@ return; } if (sign == '2') { + //$("#PickID").val(PickIDs); gridList3(); } - + Seach(); } @@ -786,12 +803,30 @@ var objArr = ''; var rowId = objList[i]; var rowData = $("#gridList").jqGrid('getRowData', rowId); - if (rowData.IsOccupy == "已占料") { + //if (rowData.IsOccupy == "已占料") { objCode += "'" + rowData.Code + "',"; - ISFlag = ISFlag + 1; + // ISFlag = ISFlag + 1; + //} + } + $.ajax({ + url: "/WMS/PickMaterial/SeachPickLog" + "?" + Math.random() + "&objCode=" + objCode, + dataType: "json", + type: "post", + async: false, + success: function (data) { + sign = data.count; } + }); + if (sign == '0') { + + $.modalAlert("所选单据无需取消占料!", "warning"); + return; + } + if (sign == '1') { + $.modalAlert("所选单据占料状态不一致!", "warning"); + return; } - if (objList.length == ISFlag) { + if (sign == '2') { $.submitForm({ url: "/WMS/PickMaterial/DelPickLog?" + Math.random(), param: { objCode: JSON.stringify(objCode) }, @@ -799,10 +834,8 @@ $.currentWindow().$("#gridList").trigger("reloadGrid"); } }) - } else { - $.modalAlert("所选单据中存在未占料单据,请重新选择!", "warning"); - return; } + } @@ -886,6 +919,7 @@