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.
 
 
 
 
 
 

172 lines
7.7 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2020-05-06 11:28
  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. $('#MajorNo').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/SignUpAboutTrain/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/SignUpAboutTrain/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/SignUpAboutTrain/DeleteForm', { keyValue: keyValue }, function () {
  60. refreshGirdData();
  61. });
  62. }
  63. });
  64. }
  65. });
  66. },
  67. // 初始化列表
  68. initGird: function () {
  69. $('#gridtable').lrAuthorizeJfGrid({
  70. url: top.$.rootUrl + '/EducationalAdministration/SignUpAboutTrain/GetPageList',
  71. headData: [
  72. { label: "姓名", name: "RealName", width: 100, align: "left" },
  73. {
  74. label: "性别", name: "Sex", width: 100, align: "left",
  75. formatterAsync: function (callback, value, row, op, $cell) {
  76. learun.clientdata.getAsync('dataItem', {
  77. key: value,
  78. code: 'usersex',
  79. callback: function (_data) {
  80. callback(_data.text);
  81. }
  82. });
  83. }
  84. },
  85. { label: "年龄", name: "Age", width: 100, align: "left" },
  86. {
  87. label: "民族", name: "NationalityNo", width: 100, align: "left",
  88. formatterAsync: function (callback, value, row, op, $cell) {
  89. learun.clientdata.getAsync('dataItem', {
  90. key: value,
  91. code: 'National',
  92. callback: function (_data) {
  93. callback(_data.text);
  94. }
  95. });
  96. }
  97. },
  98. {
  99. label: "政治面貌", name: "PartyFaceNo", width: 100, align: "left",
  100. formatterAsync: function (callback, value, row, op, $cell) {
  101. learun.clientdata.getAsync('dataItem', {
  102. key: value,
  103. code: 'BCdPartyFace',
  104. callback: function (_data) {
  105. callback(_data.text);
  106. }
  107. });
  108. }
  109. },
  110. { label: "户籍", name: "OriginAddress", width: 100, align: "left" },
  111. { label: "身份证号", name: "IdCard", width: 150, align: "left" },
  112. {
  113. label: "文化程度", name: "CultureDegree", width: 100, align: "left",
  114. formatterAsync: function (callback, value, row, op, $cell) {
  115. learun.clientdata.getAsync('custmerData', {
  116. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree',
  117. key: value,
  118. keyId: 'culturedegreeno',
  119. callback: function (_data) {
  120. callback(_data['culturedegree']);
  121. }
  122. });
  123. }
  124. },
  125. {
  126. label: "户口性质", name: "ResidenceNo", width: 100, align: "left",
  127. formatterAsync: function (callback, value, row, op, $cell) {
  128. learun.clientdata.getAsync('dataItem', {
  129. key: value,
  130. code: 'ResidenceNo',
  131. callback: function (_data) {
  132. callback(_data.text);
  133. }
  134. });
  135. }
  136. },
  137. { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" },
  138. { label: "联系电话", name: "Phone", width: 100, align: "left" },
  139. {
  140. label: "培训专业", name: "MajorNo", width: 100, align: "left",
  141. formatterAsync: function (callback, value, row, op, $cell) {
  142. learun.clientdata.getAsync('custmerData', {
  143. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  144. key: value,
  145. keyId: 'majorno',
  146. callback: function (_data) {
  147. callback(_data['majorname']);
  148. }
  149. });
  150. }
  151. },
  152. { label: "时间", name: "Date", width: 100, align: "left" },
  153. { label: "创建时间", name: "CreateTime", width: 130, align: "left" },
  154. ],
  155. mainId: 'Id',
  156. isPage: true,
  157. sidx: 'CreateTime',
  158. sord: 'desc'
  159. });
  160. page.search();
  161. },
  162. search: function (param) {
  163. param = param || {};
  164. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  165. }
  166. };
  167. refreshGirdData = function () {
  168. page.search();
  169. };
  170. page.init();
  171. }