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.
 
 
 
 
 
 

249 lines
12 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-10-28 11:48
  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. // 刷新
  20. $('#lr_refresh').on('click', function () {
  21. location.reload();
  22. });
  23. // 新增
  24. $('#lr_add').on('click', function () {
  25. learun.layerForm({
  26. id: 'form',
  27. title: '新增',
  28. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/Form',
  29. width: 1000,
  30. height: 600,
  31. callBack: function (id) {
  32. return top[id].acceptClick(refreshGirdData);
  33. }
  34. });
  35. });
  36. // 编辑
  37. $('#lr_edit').on('click', function () {
  38. var keyValue = $('#gridtable').jfGridValue('Id');
  39. if (learun.checkrow(keyValue)) {
  40. var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
  41. if (CheckStatus === 1) {
  42. learun.alert.warning("当前项目已审核不能编辑!");
  43. return;
  44. }
  45. learun.layerForm({
  46. id: 'form',
  47. title: '编辑',
  48. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/Form?keyValue=' + keyValue,
  49. width: 1000,
  50. height: 600,
  51. callBack: function (id) {
  52. return top[id].acceptClick(refreshGirdData);
  53. }
  54. });
  55. }
  56. });
  57. // 删除
  58. $('#lr_delete').on('click', function () {
  59. var keyValue = $('#gridtable').jfGridValue('Id');
  60. if (learun.checkrow(keyValue)) {
  61. var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
  62. if (CheckStatus === 1) {
  63. learun.alert.warning("当前项目已审核不能删除!");
  64. return;
  65. }
  66. learun.layerConfirm('是否确认删除该项!', function (res) {
  67. if (res) {
  68. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/DeleteForm', { keyValue: keyValue }, function () {
  69. refreshGirdData();
  70. });
  71. }
  72. });
  73. }
  74. });
  75. //审核
  76. $('#lr_check').on('click', function () {
  77. var keyValue = $('#gridtable').jfGridValue('Id');
  78. if (learun.checkrow(keyValue)) {
  79. var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
  80. if (CheckStatus === 1) {
  81. learun.alert.warning("当前项目已审核!");
  82. return;
  83. }
  84. learun.layerConfirm('是否确认审核该项!', function (res) {
  85. if (res) {
  86. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/CheckForm', { keyValue: keyValue }, function () {
  87. refreshGirdData();
  88. });
  89. }
  90. });
  91. }
  92. });
  93. //去审核
  94. $('#lr_uncheck').on('click', function () {
  95. var keyValue = $('#gridtable').jfGridValue('Id');
  96. if (learun.checkrow(keyValue)) {
  97. var CheckStatus = $('#gridtable').jfGridValue('CheckStatus');
  98. if (CheckStatus != 1) {
  99. learun.alert.warning("当前项目未审核无法去审!");
  100. return;
  101. }
  102. learun.layerConfirm('是否确认去审核该项!', function (res) {
  103. if (res) {
  104. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/UnCheckForm', { keyValue: keyValue }, function () {
  105. refreshGirdData();
  106. });
  107. }
  108. });
  109. }
  110. });
  111. },
  112. // 初始化列表
  113. initGird: function () {
  114. $('#gridtable').lrAuthorizeJfGrid({
  115. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasicChange/GetPageList',
  116. headData: [
  117. { label: "学号", name: "StuNo", width: 100, align: "left" },
  118. { label: "姓名", name: "StuName", width: 100, align: "left" },
  119. {
  120. label: "异动类型", name: "StuChangeType", width: 100, align: "left",
  121. formatterAsync: function (callback, value, row, op, $cell) {
  122. learun.clientdata.getAsync('dataItem', {
  123. key: value,
  124. code: 'StuChangeType',
  125. callback: function (_data) {
  126. callback(_data.text);
  127. }
  128. });
  129. }
  130. },
  131. {
  132. label: "异动原因", name: "StuChangeReason", width: 100, align: "left",
  133. formatterAsync: function (callback, value, row, op, $cell) {
  134. learun.clientdata.getAsync('dataItem', {
  135. key: value,
  136. code: 'StuChangeReason',
  137. callback: function (_data) {
  138. callback(_data.text);
  139. }
  140. });
  141. }
  142. },
  143. {
  144. label: "系部", name: "DeptNo", width: 100, align: "left",
  145. formatterAsync: function (callback, value, row, op, $cell) {
  146. learun.clientdata.getAsync('custmerData', {
  147. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  148. key: value,
  149. keyId: 'deptno',
  150. callback: function (_data) {
  151. callback(_data['deptname']);
  152. }
  153. });
  154. }
  155. },
  156. {
  157. label: "专业", name: "MajorNo", width: 100, align: "left",
  158. formatterAsync: function (callback, value, row, op, $cell) {
  159. learun.clientdata.getAsync('custmerData', {
  160. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  161. key: value,
  162. keyId: 'majorno',
  163. callback: function (_data) {
  164. callback(_data['majorname']);
  165. }
  166. });
  167. }
  168. },
  169. {
  170. label: "班级", name: "ClassNo", width: 100, align: "left",
  171. formatterAsync: function (callback, value, row, op, $cell) {
  172. learun.clientdata.getAsync('custmerData', {
  173. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  174. key: value,
  175. keyId: 'classno',
  176. callback: function (_data) {
  177. callback(_data['classname']);
  178. }
  179. });
  180. }
  181. },
  182. {
  183. label: "新系部", name: "NewDeptNo", width: 100, align: "left",
  184. formatterAsync: function (callback, value, row, op, $cell) {
  185. learun.clientdata.getAsync('custmerData', {
  186. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  187. key: value,
  188. keyId: 'deptno',
  189. callback: function (_data) {
  190. callback(_data['deptname']);
  191. }
  192. });
  193. }
  194. },
  195. {
  196. label: "新专业", name: "NewMajorNo", width: 100, align: "left",
  197. formatterAsync: function (callback, value, row, op, $cell) {
  198. learun.clientdata.getAsync('custmerData', {
  199. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  200. key: value,
  201. keyId: 'majorno',
  202. callback: function (_data) {
  203. callback(_data['majorname']);
  204. }
  205. });
  206. }
  207. },
  208. {
  209. label: "新班级", name: "NewClassNo", width: 100, align: "left",
  210. formatterAsync: function (callback, value, row, op, $cell) {
  211. learun.clientdata.getAsync('custmerData', {
  212. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  213. key: value,
  214. keyId: 'classno',
  215. callback: function (_data) {
  216. callback(_data['classname']);
  217. }
  218. });
  219. }
  220. },
  221. { label: "创建时间", name: "CreateTime", width: 130, align: "left" },
  222. { label: "创建用户", name: "CreateUserId", width: 100, align: "left" },
  223. { label: "审核时间", name: "CheckTime", width: 130, align: "left" },
  224. { label: "审核用户", name: "CheckUserId", width: 100, align: "left" },
  225. {
  226. label: "审核状态", name: "CheckStatus", width: 100, align: "left",
  227. formatter: function (cellvalue) {
  228. return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
  229. }
  230. },
  231. ],
  232. mainId: 'Id',
  233. isPage: true,
  234. sord: 'desc',
  235. sidx: 'CreateTime'
  236. });
  237. page.search();
  238. },
  239. search: function (param) {
  240. param = param || {};
  241. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  242. }
  243. };
  244. refreshGirdData = function () {
  245. page.search();
  246. };
  247. page.init();
  248. }