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.
 
 
 
 
 
 

340 lines
16 KiB

  1. /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  2. * Copyright (c) 2013-2018 北京泉江科技有限公司
  3. * 创建人:超级管理员
  4. * 日 期:2019-08-08 17:21
  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. $('#btn_Search').on('click', function () {
  19. var keyword = $('#txt_Keyword').val();
  20. page.search({ keyword: keyword });
  21. });
  22. // 刷新
  23. $('#lr_refresh').on('click', function () {
  24. location.reload();
  25. });
  26. //打印报道流程单
  27. $('#lr_printlc').on('click', function () {
  28. var keyValue = $('#gridtable').jfGridValue('ID');
  29. if (learun.checkrow(keyValue)) {
  30. learun.layerForm({
  31. id: 'form',
  32. title: '打印报道流程单',
  33. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PrintSignFlow?Id=' + keyValue,
  34. width: 1200,
  35. height: 800,
  36. btn: null
  37. });
  38. }
  39. });
  40. // 新增
  41. $('#lr_add').on('click', function () {
  42. selectedRow = null;
  43. learun.layerForm({
  44. id: 'form',
  45. title: '新增',
  46. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/Form',
  47. width: 1200,
  48. height: 700,
  49. callBack: function (id) {
  50. return top[id].acceptClick(refreshGirdData);
  51. }
  52. });
  53. });
  54. // 编辑
  55. $('#lr_edit').on('click', function () {
  56. var keyValue = $('#gridtable').jfGridValue('ID');
  57. selectedRow = $('#gridtable').jfGridGet('rowdata');
  58. if (learun.checkrow(keyValue)) {
  59. learun.layerForm({
  60. id: 'form',
  61. title: '编辑',
  62. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/Form?keyValue=' + keyValue,
  63. width: 1200,
  64. height: 700,
  65. callBack: function (id) {
  66. return top[id].acceptClick(refreshGirdData);
  67. }
  68. });
  69. }
  70. });
  71. // 删除
  72. $('#lr_delete').on('click', function () {
  73. var keyValue = $('#gridtable').jfGridValue('ID');
  74. if (learun.checkrow(keyValue)) {
  75. learun.layerConfirm('是否确认删除该项!', function (res) {
  76. if (res) {
  77. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/DeleteForm', { keyValue: keyValue }, function () {
  78. });
  79. }
  80. });
  81. }
  82. });
  83. // 查看
  84. $('#lr_view').on('click', function () {
  85. var keyValue = $('#gridtable').jfGridValue('ID');
  86. selectedRow = $('#gridtable').jfGridGet('rowdata');
  87. if (learun.checkrow(keyValue)) {
  88. learun.layerForm({
  89. id: 'form',
  90. title: '查看',
  91. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/FormView?keyValue=' + keyValue,
  92. width: 1200,
  93. height: 700,
  94. btn: null
  95. });
  96. }
  97. });
  98. //  分配班级
  99. $('#lr_allocationClass').on('click', function () {
  100. learun.layerForm({
  101. id: 'form',
  102. title: "分配班级",
  103. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/AllocationClass',
  104. width: 1300,
  105. height: 800,
  106. btn: null
  107. });
  108. });
  109. //  分配宿舍
  110. $('#lr_newallocationDormitory').on('click', function () {
  111. learun.layerFormForPercent({
  112. id: 'form',
  113. title: "分配宿舍",
  114. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/AllocationDormitory',
  115. width: '95%',
  116. height: '95%',
  117. btn: null
  118. });
  119. });
  120. //  分配床位
  121. $('#lr_newallocationBed').on('click', function () {
  122. learun.layerFormForPercent({
  123. id: 'form',
  124. title: "分配床位",
  125. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/AllocationBed',
  126. width: '95%',
  127. height: '95%',
  128. btn: null
  129. });
  130. });
  131. //  导出学生宿舍
  132. $('#lr_exportBed').on('click', function () {
  133. learun.layerForm({
  134. id: 'ExportBedForm',
  135. title: '导出学生宿舍',
  136. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/ExportBedForm',
  137. width: 600,
  138. height: 400,
  139. btn: null
  140. });
  141. });
  142. //确认分配宿舍
  143. $('#lr_confirmDormitory').on('click', function () {
  144. learun.layerConfirm('是否确认已经分配的宿舍!', function (res) {
  145. if (res) {
  146. learun.loading(true, '分配中');
  147. learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/ConfirmDormitory', {}, function (val) {
  148. learun.alert.success('操作成功');
  149. learun.loading(false);
  150. });
  151. }
  152. });
  153. });
  154. // 生成学籍信息
  155. $('#lr_insertStuInfoBasic').on('click', function () {
  156. learun.layerConfirm('是否确认生成学籍信息!', function (res) {
  157. if (res) {
  158. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/ImportStuInfoBasic', {}, function () {
  159. refreshGirdData();
  160. });
  161. }
  162. });
  163. });
  164. },
  165. initGird: function () {
  166. $('#gridtable').lrAuthorizeJfGrid({
  167. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetPageList',
  168. headData: [
  169. { label: '考生号', name: 'ksh', width: 150, align: "left" },
  170. { label: '准考证号', name: 'zkzh', width: 150, align: "left" },
  171. { label: '学号', name: 'StuNo', width: 100, align: "left" },
  172. { label: '姓名', name: 'StuName', width: 100, align: "left" },
  173. {
  174. label: '是否完善信息', name: 'ID', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  175. learun.clientdata.getAsync('custmerData', {
  176. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DirectRelatives',
  177. key: row.ID,
  178. keyId: 'stuinfofreshid',
  179. callback: function (_data) {
  180. var a = _data['id'];
  181. if (a == undefined) {
  182. callback("<span class=\"label label-warning\">未完善</span>");
  183. } else {
  184. callback("<span class=\"label label-success\">已完善</span>");
  185. }
  186. }
  187. });
  188. }
  189. },
  190. {
  191. label: '是否生成学籍', name: 'IsInBasic', width: 100, align: "left", formatter: function (cellvalue) {
  192. return cellvalue == true ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-warning\">否</span>";
  193. }
  194. },
  195. {
  196. label: '系', name: 'DeptNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  197. learun.clientdata.getAsync('custmerData', {
  198. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  199. key: value,
  200. keyId: 'deptno',
  201. callback: function (_data) {
  202. callback(_data['deptname']);
  203. }
  204. });
  205. }
  206. },
  207. {
  208. label: '专业', name: 'MajorNo', width: 100, align: "left", 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: 'ClassNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  221. learun.clientdata.getAsync('custmerData', {
  222. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  223. key: value,
  224. keyId: 'classno',
  225. callback: function (_data) {
  226. callback(_data['classname']);
  227. }
  228. });
  229. }
  230. },
  231. {
  232. label: '性别', name: 'GenderNo', width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  233. learun.clientdata.getAsync('dataItem', {
  234. key: value,
  235. code: 'usersex',
  236. callback: function (_data) {
  237. callback(_data.text);
  238. }
  239. });
  240. }
  241. },
  242. { label: '身份证号', name: 'IdentityCardNo', width: 150, align: "left" },
  243. {
  244. label: '民族', name: 'NationalityNo', width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  245. learun.clientdata.getAsync('custmerData', {
  246. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdNationality',
  247. key: value,
  248. keyId: 'nationalityno',
  249. callback: function (_data) {
  250. callback(_data['nationality']);
  251. }
  252. });
  253. }
  254. },
  255. {
  256. label: '考生类别', name: 'FamilyOriginNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  257. learun.clientdata.getAsync('dataItem', {
  258. key: value,
  259. code: 'ExamineeCategory',
  260. callback: function (_data) {
  261. callback(_data.text);
  262. }
  263. });
  264. }
  265. },
  266. {
  267. label: '考生类型', name: 'TestStuSortNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  268. learun.clientdata.getAsync('dataItem', {
  269. key: value,
  270. code: 'ExamineeType',
  271. callback: function (_data) {
  272. callback(_data.text);
  273. }
  274. });
  275. }
  276. },
  277. {
  278. label: '科类', name: 'TestStuSubjectNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  279. learun.clientdata.getAsync('dataItem', {
  280. key: value,
  281. code: 'SubjectType',
  282. callback: function (_data) {
  283. callback(_data.text);
  284. }
  285. });
  286. }
  287. },
  288. { label: '高考总分', name: 'HighAmountScore', width: 100, align: "left" },
  289. { label: '第几志愿', name: 'WillNo', width: 80, align: "left" },
  290. {
  291. label: '录取专业', name: 'RecruitMajorNo', width: 100, align: "left",
  292. formatterAsync: function (callback, value, row, op, $cell) {
  293. learun.clientdata.getAsync('custmerData', {
  294. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  295. key: value,
  296. keyId: 'majorno',
  297. callback: function (_data) {
  298. callback(_data['majorname']);
  299. }
  300. });
  301. }
  302. },
  303. {
  304. label: '录取方式', name: 'MatriculateSort', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  305. learun.clientdata.getAsync('dataItem', {
  306. key: value,
  307. code: 'EnrollStyle',
  308. callback: function (_data) {
  309. callback(_data.text);
  310. }
  311. });
  312. }
  313. },
  314. { label: '语文', name: 'ChineseScore', width: 100, align: "left" },
  315. { label: '数学', name: 'MathScore', width: 100, align: "left" },
  316. { label: '英语', name: 'ForeignLangScore', width: 100, align: "left" },
  317. { label: '综合', name: 'ComprehensiveScore', width: 100, align: "left" },
  318. ],
  319. mainId: 'ID',
  320. isPage: true,
  321. sidx: 'StuNo',
  322. sord: 'desc'
  323. });
  324. page.search();
  325. },
  326. search: function (param) {
  327. param = param || {};
  328. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  329. }
  330. };
  331. refreshGirdData = function () {
  332. page.search();
  333. };
  334. page.init();
  335. }