diff --git a/HHWMS.Web/Areas/XWMS/Controllers/XWMSMFMController.cs b/HHWMS.Web/Areas/XWMS/Controllers/XWMSMFMController.cs index 7ec2eb9..fe90bdb 100644 --- a/HHWMS.Web/Areas/XWMS/Controllers/XWMSMFMController.cs +++ b/HHWMS.Web/Areas/XWMS/Controllers/XWMSMFMController.cs @@ -33,9 +33,36 @@ public class XWMSMFMController : BaseController } [ActionDescription("Sys.Search")] - public ActionResult Search() + public ActionResult Search(string address, string zjcode, string materialcode, string gdbill, int gdline = 0, int ms = 0) { - var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSMFM where rownum <=30").Tables[0]; + var sql = @"select * from QREQ3.XWMSMFM where 1=1"; + if (!string.IsNullOrEmpty(address)) + { + sql += $" and MFGFCY_0 = '{address}'"; + } + if (!string.IsNullOrEmpty(zjcode)) + { + sql += $" and MFIITMREF_0 like '%{zjcode}%'"; + } + if (!string.IsNullOrEmpty(materialcode)) + { + sql += $"and ITMREF_0 like '%{materialcode}%'"; + } + if (!string.IsNullOrEmpty(gdbill)) + { + sql += $" and MFGNUM_0 like '%{gdbill}%'"; + } + if (gdline != 0) + { + sql += $" and MFGLIN_0 = '{gdline}'"; + } + if (ms != 0) + { + sql += $" and STOCOD_0 = '{ms}'"; + } + + var data = OracleHelper.GetDataSet(sql).Tables[0]; + var list = data.AsEnumerable().Select (x => new { diff --git a/HHWMS.Web/Areas/XWMS/Controllers/XWMSPOHController.cs b/HHWMS.Web/Areas/XWMS/Controllers/XWMSPOHController.cs index a8f2855..efb9581 100644 --- a/HHWMS.Web/Areas/XWMS/Controllers/XWMSPOHController.cs +++ b/HHWMS.Web/Areas/XWMS/Controllers/XWMSPOHController.cs @@ -52,7 +52,7 @@ public class XWMSPOHController : BaseController { sql += $"and ITMREF_0 like '%{materialcode}%'"; } - sql += " and rownum <=30"; + var data = OracleHelper.GetDataSet(sql).Tables[0]; var list = data.AsEnumerable().Select (x => new @@ -83,6 +83,7 @@ public class XWMSPOHController : BaseController STA_0 = x.Field("STA_0"), } ).ToList(); + return JsonMore(list); } diff --git a/HHWMS.Web/Areas/XWMS/Controllers/XWMSPTHController.cs b/HHWMS.Web/Areas/XWMS/Controllers/XWMSPTHController.cs index f361a89..108685b 100644 --- a/HHWMS.Web/Areas/XWMS/Controllers/XWMSPTHController.cs +++ b/HHWMS.Web/Areas/XWMS/Controllers/XWMSPTHController.cs @@ -33,9 +33,31 @@ public class XWMSPTHController : BaseController } [ActionDescription("Sys.Search")] - public ActionResult Search() + public ActionResult Search(string address, string billno, string supply, string materialcode, string cgsh) { - var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSPTH where rownum <=30").Tables[0]; + var sql = @"select * from QREQ3.XWMSPTH where 1=1"; + if (!string.IsNullOrEmpty(address)) + { + sql += $" and PRHFCY_0 = '{address}'"; + } + if (!string.IsNullOrEmpty(billno)) + { + sql += $" and POHNUM_0 like '%{billno}%'"; + } + if (!string.IsNullOrEmpty(supply)) + { + sql += $" and BPSNUM_0 like '%{supply}%'"; + } + if (!string.IsNullOrEmpty(materialcode)) + { + sql += $"and ITMREF_0 like '%{materialcode}%'"; + } + if (!string.IsNullOrEmpty(cgsh)) + { + sql += $"and PTHNUM_0 like '%{cgsh}%'"; + } + + var data = OracleHelper.GetDataSet(sql).Tables[0]; var list = data.AsEnumerable().Select (x => new { diff --git a/HHWMS.Web/Areas/XWMS/Controllers/XWMSSHIPController.cs b/HHWMS.Web/Areas/XWMS/Controllers/XWMSSHIPController.cs index f663591..c6b1b4a 100644 --- a/HHWMS.Web/Areas/XWMS/Controllers/XWMSSHIPController.cs +++ b/HHWMS.Web/Areas/XWMS/Controllers/XWMSSHIPController.cs @@ -33,9 +33,27 @@ public class XWMSSHIPController : BaseController } [ActionDescription("Sys.Search")] - public ActionResult Search() + public ActionResult Search(string address, string billno, string sbill, string materialcode) { - var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSSHIP where rownum <=30").Tables[0]; + var sql = @"select * from QREQ3.XWMSSHIP where 1=1"; + if (!string.IsNullOrEmpty(address)) + { + sql += $" and FCY_0 = '{address}'"; + } + if (!string.IsNullOrEmpty(billno)) + { + sql += $" and POHNUM_0 like '%{billno}%'"; + } + if (!string.IsNullOrEmpty(sbill)) + { + sql += $" and SDHNUM_0 like '%{sbill}%'"; + } + if (!string.IsNullOrEmpty(materialcode)) + { + sql += $"and ITMREF_0 like '%{materialcode}%'"; + } + + var data = OracleHelper.GetDataSet(sql).Tables[0]; var list = data.AsEnumerable().Select (x => new { diff --git a/HHWMS.Web/Areas/XWMS/Controllers/XWMSSOHController.cs b/HHWMS.Web/Areas/XWMS/Controllers/XWMSSOHController.cs index 35a11d6..ac60ac8 100644 --- a/HHWMS.Web/Areas/XWMS/Controllers/XWMSSOHController.cs +++ b/HHWMS.Web/Areas/XWMS/Controllers/XWMSSOHController.cs @@ -33,9 +33,28 @@ public class XWMSSOHController : BaseController } [ActionDescription("Sys.Search")] - public ActionResult Search() + public ActionResult Search(string address, string billno, string cust, string materialcode) { - var data = OracleHelper.GetDataSet("select * from QREQ3.XWMSSOH where rownum <=30").Tables[0]; + var sql = @"select * from QREQ3.XWMSSOH where 1=1"; + if (!string.IsNullOrEmpty(address)) + { + sql += $" and SALFCY_0 = '{address}'"; + } + if (!string.IsNullOrEmpty(billno)) + { + sql += $" and SOHNUM_0 like '%{billno}%'"; + } + if (!string.IsNullOrEmpty(cust)) + { + sql += $" and BPCNAM_0 like '%{cust}%'"; + } + if (!string.IsNullOrEmpty(materialcode)) + { + sql += $"and ITMREF_0 like '%{materialcode}%'"; + } + + var data = OracleHelper.GetDataSet(sql).Tables[0]; + var list = data.AsEnumerable().Select (x => new { diff --git a/HHWMS.Web/Areas/XWMS/Views/XWMSMFM/Index.cshtml b/HHWMS.Web/Areas/XWMS/Views/XWMSMFM/Index.cshtml index 48de3e2..4fb588c 100644 --- a/HHWMS.Web/Areas/XWMS/Views/XWMSMFM/Index.cshtml +++ b/HHWMS.Web/Areas/XWMS/Views/XWMSMFM/Index.cshtml @@ -23,11 +23,49 @@ } - + + 创建单据 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@cell-mouse-leave="handleCellLeave" + @@selection-change="handleSelectionChange"> @@ -53,6 +91,15 @@ + +