From f0337e774ea19f4cbc1b11fca1d7d2a6521bf483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=B0=20=E6=9C=B1?= <501697962@qq.com> Date: Fri, 21 May 2021 09:32:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.Model/Request/PoOrderRequest.cs | 2 +- NX.ERP.U8/Pmc/PmcQuery.cs | 16 ++++++++++------ NX.ERP.WebAPi/Web.config | 2 +- NX.ERP.Webapp/src/views/inventory-po.vue | 21 +++++++++++++++++++++ 4 files changed, 33 insertions(+), 8 deletions(-) diff --git a/NX.ERP.Model/Request/PoOrderRequest.cs b/NX.ERP.Model/Request/PoOrderRequest.cs index 1cac536..01030d3 100644 --- a/NX.ERP.Model/Request/PoOrderRequest.cs +++ b/NX.ERP.Model/Request/PoOrderRequest.cs @@ -15,7 +15,7 @@ namespace NX.ERP.Model.Request public IEnumerable InvCodes { get; set; } - + public bool byFinish { get; set; } public DateTime? BeginDate { get; set; } public DateTime? EndDate { get; set; } diff --git a/NX.ERP.U8/Pmc/PmcQuery.cs b/NX.ERP.U8/Pmc/PmcQuery.cs index a1a78f8..8a72322 100644 --- a/NX.ERP.U8/Pmc/PmcQuery.cs +++ b/NX.ERP.U8/Pmc/PmcQuery.cs @@ -138,7 +138,7 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam FROM mom_order m WITH (NOLOCK) INNER JOIN mom_orderdetail md WITH (NOLOCK) ON m.MoId = md.MoId INNER JOIN mom_moallocate ma WITH (NOLOCK) ON md.MoDId = ma.MoDId - INNER JOIN + left JOIN mom_motype motype WITH (NOLOCK) ON motype.MoTypeId = md.MoTypeId INNER JOIN (SELECT ma.invcode, SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) wqty @@ -226,7 +226,7 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam FROM mom_order m WITH (NOLOCK) INNER JOIN mom_orderdetail md WITH (NOLOCK) ON m.MoId = md.MoId INNER JOIN mom_moallocate ma WITH (NOLOCK) ON md.MoDId = ma.MoDId - INNER JOIN + left JOIN mom_motype motype WITH (NOLOCK) ON motype.MoTypeId = md.MoTypeId INNER JOIN (SELECT ma.invcode, SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) wqty @@ -368,13 +368,13 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam where convert(varchar,b.dDate,112) between convert(varchar,dateadd(day,-day(dateadd(month,-3,getdate()))+1,dateadd(month,-3,getdate())),112) and convert(varchar,dateadd(day,-day(dateadd(month,-3,getdate())),dateadd(month,1,dateadd(month,-3,getdate()))),112) group by a.cinvcode - ) a2 on a.cInvCode =a2.cInvCode + ) a3 on a.cInvCode =a3.cInvCode full join (select left(convert(varchar,dateadd(month,-2,getdate()),112),6) as month1 , a.cinvcode, sum(a.iQuantity) as iQuantity from rdrecords11 a WITH (nolock) left join rdrecord11 b WITH (nolock) on a.id=b.id where convert(varchar,b.dDate,112) between convert(varchar,dateadd(day,-day(dateadd(month,-2,getdate()))+1,dateadd(month,-2,getdate())),112) and convert(varchar,dateadd(day,-day(dateadd(month,-2,getdate())),dateadd(month,1,dateadd(month,-2,getdate()))),112) group by a.cinvcode - ) a3 on a.cInvCode =a3.cInvCode + ) a2 on a.cInvCode =a2.cInvCode full join (select left(convert(varchar,dateadd(month,-4,getdate()),112),6) as month1 , a.cinvcode, sum(a.iQuantity) as iQuantity from rdrecords11 a WITH (nolock) left join rdrecord11 b WITH (nolock) on a.id=b.id where convert(varchar,b.dDate,112) between convert(varchar,dateadd(day,-day(dateadd(month,-4,getdate()))+1,dateadd(month,-4,getdate())),112) @@ -547,7 +547,8 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam { string sql = $@" Select cpoid,CONVERT(varchar(100),dpodate, 23) as dpodate,zpurpoheader.cvenabbname,zpurpotail.cinvcode,zpurpotail.cinvname,zpurpotail.cinvstd,zpurpotail.cinvm_unit,zpurpotail.ireceivedqty, - iquantity,prd.rqty,CONVERT(varchar(100), zpurpotail.darrivedate, 23) as darrivedate,cupsocode, CONVERT(varchar(100), d.ddate, 23) as ddate, CONVERT(varchar(100), c.drequirdate, 23) as drequirdate + iquantity,prd.rqty,CONVERT(varchar(100), zpurpotail.darrivedate, 23) as darrivedate,cupsocode, CONVERT(varchar(100), d.ddate, 23) as ddate, CONVERT(varchar(100), c.drequirdate, 23) as drequirdate, + zpurpotail.cbcloser,zpurpoheader.ccloser From zpurpoheader with(nolock) inner join zpurpotail with(nolock) on zpurpoheader.poid=zpurpotail.poid left join pu_appbody c with(nolock) on zpurpotail.iAppIds =c.autoid left join pu_apphead d with(nolock) on d.id =c.id @@ -598,7 +599,10 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam where.Add(" d.dDate between @beginDate2 and @endDate2 "); } - + if (!info1.byFinish) + { + where.Add(" isnull(zpurpotail.cbcloser,'') ='' "); + } var aa = string.Join(" and ", where.ToArray()); if (!string.IsNullOrEmpty(aa)) diff --git a/NX.ERP.WebAPi/Web.config b/NX.ERP.WebAPi/Web.config index 9e28fb3..c17d67d 100644 --- a/NX.ERP.WebAPi/Web.config +++ b/NX.ERP.WebAPi/Web.config @@ -7,7 +7,7 @@ - + diff --git a/NX.ERP.Webapp/src/views/inventory-po.vue b/NX.ERP.Webapp/src/views/inventory-po.vue index fdd7ef6..6312342 100644 --- a/NX.ERP.Webapp/src/views/inventory-po.vue +++ b/NX.ERP.Webapp/src/views/inventory-po.vue @@ -33,6 +33,12 @@ + + +
+ 包含关闭 +
+