From 99515f25dd3d01f6f13893f47f8494f73045cee9 Mon Sep 17 00:00:00 2001 From: gongxh Date: Tue, 4 May 2021 14:43:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.Model/NX.ERP.Model.csproj | 1 + NX.ERP.Model/Request/SaleOrderRequest.cs | 25 ++ NX.ERP.U8/Pmc/PmcQuery.cs | 22 +- .../Controllers/Pmc/PmcController.cs | 2 +- NX.ERP.Webapp/src/views/inventory-so.vue | 221 +++++++++--------- 5 files changed, 155 insertions(+), 116 deletions(-) create mode 100644 NX.ERP.Model/Request/SaleOrderRequest.cs diff --git a/NX.ERP.Model/NX.ERP.Model.csproj b/NX.ERP.Model/NX.ERP.Model.csproj index 72730d1..622cb3e 100644 --- a/NX.ERP.Model/NX.ERP.Model.csproj +++ b/NX.ERP.Model/NX.ERP.Model.csproj @@ -64,6 +64,7 @@ + diff --git a/NX.ERP.Model/Request/SaleOrderRequest.cs b/NX.ERP.Model/Request/SaleOrderRequest.cs new file mode 100644 index 0000000..74dcb99 --- /dev/null +++ b/NX.ERP.Model/Request/SaleOrderRequest.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace NX.ERP.Model.Request +{ + public class SaleOrderRequest + { + public IEnumerable SoCodes { get; set; } + public string InvStd { get; set; } + + public IEnumerable InvCodes { get; set; } + + + + public DateTime? BeginDate { get; set; } + public DateTime? EndDate { get; set; } + + + public bool byFinish { get; set; } + + + } +} diff --git a/NX.ERP.U8/Pmc/PmcQuery.cs b/NX.ERP.U8/Pmc/PmcQuery.cs index 1e40c8d..dac5d7a 100644 --- a/NX.ERP.U8/Pmc/PmcQuery.cs +++ b/NX.ERP.U8/Pmc/PmcQuery.cs @@ -97,7 +97,7 @@ namespace NX.ERP.U8.Pmc where.Add(" c.cinvcode in @cinvcode"); } - + @@ -341,7 +341,7 @@ namespace NX.ERP.U8.Pmc } - public IEnumerable Inventorysocode(NX.ERP.Model.Request.Inventoryall info1) + public IEnumerable Inventorysocode(NX.ERP.Model.Request.SaleOrderRequest info1) { string sql = $@" select j.cSTName,b.cSOCode,b.dDate,a.iRowNo,f.cCusAbbName,a.cInvCode,a.cInvName,g.cInvStd,a.iQuantity, h.dDate as fhdDate ,isnull(c.fqty,0)fqty,isnull(d.cqty,0)cqty @@ -380,11 +380,23 @@ namespace NX.ERP.U8.Pmc { where.Add(" g.cInvStd like @cInvStd "); } - if (!string.IsNullOrEmpty(info1.SoCode)) + if (info1.SoCodes != null) { - where.Add(" b.cSOCode like @cSOCode "); + where.Add(" b.cSOCode in @cSOCode "); } + if (info1.BeginDate != null && info1.EndDate != null) + { + where.Add(" b.dDate between @beginDate and @endDate "); + + } + + if (!info1.byFinish) + { + where.Add(" h.dDate is null "); + } + + var aa = string.Join(" and ", where.ToArray()); if (!string.IsNullOrEmpty(aa)) @@ -394,7 +406,7 @@ namespace NX.ERP.U8.Pmc using (var conn = NX.ERP.U8.U8LoginContext.Instance.Connection) { - return conn.Query(sql, new { cinvcode = info1.InvCodes, cInvStd = $"%{info1.InvStd}%", cSOCode = $"%{info1.SoCode}%" }); + return conn.Query(sql, new { cinvcode = info1.InvCodes, cInvStd = $"%{info1.InvStd}%", cSOCode = info1.SoCodes, info1.BeginDate, info1.EndDate }); } } diff --git a/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs b/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs index faa14b0..3a1e752 100644 --- a/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs +++ b/NX.ERP.WebAPi/Controllers/Pmc/PmcController.cs @@ -37,7 +37,7 @@ namespace NX.ERP.WebAPi.Controllers [HttpPost] [Route("api/Pmc/Inventorysocode")] - public IEnumerable Inventorysocode(NX.ERP.Model.Request.Inventoryall info) + public IEnumerable Inventorysocode(NX.ERP.Model.Request.SaleOrderRequest info) { var PmcQuery = new NX.ERP.U8.Pmc.PmcQuery(); return PmcQuery.Inventorysocode(info); diff --git a/NX.ERP.Webapp/src/views/inventory-so.vue b/NX.ERP.Webapp/src/views/inventory-so.vue index 0d3e444..fa6809e 100644 --- a/NX.ERP.Webapp/src/views/inventory-so.vue +++ b/NX.ERP.Webapp/src/views/inventory-so.vue @@ -3,7 +3,12 @@

销售订单表

- + + + + + + @@ -11,33 +16,27 @@ - - - + + + +
+ +
+ + + +
+ 包含已经交货 +
- - + +
- -
+