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.

154 lines
4.0 KiB

10 months ago
10 months ago
  1. using NFine.Application.OMAY;
  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.OMAY.Controllers
  10. {
  11. public class ApsController : ControllerBase
  12. {
  13. // GET: OMAY/Aps
  14. OMAYApsApp App = new OMAYApsApp();
  15. public ActionResult MoProducePlan()
  16. {
  17. return View();
  18. }
  19. public ActionResult EditInstructionBill(string ids,string line)
  20. {
  21. ViewData["ids"] = ids;
  22. ViewData["line"] = line;
  23. return View();
  24. }
  25. [HttpPost]
  26. [HandlerAjaxOnly]
  27. public ActionResult GetGridJsonChengPing(Pagination pagination, string queryJson)
  28. {
  29. DataTable ListData = App.GetGridJsonChengPing(queryJson, 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. [HttpPost]
  40. [HandlerAjaxOnly]
  41. public ActionResult UpdateMoPlan(string keyValue)
  42. {
  43. string msg = App.UpdateMoPlan(keyValue);
  44. if (!string.IsNullOrEmpty(msg))
  45. {
  46. return Error(msg);
  47. }
  48. else
  49. {
  50. return Success("修改成功!");
  51. }
  52. }
  53. /// <summary>
  54. /// 取消下发
  55. /// </summary>
  56. /// <param name="keyValue"></param>
  57. /// <returns></returns>
  58. [HttpPost]
  59. [HandlerAjaxOnly]
  60. public ActionResult CancelSendMo(string keyValue)
  61. {
  62. string msg = App.CancelSendMo(keyValue);
  63. if (!string.IsNullOrEmpty(msg))
  64. {
  65. return Error(msg);
  66. }
  67. else
  68. {
  69. return Success("修改成功!");
  70. }
  71. }
  72. [HttpPost]
  73. [HandlerAjaxOnly]
  74. public ActionResult UpdateMoOrderStatus(string keyValue)
  75. {
  76. string msg = App.UpdateMoOrderStatus(keyValue);
  77. if (!string.IsNullOrEmpty(msg))
  78. {
  79. return Error(msg);
  80. }
  81. else
  82. {
  83. return Success("修改成功!");
  84. }
  85. }
  86. [HttpGet]
  87. [HandlerAjaxOnly]
  88. public ActionResult GetOrgAName()
  89. {
  90. string value = App.GetOrgAName();
  91. return Success(value);
  92. }
  93. /// <summary>
  94. /// 不调用ERP
  95. /// </summary>
  96. /// <param name="keyValue"></param>
  97. /// <returns></returns>
  98. [HttpPost]
  99. [HandlerAjaxOnly]
  100. public ActionResult UpdateMoPlan2(string keyValue)
  101. {
  102. string msg = App.UpdateMoPlan2(keyValue);
  103. if (!string.IsNullOrEmpty(msg))
  104. {
  105. return Error(msg);
  106. }
  107. else
  108. {
  109. return Success("修改成功");
  110. }
  111. }
  112. [HttpGet]
  113. [HandlerAjaxOnly]
  114. public ActionResult GetApsPlanSubGridJsonList(string moCode,int moSeq, Pagination pagination)
  115. {
  116. DataTable ListData = App.GetApsPlanSubGridJsonList(moCode, moSeq, ref pagination);
  117. var JsonData = new
  118. {
  119. total = 1,
  120. page =1,
  121. records = 0,
  122. rows = ListData,
  123. };
  124. return Content(JsonData.ToJson());
  125. }
  126. [HttpPost]
  127. [HandlerAjaxOnly]
  128. public ActionResult GetApsPlanSelectSubItemList(Pagination pagination,string ids)
  129. {
  130. DataTable ListData = App.GetApsPlanSelectSubItemList(ids, ref pagination);
  131. var JsonData = new
  132. {
  133. total = 1,
  134. page = 1,
  135. records = 0,
  136. rows = ListData,
  137. };
  138. return Content(JsonData.ToJson());
  139. }
  140. }
  141. }