diff --git a/KanBan/NFine.Application/SRM/WatchPanelApp.cs b/KanBan/NFine.Application/SRM/WatchPanelApp.cs index 0ea0633..aeb5a32 100644 --- a/KanBan/NFine.Application/SRM/WatchPanelApp.cs +++ b/KanBan/NFine.Application/SRM/WatchPanelApp.cs @@ -1513,6 +1513,7 @@ where ODNType='1' and a.Quantity-a.RCVQuantity>0"; when a.FromWarehouseCode='025' then a.FromWarehouseCode+'/'+'L5' when a.FromWarehouseCode='026' then a.FromWarehouseCode+'/'+'L6' when a.FromWarehouseCode='027' then a.FromWarehouseCode+'/'+'L7' + when a.FromWarehouseCode='015' then a.FromWarehouseCode+'/'+'C1' else a.FromWarehouseCode+'/'+c.WarehouseName end as '调拨仓', case when a.ToWarehouseCode='021' then a.ToWarehouseCode+'/'+'L1' @@ -1522,15 +1523,18 @@ else a.FromWarehouseCode+'/'+c.WarehouseName end as '调拨仓', when a.ToWarehouseCode='025' then a.ToWarehouseCode+'/'+'L5' when a.ToWarehouseCode='026' then a.ToWarehouseCode+'/'+'L6' when a.ToWarehouseCode='027' then a.ToWarehouseCode+'/'+'L7' -else a.ToWarehouseCode+'/'+c.WarehouseName end as '目标仓', + when a.ToWarehouseCode='015' then a.ToWarehouseCode+'/'+'C1' +else a.ToWarehouseCode+'/'+d.WarehouseName end as '目标仓', format(a.MTIME , 'yyyy-MM-dd') as '调拨时间' from dbo.ICSWareHouseLotInfoLog a inner join dbo.ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint - inner join dbo.ICSWarehouse c on a.ToWarehouseCode=c.WarehouseCode and a.WorkPoint=c.WorkPoint + inner join dbo.ICSWarehouse c on a.FromWarehouseCode=c.WarehouseCode and a.WorkPoint=c.WorkPoint + inner join dbo.ICSWarehouse d on a.ToWarehouseCode=d.WarehouseCode and a.WorkPoint=d.WorkPoint where BusinessCode in ('70','47') and a.TransType in ('6','14') and format(a.MTIME , 'yyyy-MM-dd') =format(getdate() , 'yyyy-MM-dd') )a - group by a.调拨时间 ,a.存货编码,a.存货名称,a.调拨仓,a.目标仓"; + group by a.调拨时间 ,a.存货编码,a.存货名称,a.调拨仓,a.目标仓 +"; DataTable dt = SqlHelper.GetDataTableBySql(SqlText); @@ -1633,7 +1637,7 @@ SELECT select count(*) as DB into #Temp5 from( -select a.调拨仓,a.存货编码,a.存货名称,sum(a.数量) as 数量,a.目标仓,a.调拨时间 +select a.调拨仓,a.存货编码,a.存货名称,cast(sum(a.数量 )as decimal(16,2) ) 数量,a.目标仓,a.调拨时间 from( select a.InvCode as '存货编码',b.InvName+'|'+b.InvStd as '存货名称', case when b.AmountEnable='1' then a.Quantity/b.EATTRIBUTE1 else a.Quantity end '数量', @@ -1653,15 +1657,17 @@ else a.FromWarehouseCode+'/'+c.WarehouseName end as '调拨仓', when a.ToWarehouseCode='025' then a.ToWarehouseCode+'/'+'L5' when a.ToWarehouseCode='026' then a.ToWarehouseCode+'/'+'L6' when a.ToWarehouseCode='027' then a.ToWarehouseCode+'/'+'L7' -else a.ToWarehouseCode+'/'+c.WarehouseName end as '目标仓', +else a.ToWarehouseCode+'/'+d.WarehouseName end as '目标仓', format(a.MTIME , 'yyyy-MM-dd') as '调拨时间' from dbo.ICSWareHouseLotInfoLog a inner join dbo.ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint - inner join dbo.ICSWarehouse c on a.ToWarehouseCode=c.WarehouseCode and a.WorkPoint=c.WorkPoint + inner join dbo.ICSWarehouse c on a.FromWarehouseCode=c.WarehouseCode and a.WorkPoint=c.WorkPoint + inner join dbo.ICSWarehouse d on a.ToWarehouseCode=d.WarehouseCode and a.WorkPoint=d.WorkPoint where BusinessCode in ('70','47') and a.TransType in ('6','14') and format(a.MTIME , 'yyyy-MM-dd') =format(getdate() , 'yyyy-MM-dd') )a group by a.调拨时间 ,a.存货编码,a.存货名称,a.调拨仓,a.目标仓 + )e diff --git a/KanBan/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa.cshtml b/KanBan/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa.cshtml index f930a13..7939616 100644 --- a/KanBan/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa.cshtml +++ b/KanBan/NFine.Web/Areas/SRM/Views/WatchPanel/PanelWIPZhiXingDa.cshtml @@ -143,13 +143,13 @@ width: 10% !important; } .CustDiv5 div span:nth-child(2),.CustDiv5 div div span:nth-child(2) { - width: 30% !important; + width: 35% !important; } .CustDiv5 div span:nth-child(3),.CustDiv5 div div span:nth-child(3) { width: 35% !important; } .CustDiv5 div span:nth-child(4),.CustDiv5 div div span:nth-child(4) { - width: 15% !important; + width: 10% !important; } .CustDiv5 div span:nth-child(5),.CustDiv5 div div span:nth-child(5) { width: 10% !important; diff --git a/WMS-BS/NFine.Application/WMS/PrintLotNoOverallApp.cs b/WMS-BS/NFine.Application/WMS/PrintLotNoOverallApp.cs index 774f9f1..c676840 100644 --- a/WMS-BS/NFine.Application/WMS/PrintLotNoOverallApp.cs +++ b/WMS-BS/NFine.Application/WMS/PrintLotNoOverallApp.cs @@ -68,12 +68,26 @@ namespace NFine.Application.WMS string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location; string msg = ""; keyValue = keyValue.Substring(1, keyValue.Length - 2); - string sql = string.Empty; - sql += string.Format(@"DELETE FROM dbo.ICSInventoryLot WHERE LotNo IN ({0}) and WorkPoint ='{1}'", keyValue.TrimEnd(','), WorkPoint); - sql += string.Format(@"DELETE FROM dbo.ICSInventoryLotDetail WHERE LotNo IN ({0}) and WorkPoint ='{1}'", keyValue.TrimEnd(','), WorkPoint); + string sqls = string.Empty; + string sql = string.Format(@"SELECT * FROM dbo.ICSInspection + WHERE LotNo IN (SELECT LotNO FROM dbo.ICSInventoryLot WHERE ID IN ({0})) and WorkPoint in ('{1}')", keyValue.TrimEnd(','), WorkPoint); + DataTable dtASN = SqlHelper.GetDataTableBySql(sql); + if (dtASN != null && dtASN.Rows.Count > 0) + { + msg = "所选条码已生成检验单,无法删除!"; + } + sql = string.Format(@"SELECT * FROM dbo.ICSWareHouseLotInfo WHERE LotNO IN + (SELECT LotNO FROM dbo.ICSInventoryLot WHERE ID IN ({0})) and WorkPoint in ('{1}')", keyValue.TrimEnd(','), WorkPoint); + DataTable dtCarton = SqlHelper.GetDataTableBySql(sql); + if (dtCarton != null && dtCarton.Rows.Count > 0) + { + msg += "所选条码已入库,无法删除!"; + } + sqls += string.Format(@"DELETE FROM dbo.ICSInventoryLot WHERE LotNo IN ({0}) and WorkPoint ='{1}'", keyValue.TrimEnd(','), WorkPoint); + sqls += string.Format(@"DELETE FROM dbo.ICSInventoryLotDetail WHERE LotNo IN ({0}) and WorkPoint ='{1}'", keyValue.TrimEnd(','), WorkPoint); try { - SqlHelper.CmdExecuteNonQueryLi(sql); + SqlHelper.CmdExecuteNonQueryLi(sqls); } catch (Exception ex) {