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.

131 lines
3.5 KiB

  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)
  20. {
  21. ViewData["ids"] = ids;
  22. return View();
  23. }
  24. [HttpPost]
  25. [HandlerAjaxOnly]
  26. public ActionResult GetGridJsonChengPing(Pagination pagination, string queryJson)
  27. {
  28. DataTable ListData = App.GetGridJsonChengPing(queryJson, ref pagination);
  29. var JsonData = new
  30. {
  31. total = pagination.total,
  32. page = pagination.page,
  33. records = pagination.records,
  34. rows = ListData,
  35. };
  36. return Content(JsonData.ToJson());
  37. }
  38. [HttpPost]
  39. [HandlerAjaxOnly]
  40. public ActionResult UpdateMoPlan(string keyValue)
  41. {
  42. string msg = App.UpdateMoPlan(keyValue);
  43. if (!string.IsNullOrEmpty(msg))
  44. {
  45. return Error(msg);
  46. }
  47. else
  48. {
  49. return Success("修改成功!");
  50. }
  51. }
  52. [HttpPost]
  53. [HandlerAjaxOnly]
  54. public ActionResult UpdateMoOrderStatus(string keyValue)
  55. {
  56. string msg = App.UpdateMoOrderStatus(keyValue);
  57. if (!string.IsNullOrEmpty(msg))
  58. {
  59. return Error(msg);
  60. }
  61. else
  62. {
  63. return Success("修改成功!");
  64. }
  65. }
  66. [HttpGet]
  67. [HandlerAjaxOnly]
  68. public ActionResult GetOrgAName()
  69. {
  70. string value = App.GetOrgAName();
  71. return Success(value);
  72. }
  73. /// <summary>
  74. /// 不调用ERP
  75. /// </summary>
  76. /// <param name="keyValue"></param>
  77. /// <returns></returns>
  78. [HttpPost]
  79. [HandlerAjaxOnly]
  80. public ActionResult UpdateMoPlan2(string keyValue)
  81. {
  82. string msg = App.UpdateMoPlan2(keyValue);
  83. if (!string.IsNullOrEmpty(msg))
  84. {
  85. return Error(msg);
  86. }
  87. else
  88. {
  89. return Success("修改成功");
  90. }
  91. }
  92. [HttpGet]
  93. [HandlerAjaxOnly]
  94. public ActionResult GetApsPlanSubGridJsonList(string moCode,int moSeq, Pagination pagination)
  95. {
  96. DataTable ListData = App.GetApsPlanSubGridJsonList(moCode, moSeq, ref pagination);
  97. var JsonData = new
  98. {
  99. total = 1,
  100. page =1,
  101. records = 0,
  102. rows = ListData,
  103. };
  104. return Content(JsonData.ToJson());
  105. }
  106. [HttpPost]
  107. [HandlerAjaxOnly]
  108. public ActionResult GetApsPlanSelectSubItemList(Pagination pagination,string ids)
  109. {
  110. DataTable ListData = App.GetApsPlanSelectSubItemList(ids, ref pagination);
  111. var JsonData = new
  112. {
  113. total = 1,
  114. page = 1,
  115. records = 0,
  116. rows = ListData,
  117. };
  118. return Content(JsonData.ToJson());
  119. }
  120. }
  121. }