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.
 
 
 
 
 
 

138 lines
6.5 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-03-26 11:41
  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. // 刷新
  17. $('#lr_refresh').on('click', function () {
  18. location.reload();
  19. });
  20. // 新增
  21. $('#lr_add').on('click', function () {
  22. learun.layerForm({
  23. id: 'formAss_AssetsInfoItemApply',
  24. title: '新增',
  25. url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/Form',
  26. width: 600,
  27. height: 400,
  28. callBack: function (id) {
  29. return top[id].acceptClick(refreshGirdData);
  30. }
  31. });
  32. });
  33. // 编辑
  34. $('#lr_edit').on('click', function () {
  35. var keyValue = $('#gridtable').jfGridValue('AAIId');
  36. if (learun.checkrow(keyValue)) {
  37. learun.layerForm({
  38. id: 'formAss_AssetsInfoItemApply',
  39. title: '编辑',
  40. url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/Form?keyValue=' + keyValue,
  41. width: 600,
  42. height: 400,
  43. callBack: function (id) {
  44. return top[id].acceptClick(refreshGirdData);
  45. }
  46. });
  47. }
  48. });
  49. // 删除
  50. $('#lr_delete').on('click', function () {
  51. var keyValue = $('#gridtable').jfGridValue('AAIId');
  52. if (learun.checkrow(keyValue)) {
  53. learun.layerConfirm('是否确认删除该项!', function (res) {
  54. if (res) {
  55. learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/DeleteForm', { keyValue: keyValue}, function () {
  56. refreshGirdData();
  57. });
  58. }
  59. });
  60. }
  61. });
  62. },
  63. // 初始化列表
  64. initGird: function () {
  65. $('#gridtable').lrAuthorizeJfGrid({
  66. url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/GetPageList',
  67. headData: [
  68. { label: "资产编号", name: "AAICode", width: 100, align: "left"},
  69. { label: "资产名称", name: "AAIName", width: 100, align: "left"},
  70. { label: "英文名称", name: "AAIEName", width: 100, align: "left"},
  71. { label: "资产类别", name: "AAITId", width: 100, align: "left",
  72. formatterAsync: function (callback, value, row, op,$cell) {
  73. learun.clientdata.getAsync('custmerData', {
  74. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType',
  75. key: value,
  76. keyId: 'atid',
  77. callback: function (_data) {
  78. callback(_data['aname']);
  79. }
  80. });
  81. }},
  82. { label: "资产型号", name: "AAIModel", width: 100, align: "left"},
  83. { label: "生产厂家", name: "AAIManufacturer", width: 100, align: "left"},
  84. { label: "资产来源", name: "AAISource", width: 100, align: "left",
  85. formatterAsync: function (callback, value, row, op,$cell) {
  86. learun.clientdata.getAsync('dataItem', {
  87. key: value,
  88. code: 'zcly',
  89. callback: function (_data) {
  90. callback(_data.text);
  91. }
  92. });
  93. }},
  94. { label: "供应商", name: "AAISupplierId", width: 100, align: "left",
  95. formatterAsync: function (callback, value, row, op,$cell) {
  96. learun.clientdata.getAsync('custmerData', {
  97. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData',
  98. key: value,
  99. keyId: 'sid',
  100. callback: function (_data) {
  101. callback(_data['sname']);
  102. }
  103. });
  104. }},
  105. { label: "单价", name: "AAIPrice", width: 100, align: "left"},
  106. { label: "数量", name: "AAIStock", width: 100, align: "left"},
  107. { label: "数量单位", name: "AAIUnit", width: 100, align: "left",
  108. formatterAsync: function (callback, value, row, op,$cell) {
  109. learun.clientdata.getAsync('dataItem', {
  110. key: value,
  111. code: 'sldw',
  112. callback: function (_data) {
  113. callback(_data.text);
  114. }
  115. });
  116. }},
  117. { label: "排序", name: "AAIOrder", width: 100, align: "left"},
  118. { label: "资产图片", name: "AAIPhoto", width: 100, align: "left"},
  119. { label: "资产描述", name: "AAIContent", width: 100, align: "left"},
  120. { label: "资产规格", name: "AAISpecification", width: 100, align: "left"},
  121. { label: "用途", name: "AAIUse", width: 100, align: "left"},
  122. ],
  123. mainId:'AAIId',
  124. isPage: true
  125. });
  126. page.search();
  127. },
  128. search: function (param) {
  129. param = param || {};
  130. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  131. }
  132. };
  133. refreshGirdData = function () {
  134. page.search();
  135. };
  136. page.init();
  137. }