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.

Index.js 5.0 KiB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-11-11 14:47
  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. $('#StuNo').lrDataSourceSelect({ code: 'StuInfoBasic',value: 'stuno',text: 'stuname' });
  20. $('#CID').lrDataSourceSelect({ code: 'CertificateManage',value: 'stuno',text: 'stuname' });
  21. // 刷新
  22. $('#lr_refresh').on('click', function () {
  23. location.reload();
  24. });
  25. // 新增
  26. $('#lr_add').on('click', function () {
  27. learun.layerForm({
  28. id: 'form',
  29. title: '新增',
  30. url: top.$.rootUrl + '/EducationalAdministration/CertificateResult/Form',
  31. width: 600,
  32. height: 400,
  33. callBack: function (id) {
  34. return top[id].acceptClick(refreshGirdData);
  35. }
  36. });
  37. });
  38. // 编辑
  39. $('#lr_edit').on('click', function () {
  40. var keyValue = $('#gridtable').jfGridValue('AID');
  41. if (learun.checkrow(keyValue)) {
  42. learun.layerForm({
  43. id: 'form',
  44. title: '编辑',
  45. url: top.$.rootUrl + '/EducationalAdministration/CertificateResult/Form?keyValue=' + keyValue,
  46. width: 600,
  47. height: 400,
  48. callBack: function (id) {
  49. return top[id].acceptClick(refreshGirdData);
  50. }
  51. });
  52. }
  53. });
  54. // 删除
  55. $('#lr_delete').on('click', function () {
  56. var keyValue = $('#gridtable').jfGridValue('AID');
  57. if (learun.checkrow(keyValue)) {
  58. learun.layerConfirm('是否确认删除该项!', function (res) {
  59. if (res) {
  60. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/CertificateResult/DeleteForm', { keyValue: keyValue}, function () {
  61. refreshGirdData();
  62. });
  63. }
  64. });
  65. }
  66. });
  67. // 打印
  68. $('#lr_print').on('click', function () {
  69. $('#gridtable').jqprintTable();
  70. });
  71. },
  72. // 初始化列表
  73. initGird: function () {
  74. $('#gridtable').lrAuthorizeJfGrid({
  75. url: top.$.rootUrl + '/EducationalAdministration/CertificateResult/GetPageList',
  76. headData: [
  77. { label: "学生", name: "StuNo", width: 100, align: "left",
  78. formatterAsync: function (callback, value, row, op,$cell) {
  79. learun.clientdata.getAsync('custmerData', {
  80. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic',
  81. key: value,
  82. keyId: 'stuno',
  83. callback: function (_data) {
  84. callback(_data['stuname']);
  85. }
  86. });
  87. }},
  88. { label: "证书", name: "CID", width: 100, align: "left",
  89. formatterAsync: function (callback, value, row, op,$cell) {
  90. learun.clientdata.getAsync('custmerData', {
  91. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CertificateManage',
  92. key: value,
  93. keyId: 'id',
  94. callback: function (_data) {
  95. callback(_data['name']);
  96. }
  97. });
  98. }},
  99. { label: "应知成绩", name: "YZResult", width: 100, align: "left"},
  100. { label: "应会成绩", name: "YHResult", width: 100, align: "left"},
  101. { label: "总成绩", name: "TotalResult", width: 100, align: "left"},
  102. ],
  103. mainId:'AID',
  104. isPage: true
  105. });
  106. page.search();
  107. },
  108. search: function (param) {
  109. param = param || {};
  110. $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
  111. }
  112. };
  113. refreshGirdData = function () {
  114. page.search();
  115. };
  116. page.init();
  117. }