diff --git a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs index e5502bc..d23ce44 100644 --- a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs +++ b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs @@ -167,12 +167,44 @@ where b.MOCode='{0}' and a.WorkPoint='{1}'"; { sqlString.Append($@" and a.NeedDate like '%{queryParam["NeedDate"]}%' "); } + if (!string.IsNullOrWhiteSpace(queryParam["Status"].ToString())) + { + if (queryParam["NeedDate"].ToString() == "3") + { + sqlString.Append($@" and sum(a.Quantity) = sum(IssueQuantity) and a.MUSERName != 'JOB "); + } + else if (queryParam["NeedDate"].ToString() == "2") + { + sqlString.Append($@" and sum(a.Quantity) =sum(IssueQuantity) and a.MUSERName = 'JOB' "); + } + else if(queryParam["NeedDate"].ToString() == "1") + { + sqlString.Append($@" and sum(a.Quantity) >= sum(IssueQuantity) "); + } + } + } 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"); + + if (!string.IsNullOrWhiteSpace(queryParam["Status"].ToString())) + { + if (queryParam["Status"].ToString() == "3") + { + sqlString.Append($@" AND t.Status='已过帐' "); + } + else if (queryParam["Status"].ToString() == "2") + { + sqlString.Append($@" AND t.Status='已配料' "); + } + else if (queryParam["Status"].ToString() == "1") + { + sqlString.Append($@" AND t.Status='未配料' "); + } + } #endregion @@ -2574,7 +2606,7 @@ b.InvUnit, } else if (dts2 != null && dts2.Rows.Count > 0) { - msg = "当前选择单据号存在已出库的单据号,合并拣料失败"; + msg = "当前选择单据号存在已出库的单据号,合并 失败"; } else { 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 b7f21aa..e485567 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml @@ -229,6 +229,7 @@ WHCode: $("#txt_WHCode").val(), CusCode: $("#txt_CusCode").val(), CusName: $("#txt_CusName").val(), + Status: $("#selShow2").val(), Order: $("#txt_Order").val(), Container: $('input[name="container"]:checked').val(), CreateDate: $("#txt_CreateDate").val(), @@ -804,11 +805,11 @@