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.

134 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,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. [HttpPost]
  54. [HandlerAjaxOnly]
  55. public ActionResult UpdateMoOrderStatus(string keyValue)
  56. {
  57. string msg = App.UpdateMoOrderStatus(keyValue);
  58. if (!string.IsNullOrEmpty(msg))
  59. {
  60. return Error(msg);
  61. }
  62. else
  63. {
  64. return Success("修改成功!");
  65. }
  66. }
  67. [HttpGet]
  68. [HandlerAjaxOnly]
  69. public ActionResult GetOrgAName()
  70. {
  71. string value = App.GetOrgAName();
  72. return Success(value);
  73. }
  74. /// <summary>
  75. /// 不调用ERP
  76. /// </summary>
  77. /// <param name="keyValue"></param>
  78. /// <returns></returns>
  79. [HttpPost]
  80. [HandlerAjaxOnly]
  81. public ActionResult UpdateMoPlan2(string keyValue)
  82. {
  83. string msg = App.UpdateMoPlan2(keyValue);
  84. if (!string.IsNullOrEmpty(msg))
  85. {
  86. return Error(msg);
  87. }
  88. else
  89. {
  90. return Success("修改成功");
  91. }
  92. }
  93. [HttpGet]
  94. [HandlerAjaxOnly]
  95. public ActionResult GetApsPlanSubGridJsonList(string moCode,int moSeq, Pagination pagination)
  96. {
  97. DataTable ListData = App.GetApsPlanSubGridJsonList(moCode, moSeq, ref pagination);
  98. var JsonData = new
  99. {
  100. total = 1,
  101. page =1,
  102. records = 0,
  103. rows = ListData,
  104. };
  105. return Content(JsonData.ToJson());
  106. }
  107. [HttpPost]
  108. [HandlerAjaxOnly]
  109. public ActionResult GetApsPlanSelectSubItemList(Pagination pagination,string ids)
  110. {
  111. DataTable ListData = App.GetApsPlanSelectSubItemList(ids, ref pagination);
  112. var JsonData = new
  113. {
  114. total = 1,
  115. page = 1,
  116. records = 0,
  117. rows = ListData,
  118. };
  119. return Content(JsonData.ToJson());
  120. }
  121. }
  122. }