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.3 KiB

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