Index.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. var refreshGirdData;
  2. var logbegin = '';
  3. var logend = '';
  4. var StartTimeBegin = '';
  5. var StartTimeend = '';
  6. var EndTimeBegin = '';
  7. var EndTimeend = '';
  8. var bootstrap = function ($, learun) {
  9. "use strict";
  10. var page = {
  11. init: function () {
  12. //page.initGird();
  13. page.bind();
  14. },
  15. bind: function () {
  16. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  17. // 调用后台查询
  18. // queryJson 查询条件
  19. }, 250);
  20. $('#InvStateCode').lrselect({
  21. url: top.$.rootUrl + '/KLHCManager/Enums/GetInvStateList',
  22. maxHeight: 180,
  23. allowSearch: false
  24. });
  25. $('#Status').lrselect({
  26. url: top.$.rootUrl + '/KLHCManager/Enums/GetLocationStateList',
  27. maxHeight: 180,
  28. allowSearch: false
  29. });
  30. //$('#WarehouseId').lrselect({
  31. // url: top.$.rootUrl + '/KLHCManager/BaseWarehouse/GetSelectWarehouseNameList',
  32. // maxHeight: 180,
  33. // allowSearch: false
  34. //});
  35. $("#lr_exception").on('click', function () {
  36. var isexception = $('#isexception').val();
  37. if (isexception == '') {
  38. learun.alert.error('参数不能为空!');
  39. return false;
  40. }
  41. learun.layerConfirm('是否启用异常轮自动入库!', function (res) {
  42. if (res) {
  43. learun.httpAsyncPost(top.$.rootUrl + '/KLHCManager/ErrorDispose/IsExceptionAutoIn', { isin: isexception }, function (data) {
  44. top.layer.close(top.layer.index);
  45. if (data.IsSucc) {
  46. learun.alert.info(data.info);
  47. }
  48. else {
  49. learun.alert.error(data.info);
  50. }
  51. });
  52. }
  53. });
  54. });
  55. //修改库存状态信息
  56. $('#Update_StockState').on('click', function () {
  57. var Code = $('#Code').val().replace(/^[' ' || ' ']*/, '').replace(/[' ' | ' ']*$/, '');
  58. var InvStateCode = $("#InvStateCode").lrselectGet();
  59. if (Code.length == 0) {
  60. learun.alert.error('工字轮条码不能为空!');
  61. return false;
  62. }
  63. learun.layerConfirm('是否确定修改库存状态!', function (res) {
  64. if (res) {
  65. learun.httpAsyncPost(top.$.rootUrl + '/KLHCManager/Inventorys/UpdateStockState', { Code: Code, InvStateCode: InvStateCode }, function (data) {
  66. top.layer.close(top.layer.index);
  67. if (data.IsSucc) {
  68. learun.alert.info(data.info);
  69. }
  70. else {
  71. learun.alert.error(data.info);
  72. }
  73. });
  74. }
  75. });
  76. });
  77. //修改货位状态
  78. $('#Update_CellState').on('click', function () {
  79. var CellCode = $('#CellCode').val().replace(/^[' ' || ' ']*/, '').replace(/[' ' | ' ']*$/, '');
  80. var Status = $("#Status").lrselectGet();
  81. if (CellCode.length == 0) {
  82. learun.alert.error('货位编码不能为空!');
  83. return false;
  84. }
  85. if (Status.length == 0) {
  86. learun.alert.error('状态不能为空!');
  87. return false;
  88. }
  89. learun.layerConfirm('是否确定修改货位状态!', function (res) {
  90. if (res) {
  91. learun.httpAsyncPost(top.$.rootUrl + '/KLHCManager/BaseWareCell/UpdateCellState', { CellCode: CellCode, Status: Status }, function (data) {
  92. top.layer.close(top.layer.index);
  93. if (data.IsSucc) {
  94. learun.alert.info(data.info);
  95. }
  96. else {
  97. learun.alert.error(data.info);
  98. }
  99. });
  100. }
  101. });
  102. });
  103. },
  104. search: function (param) {
  105. $('#gridtable').jfGridSet('reload', param);
  106. }
  107. };
  108. refreshGirdData = function () {
  109. $('#gridtable').jfGridSet('reload');
  110. };
  111. page.init();
  112. }