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

128 lines
3.7 KiB

3 years ago
  1. using NFine.Application.WMS;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Data;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Web;
  8. using System.Web.Mvc;
  9. using NFine.Code;
  10. using System.Data.SqlClient;
  11. using NFine.Data.Extensions;
  12. using System.Data.OleDb;
  13. using System.Configuration;
  14. using ICS.Application.Entity;
  15. namespace NFine.Web.Areas.WMS.Controllers
  16. {
  17. public class PickMaterialController : ControllerBase
  18. {
  19. // GET: WMS/PickMaterial
  20. PickMaterialApp App = new PickMaterialApp();
  21. public ActionResult ICSMOPickMerge()
  22. {
  23. return View();
  24. }
  25. [HttpGet]
  26. [HandlerAjaxOnly]
  27. public ActionResult GetGridJson(Pagination pagination, string queryJson, string Type)
  28. {
  29. DataTable ListData = new DataTable();
  30. if (Type == "1")//工单
  31. {
  32. ListData = App.GetGridJson(queryJson, ref pagination);
  33. }
  34. if (Type=="2")//工单发料
  35. {
  36. ListData = App.GetGridJson2(queryJson, ref pagination);
  37. }
  38. if (Type=="3")//工单材料出库
  39. {
  40. ListData = App.GetGridJson3(queryJson, ref pagination);
  41. }
  42. if (Type == "4")//委外备料
  43. {
  44. ListData = App.GetGridJson4(queryJson, ref pagination);
  45. }
  46. if (Type == "5")//委外领料
  47. {
  48. ListData = App.GetGridJson5(queryJson, ref pagination);
  49. }
  50. if (Type == "6")//委外材料出库
  51. {
  52. ListData = App.GetGridJson6(queryJson, ref pagination);
  53. }
  54. if (Type == "7")//销售发货
  55. {
  56. ListData = App.GetGridJson7(queryJson, ref pagination);
  57. }
  58. if (Type == "8")//其它出库
  59. {
  60. ListData = App.GetGridJson8(queryJson, ref pagination);
  61. }
  62. if (Type == "9")//借用单
  63. {
  64. ListData = App.GetGridJson9(queryJson, ref pagination);
  65. }
  66. var JsonData = new
  67. {
  68. total = pagination.total,
  69. page = pagination.page,
  70. records = pagination.records,
  71. rows = ListData,
  72. };
  73. return Content(JsonData.ToJson());
  74. }
  75. [HttpGet]
  76. [HandlerAjaxOnly]
  77. public ActionResult GetICSMOPickMergeTemp(Pagination pagination, string ID,string Type,string flag)
  78. {
  79. DataTable ListData = new DataTable();
  80. if (flag=="1")
  81. {
  82. ListData = App.GetICSMOPickMergeTemp(ID, Type);
  83. }
  84. else
  85. {
  86. ListData = App.GetICSMOPickMergeTemp2(ID, Type);
  87. }
  88. var JsonData = new
  89. {
  90. total = pagination.total,
  91. page = pagination.page,
  92. records = pagination.records,
  93. rows = ListData,
  94. };
  95. return Content(JsonData.ToJson());
  96. }
  97. [HttpPost]
  98. [HandlerAjaxOnly]
  99. public ActionResult MergeMaterial(string keyValue,string Type)
  100. {
  101. string msg = App.MergeMaterial(keyValue, Type);
  102. if (!string.IsNullOrEmpty(msg))
  103. {
  104. return Error(msg);
  105. }
  106. else
  107. {
  108. return Success("添加成功!");
  109. }
  110. }
  111. [HttpPost]
  112. public ActionResult CheckQty(string objArr)
  113. {
  114. string i = App.CheckQty(objArr);
  115. var JsonData = new
  116. {
  117. count = i
  118. };
  119. return Content(JsonData.ToJson());
  120. }
  121. }
  122. }