From d3e5e261b9b7a454bc8898f6dba96447f2d11110 Mon Sep 17 00:00:00 2001 From: lilili Date: Fri, 11 Aug 2023 16:34:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=8D=A0=E6=96=99?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NFine.Application/WMS/WMSDeleteReceipts.cs | 17 ++++++++++++----- .../DeleteReceipts/ICSDeleteReceipts.cshtml | 10 +++++----- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/WMSDeleteReceipts.cs b/WMS-BS/NFine.Application/WMS/WMSDeleteReceipts.cs index d12de5d..66f8a00 100644 --- a/WMS-BS/NFine.Application/WMS/WMSDeleteReceipts.cs +++ b/WMS-BS/NFine.Application/WMS/WMSDeleteReceipts.cs @@ -1040,11 +1040,18 @@ namespace NFine.Application.WMS string MUSER = NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode; string MUSERNAME = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName; DateTime MTime = DateTime.Now; - string sql = string.Empty; + string check = $@"IF EXISTS (SELECT ID FROM ICSWareHouseLotInfoLog WHERE TransType='15' AND TransCode IN ({codes}) ) + BEGIN + RAISERROR('单据已占料,请先取消占料',16,1); + RETURN + END;"; + //Repository().ExecuteBySql(check); + SqlHelper.CmdExecuteNonQueryLi(check); + string sql = String.Empty; StringBuilder msg=new StringBuilder(); if (type == "14") { - sql = $@"SELECT a.RCVCode as Code,a.Sequence,SUM(c.Quantity) as Quantity ,a.RCVQuantity as IssueQuantity + sql += $@"SELECT a.RCVCode as Code,a.Sequence,SUM(c.Quantity) as Quantity ,a.RCVQuantity as IssueQuantity FROM ICSManufactureReceive a left JOIN ICSInventoryLotDetail b ON a.RCVCode=b.TransCode AND a.Sequence=b.TransSequence left JOIN ICSInventoryLot c ON c.LotNo=b.LotNo @@ -1054,7 +1061,7 @@ namespace NFine.Application.WMS } else if (type == "15") { - sql = $@"SELECT a.InCode as Code,a.Sequence,SUM(c.Quantity) as Quantity ,a.InQuantity as IssueQuantity + sql += $@"SELECT a.InCode as Code,a.Sequence,SUM(c.Quantity) as Quantity ,a.InQuantity as IssueQuantity FROM ICSOtherIn a left JOIN ICSInventoryLotDetail b ON a.InCode=b.TransCode AND a.Sequence=b.TransSequence left JOIN ICSInventoryLot c ON c.LotNo=b.LotNo @@ -1064,7 +1071,7 @@ namespace NFine.Application.WMS } else if (type == "16") { - sql = $@"SELECT a.ApplyNegCode as Code,a.Sequence,SUM(c.Quantity) as Quantity ,a.IssueNegQuantity as IssueQuantity FROM ICSMOApplyNegDetail a + sql += $@"SELECT a.ApplyNegCode as Code,a.Sequence,SUM(c.Quantity) as Quantity ,a.IssueNegQuantity as IssueQuantity FROM ICSMOApplyNegDetail a left JOIN ICSInventoryLotDetail b ON a.ApplyNegCode=b.TransCode AND a.Sequence=b.TransSequence left JOIN ICSInventoryLot c ON c.LotNo=b.LotNo WHERE a.ApplyNegCode in ({codes}) @@ -1073,7 +1080,7 @@ namespace NFine.Application.WMS } else if (type == "17") { - sql = $@"SELECT a.SDNCode as Code,a.Sequence,SUM(c.Quantity) as Quantity ,a.SDNQuantity as IssueQuantity + sql += $@"SELECT a.SDNCode as Code,a.Sequence,SUM(c.Quantity) as Quantity ,a.SDNQuantity as IssueQuantity FROM ICSSDN a left JOIN ICSInventoryLotDetail b ON a.SDNCode=b.TransCode AND a.Sequence=b.TransSequence left JOIN ICSInventoryLot c ON c.LotNo=b.LotNo diff --git a/WMS-BS/NFine.Web/Areas/WMS/Views/DeleteReceipts/ICSDeleteReceipts.cshtml b/WMS-BS/NFine.Web/Areas/WMS/Views/DeleteReceipts/ICSDeleteReceipts.cshtml index 91564ed..e944675 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/DeleteReceipts/ICSDeleteReceipts.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/DeleteReceipts/ICSDeleteReceipts.cshtml @@ -1456,11 +1456,11 @@ else { for (var i = 0; i < objList.length; i++) { - var strValue = $("#gridList").jqGrid("getCell", objList[i], "IsOccupy");//得到单元格数据 - if (strValue == "已占料") { - $.modalAlertNew("WMS00116"); - return; - } + //var strValue = $("#gridList").jqGrid("getCell", objList[i], "IsOccupy");//得到单元格数据 + //if (strValue == "已占料") { + // $.modalAlertNew("WMS00116"); + // return; + //} var strValue1 = $("#gridList").jqGrid("getCell", objList[i], "Status");//得到单元格数据 if (strValue1 == "已过账") { $.modalAlertNew("WMS00118"); From 41a1b90035ea7482c47b4801747bb817fcf3d0e2 Mon Sep 17 00:00:00 2001 From: lilili Date: Fri, 11 Aug 2023 17:06:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Areas/WMS/Views/DeleteReceipts/ICSDeleteReceipts.cshtml | 1 + 1 file changed, 1 insertion(+) diff --git a/WMS-BS/NFine.Web/Areas/WMS/Views/DeleteReceipts/ICSDeleteReceipts.cshtml b/WMS-BS/NFine.Web/Areas/WMS/Views/DeleteReceipts/ICSDeleteReceipts.cshtml index e944675..b2ef704 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/DeleteReceipts/ICSDeleteReceipts.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/DeleteReceipts/ICSDeleteReceipts.cshtml @@ -1176,6 +1176,7 @@ InvCode: $("#txt_InvCode").val(), InvName: "", BatchCode: "", + WHCode:"", Container: "2", } $gridList.dataGrid({