You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
2.4 KiB

3 weeks ago
  1. using NFine.Application.WMS;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. using NFine.Code;
  10. using System.Data.SqlClient;
  11. using NFine.Data.Extensions;
  12. using System.Data.OleDb;
  13. using System.Configuration;
  14. using ICS.Application.Entity;
  15. namespace NFine.Web.Areas.WMS.Controllers
  16. {
  17. public class DeciliterController : ControllerBase
  18. {
  19. DeciliterApp App = new DeciliterApp();
  20. // GET: WMS/Deciliter
  21. public ActionResult ICSDeciliter()
  22. {
  23. return View();
  24. }
  25. public ActionResult LotNoSplit()
  26. {
  27. return View();
  28. }
  29. public ActionResult LotNoCombine()
  30. {
  31. return View();
  32. }
  33. public ActionResult LotNoPackingSplit()
  34. {
  35. return View();
  36. }
  37. [HttpGet]
  38. [HandlerAjaxOnly]
  39. public ActionResult GetNewLotNo(string LotNO)
  40. {
  41. string ListData = App.GetNewLotNo(LotNO);
  42. var data = new
  43. {
  44. rows = ListData,
  45. };
  46. return Content(data.ToJson());
  47. }
  48. [HttpGet]
  49. [HandlerAjaxOnly]
  50. public ActionResult GetNewLotNoByPacking(string LotNO)
  51. {
  52. string ListData = App.GetNewLotNoByPacking(LotNO);
  53. var data = new
  54. {
  55. rows = ListData,
  56. };
  57. return Content(data.ToJson());
  58. }
  59. [HttpPost]
  60. [HandlerAjaxOnly]
  61. public ActionResult Split(string Parameter)
  62. {
  63. string msg = App.Split(Parameter);
  64. if (!string.IsNullOrEmpty(msg))
  65. {
  66. return Error(msg);
  67. }
  68. else
  69. {
  70. return Success("添加成功!");
  71. }
  72. }
  73. //根据ID获取条码
  74. public ActionResult GetLotNoByID(string ID)
  75. {
  76. DataTable dt = App.GetLotNoByID(ID);
  77. return Content(dt.ToJson());
  78. }
  79. //合批
  80. public ActionResult Combine(string LotNo,string ID)
  81. {
  82. string msg = App.Combine(LotNo,ID);
  83. if (string.IsNullOrEmpty(msg))
  84. {
  85. return Success("操作成功!");
  86. }
  87. else
  88. {
  89. return Error("" + msg + "");
  90. }
  91. }
  92. }
  93. }