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.
 
 
 
 
 
 

91 line
4.2 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2022-03-02 10:37
  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. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  18. page.search(queryJson);
  19. }, 200, 400);
  20. $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
  21. // 刷新
  22. $('#lr_refresh').on('click', function () {
  23. location.reload();
  24. });
  25. // 查看
  26. $('#lr_view').on('click', function () {
  27. var keyValue = $('#gridtable').jfGridValue('ID');
  28. if (learun.checkrow(keyValue)) {
  29. learun.layerForm({
  30. id: 'formview',
  31. title: '查看',
  32. url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/FormUse?keyValue=' + keyValue,
  33. width: 1000,
  34. height: 700,
  35. btn: null,
  36. });
  37. }
  38. });
  39. },
  40. initGird: function () {
  41. $('#gridtable').lrAuthorizeJfGridLei({
  42. url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
  43. headData: [
  44. { label: '库存单号', name: 'BookCode', width: 200, align: "left" },
  45. {
  46. label: "课程", name: "LessonNo", width: 150, align: "left",
  47. formatterAsync: function (callback, value, row, op, $cell) {
  48. learun.clientdata.getAsync('custmerData', {
  49. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
  50. key: value,
  51. keyId: 'lessonno',
  52. callback: function (_data) {
  53. callback(_data['lessonname']);
  54. }
  55. });
  56. }
  57. },
  58. { label: '教材名称', name: 'TextBookName', width: 200, align: "left" },
  59. { label: '教材号', name: 'TextBookNo', width: 200, align: "left" },
  60. { label: '出版号', name: 'PublishNo', width: 200, align: "left" },
  61. { label: '第一作者', name: 'FirstAuthor', width: 200, align: "left" },
  62. { label: '其他作者', name: 'OtherAuthor', width: 200, align: "left" },
  63. { label: '出版社', name: 'Publisher', width: 200, align: "left" },
  64. { label: '版次', name: 'Edition', width: 200, align: "left" },
  65. { label: '印次', name: 'Impression', width: 200, align: "left" },
  66. { label: '创建时间', name: 'CreateTime', width: 200, align: "left" },
  67. { label: '创建用户', name: 'CrateUserID', width: 200, align: "left" },
  68. { label: '当前数量', name: 'FinallyNum', width: 200, align: "left" },
  69. { label: '累计入库数量', name: 'RKNum', width: 100, align: "left" },
  70. { label: '累计出库数量', name: 'CKNum', width: 100, align: "left" },
  71. { label: '备注', name: 'Remark', width: 200, align: "left" },
  72. ],
  73. mainId: 'ID',
  74. isPage: true,
  75. sidx: 'CreateTime desc'
  76. });
  77. page.search();
  78. },
  79. search: function (param) {
  80. param = param || {};
  81. param.SqlParameter = 'and IsDel = 0 ';
  82. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  83. }
  84. };
  85. refreshGirdData = function () {
  86. $('#gridtable').jfGridSet('reload');
  87. };
  88. page.init();
  89. }