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.
 
 
 
 
 
 

383 lines
19 KiB

  1. /* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
  2. * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2023-01-04 15:03
  5. * 描 述:学籍异动列表
  6. */
  7. var selectedRow;
  8. var refreshGirdData;
  9. var bootstrap = function ($, learun) {
  10. "use strict";
  11. var page = {
  12. init: function () {
  13. page.initGird();
  14. page.bind();
  15. },
  16. bind: function () {
  17. // 查询
  18. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  19. page.search(queryJson);
  20. }, 245, 400);
  21. $('#AnomalousType').lrDataItemSelect({ code: 'StuChangeType' });
  22. $('#ClassNo').lrselect({
  23. allowSearch: true,
  24. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  25. param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" },
  26. value: "classno",
  27. text: "classname"
  28. });
  29. $('#CheckUserId').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' });
  30. $('#CreateUserId').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' });
  31. $('#F_EnabledMark').lrselect({
  32. data: [{ text: "未生效", value: "0" }, { text: "已生效", value: "1" }],
  33. text: "text",
  34. value: "value"
  35. })
  36. // 刷新
  37. $('#lr_refresh').on('click', function () {
  38. location.reload();
  39. });
  40. // 打印
  41. $('#lr_print').on('click', function () {
  42. $('#gridtable').jqprintTable();
  43. });
  44. // 审核
  45. $('#lr_check').on('click', function () {
  46. var keyValue = $('#gridtable').jfGridValue('ID');
  47. if (learun.checkrow(keyValue)) {
  48. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  49. if (CheckMark.indexOf('1') != -1) {
  50. learun.alert.warning("选中记录中包含已审核项目,已审核项不能二次审核!");
  51. return;
  52. }
  53. learun.layerConfirm('是否确认审核选中项进行学籍异动,该项不可逆转!', function (res) {
  54. if (res) {
  55. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/CheckForm', { keyValue: keyValue }, function () {
  56. refreshGirdData();
  57. });
  58. }
  59. });
  60. }
  61. });
  62. // 删除
  63. $('#lr_delete').on('click', function () {
  64. var keyValue = $('#gridtable').jfGridValue('ID');
  65. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  66. if (learun.checkrow(keyValue)) {
  67. if (CheckMark.indexOf('1') != -1) {
  68. learun.alert.warning("选中记录中包含已生效项目,不可删除!");
  69. return;
  70. }
  71. learun.layerConfirm('是否确认删除该项,此项不可逆!', function (res) {
  72. if (res) {
  73. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/DeleteForm', { keyValue: keyValue }, function () {
  74. refreshGirdData();
  75. });
  76. }
  77. });
  78. }
  79. });
  80. // 查看
  81. $('#lr_view').on('click', function () {
  82. var keyValue = $('#gridtable').jfGridValue('ID');
  83. if (learun.checkrow(keyValue)) {
  84. if (keyValue.indexOf(',') != -1) {
  85. learun.alert.warning("只能选择一条记录进行查看!");
  86. return;
  87. }
  88. var CheckMark = $('#gridtable').jfGridValue('F_EnabledMark');
  89. if (CheckMark.indexOf('0') != -1) {
  90. learun.alert.warning("请选择已生效项进行查看!");
  91. return;
  92. }
  93. learun.layerForm({
  94. id: 'formview',
  95. title: '查看',
  96. url: top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/FormView?keyValue=' + keyValue,
  97. width: 1000,
  98. height: 600,
  99. btn: null
  100. });
  101. }
  102. });
  103. },
  104. initGird: function () {
  105. $('#gridtable').lrAuthorizeJfGridLei({
  106. url: top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/GetPageList',
  107. headData: [
  108. { label: '姓名', name: 'StuName', width: 100, align: "left" },
  109. { label: '学号', name: 'StuNo', width: 150, align: "left" },
  110. {
  111. label: '性别', name: 'Gender', width: 80, align: "left",
  112. formatter: function (cellvalue) {
  113. return cellvalue == true ? "男" : "女";
  114. }
  115. },
  116. {
  117. label: '异动类型', name: 'AnomalousType', width: 100, align: "left",
  118. formatterAsync: function (callback, value, row, op, $cell) {
  119. learun.clientdata.getAsync('dataItem', {
  120. key: value,
  121. code: 'StuChangeType',
  122. callback: function (_data) {
  123. callback(_data.text);
  124. }
  125. });
  126. }
  127. },
  128. {
  129. label: '入班日期', name: 'LeaveDate', width: 140, align: "left",
  130. formatter: function (cellvalue) {
  131. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  132. }
  133. },
  134. {
  135. label: '离班日期', name: 'EnteDate', width: 140, align: "left",
  136. formatter: function (cellvalue) {
  137. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  138. }
  139. },
  140. //{ label: '身份证号', name: 'IdentityCardNo', width: 160, align: "left" },
  141. {
  142. label: '异动前班级', name: 'ClassNo', width: 140, align: "left",
  143. formatterAsync: function (callback, value, row, op, $cell) {
  144. learun.clientdata.getAsync('custmerData', {
  145. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  146. key: value,
  147. keyId: 'classno',
  148. callback: function (_data) {
  149. callback(_data['classname']);
  150. }
  151. });
  152. }
  153. },
  154. //{
  155. // label: '原专业', name: 'MajorNo', width: 100, align: "left",
  156. // formatterAsync: function (callback, value, row, op, $cell) {
  157. // learun.clientdata.getAsync('custmerData', {
  158. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  159. // key: value,
  160. // keyId: 'majorno',
  161. // callback: function (_data) {
  162. // callback(_data['majorname']);
  163. // }
  164. // });
  165. // }
  166. //},
  167. //{
  168. // label: '原系部', name: 'DeptNo', width: 100, align: "left",
  169. // formatterAsync: function (callback, value, row, op, $cell) {
  170. // learun.clientdata.getAsync('custmerData', {
  171. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  172. // key: value,
  173. // keyId: 'deptno',
  174. // callback: function (_data) {
  175. // callback(_data['deptname']);
  176. // }
  177. // });
  178. // }
  179. //},
  180. //{ label: '年级', name: 'Grade', width: 60, align: "left" },
  181. //{
  182. // label: '学制', name: 'EduSystem', width: 100, align: "left",
  183. // formatterAsync: function (callback, value, row, op, $cell) {
  184. // learun.clientdata.getAsync('dataItem', {
  185. // key: value,
  186. // code: 'EduSystem',
  187. // callback: function (_data) {
  188. // callback(_data.text);
  189. // }
  190. // });
  191. // }
  192. //},
  193. {
  194. label: '异动后班级', name: 'NewClassNo', width: 140, align: "left",
  195. formatterAsync: function (callback, value, row, op, $cell) {
  196. learun.clientdata.getAsync('custmerData', {
  197. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  198. key: value,
  199. keyId: 'classno',
  200. callback: function (_data) {
  201. callback(_data['classname']);
  202. }
  203. });
  204. }
  205. },
  206. //{
  207. // label: '现专业', name: 'NewMajorNo', width: 100, align: "left",
  208. // formatterAsync: function (callback, value, row, op, $cell) {
  209. // learun.clientdata.getAsync('custmerData', {
  210. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  211. // key: value,
  212. // keyId: 'majorno',
  213. // callback: function (_data) {
  214. // callback(_data['majorname']);
  215. // }
  216. // });
  217. // }
  218. //},
  219. //{
  220. // label: '现系部', name: 'NewDeptNo', width: 100, align: "left",
  221. // formatterAsync: function (callback, value, row, op, $cell) {
  222. // learun.clientdata.getAsync('custmerData', {
  223. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  224. // key: value,
  225. // keyId: 'deptno',
  226. // callback: function (_data) {
  227. // callback(_data['deptname']);
  228. // }
  229. // });
  230. // }
  231. //},
  232. //{ label: '现年级', name: 'NewGrade', width: 60, align: "left" },
  233. //{
  234. // label: '创建时间', name: 'CreateTime', width: 100, align: "left",
  235. // formatter: function (cellvalue) {
  236. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  237. // }
  238. //},
  239. {
  240. label: '申请人', name: 'CreateUserId', width: 100, align: "left",
  241. formatterAsync: function (callback, value, row, op, $cell) {
  242. learun.clientdata.getAsync('custmerData', {
  243. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  244. key: value,
  245. keyId: 'f_userid',
  246. callback: function (_data) {
  247. callback(_data['f_realname']);
  248. }
  249. });
  250. }
  251. },
  252. { label: '异动原因', name: 'ChangeReason', width: 300, align: "left" },
  253. //{
  254. // label: '审核时间', name: 'CheckTime', width: 200, align: "left",
  255. // formatter: function (cellvalue) {
  256. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  257. // }
  258. //},
  259. //{
  260. // label: '审核用户', name: 'CheckUserId', width: 200, align: "left",
  261. // formatterAsync: function (callback, value, row, op, $cell) {
  262. // learun.clientdata.getAsync('custmerData', {
  263. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  264. // key: value,
  265. // keyId: 'f_userid',
  266. // callback: function (_data) {
  267. // callback(_data['f_realname']);
  268. // }
  269. // });
  270. // }
  271. //},
  272. {
  273. label: '审核状态', name: 'F_EnabledMark', width: 100, align: "left",
  274. formatter: function (cellvalue) {
  275. if (cellvalue == "0") {
  276. return "<span class=\"label label-danger\">未生效</span>";
  277. } else if (cellvalue == "1") {
  278. return "<span class=\"label label-success\">已生效</span>";
  279. }
  280. }
  281. },
  282. //{
  283. // label: '操作', name: 'CZ', width: 100, align: "center",
  284. //},
  285. //{
  286. // label: '是否保留学籍', name: 'StuStatus', width: 80, align: "left",
  287. // formatterAsync: function (callback, value, row, op, $cell) {
  288. // learun.clientdata.getAsync('dataItem', {
  289. // key: value,
  290. // code: 'YesOrNoInt',
  291. // callback: function (_data) {
  292. // callback(_data.text);
  293. // }
  294. // });
  295. // }
  296. //},
  297. //{
  298. // label: '是否注销账号', name: 'F_WriteMark', width: 80, align: "left",
  299. // formatterAsync: function (callback, value, row, op, $cell) {
  300. // learun.clientdata.getAsync('dataItem', {
  301. // key: value,
  302. // code: 'YesOrNoInt',
  303. // callback: function (_data) {
  304. // callback(_data.text);
  305. // }
  306. // });
  307. // }
  308. //},
  309. //{
  310. // label: '是否恢复学籍', name: 'RecoverStuStatus', width: 80, align: "left",
  311. // formatterAsync: function (callback, value, row, op, $cell) {
  312. // learun.clientdata.getAsync('dataItem', {
  313. // key: value,
  314. // code: 'YesOrNoInt',
  315. // callback: function (_data) {
  316. // callback(_data.text);
  317. // }
  318. // });
  319. // }
  320. //},
  321. //{
  322. // label: '是否恢复账号', name: 'RecoverWriteMark', width: 80, align: "left",
  323. // formatterAsync: function (callback, value, row, op, $cell) {
  324. // learun.clientdata.getAsync('dataItem', {
  325. // key: value,
  326. // code: 'YesOrNoInt',
  327. // callback: function (_data) {
  328. // callback(_data.text);
  329. // }
  330. // });
  331. // }
  332. //},
  333. //{ label: '修学年限', name: 'SuspensionPeriod', width: 200, align: "left" },
  334. //{
  335. // label: '休学开始时间', name: 'SuspensionBeginTime', width: 100, align: "left",
  336. // formatter: function (cellvalue) {
  337. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  338. // }
  339. //},
  340. //{
  341. // label: '休学结束时间', name: 'SuspensionEndTime', width: 100, align: "left",
  342. // formatter: function (cellvalue) {
  343. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  344. // }
  345. //},
  346. //{ label: '转学前学校', name: 'TransferSchool', width: 150, align: "left" },
  347. //{ label: '转学前学号', name: 'TransferStuNo', width: 100, align: "left" },
  348. //{
  349. // label: '出身日期', name: 'Birthday', width: 100, align: "left",
  350. // formatter: function (cellvalue) {
  351. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  352. // }
  353. //},
  354. //{ label: '民族', name: 'NationalityNo', width: 80, align: "left" },
  355. //{ label: '省', name: 'Province', width: 100, align: "left" },
  356. //{ label: '市', name: 'City', width: 100, align: "left" },
  357. //{ label: '县/区', name: 'County', width: 100, align: "left" },
  358. //{ label: '联系电话', name: 'Mobile', width: 100, align: "left" },
  359. //{ label: '家庭地址', name: 'MailAddress', width: 200, align: "left" },
  360. //{ label: '转出学校', name: 'OutSchool', width: 100, align: "left" },
  361. //{ label: '备注', name: 'Remark', width: 500, align: "left" },
  362. ],
  363. mainId: 'ID',
  364. isPage: true,
  365. rows: 100,
  366. sidx: 'F_EnabledMark asc,CreateUserId asc,CreateTime desc',
  367. isMultiselect: true
  368. });
  369. page.search();
  370. },
  371. search: function (param) {
  372. param = param || {};
  373. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  374. }
  375. };
  376. refreshGirdData = function () {
  377. $('#gridtable').jfGridSet('reload');
  378. };
  379. page.init();
  380. }