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.
 
 
 
 
 
 

473 lines
24 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 startTime;
  12. var endTime;
  13. var page = {
  14. init: function () {
  15. page.initGird();
  16. page.bind();
  17. },
  18. bind: function () {
  19. // 时间搜索框
  20. $('#datesearch').lrdate({
  21. dfdata: [
  22. { name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  23. { name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  24. { name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
  25. { name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
  26. ],
  27. // 月
  28. mShow: false,
  29. premShow: false,
  30. // 季度
  31. jShow: false,
  32. prejShow: false,
  33. // 年
  34. ysShow: false,
  35. yxShow: false,
  36. preyShow: false,
  37. yShow: false,
  38. // 默认
  39. dfvalue: '2',
  40. selectfn: function (begin, end) {
  41. startTime = begin;
  42. endTime = end;
  43. page.search();
  44. }
  45. });
  46. // 跳转
  47. //var modulesTree = learun.clientdata.get(['modulesTree']);
  48. $('#changeMajor').on('click', function () {
  49. //let item = modulesTree[0].filter(item => {
  50. // return item.F_FullName == "教务信息管理"
  51. //})
  52. //let modules = modulesTree[item[0].F_ModuleId].filter(item => {
  53. // return item.F_EnCode == "Transfermenu" //学籍异动菜单
  54. //})
  55. //let moduleitem = modulesTree[modules[0].F_ModuleId].filter(item => {
  56. // return item.F_EnCode == "MajorIndex"// "转专业"
  57. //})
  58. var SetkeyValue = 'c94221e8-9ad3-4af8-8976-c08067532902';
  59. $.lrSetForm(top.$.rootUrl + '/LR_SystemModule/Module/GetFormData?keyValue=' + SetkeyValue, function (data) {
  60. if (data.moduleEntity != null) {
  61. learun.frameTab.open(data.moduleEntity);
  62. }
  63. });
  64. //learun.frameTab.open(moduleitem[0]);
  65. })
  66. $('#changeRestAgain').on('click', function () {
  67. var SetkeyValue = '36df4209-152b-4842-97e0-6057a40fe903';
  68. $.lrSetForm(top.$.rootUrl + '/LR_SystemModule/Module/GetFormData?keyValue=' + SetkeyValue, function (data) {
  69. if (data.moduleEntity != null) {
  70. learun.frameTab.open(data.moduleEntity); // "休学复学"
  71. }
  72. });
  73. //let item = modulesTree[0].filter(item => {
  74. // return item.F_FullName == "教务信息管理"
  75. //})
  76. //let modules = modulesTree[item[0].F_ModuleId].filter(item => {
  77. // return item.F_EnCode == "Transfermenu" //学籍异动菜单
  78. //})
  79. //let moduleitem = modulesTree[modules[0].F_ModuleId].filter(item => {
  80. // return item.F_EnCode == "RestAgain"// "休学复学"
  81. //})
  82. //learun.frameTab.open(moduleitem[0]);
  83. })
  84. $('#changeDrop').on('click', function () {
  85. var SetkeyValue = 'a418147e-7768-44c2-ae5f-05bc4de6af2b';
  86. $.lrSetForm(top.$.rootUrl + '/LR_SystemModule/Module/GetFormData?keyValue=' + SetkeyValue, function (data) {
  87. if (data.moduleEntity != null) {
  88. learun.frameTab.open(data.moduleEntity); // "退学异动"
  89. }
  90. });
  91. //let item = modulesTree[0].filter(item => {
  92. // return item.F_FullName == "教务信息管理"
  93. //})
  94. //let modules = modulesTree[item[0].F_ModuleId].filter(item => {
  95. // return item.F_EnCode == "Transfermenu" //学籍异动菜单
  96. //})
  97. //let moduleitem = modulesTree[modules[0].F_ModuleId].filter(item => {
  98. // return item.F_EnCode == "DropOut"// "退学异动"
  99. //})
  100. //learun.frameTab.open(moduleitem[0]);
  101. })
  102. $('#changeIndexAnd').on('click', function () {
  103. var SetkeyValue = 'e3c24747-9b2f-4645-8392-1e0f1b37340d';
  104. $.lrSetForm(top.$.rootUrl + '/LR_SystemModule/Module/GetFormData?keyValue=' + SetkeyValue, function (data) {
  105. if (data.moduleEntity != null) {
  106. learun.frameTab.open(data.moduleEntity); //"转入转出异动"
  107. }
  108. });
  109. //let item = modulesTree[0].filter(item => {
  110. // return item.F_FullName == "教务信息管理"
  111. //})
  112. //let modules = modulesTree[item[0].F_ModuleId].filter(item => {
  113. // return item.F_EnCode == "Transfermenu" //学籍异动菜单
  114. //})
  115. //let moduleitem = modulesTree[modules[0].F_ModuleId].filter(item => {
  116. // return item.F_EnCode == "InAndOut" //"转入转出异动"
  117. //})
  118. //learun.frameTab.open(moduleitem[0]);
  119. })
  120. $('#changeCheck').on('click', function () {
  121. var SetkeyValue = '5d40d91e-833c-4511-96e6-4a91afaabc9f';
  122. $.lrSetForm(top.$.rootUrl + '/LR_SystemModule/Module/GetFormData?keyValue=' + SetkeyValue, function (data) {
  123. if (data.moduleEntity != null) {
  124. learun.frameTab.open(data.moduleEntity); //"学籍异动审核"
  125. }
  126. });
  127. //let item = modulesTree[0].filter(item => {
  128. // return item.F_FullName == "教务信息管理"
  129. //})
  130. //let modules = modulesTree[item[0].F_ModuleId].filter(item => {
  131. // return item.F_EnCode == "Transfermenu" //学籍异动菜单
  132. //})
  133. //let moduleitem = modulesTree[modules[0].F_ModuleId].filter(item => {
  134. // return item.F_EnCode == "CheckIndex" //"学籍异动审核"
  135. //})
  136. //learun.frameTab.open(moduleitem[0]);
  137. })
  138. // 查询
  139. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  140. page.search(queryJson);
  141. }, 350, 400);
  142. $('#AnomalousType').lrDataItemSelect({ code: 'StuChangeType' });
  143. $('#ClassNo').lrselect({
  144. allowSearch: true,
  145. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  146. param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" },
  147. value: "classno",
  148. text: "classname"
  149. });
  150. $('#CheckUserId').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' });
  151. $('#CreateUserId').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' });
  152. $('#StuStatus').lrDataItemSelect({ code: 'YesOrNoInt' });
  153. // 刷新
  154. $('#lr_refresh').on('click', function () {
  155. location.reload();
  156. });
  157. //// 查看
  158. //$('#lr_view').on('click', function () {
  159. // var keyValue = $('#gridtable').jfGridValue('ID');
  160. // if (learun.checkrow(keyValue)) {
  161. // if (keyValue.indexOf(',') != -1) {
  162. // learun.alert.warning("只能选择一条记录进行查看!");
  163. // return;
  164. // }
  165. // learun.layerForm({
  166. // id: 'formview',
  167. // title: '查看',
  168. // url: top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/FormView?keyValue=' + keyValue,
  169. // width: 1000,
  170. // height: 600,
  171. // btn: null
  172. // });
  173. // }
  174. //});
  175. // 综合查询
  176. $('#lr_compoundQuery').on('click', function () {
  177. var keyValue = $('#gridtable').jfGridValue('ID');
  178. var StuNo = $('#gridtable').jfGridValue('StuNo');
  179. if (learun.checkrow(keyValue)) {
  180. if (keyValue.indexOf(',') != -1) {
  181. learun.alert.warning("只能选择一条记录进行查看!");
  182. return;
  183. }
  184. learun.layerForm({
  185. id: 'QueryBasicInfo',
  186. title: '综合查询',
  187. url: top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/QueryBasicInfo?keyValue=' + keyValue + '&StuNo=' + StuNo,
  188. width: 1200,
  189. height: 800,
  190. btn: null
  191. });
  192. }
  193. });
  194. },
  195. initGird: function () {
  196. $('#gridtable').lrAuthorizeJfGrid({
  197. url: top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/GetPageList',
  198. headData: [
  199. { label: '姓名', name: 'StuName', width: 100, align: "left" },
  200. { label: '学号', name: 'StuNo', width: 160, align: "left" },
  201. {
  202. label: "性别", name: "Gender", width: 80, align: "left",
  203. formatter: function (cellvalue) {
  204. return cellvalue == true ? "男" : "女";
  205. }
  206. },
  207. { label: '身份证号', name: 'IdentityCardNo', width: 200, align: "left" },
  208. {
  209. label: '原班级', name: 'ClassNo', width: 150, 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. {
  222. label: '原专业', name: 'MajorNo', width: 150, align: "left",
  223. formatterAsync: function (callback, value, row, op, $cell) {
  224. learun.clientdata.getAsync('custmerData', {
  225. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  226. key: value,
  227. keyId: 'majorno',
  228. callback: function (_data) {
  229. callback(_data['majorname']);
  230. }
  231. });
  232. }
  233. },
  234. {
  235. label: '原系部', name: 'DeptNo', width: 100, align: "left",
  236. formatterAsync: function (callback, value, row, op, $cell) {
  237. learun.clientdata.getAsync('custmerData', {
  238. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  239. key: value,
  240. keyId: 'deptno',
  241. callback: function (_data) {
  242. callback(_data['deptname']);
  243. }
  244. });
  245. }
  246. },
  247. { label: '原年级', name: 'Grade', width: 60, align: "left" },
  248. {
  249. label: '原学制', name: 'EduSystem', width: 80, align: "left",
  250. formatterAsync: function (callback, value, row, op, $cell) {
  251. learun.clientdata.getAsync('dataItem', {
  252. key: value,
  253. code: 'EduSystem',
  254. callback: function (_data) {
  255. callback(_data.text);
  256. }
  257. });
  258. }
  259. },
  260. //{
  261. // label: '入班日期', name: 'LeaveDate', width: 100, align: "left",
  262. // formatter: function (cellvalue) {
  263. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  264. // }
  265. //},
  266. //{
  267. // label: '离班日期', name: 'EnteDate', width: 100, align: "left",
  268. // formatter: function (cellvalue) {
  269. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  270. // }
  271. //},
  272. {
  273. label: '现班级', name: 'NewClassNo', width: 100, align: "left",
  274. formatterAsync: function (callback, value, row, op, $cell) {
  275. learun.clientdata.getAsync('custmerData', {
  276. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  277. key: value,
  278. keyId: 'classno',
  279. callback: function (_data) {
  280. callback(_data['classname']);
  281. }
  282. });
  283. }
  284. },
  285. {
  286. label: '现专业', name: 'NewMajorNo', width: 100, align: "left",
  287. formatterAsync: function (callback, value, row, op, $cell) {
  288. learun.clientdata.getAsync('custmerData', {
  289. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  290. key: value,
  291. keyId: 'majorno',
  292. callback: function (_data) {
  293. callback(_data['majorname']);
  294. }
  295. });
  296. }
  297. },
  298. {
  299. label: '现系部', name: 'NewDeptNo', width: 100, align: "left",
  300. formatterAsync: function (callback, value, row, op, $cell) {
  301. learun.clientdata.getAsync('custmerData', {
  302. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  303. key: value,
  304. keyId: 'deptno',
  305. callback: function (_data) {
  306. callback(_data['deptname']);
  307. }
  308. });
  309. }
  310. },
  311. { label: '现年级', name: 'NewGrade', width: 60, align: "left" },
  312. //{
  313. // label: '创建时间', name: 'CreateTime', width: 100, align: "left",
  314. // formatter: function (cellvalue) {
  315. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  316. // }
  317. //},
  318. {
  319. label: '申请人', name: 'CreateUserId', width: 140, align: "left",
  320. formatterAsync: function (callback, value, row, op, $cell) {
  321. learun.clientdata.getAsync('custmerData', {
  322. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  323. key: value,
  324. keyId: 'f_userid',
  325. callback: function (_data) {
  326. callback(_data['f_realname']);
  327. }
  328. });
  329. }
  330. },
  331. {
  332. label: '审核时间', name: 'CheckTime', width: 150, align: "left",
  333. formatter: function (cellvalue) {
  334. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  335. }
  336. },
  337. {
  338. label: '审核用户', name: 'CheckUserId', width: 100, align: "left",
  339. formatterAsync: function (callback, value, row, op, $cell) {
  340. learun.clientdata.getAsync('custmerData', {
  341. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  342. key: value,
  343. keyId: 'f_userid',
  344. callback: function (_data) {
  345. callback(_data['f_realname']);
  346. }
  347. });
  348. }
  349. },
  350. {
  351. label: '审核状态', name: 'F_EnabledMark', width: 100, align: "left",
  352. formatter: function (cellvalue) {
  353. return cellvalue == "1" ? "<span class=\"label label-success\">已生效</span>" : "<span class=\"label label-danger\">未生效</span>";
  354. }
  355. },
  356. {
  357. label: '异动类型', name: 'AnomalousType', width: 100, align: "left",
  358. formatterAsync: function (callback, value, row, op, $cell) {
  359. learun.clientdata.getAsync('dataItem', {
  360. key: value,
  361. code: 'StuChangeType',
  362. callback: function (_data) {
  363. callback(_data.text);
  364. }
  365. });
  366. }
  367. },
  368. //{ label: '异动原因', name: 'ChangeReason', width: 300, align: "left" },
  369. //{
  370. // label: '是否保留学籍', name: 'StuStatus', width: 80, align: "left",
  371. // formatterAsync: function (callback, value, row, op, $cell) {
  372. // learun.clientdata.getAsync('dataItem', {
  373. // key: value,
  374. // code: 'YesOrNoInt',
  375. // callback: function (_data) {
  376. // callback(_data.text);
  377. // }
  378. // });
  379. // }
  380. //},
  381. //{
  382. // label: '是否注销账号', name: 'F_WriteMark', width: 80, align: "left",
  383. // formatterAsync: function (callback, value, row, op, $cell) {
  384. // learun.clientdata.getAsync('dataItem', {
  385. // key: value,
  386. // code: 'YesOrNoInt',
  387. // callback: function (_data) {
  388. // callback(_data.text);
  389. // }
  390. // });
  391. // }
  392. //},
  393. //{
  394. // label: '是否恢复学籍', name: 'RecoverStuStatus', width: 80, align: "left",
  395. // formatterAsync: function (callback, value, row, op, $cell) {
  396. // learun.clientdata.getAsync('dataItem', {
  397. // key: value,
  398. // code: 'YesOrNoInt',
  399. // callback: function (_data) {
  400. // callback(_data.text);
  401. // }
  402. // });
  403. // }
  404. //},
  405. //{
  406. // label: '是否恢复账号', name: 'RecoverWriteMark', width: 80, align: "left",
  407. // formatterAsync: function (callback, value, row, op, $cell) {
  408. // learun.clientdata.getAsync('dataItem', {
  409. // key: value,
  410. // code: 'YesOrNoInt',
  411. // callback: function (_data) {
  412. // callback(_data.text);
  413. // }
  414. // });
  415. // }
  416. //},
  417. //{ label: '修学年限', name: 'SuspensionPeriod', width: 200, align: "left" },
  418. //{
  419. // label: '休学开始时间', name: 'SuspensionBeginTime', width: 100, align: "left",
  420. // formatter: function (cellvalue) {
  421. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  422. // }
  423. //},
  424. //{
  425. // label: '休学结束时间', name: 'SuspensionEndTime', width: 100, align: "left",
  426. // formatter: function (cellvalue) {
  427. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  428. // }
  429. //},
  430. //{ label: '转学前学校', name: 'TransferSchool', width: 150, align: "left" },
  431. //{ label: '转学前学号', name: 'TransferStuNo', width: 100, align: "left" },
  432. //{
  433. // label: '出身日期', name: 'Birthday', width: 100, align: "left",
  434. // formatter: function (cellvalue) {
  435. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  436. // }
  437. //},
  438. //{ label: '民族', name: 'NationalityNo', width: 80, align: "left" },
  439. //{ label: '省', name: 'Province', width: 100, align: "left" },
  440. //{ label: '市', name: 'City', width: 100, align: "left" },
  441. //{ label: '县/区', name: 'County', width: 100, align: "left" },
  442. //{ label: '联系电话', name: 'Mobile', width: 100, align: "left" },
  443. //{ label: '家庭地址', name: 'MailAddress', width: 200, align: "left" },
  444. //{ label: '转出学校', name: 'OutSchool', width: 100, align: "left" },
  445. { label: '备注', name: 'Remark', width: 300, align: "left" },
  446. ],
  447. mainId: 'ID',
  448. isPage: true,
  449. rows: 100,
  450. sidx:'CheckTime desc'
  451. });
  452. page.search();
  453. },
  454. search: function (param) {
  455. param = param || {};
  456. param.StartTime = startTime;
  457. param.EndTime = endTime;
  458. param.SqlParameter = ' and F_EnabledMark = 1 ';
  459. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  460. }
  461. };
  462. refreshGirdData = function () {
  463. $('#gridtable').jfGridSet('reload');
  464. };
  465. page.init();
  466. }