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 20 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  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. var modulesTree = learun.clientdata.get(['modulesTree']);
  19. $('#changeMajor').on('click', function () {
  20. let item = modulesTree[0].filter(item => {
  21. return item.F_FullName == "教务信息管理"
  22. })
  23. let modules = modulesTree[item[0].F_ModuleId].filter(item => {
  24. return item.F_EnCode == "Transfermenu" //学籍异动菜单
  25. })
  26. let moduleitem = modulesTree[modules[0].F_ModuleId].filter(item => {
  27. return item.F_EnCode == "MajorIndex"// "转专业"
  28. })
  29. learun.frameTab.open(moduleitem[0]);
  30. })
  31. $('#changeRestAgain').on('click', function () {
  32. let item = modulesTree[0].filter(item => {
  33. return item.F_FullName == "教务信息管理"
  34. })
  35. let modules = modulesTree[item[0].F_ModuleId].filter(item => {
  36. return item.F_EnCode == "Transfermenu" //学籍异动菜单
  37. })
  38. let moduleitem = modulesTree[modules[0].F_ModuleId].filter(item => {
  39. return item.F_EnCode == "RestAgain"// "休学复学"
  40. })
  41. learun.frameTab.open(moduleitem[0]);
  42. })
  43. $('#changeDrop').on('click', function () {
  44. let item = modulesTree[0].filter(item => {
  45. return item.F_FullName == "教务信息管理"
  46. })
  47. let modules = modulesTree[item[0].F_ModuleId].filter(item => {
  48. return item.F_EnCode == "Transfermenu" //学籍异动菜单
  49. })
  50. let moduleitem = modulesTree[modules[0].F_ModuleId].filter(item => {
  51. return item.F_EnCode == "DropOut"// "退学异动"
  52. })
  53. learun.frameTab.open(moduleitem[0]);
  54. })
  55. $('#changeIndexAnd').on('click', function () {
  56. let item = modulesTree[0].filter(item => {
  57. return item.F_FullName == "教务信息管理"
  58. })
  59. let modules = modulesTree[item[0].F_ModuleId].filter(item => {
  60. return item.F_EnCode == "Transfermenu" //学籍异动菜单
  61. })
  62. let moduleitem = modulesTree[modules[0].F_ModuleId].filter(item => {
  63. return item.F_EnCode == "InAndOut" //"转入转出异动"
  64. })
  65. learun.frameTab.open(moduleitem[0]);
  66. })
  67. $('#changeCheck').on('click', function () {
  68. let item = modulesTree[0].filter(item => {
  69. return item.F_FullName == "教务信息管理"
  70. })
  71. let modules = modulesTree[item[0].F_ModuleId].filter(item => {
  72. return item.F_EnCode == "Transfermenu" //学籍异动菜单
  73. })
  74. let moduleitem = modulesTree[modules[0].F_ModuleId].filter(item => {
  75. return item.F_EnCode == "CheckIndex" //"学籍异动审核"
  76. })
  77. learun.frameTab.open(moduleitem[0]);
  78. })
  79. // 查询
  80. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  81. page.search(queryJson);
  82. }, 290, 400);
  83. $('#AnomalousType').lrDataItemSelect({ code: 'StuChangeType' });
  84. $('#ClassNo').lrselect({
  85. allowSearch: true,
  86. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  87. param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" },
  88. value: "classno",
  89. text: "classname"
  90. });
  91. $('#CheckUserId').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' });
  92. $('#CreateUserId').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' });
  93. $('#StuStatus').lrDataItemSelect({ code: 'YesOrNoInt' });
  94. // 刷新
  95. $('#lr_refresh').on('click', function () {
  96. location.reload();
  97. });
  98. // 查看
  99. $('#lr_view').on('click', function () {
  100. var keyValue = $('#gridtable').jfGridValue('ID');
  101. if (learun.checkrow(keyValue)) {
  102. if (keyValue.indexOf(',') != -1) {
  103. learun.alert.warning("只能选择一条记录进行查看!");
  104. return;
  105. }
  106. learun.layerForm({
  107. id: 'formview',
  108. title: '查看',
  109. url: top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/FormView?keyValue=' + keyValue,
  110. width: 1000,
  111. height: 600,
  112. btn: null
  113. });
  114. }
  115. });
  116. },
  117. initGird: function () {
  118. $('#gridtable').lrAuthorizeJfGrid({
  119. url: top.$.rootUrl + '/EducationalAdministration/StuTransferInfo/GetPageList',
  120. headData: [
  121. { label: '姓名', name: 'StuName', width: 100, align: "left" },
  122. { label: '学号', name: 'StuNo', width: 160, align: "left" },
  123. {
  124. label: "性别", name: "GenderNo", width: 80, align: "left",
  125. formatter: function (cellvalue) {
  126. return cellvalue == true ? "男" : "女";
  127. }
  128. },
  129. { label: '身份证号', name: 'IdentityCardNo', width: 200, align: "left" },
  130. {
  131. label: '原班级', name: 'ClassNo', width: 150, align: "left",
  132. formatterAsync: function (callback, value, row, op, $cell) {
  133. learun.clientdata.getAsync('custmerData', {
  134. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  135. key: value,
  136. keyId: 'classno',
  137. callback: function (_data) {
  138. callback(_data['classname']);
  139. }
  140. });
  141. }
  142. },
  143. {
  144. label: '原专业', name: 'MajorNo', width: 150, align: "left",
  145. formatterAsync: function (callback, value, row, op, $cell) {
  146. learun.clientdata.getAsync('custmerData', {
  147. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  148. key: value,
  149. keyId: 'majorno',
  150. callback: function (_data) {
  151. callback(_data['majorname']);
  152. }
  153. });
  154. }
  155. },
  156. //{
  157. // label: '原系部', name: 'DeptNo', width: 100, align: "left",
  158. // formatterAsync: function (callback, value, row, op, $cell) {
  159. // learun.clientdata.getAsync('custmerData', {
  160. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  161. // key: value,
  162. // keyId: 'deptno',
  163. // callback: function (_data) {
  164. // callback(_data['deptname']);
  165. // }
  166. // });
  167. // }
  168. //},
  169. { label: '年级', name: 'Grade', width: 100, align: "left" },
  170. {
  171. label: '学制', name: 'EduSystem', width: 200, align: "left",
  172. formatterAsync: function (callback, value, row, op, $cell) {
  173. learun.clientdata.getAsync('dataItem', {
  174. key: value,
  175. code: 'EduSystem',
  176. callback: function (_data) {
  177. callback(_data.text);
  178. }
  179. });
  180. }
  181. },
  182. //{
  183. // label: '入班日期', name: 'LeaveDate', width: 100, align: "left",
  184. // formatter: function (cellvalue) {
  185. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  186. // }
  187. //},
  188. //{
  189. // label: '离班日期', name: 'EnteDate', width: 100, align: "left",
  190. // formatter: function (cellvalue) {
  191. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  192. // }
  193. //},
  194. //{
  195. // label: '现班级', name: 'NewClassNo', width: 100, align: "left",
  196. // formatterAsync: function (callback, value, row, op, $cell) {
  197. // learun.clientdata.getAsync('custmerData', {
  198. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  199. // key: value,
  200. // keyId: 'classno',
  201. // callback: function (_data) {
  202. // callback(_data['classname']);
  203. // }
  204. // });
  205. // }
  206. //},
  207. //{
  208. // label: '现专业', name: 'NewMajorNo', width: 100, align: "left",
  209. // formatterAsync: function (callback, value, row, op, $cell) {
  210. // learun.clientdata.getAsync('custmerData', {
  211. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  212. // key: value,
  213. // keyId: 'majorno',
  214. // callback: function (_data) {
  215. // callback(_data['majorname']);
  216. // }
  217. // });
  218. // }
  219. //},
  220. //{
  221. // label: '现系部', name: 'NewDeptNo', width: 100, align: "left",
  222. // formatterAsync: function (callback, value, row, op, $cell) {
  223. // learun.clientdata.getAsync('custmerData', {
  224. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  225. // key: value,
  226. // keyId: 'deptno',
  227. // callback: function (_data) {
  228. // callback(_data['deptname']);
  229. // }
  230. // });
  231. // }
  232. //},
  233. //{ label: '现年级', name: 'NewGrade', width: 60, align: "left" },
  234. //{
  235. // label: '创建时间', name: 'CreateTime', width: 100, align: "left",
  236. // formatter: function (cellvalue) {
  237. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  238. // }
  239. //},
  240. //{
  241. // label: '创建用户', name: 'CreateUserId', width: 200, align: "left",
  242. // formatterAsync: function (callback, value, row, op, $cell) {
  243. // learun.clientdata.getAsync('custmerData', {
  244. // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
  245. // key: value,
  246. // keyId: 'f_userid',
  247. // callback: function (_data) {
  248. // callback(_data['f_realname']);
  249. // }
  250. // });
  251. // }
  252. //},
  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: 200, align: "left",
  274. formatter: function (cellvalue) {
  275. return cellvalue == "1" ? "<span class=\"label label-success\">已生效</span>" : "<span class=\"label label-danger\">未生效</span>";
  276. }
  277. },
  278. {
  279. label: '异动类型', name: 'AnomalousType', width: 100, align: "left",
  280. formatterAsync: function (callback, value, row, op, $cell) {
  281. learun.clientdata.getAsync('dataItem', {
  282. key: value,
  283. code: 'StuChangeType',
  284. callback: function (_data) {
  285. callback(_data.text);
  286. }
  287. });
  288. }
  289. },
  290. //{ label: '异动原因', name: 'ChangeReason', width: 300, align: "left" },
  291. //{
  292. // label: '是否保留学籍', name: 'StuStatus', width: 80, align: "left",
  293. // formatterAsync: function (callback, value, row, op, $cell) {
  294. // learun.clientdata.getAsync('dataItem', {
  295. // key: value,
  296. // code: 'YesOrNoInt',
  297. // callback: function (_data) {
  298. // callback(_data.text);
  299. // }
  300. // });
  301. // }
  302. //},
  303. //{
  304. // label: '是否注销账号', name: 'F_WriteMark', width: 80, align: "left",
  305. // formatterAsync: function (callback, value, row, op, $cell) {
  306. // learun.clientdata.getAsync('dataItem', {
  307. // key: value,
  308. // code: 'YesOrNoInt',
  309. // callback: function (_data) {
  310. // callback(_data.text);
  311. // }
  312. // });
  313. // }
  314. //},
  315. //{
  316. // label: '是否恢复学籍', name: 'RecoverStuStatus', width: 80, align: "left",
  317. // formatterAsync: function (callback, value, row, op, $cell) {
  318. // learun.clientdata.getAsync('dataItem', {
  319. // key: value,
  320. // code: 'YesOrNoInt',
  321. // callback: function (_data) {
  322. // callback(_data.text);
  323. // }
  324. // });
  325. // }
  326. //},
  327. //{
  328. // label: '是否恢复账号', name: 'RecoverWriteMark', width: 80, align: "left",
  329. // formatterAsync: function (callback, value, row, op, $cell) {
  330. // learun.clientdata.getAsync('dataItem', {
  331. // key: value,
  332. // code: 'YesOrNoInt',
  333. // callback: function (_data) {
  334. // callback(_data.text);
  335. // }
  336. // });
  337. // }
  338. //},
  339. //{ label: '修学年限', name: 'SuspensionPeriod', width: 200, align: "left" },
  340. //{
  341. // label: '休学开始时间', name: 'SuspensionBeginTime', width: 100, align: "left",
  342. // formatter: function (cellvalue) {
  343. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  344. // }
  345. //},
  346. //{
  347. // label: '休学结束时间', name: 'SuspensionEndTime', width: 100, align: "left",
  348. // formatter: function (cellvalue) {
  349. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  350. // }
  351. //},
  352. //{ label: '转学前学校', name: 'TransferSchool', width: 150, align: "left" },
  353. //{ label: '转学前学号', name: 'TransferStuNo', width: 100, align: "left" },
  354. //{
  355. // label: '出身日期', name: 'Birthday', width: 100, align: "left",
  356. // formatter: function (cellvalue) {
  357. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  358. // }
  359. //},
  360. //{ label: '民族', name: 'NationalityNo', width: 80, align: "left" },
  361. //{ label: '省', name: 'Province', width: 100, align: "left" },
  362. //{ label: '市', name: 'City', width: 100, align: "left" },
  363. //{ label: '县/区', name: 'County', width: 100, align: "left" },
  364. //{ label: '联系电话', name: 'Mobile', width: 100, align: "left" },
  365. //{ label: '家庭地址', name: 'MailAddress', width: 200, align: "left" },
  366. //{ label: '转出学校', name: 'OutSchool', width: 100, align: "left" },
  367. //{ label: '备注', name: 'Remark', width: 500, align: "left" },
  368. ],
  369. mainId: 'ID',
  370. isPage: true,
  371. rows: 100,
  372. });
  373. page.search();
  374. },
  375. search: function (param) {
  376. param = param || {};
  377. param.SqlParameter = ' and F_EnabledMark = 1 ';
  378. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  379. }
  380. };
  381. refreshGirdData = function () {
  382. $('#gridtable').jfGridSet('reload');
  383. };
  384. page.init();
  385. }