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.

95 lines
2.2 KiB

3 weeks ago
  1. using NFine.Application.WMSKBS;
  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.KBSWMS.Controllers
  16. {
  17. public class ICSLotFreezeDHController : ControllerBase
  18. {
  19. ICSLotFreezeDHApp App = new ICSLotFreezeDHApp();
  20. // GET: WMS/Deciliter
  21. public ActionResult ICSLotFreezeDH()
  22. {
  23. return View();
  24. }
  25. public ActionResult From()
  26. {
  27. return View();
  28. }
  29. [HttpGet]
  30. [HandlerAjaxOnly]
  31. public ActionResult GetNewLotNo(string LotNO)
  32. {
  33. string ListData = App.GetNewLotNo(LotNO);
  34. var data = new
  35. {
  36. rows = ListData,
  37. };
  38. return Content(data.ToJson());
  39. }
  40. [HttpGet]
  41. [HandlerAjaxOnly]
  42. public ActionResult GetBathCode(string BatchCode)
  43. {
  44. string ListData = App.GetBathCode(BatchCode);
  45. return Success(ListData);
  46. }
  47. [HttpPost]
  48. [HandlerAjaxOnly]
  49. public ActionResult Freeze(string LotNOList, string Memo,string BatchCode)
  50. {
  51. string msg = App.Freeze(LotNOList.TrimEnd(','), Memo, BatchCode);
  52. if (!string.IsNullOrEmpty(msg))
  53. {
  54. return Error(msg);
  55. }
  56. else
  57. {
  58. return Success("冻结成功!");
  59. }
  60. }
  61. [HttpPost]
  62. [HandlerAjaxOnly]
  63. public ActionResult UnFreeze(string LotNOList, string Memo)
  64. {
  65. string msg = App.UnFreeze(LotNOList.TrimEnd(','), Memo);
  66. if (!string.IsNullOrEmpty(msg))
  67. {
  68. return Error(msg);
  69. }
  70. else
  71. {
  72. return Success("解除冻结成功!");
  73. }
  74. }
  75. //根据ID获取条码
  76. public ActionResult GetLotNoByID(string ID)
  77. {
  78. DataTable dt = App.GetLotNoByID(ID);
  79. return Content(dt.ToJson());
  80. }
  81. }
  82. }