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.

142 lines
3.7 KiB

3 weeks ago
  1. using NFine.Application.WMS;
  2. using NFine.Code;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. namespace NFine.Web.Areas.WMS.Controllers
  10. {
  11. public class ICSOOPickController : ControllerBase
  12. {
  13. ICSOOPickApp App = new ICSOOPickApp();
  14. // GET: WMS/ProductionIssue
  15. public ActionResult ICSOOPickApplyNeg()
  16. {
  17. return View();
  18. }
  19. public ActionResult ICSOOPickApplyNegAdd()
  20. {
  21. return View();
  22. }
  23. public ActionResult SeachICSOOPick()
  24. {
  25. return View();
  26. }
  27. public ActionResult SeachInventory()
  28. {
  29. return View();
  30. }
  31. public ActionResult ICSOOPickApplyNegUpdate()
  32. {
  33. return View();
  34. }
  35. [HttpGet]
  36. public ActionResult GetOOPickApplyNeg(Pagination pagination)
  37. {
  38. DataTable ListData = App.GetOOPickApplyNeg(ref pagination);
  39. var JsonData = new
  40. {
  41. total = pagination.total,
  42. page = pagination.page,
  43. records = pagination.records,
  44. rows = ListData,
  45. };
  46. return Content(JsonData.ToJson());
  47. }
  48. [HttpGet]
  49. public ActionResult GetINV(string OOCode, Pagination pagination)
  50. {
  51. DataTable ListData = App.GetINV(OOCode, ref pagination);
  52. var JsonData = new
  53. {
  54. total = pagination.total,
  55. page = pagination.page,
  56. records = pagination.records,
  57. rows = ListData,
  58. };
  59. return Content(JsonData.ToJson());
  60. }
  61. public ActionResult GetICSOOPickReturnTemporary(string ID, Pagination pagination)
  62. {
  63. DataTable table = App.GetICSOOPickReturnTemporary(ID);
  64. var JsonData = new
  65. {
  66. total = pagination.total,
  67. page = pagination.page,
  68. records = pagination.records,
  69. rows = table
  70. };
  71. return Content(JsonData.ToJson());
  72. }
  73. [HttpPost]
  74. [HandlerAjaxOnly]
  75. [ValidateAntiForgeryToken]
  76. public ActionResult DeleteICSOOPickApplyNeg(string keyValue)
  77. {
  78. string msg = App.DeleteOOPickApplyNeg(keyValue);
  79. if (string.IsNullOrEmpty(msg))
  80. {
  81. return Success("删除成功!");
  82. }
  83. else
  84. {
  85. return Error(msg);
  86. }
  87. }
  88. public void ClearTemp()
  89. {
  90. App.ClearTemp();
  91. }
  92. /// <summary>
  93. /// 新增
  94. /// </summary>
  95. /// <param name="ICSASN"></param>
  96. /// <returns></returns>
  97. [HttpPost]
  98. [HandlerAjaxOnly]
  99. public ActionResult SaveICSOOPickApplyNeg(string ICSASN)
  100. {
  101. string msg = App.SaveICSOOPickAppApplyNeg(ICSASN);
  102. if (!string.IsNullOrEmpty(msg))
  103. {
  104. return Error(msg);
  105. }
  106. else
  107. {
  108. return Success("添加成功!");
  109. }
  110. }
  111. /// <summary>
  112. /// 修改
  113. /// </summary>
  114. /// <param name="ICSASN"></param>
  115. /// <returns></returns>
  116. [HttpPost]
  117. [HandlerAjaxOnly]
  118. public ActionResult UpdateICSOOPickApplyNeg(string ICSASN)
  119. {
  120. string msg = App.UpdateICSOOPickApplyNeg(ICSASN);
  121. if (!string.IsNullOrEmpty(msg))
  122. {
  123. return Error(msg);
  124. }
  125. else
  126. {
  127. return Success("修改成功!");
  128. }
  129. }
  130. }
  131. }