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.

159 lines
3.8 KiB

3 weeks ago
  1. using NFine.Application.WMS;
  2. using System.Data;
  3. using System.Web.Mvc;
  4. using NFine.Code;
  5. namespace NFine.Web.Areas.WMS.Controllers
  6. {
  7. public class ICSOperationController : ControllerBase
  8. {
  9. ICSOperationApp App = new ICSOperationApp();
  10. // GET: WMS/ICSOperation
  11. public ActionResult ICSOperation()
  12. {
  13. return View();
  14. }
  15. public ActionResult ICSOperationAdd()
  16. {
  17. return View();
  18. }
  19. public ActionResult ICSOperationUpdate()
  20. {
  21. return View();
  22. }
  23. public ActionResult SeachICSApplyDetail()
  24. {
  25. return View();
  26. }
  27. [HttpGet]
  28. public ActionResult SearchICSOperation(Pagination pagination, string queryJson)
  29. {
  30. DataTable ListData = App.SearchICSOperation(queryJson, ref pagination);
  31. var JsonData = new
  32. {
  33. total = pagination.total,
  34. page = pagination.page,
  35. records = pagination.records,
  36. rows = ListData,
  37. };
  38. return Content(JsonData.ToJson());
  39. }
  40. [HttpGet]
  41. [HandlerAjaxOnly]
  42. public ActionResult SearchICSOperationDetail(string Code, Pagination pagination)
  43. {
  44. DataTable ListData = App.SearchICSOperationDetail(Code, ref pagination);
  45. var JsonData = new
  46. {
  47. total = pagination.total,
  48. page = pagination.page,
  49. records = pagination.records,
  50. rows = ListData,
  51. };
  52. return Content(JsonData.ToJson());
  53. }
  54. [HttpGet]
  55. public ActionResult GetIcsApplyDetail(string invcode, string Code, string Invstd ,Pagination pagination)
  56. {
  57. DataTable ListData = App.GetIcsApplyDetail(invcode, Code, Invstd ,ref pagination);
  58. var JsonData = new
  59. {
  60. total = pagination.total,
  61. page = pagination.page,
  62. records = pagination.records,
  63. rows = ListData,
  64. };
  65. return Content(JsonData.ToJson());
  66. }
  67. public ActionResult GetICSOperationDetail(string OperationCode, Pagination pagination)
  68. {
  69. DataTable table = App.GetICSOperationDetail(OperationCode, ref pagination);
  70. var JsonData = new
  71. {
  72. total = pagination.total,
  73. page = pagination.page,
  74. records = pagination.records,
  75. rows = table
  76. };
  77. return Content(JsonData.ToJson());
  78. }
  79. [HttpPost]
  80. [HandlerAjaxOnly]
  81. public ActionResult SaveICSOperation(string ICSASN)
  82. {
  83. string msg = App.SaveICSOperation(ICSASN);
  84. if (!string.IsNullOrEmpty(msg))
  85. {
  86. return Error(msg);
  87. }
  88. else
  89. {
  90. return Success("添加成功!");
  91. }
  92. }
  93. [HttpPost]
  94. [HandlerAjaxOnly]
  95. public ActionResult UpdateICSOperation(string ICSASN)
  96. {
  97. string msg = App.UpdateICSOperation(ICSASN);
  98. if (!string.IsNullOrEmpty(msg))
  99. {
  100. return Error(msg);
  101. }
  102. else
  103. {
  104. return Success("修改成功!");
  105. }
  106. }
  107. [HttpPost]
  108. [HandlerAjaxOnly]
  109. public ActionResult AuditICSOperation(string keyValue)
  110. {
  111. string msg = App.AuditICSOperation(keyValue);
  112. if (!string.IsNullOrEmpty(msg))
  113. {
  114. return Error(msg);
  115. }
  116. else
  117. {
  118. return Success("操作成功!");
  119. }
  120. }
  121. }
  122. }