From 9115fd717c26abf2047ae6e64f74e8700fbec592 Mon Sep 17 00:00:00 2001 From: lilili Date: Tue, 6 Jun 2023 13:12:32 +0800 Subject: [PATCH] =?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 --- .../NFine.Application/WMS/PickMaterialApp.cs | 23 ++++++++++------ .../Views/PickMaterial/ICSMOPickMerge.cshtml | 26 ++++++++++++++++++- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs index 29aed53..7237c3e 100644 --- a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs +++ b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs @@ -124,12 +124,14 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'"; case when sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName != 'JOB' then '已过账' else (case when sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName = 'JOB' then '已配料' else '未配料' end) end as Status, f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 , - f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID + f.cFree4 ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10,a.ID, + case when a.MUSER!= 'JOB' then a.MUSER else '' end AS PickName from ICSMOApply a left JOIN ICSInventory b ON b.InvCode=a.InvCode LEFT JOIN ICSInventoryDetail detail ON b.InvCode=detail.INVCode AND a.WHCode=detail.WHCode AND a.WorkPoint=detail.WorkPoint left join ICSMOPickMerge e on a.ID=e.SourceID and a.WorkPoint=e.WorkPoint - left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint + left join ICSExtension f on a.ExtensionID=f.ID and a.WorkPoint=f.WorkPoint + where a.WorkPoint='{WorkPoint}' and a.EATTRIBUTE!='17'"); if (!string.IsNullOrWhiteSpace(queryJson)) @@ -189,13 +191,13 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'"; sqlString.Append(@" group by a.ApplyCode, a.WorkPoint,a.IssueQuantity,a.CreateDateTime,a.createperson, f.Colspan,f.ProjectCode,f.BatchCode,f.Version,f.Brand,f.cFree1,f.cFree2, f.cFree3,f.cFree4,f.cFree5,f.cFree6,f.cFree7,f.cFree8,f.cFree9,f.cFree10,a.WHCode,detail.LocationCode,a.ID,a.EATTRIBUTE,a.Sets,a.OrderInvCode,a.OrderInvDescribe,a.BillType,a.Remarks,a.Desks,a.DispatchNumber,a.DispatcherName, - a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.InvDescribe,a.Unit,a.StockIndicator,a.MUSERName) as t where t.row=1"); + a.ReceiverNumber,a.ReceiverName,a.Urgency,a.NeedDate,a.NeedTime,a.RemarksTerm,a.TextNumber,a.InvDescribe,a.Unit,a.StockIndicator,a.MUSERName,a.MUSER ) as t where t.row=1"); if (!string.IsNullOrWhiteSpace(queryParam["Status"].ToString())) { if (queryParam["Status"].ToString() == "3") { - sqlString.Append($@" AND t.Status='已过帐' "); + sqlString.Append($@" AND t.Status='已过账' "); } else if (queryParam["Status"].ToString() == "2") { @@ -1887,17 +1889,22 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'"; picksql = string.Format(picksql, MUSER, WorkPoint); SqlHelper.ExecuteNonQuery(picksql); picksql = ""; - foreach (DataRow pickdr in table.Rows) + if (table.Rows.Count>0) { - picksql += @" INSERT INTO ICSPickPrintTemp + foreach (DataRow pickdr in table.Rows) + { + picksql += @" INSERT INTO ICSPickPrintTemp (ID,DocNO,INVCode,iQuantity,WHCode,BinCode,LotNO,QTYTotal,SendQTY,MUSER,MUSERNAME,WorkPoint) VALUES - (NEWID(),'{0}','{1}',{2},'{3}','{4}','{5}',{6},{7},'{8}','{9}','{10}')"; + (NEWID(),'{0}','{1}',{2},'{3}','{4}','{5}',{6},{7},'{8}','{9}','{10}') ; + UPDATE ICSMOApply SET MUSER='{8}' WHERE ApplyCode='{0}' ;"; picksql = string.Format(picksql, pickdr["Code"].ToString(), pickdr["InvCode"].ToString(), Convert.ToDecimal(pickdr["iQuantity"]) , pickdr["WarehouseCode"].ToString(), pickdr["LocationCode"].ToString(), pickdr["LotNO"].ToString() , Convert.ToDecimal(pickdr["QTYTotal"]), Convert.ToDecimal(pickdr["SendQTY"]), MUSER, MUSERNAME, WorkPoint); - } + } SqlHelper.ExecuteNonQuery(picksql); + } + #endregion var result = ConvertCellToString(table); if (Invmes.Rows.Count > 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 fc38c2c..d7f724e 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml @@ -166,6 +166,29 @@ if (Type == 2||Type==12) { var collast = { label: '状态', name: 'Status', width: 150, align: 'left' }; cols.push(collast); + var collast = { label: '物料号(父项生产订单物料)', name: 'OrderInvCode', width: 150, align: 'left' }; + cols.push(collast); + var collast = { label: '物料描述(父项生产订单主物料)', name: 'OrderInvDescribe', width: 150, align: 'left' }; + cols.push(collast); + var collast = { label: '调度工号', name: 'DispatchNumber', width: 120, align: 'left', }; + cols.push(collast); + var collast = { label: '调度姓名', name: 'DispatcherName', width: 120, align: 'left' }; + cols.push(collast); + var collast = { label: '收料人工号', name: 'ReceiverNumber', width: 150, align: 'left' }; + cols.push(collast); + var collast = { label: '收料人姓名', name: 'ReceiverName', width: 150, align: 'left' }; + cols.push(collast); + var collast = { label: '紧急程度', name: 'Urgency', width: 120, align: 'left', }; + cols.push(collast); + var collast = { label: '需求日期', name: 'NeedDate', width: 120, align: 'left' }; + cols.push(collast); + var collast = { label: '需求时间', name: 'NeedTime', width: 120, align: 'left', }; + cols.push(collast); + var collast = { label: '工位', name: 'Desks', width: 100, align: 'left' }; + cols.push(collast); + var collast = { label: '拣料人姓名', name: 'PickName', width: 100, align: 'left' }; + cols.push(collast); + ct4.style.display = ""; ct5.style.display = ""; ct6.style.display = ""; @@ -466,6 +489,7 @@ }); $("#btn_search").click(function () { var warehouse = $("#warehouse a.active").attr('data-value'); + var Types = $("#selShow").val(); var queryJson = { POCode: $("#txt_POCode").val(), InvCode: $("#txt_InvCode").val(), @@ -481,7 +505,7 @@ NeedDate: $("#txt_NeedDate").val() } $gridList.jqGrid('setGridParam', { - postData: { queryJson: JSON.stringify(queryJson) }, + postData: { queryJson: JSON.stringify(queryJson) ,Type:Types}, }).trigger('reloadGrid'); });