diff --git a/WMS-BS/NFine.Application/OMAY/OMAYMoOutboundApp.cs b/WMS-BS/NFine.Application/OMAY/OMAYMoOutboundApp.cs index db6a7cb..945bc26 100644 --- a/WMS-BS/NFine.Application/OMAY/OMAYMoOutboundApp.cs +++ b/WMS-BS/NFine.Application/OMAY/OMAYMoOutboundApp.cs @@ -48,7 +48,10 @@ namespace NFine.Application.OMAY string User = UserName.Substring(0, 2); #region [SQL] - string sql = @" select a.ID,a.MOCode,a.Sequence,a.InvCode,b.InvName,b.InvDesc,b.InvUnit,b.InvStd,a.Quantity,a.Amount,a.MODetailID,c.DepName from dbo.ICSMO a + string sql = @" select a.ID,a.MOCode,a.Sequence,a.InvCode,b.InvName,b.InvDesc +,case when b.AmountEnable='1' then b.EATTRIBUTE4 else b.EATTRIBUTE3 end InvUnit --b.InvUnit +,b.InvStd,a.Quantity,a.Amount,a.MODetailID,c.DepName +from dbo.ICSMO a left join dbo.ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint inner join ICSDepartment c on a.DepCode=c.DepCode and a.WorkPoint=c.WorkPoint "; sql += " WHERE 1=1 and a.MOCode='"+ queryParam["Code"].ToString() + "'"; @@ -73,7 +76,7 @@ namespace NFine.Application.OMAY #region [SQL] string sql = @"select a.ID,a.MODetailID,a.Sequence,a.InvCode,b.InvName,b.InvDesc,b.InvStd,c.WarehouseName, case when b.AmountEnable='1' then a.Amount else a.Quantity end as Quantity, -case when b.AmountEnable='1' then b.AmountUnit else b.InvUnit end as InvUnit, +case when b.AmountEnable='1' then b.EATTRIBUTE4 else b.EATTRIBUTE3 end as InvUnit, case when b.AmountEnable='1' then a.IssueQuantity/isnull(b.EATTRIBUTE1,1) else a.IssueQuantity end as IssueQuantity, b.EATTRIBUTE1,a.Amount from dbo.ICSMOPick a diff --git a/WMS-BS/NFine.Application/WMS/DeciliterApp.cs b/WMS-BS/NFine.Application/WMS/DeciliterApp.cs index cafaafe..62b5d4a 100644 --- a/WMS-BS/NFine.Application/WMS/DeciliterApp.cs +++ b/WMS-BS/NFine.Application/WMS/DeciliterApp.cs @@ -32,7 +32,7 @@ namespace NFine.Application.WMS List parameter = new List(); //string sql = @"select max(LotNo) as NewLotNo from ICSInventoryLot where EATTRIBUTE1='{0}' "; - string sql = @"SELECT TOP 1 LotNO as NewLotNo FROM ICSInventoryLot WHERE EATTRIBUTE1='{0}' + string sql = @"SELECT TOP 1 LotNO as NewLotNo FROM ICSInventoryLot WHERE EATTRIBUTE1 like '{0}%' ORDER BY CAST(SUBSTRING(LotNO, (LEN(LotNO)-CHARINDEX('-',REVERSE(LotNO))+1)+1,CHARINDEX('-',REVERSE(LotNO))-1) AS INT) DESC"; sql = string.Format(sql, LotNO); dt= Repository().FindTableBySql(sql.ToString()); diff --git a/WMS-BS/NFine.Application/WMS/ICSMTDOCApp.cs b/WMS-BS/NFine.Application/WMS/ICSMTDOCApp.cs index f9b1f85..93602d8 100644 --- a/WMS-BS/NFine.Application/WMS/ICSMTDOCApp.cs +++ b/WMS-BS/NFine.Application/WMS/ICSMTDOCApp.cs @@ -327,7 +327,7 @@ d.ProjectCode,d.BatchCode,d.Version,d.Brand,d.cFree1,d.cFree2,d.cFree3,d.cFree4, string LotNo = jo["LotNo"].ToString(); - string sqls = @"select max(LotNo) as NewLotNo from ICSInventoryLot where EATTRIBUTE1='{0}' "; + string sqls = @"select max(LotNo) as NewLotNo from ICSInventoryLot where EATTRIBUTE1 like '{0}%' "; sqls = string.Format(sqls, LotNo); dt = Repository().FindTableBySql(sqls.ToString()); var aaa = Regex.Matches(LotNo, "-").Count; diff --git a/WMS-BS/NFine.Web/Areas/OMAY/Views/OMAYMoOutbound/OMAYMoOutbound.cshtml b/WMS-BS/NFine.Web/Areas/OMAY/Views/OMAYMoOutbound/OMAYMoOutbound.cshtml index ecfd6a2..f7c4aae 100644 --- a/WMS-BS/NFine.Web/Areas/OMAY/Views/OMAYMoOutbound/OMAYMoOutbound.cshtml +++ b/WMS-BS/NFine.Web/Areas/OMAY/Views/OMAYMoOutbound/OMAYMoOutbound.cshtml @@ -73,9 +73,9 @@ { label: '存货代码', name: 'InvDesc', width: 100, align: 'left' }, { label: '存货名称', name: 'InvName', width: 180, align: 'left' }, { label: '规格型号', name: 'InvStd', width: 100, align: 'left' }, - { label: '重量', name: 'Quantity', width: 100, align: 'left' }, - { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, + { label: '重量', name: 'Quantity', width: 100, align: 'left', hidden: true }, { label: '数量', name: 'Amount', width: 100, align: 'left' }, + { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, { label: 'ERP工单行ID', name: 'MODetailID', hidden: true }, // { label: '部门', name: 'DepName', width: 100, align: 'left' }, ], @@ -125,8 +125,8 @@ { label: '规格型号', name: 'InvStd', width: 180, align: 'left' }, { label: '仓库名称', name: 'WarehouseName', width: 100, align: 'left' }, { label: '应领数量', name: 'Quantity', width: 100, align: 'left' }, - { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, { label: '已领数量', name: 'IssueQuantity', width: 100, align: 'left' }, + { label: '单位', name: 'InvUnit', width: 100, align: 'left' }, { label: '辅计量', name: 'Amount', hidden: true }, { label: '换算率', name: 'EATTRIBUTE1', width: 100, align: 'left' }, ],