Browse Source

非标准联产品

master
Juj 11 months ago
parent
commit
1980ef3ecf
  1. 16
      WMS-BS/NFine.Application/OMAY/ICSMoCreateLotApp.cs
  2. 2
      WMS-BS/NFine.Web/Areas/OMAY/Views/ICSMoCreateLot/ICSCreateLotByMO.cshtml

16
WMS-BS/NFine.Application/OMAY/ICSMoCreateLotApp.cs

@ -494,6 +494,8 @@ flag.F_Define1 as Prorate
string sql = @"select a.ID,d.MOCode,d.Sequence+'~'+ a.Sequence as Sequence,a.PickID,a.InvCode as ZInvCode,d.InvCode as MInvCode,b.InvName,b.InvDesc,b.InvStd,b.InvUnit,
CAST(a.Quantity AS DECIMAL(18,{0})) as Quantity ,a.MODetailID,
CAST(a.Amount AS DECIMAL(18,{0})) as Amount,CAST(a.IssueQuantity AS DECIMAL(18,{0})) as IssueQuantity ,a.ExtensionID,a.MUSERName,a.MTIME ,CAST(c.LOTQTY AS DECIMAL(18,{0})) as LOTQTY
,case when d.EATTRIBUTE1='1' then 1 else 0 end MoTypeValue
,case when d.EATTRIBUTE1='1' then '' else '' end MoType
,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.EATTRIBUTE1,a.EATTRIBUTE2,a.EATTRIBUTE3,a.EATTRIBUTE4,a.EATTRIBUTE5,a.EATTRIBUTE6,a.EATTRIBUTE7,a.EATTRIBUTE8,
a.EATTRIBUTE9,a.EATTRIBUTE10
@ -652,21 +654,15 @@ where isnull(a.EATTRIBUTE1,'')=''
group by b.TransCode,b.TransSequence
) f on d.MOCode=f.TransCode and d.Sequence=f.TransSequence
left join
(select case when Flag>0 then ( case when PSLNUM>MLNUM then MLNUM else PSLNUM end) else PSLNUM end as BL ,MODetailID from (
(select MinBL as BL ,MODetailID from (
select a.MODetailID,
case when isnull(sum(a.PSLYL),0)=0 then 0 else sum(a.PSLLSS)/sum(a.PSLYL)* max(isnull(F_Define1,0)/100.0) end as PSLNUM,
case when isnull(sum(a.MLYL),0)=0 then 0 else sum(a.MLLSS)/sum(a.MLYL)*max(isnull(F_Define1,0)/100.0) end as MLNUM,
sum(Flag) as Flag
min(ALLBL)*max(isnull(F_Define1,0)/100.0) as MinBL
from (
select a.MODetailID ,
case when SUBSTRING(b.ClassCode, 1, 2) IN ('01','04','05') then a.Quantity else 0 end PSLYL,
case when SUBSTRING(b.ClassCode, 1, 2) IN ('01','04','05') then a.IssueQuantity else 0 end PSLLSS,
case when SUBSTRING(b.ClassCode, 1, 2) IN ('03') then a.Quantity else 0 end MLYL,
case when SUBSTRING(b.ClassCode, 1, 2) IN ('03') then a.IssueQuantity else 0 end MLLSS,
case when SUBSTRING(b.ClassCode, 1, 2) IN ('03') then 1 else 0 end Flag
case when a.Quantity =0 then 0 when a.IssueQuantity=0 then 0 else a.IssueQuantity/a.Quantity end as ALLBL
from dbo.ICSMOPick a
inner join dbo.ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint
where a.EATTRIBUTE1 <> '1')a
where a.EATTRIBUTE1<>'1' and a.IssueQuantity>0 )a
left join Sys_SRM_ItemsDetail flag on flag.F_ItemCode='GDCS0001'
group by MODetailID )a) h on a.MODetailID=h.MODetailID
left join ICSExtension e on d.ExtensionID=e.ID and a.WorkPoint=e.WorkPoint

2
WMS-BS/NFine.Web/Areas/OMAY/Views/ICSMoCreateLot/ICSCreateLotByMO.cshtml

@ -529,7 +529,7 @@
FCPMOCode = $("#gridList").jqGrid('getRowData', ids[i]).MOCode;
Sequence = $("#gridList").jqGrid('getRowData', ids[i]).Sequence;
MODetailID = $("#gridList").jqGrid('getRowData', ids[i]).MODetailID;
InvCode = $("#gridList").jqGrid('getRowData', ids[i]).InvCode;
InvCode = $("#gridList").jqGrid('getRowData', ids[i]).ZInvCode;
MoTypeValue = $("#gridList").jqGrid('getRowData', ids[i]).MoTypeValue;
}
$.modalOpen({

Loading…
Cancel
Save