纽威
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.

121 lines
3.6 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. using NFine.Application.WMS;
  2. using NFine.Code;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Mvc;
  8. namespace NFine.Web.Areas.WMS.Controllers
  9. {
  10. public class RevokeBusinessController : ControllerBase
  11. {
  12. // GET: WMS/RevokeBusiness
  13. RevokeBusinessApp App = new RevokeBusinessApp();
  14. public ActionResult Revocation()
  15. {
  16. return View();
  17. }
  18. //[HttpPost]
  19. //[HandlerAjaxOnly]
  20. //[ValidateAntiForgeryToken]
  21. //public ActionResult Revocations(string keyValue)
  22. //{
  23. // string msg = "";
  24. // var Parameter = keyValue.ToJObject();
  25. // if (Parameter["BusinessCode"].ToString() =="1"|| Parameter["BusinessCode"].ToString() == "2")
  26. // {
  27. // msg = App.RevocationPurchase(keyValue);
  28. // }
  29. // else if (Parameter["BusinessCode"].ToString() == "13"|| Parameter["BusinessCode"].ToString() == "14"|| Parameter["BusinessCode"].ToString() == "15")
  30. // {
  31. // msg = App.RevocationPicking(keyValue);
  32. // }
  33. // else if (Parameter["BusinessCode"].ToString() == "17"|| Parameter["BusinessCode"].ToString() == "18")
  34. // {
  35. // msg = App.RevocationFinished(keyValue);
  36. // }
  37. // else
  38. // {
  39. // msg = App.RevocationMarket(keyValue);
  40. // }
  41. // if (string.IsNullOrEmpty(msg))
  42. // {
  43. // return Success("撤销成功!");
  44. // }
  45. // else
  46. // {
  47. // return Error("" + msg + "");
  48. // }
  49. //}
  50. [HttpPost]
  51. [HandlerAjaxOnly]
  52. [ValidateAntiForgeryToken]
  53. public ActionResult Revocations(string keyValue)
  54. {
  55. string msg = "";
  56. var Parameter = keyValue.ToJObject();
  57. //采购入库-采购订单
  58. if (Parameter["BusinessCode"].ToString() == "1" )
  59. {
  60. msg = App.RevocationPurchase(keyValue);
  61. }
  62. //采购入库-采购到货单
  63. else if (Parameter["BusinessCode"].ToString() == "2")
  64. {
  65. msg = App.RevocationDeliveryNotice(keyValue);
  66. }
  67. //生产发料-生产订单备料表
  68. else if (Parameter["BusinessCode"].ToString() == "13")
  69. {
  70. msg = App.RevocationPicking(keyValue);
  71. }
  72. //生产发料-领料申请单
  73. else if (Parameter["BusinessCode"].ToString() == "14")
  74. {
  75. msg = App.RevocationMOApply(keyValue);
  76. }
  77. //生产发料-材料出库单
  78. else if (Parameter["BusinessCode"].ToString() == "15")
  79. {
  80. msg = App.RevocationMOIssue(keyValue);
  81. }
  82. //产成品入库-生产订单
  83. else if (Parameter["BusinessCode"].ToString() == "17")
  84. {
  85. msg = App.RevocationFinished(keyValue);
  86. }
  87. //产成品入库-产成品入库单
  88. else if (Parameter["BusinessCode"].ToString() == "18")
  89. {
  90. msg = App.RevocationManufactureReceive(keyValue);
  91. }
  92. //销售发货-销售发货单
  93. else
  94. {
  95. msg = App.RevocationMarket(keyValue);
  96. }
  97. if (string.IsNullOrEmpty(msg))
  98. {
  99. return Success("撤销成功!");
  100. }
  101. else
  102. {
  103. return Error("" + msg + "");
  104. }
  105. }
  106. }
  107. }