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.
 
 
 
 
 
 

93 lines
4.3 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. $('#btn_Search').on('click', function () {
  18. var keyword = $('#txt_Keyword').val();
  19. page.search({ keyword: keyword });
  20. });
  21. $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
  22. // 刷新
  23. $('#lr_refresh').on('click', function () {
  24. location.reload();
  25. });
  26. // 查看
  27. $('#lr_view').on('click', function () {
  28. var keyValue = $('#gridtable').jfGridValue('ID');
  29. if (learun.checkrow(keyValue)) {
  30. learun.layerForm({
  31. id: 'formview',
  32. title: '查看',
  33. url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/FormUse?keyValue=' + keyValue,
  34. width: 1000,
  35. height: 700,
  36. btn: null,
  37. });
  38. }
  39. });
  40. },
  41. initGird: function () {
  42. $('#gridtable').lrAuthorizeJfGrid({
  43. url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
  44. headData: [
  45. { label: '库存单号', name: 'BookCode', width: 200, align: "left" },
  46. {
  47. label: "课程", name: "LessonNo", width: 150, align: "left",
  48. formatterAsync: function (callback, value, row, op, $cell) {
  49. learun.clientdata.getAsync('custmerData', {
  50. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
  51. key: value,
  52. keyId: 'lessonno',
  53. callback: function (_data) {
  54. callback(_data['lessonname']);
  55. }
  56. });
  57. }
  58. },
  59. { label: '教材名称', name: 'TextBookName', width: 200, align: "left" },
  60. { label: '教材号', name: 'TextBookNo', width: 200, align: "left" },
  61. { label: '出版号', name: 'PublishNo', width: 200, align: "left" },
  62. { label: '第一作者', name: 'FirstAuthor', width: 200, align: "left" },
  63. { label: '其他作者', name: 'OtherAuthor', width: 200, align: "left" },
  64. //{ label: '出版日期', name: 'Pubdate', width: 200, align: "left" },
  65. { label: '出版社', name: 'Publisher', width: 200, align: "left" },
  66. { label: '版次', name: 'Edition', width: 200, align: "left" },
  67. { label: '印次', name: 'Impression', width: 200, align: "left" },
  68. { label: '创建人', name: 'CreateTime', width: 200, align: "left" },
  69. { label: '创建用户', name: 'CrateUserID', width: 200, align: "left" },
  70. { label: '修改人', name: 'UpTime', width: 200, align: "left" },
  71. { label: '修改用户', name: 'UpUserID', width: 200, align: "left" },
  72. { label: '当前数量', name: 'FinallyNum', width: 200, align: "left" },
  73. { label: '备注', name: 'Remark', width: 200, align: "left" },
  74. ],
  75. mainId: 'ID',
  76. isPage: true,
  77. sidx: 'CreateTime desc'
  78. });
  79. page.search();
  80. },
  81. search: function (param) {
  82. param = param || {};
  83. param.SqlParameter = 'and IsDel = 0 ';
  84. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  85. }
  86. };
  87. refreshGirdData = function () {
  88. $('#gridtable').jfGridSet('reload');
  89. };
  90. page.init();
  91. }