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

122 lines
3.1 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 BlitemController : ControllerBase
  18. {
  19. BlitemApp App = new BlitemApp();
  20. // GET: WMS/Blitem
  21. public ActionResult BlitemList()
  22. {
  23. return View();
  24. }
  25. public ActionResult ICSCheckAdd()
  26. {
  27. return View();
  28. }
  29. [HttpGet]
  30. [HandlerAjaxOnly]
  31. public ActionResult GetGridJson(Pagination pagination, string queryJson)
  32. {
  33. DataTable ListData = App.GetGridJson(queryJson, ref pagination);
  34. var JsonData = new
  35. {
  36. total = pagination.total,
  37. page = pagination.page,
  38. records = pagination.records,
  39. rows = ListData,
  40. };
  41. return Content(JsonData.ToJson());
  42. }
  43. [HttpGet]
  44. [HandlerAjaxOnly]
  45. public ActionResult GetSubGridJson(string CheckCode, string Sequence, Pagination pagination)
  46. {
  47. DataTable ListData = App.GetSubGridJson(CheckCode, Sequence, ref pagination);
  48. var JsonData = new
  49. {
  50. total = pagination.total,
  51. page = pagination.page,
  52. records = pagination.records,
  53. rows = ListData,
  54. };
  55. return Content(JsonData.ToJson());
  56. }
  57. public ActionResult DeleteICSCheckDetail(string ID)
  58. {
  59. //keyValue = keyValue.Substring(1, keyValue.Length - 2);
  60. //WorkPoint = WorkPoint.Substring(1, WorkPoint.Length - 2);
  61. string msg = App.DeleteICSCheckDetail(ID);
  62. if (string.IsNullOrWhiteSpace(msg))
  63. {
  64. return Success("删除成功!");
  65. }
  66. else
  67. {
  68. return Error(msg);
  69. }
  70. }
  71. //获取仓库
  72. public ActionResult GetWHCode()
  73. {
  74. DataTable dt = App.GetWHCode();
  75. return Content(dt.ToJson());
  76. }
  77. [HttpPost]
  78. [HandlerAjaxOnly]
  79. public ActionResult AddICSCheck(string Parameter)
  80. {
  81. string msg = App.AddICSCheck(Parameter);
  82. if (!string.IsNullOrEmpty(msg))
  83. {
  84. return Error(msg);
  85. }
  86. else
  87. {
  88. return Success("添加成功!");
  89. }
  90. }
  91. [HttpPost]
  92. [HandlerAjaxOnly]
  93. [ValidateAntiForgeryToken]
  94. public ActionResult DeleteICSCheck(string keyValue)
  95. {
  96. string msg = App.DeleteICSCheck(keyValue);
  97. if (string.IsNullOrEmpty(msg))
  98. {
  99. return Success("删除成功!");
  100. }
  101. else
  102. {
  103. return Error(msg);
  104. }
  105. }
  106. }
  107. }