纽威
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.

182 lines
4.8 KiB

  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 ProductionRAFMRController : ControllerBase
  8. {
  9. ProductionRAFMRApp App = new ProductionRAFMRApp();
  10. // GET: WMS/ProductionRAFMR
  11. public ActionResult ICSMOApplyNegPRAFMR()
  12. {
  13. return View();
  14. }
  15. public ActionResult ICSMOApplyNegPRAFMRAdd()
  16. {
  17. return View();
  18. }
  19. public ActionResult ICSMOApplyNegPRAFMRUpdate()
  20. {
  21. return View();
  22. }
  23. public ActionResult SeachPRInventory()
  24. {
  25. return View();
  26. }
  27. [HttpGet]
  28. public ActionResult GetICSMOApplyNeg(Pagination pagination)
  29. {
  30. DataTable ListData = App.GetICSMOApplyNeg(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 GetICSMOApplyNegDetail(string ApplyNegCode, Pagination pagination)
  43. {
  44. DataTable ListData = App.GetICSMOApplyNegDetail(ApplyNegCode, 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. [HttpPost]
  55. [HandlerAjaxOnly]
  56. [ValidateAntiForgeryToken]
  57. public ActionResult DeleteICSMOApplyNeg(string keyValue)
  58. {
  59. string msg = App.DeleteICSMOApplyNeg(keyValue);
  60. if (string.IsNullOrEmpty(msg))
  61. {
  62. return Success("删除成功!");
  63. }
  64. else
  65. {
  66. return Error(msg);
  67. }
  68. }
  69. public ActionResult GetICSReturnTemporary(string rfqno, Pagination pagination)
  70. {
  71. DataTable table = App.GetICSReturnTemporary(rfqno);
  72. var JsonData = new
  73. {
  74. total = pagination.total,
  75. page = pagination.page,
  76. records = pagination.records,
  77. rows = table
  78. };
  79. return Content(JsonData.ToJson());
  80. }
  81. [HttpGet]
  82. public ActionResult GetINV(string invcode, Pagination pagination)
  83. {
  84. DataTable ListData = App.GetINV(invcode, ref pagination);
  85. var JsonData = new
  86. {
  87. total = pagination.total,
  88. page = pagination.page,
  89. records = pagination.records,
  90. rows = ListData,
  91. };
  92. return Content(JsonData.ToJson());
  93. }
  94. public void AddMOApplyNegTemp(string json)
  95. {
  96. App.AddMOApplyNegTemp(json);
  97. }
  98. [HttpPost]
  99. [HandlerAjaxOnly]
  100. public ActionResult SaveICSMOApplyNeg(string ICSASN)
  101. {
  102. string msg = App.SaveICSMOApplyNeg(ICSASN);
  103. if (!string.IsNullOrEmpty(msg))
  104. {
  105. return Error(msg);
  106. }
  107. else
  108. {
  109. return Success("添加成功!");
  110. }
  111. }
  112. public void ClearTemp()
  113. {
  114. App.ClearTemp();
  115. }
  116. public ActionResult GetICSMOApplyNegDetailTemp(string ApplyNegCode, Pagination pagination)
  117. {
  118. DataTable table = App.GetICSMOApplyNegDetailTemp(ApplyNegCode);
  119. var JsonData = new
  120. {
  121. total = pagination.total,
  122. page = pagination.page,
  123. records = pagination.records,
  124. rows = table
  125. };
  126. return Content(JsonData.ToJson());
  127. }
  128. public void UpdateMOApplyNegTemp(string json)
  129. {
  130. App.UpdateMOApplyNegTemp(json);
  131. }
  132. [HttpPost]
  133. [HandlerAjaxOnly]
  134. public ActionResult AuditICSMOApplyNeg(string ICSASN)
  135. {
  136. string msg = App.AuditICSMOApplyNeg(ICSASN);
  137. if (!string.IsNullOrEmpty(msg))
  138. {
  139. return Error(msg);
  140. }
  141. else
  142. {
  143. return Success("审核成功!");
  144. }
  145. }
  146. [HttpPost]
  147. [HandlerAjaxOnly]
  148. public ActionResult UpdateICSMOApplyNeg(string ICSASN)
  149. {
  150. string msg = App.UpdateICSMOApplyNeg(ICSASN);
  151. if (!string.IsNullOrEmpty(msg))
  152. {
  153. return Error(msg);
  154. }
  155. else
  156. {
  157. return Success("修改成功!");
  158. }
  159. }
  160. }
  161. }