Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

105 lignes
4.5 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-08-31 14:29
  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. $('#DeptNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' });
  20. // 刷新
  21. $('#lr_refresh').on('click', function () {
  22. location.reload();
  23. });
  24. // 新增
  25. $('#lr_add').on('click', function () {
  26. learun.layerForm({
  27. id: 'form',
  28. title: '新增',
  29. url: top.$.rootUrl + '/EducationalAdministration/TE_MaterialOutbound/Form',
  30. width: 600,
  31. height: 400,
  32. callBack: function (id) {
  33. return top[id].acceptClick(refreshGirdData);
  34. }
  35. });
  36. });
  37. // 编辑
  38. $('#lr_edit').on('click', function () {
  39. var keyValue = $('#gridtable').jfGridValue('Id');
  40. if (learun.checkrow(keyValue)) {
  41. learun.layerForm({
  42. id: 'form',
  43. title: '编辑',
  44. url: top.$.rootUrl + '/EducationalAdministration/TE_MaterialOutbound/Form?keyValue=' + keyValue,
  45. width: 600,
  46. height: 400,
  47. callBack: function (id) {
  48. return top[id].acceptClick(refreshGirdData);
  49. }
  50. });
  51. }
  52. });
  53. // 删除
  54. $('#lr_delete').on('click', function () {
  55. var keyValue = $('#gridtable').jfGridValue('Id');
  56. if (learun.checkrow(keyValue)) {
  57. learun.layerConfirm('是否确认删除该项!', function (res) {
  58. if (res) {
  59. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TE_MaterialOutbound/DeleteForm', { keyValue: keyValue}, function () {
  60. refreshGirdData();
  61. });
  62. }
  63. });
  64. }
  65. });
  66. },
  67. // 初始化列表
  68. initGird: function () {
  69. $('#gridtable').lrAuthorizeJfGrid({
  70. url: top.$.rootUrl + '/EducationalAdministration/TE_MaterialOutbound/GetPageList',
  71. headData: [
  72. { label: "专业部", name: "DeptNo", width: 100, align: "left",
  73. formatterAsync: function (callback, value, row, op,$cell) {
  74. learun.clientdata.getAsync('custmerData', {
  75. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  76. key: value,
  77. keyId: 'majorno',
  78. callback: function (_data) {
  79. callback(_data['majorname']);
  80. }
  81. });
  82. }},
  83. { label: "实训室名称", name: "TrainName", width: 100, align: "left"},
  84. { label: "耗材名称", name: "MaterialName", width: 100, align: "left"},
  85. { label: "数量", name: "Num", width: 100, align: "left"},
  86. { label: "领用数量", name: "ReceiveNum", width: 100, align: "left"},
  87. { label: "日期", name: "ReceiveTime", width: 100, align: "left"},
  88. { label: "库存", name: "Inventory", width: 100, align: "left"},
  89. ],
  90. mainId:'Id',
  91. isPage: true
  92. });
  93. page.search();
  94. },
  95. search: function (param) {
  96. param = param || {};
  97. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  98. }
  99. };
  100. refreshGirdData = function () {
  101. $('#gridtable').jfGridSet('reload');
  102. };
  103. page.init();
  104. }