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.

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