From 10df0dd22bca8580c0fd4e531e4fa12cf50c2b26 Mon Sep 17 00:00:00 2001 From: lilili Date: Wed, 25 Oct 2023 16:40:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BD=A2=E6=80=81=E8=BD=AC?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WMS-BS/NFine.Application/WMS/ICSMTDOCApp.cs | 10 +++++----- .../Areas/WMS/Views/ICSMTDOC/Metamorphosis.cshtml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/ICSMTDOCApp.cs b/WMS-BS/NFine.Application/WMS/ICSMTDOCApp.cs index 214d025..00c74c8 100644 --- a/WMS-BS/NFine.Application/WMS/ICSMTDOCApp.cs +++ b/WMS-BS/NFine.Application/WMS/ICSMTDOCApp.cs @@ -30,7 +30,7 @@ namespace NFine.Application.WMS List parameter = new List(); #region [SQL] - string sql = @" select distinct a.MTDOCCode,a.CreatePerson,a.CreateDateTime,a.Status,a.MUSER,a.MUSERName,a.MTIME from ICSMTDOC a"; + string sql = @" SELECT * FROM (select row_number() over(partition by a.MTDOCCode ORDER BY a.CreateDateTime) as row, a.MTDOCCode,a.CreatePerson,a.CreateDateTime,a.Status,a.MUSER,a.MUSERName,a.MTIME from ICSMTDOC a"; sql += " WHERE 1=1"; sql = string.Format(sql, DbHelper.GetErpIp(), DbHelper.GetErpName()); #endregion @@ -50,6 +50,7 @@ namespace NFine.Application.WMS //{ // sql += " and a.VenCode='" + NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode + "'"; //} + sql += " ) t WHERE t.Row=1"; return Repository().FindTablePageBySql(sql.ToString(), parameter.ToArray(), ref jqgridparam); } @@ -60,10 +61,9 @@ namespace NFine.Application.WMS string sql = string.Empty; List parameter = new List(); string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location.TrimEnd(','); - sql = @" select a.ID,a.DepCode,d.DepName,a.WHCode,c.WarehouseName,a.Sequence,a.LotNo,b.InvCode,b.InvName,a.Quantity,a.Amount,a.MTDOCQuantity,a.MTDOCType - from ICSMTDOC a - left join dbo.ICSInventoryLot e on a.LotNo=e.LotNo and a.WorkPoint=e.WorkPoint - left join ICSInventory b on e.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint + sql = @" select a.ID,a.DepCode,d.DepName,a.WHCode,c.WarehouseName,a.Sequence,b.InvCode,b.InvName,a.Quantity,a.Amount,a.MTDOCQuantity,case WHEN a.MTDOCType='1' then '转换前' ELSE '转换后' END as MTDOCType + from ICSMTDOC a + left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint left join ICSWarehouse c on a.WHCode=c.WarehouseCode and a.WorkPoint=c.WorkPoint left join ICSDepartment d on a.DepCode=d.DepCode and a.WorkPoint=d.WorkPoint WHERE a.MTDOCCode='{0}' and a.WorkPoint in ('{1}') order by a.Sequence "; diff --git a/WMS-BS/NFine.Web/Areas/WMS/Views/ICSMTDOC/Metamorphosis.cshtml b/WMS-BS/NFine.Web/Areas/WMS/Views/ICSMTDOC/Metamorphosis.cshtml index 1868a55..c4b1618 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/ICSMTDOC/Metamorphosis.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/ICSMTDOC/Metamorphosis.cshtml @@ -108,13 +108,13 @@ { label: '部门名称', name: 'DepName', width: 100, align: 'left' }, { label: '仓库代码', name: 'WHCode', width: 100, align: 'left' }, { label: '仓库名称', name: 'WarehouseName', width: 100, align: 'left' }, - { label: '条码', name: 'LotNo', width: 100, align: 'left' }, + //{ label: '条码', name: 'LotNo', width: 100, align: 'left' }, { label: '料品编码', name: 'InvCode', width: 100, align: 'left' }, - { label: '物料描述', name: 'InvName', width: 100, align: 'left' }, + { label: '物料描述', name: 'InvName', width: 300, align: 'left' }, { label: '数量', name: 'Quantity', width: 100, align: 'left' }, { label: '辅计量数量', name: 'Amount', width: 100, align: 'left' }, { label: '已转换数量', name: 'MTDOCQuantity', width: 100, align: 'left' }, - { label: '转换类型', name: 'MTDOCQuantity', width: 100, align: 'left' }, + { label: '转换类型', name: 'MTDOCType', width: 100, align: 'left' }, ], //colModel: ColModelSub, shrinkToFit: true,//宽度自适应