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.
 
 
 
 
 
 

101 lines
4.3 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-04-04 10:08
  5. * 描 述:缺货单
  6. */
  7. var refreshGirdData;
  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. page.search(queryJson);
  18. }, 220, 400);
  19. // 刷新
  20. $('#lr_refresh').on('click', function () {
  21. location.reload();
  22. });
  23. //缺货单
  24. $('#lr_view').on('click', function () {
  25. var keyValue = $('#gridtable').jfGridValue('AOId');
  26. if (learun.checkrow(keyValue)) {
  27. learun.layerForm({
  28. id: 'formAss_AssetsOutApplyIncomplete',
  29. title: '查看缺货单',
  30. url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApplyIncomplete/Form?keyValue=' + keyValue,
  31. width: 1000,
  32. height: 700,
  33. btn: ["出库", "关闭"],
  34. callBack: function (id) {
  35. return top[id].acceptClick(refreshGirdData);
  36. }
  37. });
  38. }
  39. });
  40. $('#lr_viewapp').on('click', function () {
  41. var keyValue = $('#gridtable').jfGridValue('AOId');
  42. if (learun.checkrow(keyValue)) {
  43. learun.layerForm({
  44. id: 'formAss_AssetsInfoApply',
  45. title: '查看出库申请',
  46. url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/FormView?keyValue=' + keyValue,
  47. width: 1000,
  48. height: 600,
  49. btn: null
  50. });
  51. }
  52. });
  53. },
  54. // 初始化列表
  55. initGird: function () {
  56. $('#gridtable').lrAuthorizeJfGrid({
  57. url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApplyIncomplete/GetPageList',
  58. headData: [
  59. { label: "缺货单号", name: "AOCode", width: 200, align: "left" },
  60. { label: "缺货总价", name: "AOPrice", width: 100, align: "left" },
  61. { label: "生成时间", name: "AOCreateTime", width: 150, align: "left" },
  62. {
  63. label: "出库人", name: "AOAUserId", width: 100, align: "left",
  64. formatterAsync: function (callback, value, row, op, $cell) {
  65. learun.clientdata.getAsync('user', {
  66. key: value,
  67. callback: function (_data) {
  68. callback(_data.name);
  69. }
  70. });
  71. }
  72. },
  73. { label: "出库时间", name: "AOACreateTime", width: 150, align: "left" },
  74. {
  75. label: "缺货单状态", name: "AOOutStatus", width: 100, align: "left", formatter: function (cellvalue, row) {
  76. if (cellvalue === 0) {
  77. return '<span class=\"label label-warning\">待出库</span>';
  78. } else if (cellvalue === 2) {
  79. return '<span class=\"label label-success\">出库完成</span>';
  80. } else {
  81. return '<span class=\"label label-default\" >部分出库</span>';
  82. }
  83. }
  84. }
  85. ],
  86. mainId: 'AOAIId',
  87. isPage: true
  88. });
  89. page.search();
  90. },
  91. search: function (param) {
  92. param = param || {};
  93. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  94. }
  95. };
  96. refreshGirdData = function () {
  97. page.search();
  98. };
  99. page.init();
  100. }