纽威
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 WWMaterialsDeliveredRTMController : ControllerBase
  8. {
  9. WWMaterialsDeliveredRTMApp App = new WWMaterialsDeliveredRTMApp();
  10. // GET: WMS/WWMaterialsDeliveredRTM
  11. public ActionResult WWICSMOApplyNegMD()
  12. {
  13. return View();
  14. }
  15. public ActionResult WWICSMOApplyNegMDAdd()
  16. {
  17. return View();
  18. }
  19. public ActionResult WWICSMOApplyNegMDUpdate()
  20. {
  21. return View();
  22. }
  23. public ActionResult WWSeachMDInventory()
  24. {
  25. return View();
  26. }
  27. [HttpGet]
  28. public ActionResult GetICSOApplyNeg(Pagination pagination)
  29. {
  30. DataTable ListData = App.GetICSOApplyNeg(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 GetICSOApplyNegDetail(string OApplyNegCode, Pagination pagination)
  43. {
  44. DataTable ListData = App.GetICSOApplyNegDetail(OApplyNegCode, 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. public void ClearTemp()
  99. {
  100. App.ClearTemp();
  101. }
  102. [HttpPost]
  103. [HandlerAjaxOnly]
  104. public ActionResult SaveICSMOApplyNeg(string ICSASN)
  105. {
  106. string msg = App.SaveICSMOApplyNeg(ICSASN);
  107. if (!string.IsNullOrEmpty(msg))
  108. {
  109. return Error(msg);
  110. }
  111. else
  112. {
  113. return Success("添加成功!");
  114. }
  115. }
  116. public ActionResult GetICSMOApplyNegDetailTemp(string OApplyNegCode, Pagination pagination)
  117. {
  118. DataTable table = App.GetICSMOApplyNegDetailTemp(OApplyNegCode);
  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. [HttpPost]
  129. [HandlerAjaxOnly]
  130. public ActionResult UpdateICSMOApplyNeg(string ICSASN)
  131. {
  132. string msg = App.UpdateICSMOApplyNeg(ICSASN);
  133. if (!string.IsNullOrEmpty(msg))
  134. {
  135. return Error(msg);
  136. }
  137. else
  138. {
  139. return Success("添加成功!");
  140. }
  141. }
  142. [HttpPost]
  143. [HandlerAjaxOnly]
  144. public ActionResult AuditICSMOApplyNeg(string ICSASN)
  145. {
  146. string msg = App.AuditICSMOApplyNeg(ICSASN);
  147. if (!string.IsNullOrEmpty(msg))
  148. {
  149. return Error(msg);
  150. }
  151. else
  152. {
  153. return Success("审核成功!");
  154. }
  155. }
  156. public void UpdateMOApplyNegTemp(string json)
  157. {
  158. App.UpdateMOApplyNegTemp(json);
  159. }
  160. }
  161. }