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

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