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

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  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. var Grade = $('#Grade').val();
  21. page.search({ keyword: keyword, Grade: Grade });
  22. });
  23. // 刷新
  24. $('#lr_refresh').on('click', function () {
  25. location.reload();
  26. });
  27. //打印报道流程单
  28. $('#lr_printlc').on('click', function () {
  29. var keyValue = $('#gridtable').jfGridValue('ID');
  30. if (learun.checkrow(keyValue)) {
  31. learun.layerForm({
  32. id: 'form',
  33. title: '打印报道流程单',
  34. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/PrintSignFlow?Id=' + keyValue,
  35. width: 1200,
  36. height: 800,
  37. btn: null
  38. });
  39. }
  40. });
  41. // 新增
  42. $('#lr_add').on('click', function () {
  43. selectedRow = null;
  44. learun.layerForm({
  45. id: 'form',
  46. title: '新增',
  47. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/Form',
  48. width: 1200,
  49. height: 700,
  50. callBack: function (id) {
  51. return top[id].acceptClick(refreshGirdData);
  52. }
  53. });
  54. });
  55. // 编辑
  56. $('#lr_edit').on('click', function () {
  57. var keyValue = $('#gridtable').jfGridValue('ID');
  58. selectedRow = $('#gridtable').jfGridGet('rowdata');
  59. if (learun.checkrow(keyValue)) {
  60. learun.layerForm({
  61. id: 'form',
  62. title: '编辑',
  63. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/Form?keyValue=' + keyValue,
  64. width: 1200,
  65. height: 700,
  66. callBack: function (id) {
  67. return top[id].acceptClick(refreshGirdData);
  68. }
  69. });
  70. }
  71. });
  72. // 删除
  73. $('#lr_delete').on('click', function () {
  74. var keyValue = $('#gridtable').jfGridValue('ID');
  75. if (learun.checkrow(keyValue)) {
  76. learun.layerConfirm('是否确认删除该项!', function (res) {
  77. if (res) {
  78. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/DeleteForm', { keyValue: keyValue }, function () {
  79. });
  80. }
  81. });
  82. }
  83. });
  84. // 查看
  85. $('#lr_view').on('click', function () {
  86. var keyValue = $('#gridtable').jfGridValue('ID');
  87. selectedRow = $('#gridtable').jfGridGet('rowdata');
  88. if (learun.checkrow(keyValue)) {
  89. learun.layerForm({
  90. id: 'form',
  91. title: '查看',
  92. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/FormView?keyValue=' + keyValue,
  93. width: 1200,
  94. height: 700,
  95. btn: null
  96. });
  97. }
  98. });
  99. //  分配班级
  100. $('#lr_allocationClass').on('click', function () {
  101. learun.layerForm({
  102. id: 'form',
  103. title: "分配班级",
  104. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/AllocationClass',
  105. width: 1300,
  106. height: 800,
  107. btn: null
  108. });
  109. });
  110. //  分配宿舍
  111. $('#lr_newallocationDormitory').on('click', function () {
  112. learun.layerFormForPercent({
  113. id: 'form',
  114. title: "分配宿舍",
  115. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/AllocationDormitory',
  116. width: '95%',
  117. height: '95%',
  118. btn: null
  119. });
  120. });
  121. //  分配床位
  122. $('#lr_newallocationBed').on('click', function () {
  123. learun.layerFormForPercent({
  124. id: 'form',
  125. title: "分配床位",
  126. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/AllocationBed',
  127. width: '95%',
  128. height: '95%',
  129. btn: null
  130. });
  131. });
  132. //  导出学生宿舍
  133. $('#lr_exportBed').on('click', function () {
  134. learun.layerForm({
  135. id: 'ExportBedForm',
  136. title: '导出学生宿舍',
  137. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/ExportBedForm',
  138. width: 600,
  139. height: 400,
  140. btn: null
  141. });
  142. });
  143. //确认分配宿舍
  144. $('#lr_confirmDormitory').on('click', function () {
  145. learun.layerConfirm('是否确认已经分配的宿舍!', function (res) {
  146. if (res) {
  147. learun.loading(true, '分配中');
  148. learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/ConfirmDormitory', {}, function (val) {
  149. learun.alert.success('操作成功');
  150. learun.loading(false);
  151. });
  152. }
  153. });
  154. });
  155. // 生成学籍信息
  156. $('#lr_insertStuInfoBasic').on('click', function () {
  157. learun.layerConfirm('是否确认生成学籍信息!', function (res) {
  158. if (res) {
  159. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/ImportStuInfoBasic', {}, function () {
  160. refreshGirdData();
  161. });
  162. }
  163. });
  164. });
  165. },
  166. initGird: function () {
  167. $('#gridtable').lrAuthorizeJfGrid({
  168. url: top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/GetPageList',
  169. headData: [
  170. { label: '考生号', name: 'ksh', width: 150, align: "left" },
  171. { label: '准考证号', name: 'zkzh', width: 150, align: "left" },
  172. { label: '学号', name: 'StuNo', width: 100, align: "left" },
  173. { label: '年级', name: 'Grade', width: 100, align: "left" },
  174. { label: '姓名', name: 'StuName', width: 100, align: "left" },
  175. {
  176. label: '是否完善信息', name: 'ID', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  177. learun.clientdata.getAsync('custmerData', {
  178. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DirectRelatives',
  179. key: row.ID,
  180. keyId: 'stuinfofreshid',
  181. callback: function (_data) {
  182. var a = _data['id'];
  183. if (a == undefined) {
  184. callback("<span class=\"label label-warning\">未完善</span>");
  185. } else {
  186. callback("<span class=\"label label-success\">已完善</span>");
  187. }
  188. }
  189. });
  190. }
  191. },
  192. {
  193. label: '是否生成学籍', name: 'IsInBasic', width: 100, align: "left", formatter: function (cellvalue) {
  194. return cellvalue == true ? "<span class=\"label label-success\">是</span>" : "<span class=\"label label-warning\">否</span>";
  195. }
  196. },
  197. {
  198. label: '院系', name: 'DeptNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  199. learun.clientdata.getAsync('custmerData', {
  200. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  201. key: value,
  202. keyId: 'deptno',
  203. callback: function (_data) {
  204. callback(_data['deptname']);
  205. }
  206. });
  207. }
  208. },
  209. {
  210. label: '专业', name: 'MajorNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  211. learun.clientdata.getAsync('custmerData', {
  212. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  213. key: value,
  214. keyId: 'majorno',
  215. callback: function (_data) {
  216. callback(_data['majorname']);
  217. }
  218. });
  219. }
  220. },
  221. {
  222. label: '班级', name: 'ClassNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  223. learun.clientdata.getAsync('custmerData', {
  224. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  225. key: value,
  226. keyId: 'classno',
  227. callback: function (_data) {
  228. callback(_data['classname']);
  229. }
  230. });
  231. }
  232. },
  233. {
  234. label: '性别', name: 'GenderNo', width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  235. learun.clientdata.getAsync('dataItem', {
  236. key: value,
  237. code: 'usersex',
  238. callback: function (_data) {
  239. callback(_data.text);
  240. }
  241. });
  242. }
  243. },
  244. { label: '身份证号', name: 'IdentityCardNo', width: 150, align: "left" },
  245. {
  246. label: '民族', name: 'NationalityNo', width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  247. learun.clientdata.getAsync('dataItem', {
  248. key: value,
  249. code: 'National',
  250. callback: function (_data) {
  251. callback(_data.text);
  252. }
  253. });
  254. }
  255. },
  256. {
  257. label: '考生类别', name: 'FamilyOriginNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  258. learun.clientdata.getAsync('dataItem', {
  259. key: value,
  260. code: 'ExamineeCategory',
  261. callback: function (_data) {
  262. callback(_data.text);
  263. }
  264. });
  265. }
  266. },
  267. {
  268. label: '考生类型', name: 'TestStuSortNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  269. learun.clientdata.getAsync('dataItem', {
  270. key: value,
  271. code: 'ExamineeType',
  272. callback: function (_data) {
  273. callback(_data.text);
  274. }
  275. });
  276. }
  277. },
  278. {
  279. label: '省份', name: 'Province', width: 100, align: "left",
  280. formatterAsync: function (callback, value, row, op, $cell) {
  281. learun.clientdata.getAsync('custmerData', {
  282. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE',
  283. key: value,
  284. keyId: 'pcode',
  285. callback: function (_data) {
  286. callback(_data['pname']);
  287. }
  288. });
  289. }
  290. },
  291. {
  292. label: '地市', name: 'City', width: 150, align: "left",
  293. formatterAsync: function (callback, value, row, op, $cell) {
  294. learun.clientdata.getAsync('custmerData', {
  295. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY',
  296. key: value,
  297. keyId: 'ccode',
  298. callback: function (_data) {
  299. callback(_data['cname']);
  300. }
  301. });
  302. }
  303. },
  304. { label: '毕业学校', name: 'SchoolTag', width: 100, align: "left" },
  305. {
  306. label: '毕业生类型', name: 'GraduateType', width: 100, align: "left",
  307. formatterAsync: function (callback, value, row, op, $cell) {
  308. learun.clientdata.getAsync('dataItem', {
  309. key: value,
  310. code: 'GraduateType',
  311. callback: function (_data) {
  312. callback(_data.text);
  313. }
  314. });
  315. }
  316. },
  317. {
  318. label: '科类', name: 'TestStuSubjectNo', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  319. learun.clientdata.getAsync('dataItem', {
  320. key: value,
  321. code: 'SubjectType',
  322. callback: function (_data) {
  323. callback(_data.text);
  324. }
  325. });
  326. }
  327. },
  328. { label: '高考总分', name: 'HighAmountScore', width: 100, align: "left" },
  329. { label: '第几志愿', name: 'WillNo', width: 80, align: "left" },
  330. {
  331. label: '录取专业', name: 'RecruitMajorNo', width: 100, align: "left",
  332. formatterAsync: function (callback, value, row, op, $cell) {
  333. learun.clientdata.getAsync('custmerData', {
  334. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  335. key: value,
  336. keyId: 'majorno',
  337. callback: function (_data) {
  338. callback(_data['majorname']);
  339. }
  340. });
  341. }
  342. },
  343. {
  344. label: '录取方式', name: 'MatriculateSort', width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  345. learun.clientdata.getAsync('dataItem', {
  346. key: value,
  347. code: 'EnrollStyle',
  348. callback: function (_data) {
  349. callback(_data.text);
  350. }
  351. });
  352. }
  353. },
  354. { label: '语文', name: 'ChineseScore', width: 100, align: "left" },
  355. { label: '数学', name: 'MathScore', width: 100, align: "left" },
  356. { label: '英语', name: 'ForeignLangScore', width: 100, align: "left" },
  357. { label: '综合', name: 'ComprehensiveScore', width: 100, align: "left" },
  358. {
  359. label: '开户银行', name: 'DepositBank', width: 200, align: "left",
  360. formatterAsync: function (callback, value, row, op, $cell) {
  361. learun.clientdata.getAsync('dataItem', {
  362. key: value,
  363. code: 'DepositBank',
  364. callback: function (_data) {
  365. callback(_data.text);
  366. }
  367. });
  368. }
  369. },
  370. { label: '银行卡账号', name: 'BankCard', width: 150, align: "left" },
  371. { label: '开户银行位置', name: 'BankLocation', width: 300, align: "left" },
  372. { label: '开户行号', name: 'BankNo', width: 150, align: "center" },
  373. ],
  374. mainId: 'ID',
  375. isPage: true,
  376. sidx: 'StuNo',
  377. sord: 'desc'
  378. });
  379. page.search();
  380. },
  381. search: function (param) {
  382. param = param || {};
  383. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  384. }
  385. };
  386. refreshGirdData = function () {
  387. page.search();
  388. };
  389. page.init();
  390. }