Index.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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 + '/FJManager/Enums/GetInvStateList',
  22. maxHeight: 180,
  23. allowSearch: false
  24. });
  25. $('#Status').lrselect({
  26. url: top.$.rootUrl + '/FJManager/Enums/GetLocationStateList',
  27. maxHeight: 180,
  28. allowSearch: false
  29. });
  30. $('#WarehouseId').lrselect({
  31. url: top.$.rootUrl + '/FJManager/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 + '/FJManager/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 + '/FJManager/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. var WarehouseId = $("#WarehouseId").lrselectGet();
  82. if (CellCode.length == 0) {
  83. learun.alert.error('货位编码不能为空!');
  84. return false;
  85. }
  86. if (Status.length == 0) {
  87. learun.alert.error('状态不能为空!');
  88. return false;
  89. }
  90. if (WarehouseId.length == 0) {
  91. learun.alert.error('仓库不能为空!');
  92. return false;
  93. }
  94. var url = weburl + "api/Hj/UpdateCellState";
  95. learun.layerConfirm('是否确定修改货位状态!', function (res) {
  96. if (res) {
  97. learun.httpAsyncPost(top.$.rootUrl + '/FJManager/BaseWareCell/UpdateCellState', { CellCode: CellCode, Status: Status, WarehouseId: WarehouseId }, function (data) {
  98. top.layer.close(top.layer.index);
  99. if (data.IsSucc) {
  100. learun.alert.info(data.info);
  101. }
  102. else {
  103. learun.alert.error(data.info);
  104. }
  105. });
  106. }
  107. });
  108. });
  109. },
  110. search: function (param) {
  111. $('#gridtable').jfGridSet('reload', param);
  112. }
  113. };
  114. refreshGirdData = function () {
  115. $('#gridtable').jfGridSet('reload');
  116. };
  117. page.init();
  118. }