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.

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