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

167 lines
4.4 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 MaterialsDeliveredRTMController : ControllerBase
  8. {
  9. MaterialsDeliveredRTMApp App = new MaterialsDeliveredRTMApp();
  10. public ActionResult ICSMOApplyNegMD()
  11. {
  12. return View();
  13. }
  14. public ActionResult ICSMOApplyNegMDAdd()
  15. {
  16. return View();
  17. }
  18. public ActionResult ICSMOApplyNegMDUpdate()
  19. {
  20. return View();
  21. }
  22. public ActionResult SeachMDInventory()
  23. {
  24. return View();
  25. }
  26. [HttpGet]
  27. public ActionResult GetICSMOApplyNeg(Pagination pagination)
  28. {
  29. DataTable ListData = App.GetICSMOApplyNeg(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 GetICSMOApplyNegDetail(string ApplyNegCode, Pagination pagination)
  42. {
  43. DataTable ListData = App.GetICSMOApplyNegDetail(ApplyNegCode, 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. public void ClearTemp()
  81. {
  82. App.ClearTemp();
  83. }
  84. [HttpGet]
  85. public ActionResult GetINV(string invcode, Pagination pagination)
  86. {
  87. DataTable ListData = App.GetINV(invcode, ref pagination);
  88. var JsonData = new
  89. {
  90. total = pagination.total,
  91. page = pagination.page,
  92. records = pagination.records,
  93. rows = ListData,
  94. };
  95. return Content(JsonData.ToJson());
  96. }
  97. public void AddMOApplyNegTemp(string json)
  98. {
  99. App.AddMOApplyNegTemp(json);
  100. }
  101. public void UpdateMOApplyNegTemp(string json)
  102. {
  103. App.UpdateMOApplyNegTemp(json);
  104. }
  105. [HttpPost]
  106. [HandlerAjaxOnly]
  107. public ActionResult SaveICSMOApplyNeg(string ICSASN)
  108. {
  109. string msg = App.SaveICSMOApplyNeg(ICSASN);
  110. if (!string.IsNullOrEmpty(msg))
  111. {
  112. return Error(msg);
  113. }
  114. else
  115. {
  116. return Success("添加成功!");
  117. }
  118. }
  119. public ActionResult GetICSMOApplyNegDetailTemp(string ApplyNegCode, Pagination pagination)
  120. {
  121. DataTable table = App.GetICSMOApplyNegDetailTemp(ApplyNegCode);
  122. var JsonData = new
  123. {
  124. total = pagination.total,
  125. page = pagination.page,
  126. records = pagination.records,
  127. rows = table
  128. };
  129. return Content(JsonData.ToJson());
  130. }
  131. [HttpPost]
  132. [HandlerAjaxOnly]
  133. public ActionResult UpdateICSMOApplyNeg(string ICSASN)
  134. {
  135. string msg = App.UpdateICSMOApplyNeg(ICSASN);
  136. if (!string.IsNullOrEmpty(msg))
  137. {
  138. return Error(msg);
  139. }
  140. else
  141. {
  142. return Success("修改成功!");
  143. }
  144. }
  145. }
  146. }