Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

554 wiersze
28 KiB

  1. var refreshGirdData;
  2. var StuId;
  3. var bootstrap = function ($, learun) {
  4. "use strict";
  5. var page = {
  6. init: function () {
  7. page.initGird();
  8. page.bind();
  9. },
  10. bind: function () {
  11. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  12. page.search(queryJson);
  13. }, 220, 400);
  14. $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
  15. $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
  16. $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
  17. // 刷新
  18. $('#lr_refresh').on('click', function () {
  19. location.reload();
  20. });
  21. $("#lr_photo").on('click', function () {
  22. StuId = $("#gridtable").jfGridValue('StuId');
  23. if (learun.checkrow(StuId)) {
  24. takeImg();
  25. }
  26. });
  27. // 新增
  28. $('#lr_add').on('click', function () {
  29. learun.layerForm({
  30. id: 'form',
  31. title: '新增',
  32. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Form',
  33. width: 800,
  34. height: 600,
  35. callBack: function (id) {
  36. return top[id].acceptClick(refreshGirdData);
  37. }
  38. });
  39. });
  40. // 编辑
  41. $('#lr_edit').on('click', function () {
  42. var keyValue = $('#gridtable').jfGridValue('StuId');
  43. if (learun.checkrow(keyValue)) {
  44. if (keyValue.indexOf(',') != -1) {
  45. learun.alert.warning("只能选择一条记录进行编辑!");
  46. return;
  47. }
  48. var CheckMark = $('#gridtable').jfGridValue('CheckMark');
  49. if (CheckMark === "1") {
  50. learun.alert.warning("当前项目已审核不能编辑!");
  51. return;
  52. }
  53. learun.layerForm({
  54. id: 'form',
  55. title: '编辑',
  56. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Form?keyValue=' + keyValue,
  57. width: 800,
  58. height: 600,
  59. callBack: function (id) {
  60. return top[id].acceptClick(refreshGirdData);
  61. }
  62. });
  63. }
  64. });
  65. // 删除
  66. $('#lr_delete').on('click', function () {
  67. var keyValue = $('#gridtable').jfGridValue('StuId');
  68. if (learun.checkrow(keyValue)) {
  69. var CheckMark = $('#gridtable').jfGridValue('CheckMark');
  70. if (CheckMark.indexOf('1') != -1) {
  71. learun.alert.warning("选中记录中包含已审核项目,已审核不能删除!");
  72. return;
  73. }
  74. learun.layerConfirm('是否确认删除该项!', function (res) {
  75. if (res) {
  76. learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/DeleteForm', { keyValue: keyValue }, function () {
  77. refreshGirdData();
  78. });
  79. }
  80. });
  81. }
  82. });
  83. //查看
  84. $('#lr_view').on('click', function () {
  85. var keyValue = $('#gridtable').jfGridValue('StuId');
  86. if (learun.checkrow(keyValue)) {
  87. if (keyValue.indexOf(',') != -1) {
  88. learun.alert.warning("只能选择一条记录进行查看!");
  89. return;
  90. }
  91. learun.layerForm({
  92. id: 'form',
  93. title: '编辑',
  94. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/FormView?keyValue=' + keyValue,
  95. width: 1162,
  96. height: 600,
  97. btn: null
  98. });
  99. }
  100. });
  101. // 打印
  102. $('#lr_print').on('click', function () {
  103. $('#gridtable').jqprintTable();
  104. });
  105. //审核
  106. $('#check').on('click', function () {
  107. var keyValue = $('#gridtable').jfGridValue('StuId');
  108. if (learun.checkrow(keyValue)) {
  109. var CheckMark = $('#gridtable').jfGridValue('CheckMark');
  110. if (CheckMark.indexOf('1') != -1) {
  111. learun.alert.warning("选中记录中包含已审核项目!");
  112. return;
  113. }
  114. learun.layerConfirm('是否确认审核该项?', function (res) {
  115. if (res) {
  116. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Check', { keyValue: keyValue }, function () {
  117. refreshGirdData();
  118. });
  119. }
  120. });
  121. }
  122. });
  123. //去审
  124. $('#uncheck').on('click', function () {
  125. var keyValue = $('#gridtable').jfGridValue('StuId');
  126. if (learun.checkrow(keyValue)) {
  127. var CheckMark = $('#gridtable').jfGridValue('CheckMark');
  128. var CheckMarkArr = CheckMark.split(',');
  129. if ($.inArray('0', CheckMarkArr) != -1 || $.inArray('', CheckMarkArr) != -1) {
  130. learun.alert.warning("选中记录中包含未审核项目!");
  131. return;
  132. }
  133. learun.layerConfirm('是否确认取消审核该项?', function (res) {
  134. if (res) {
  135. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/UnCheck', { keyValue: keyValue }, function () {
  136. refreshGirdData();
  137. });
  138. }
  139. });
  140. }
  141. });
  142. //审核全部
  143. $('#checkall').on('click', function () {
  144. learun.layerConfirm('是否确认全部审核?', function (res) {
  145. if (res) {
  146. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/CheckAll', {}, function () {
  147. refreshGirdData();
  148. });
  149. }
  150. });
  151. });
  152. //生成帐号
  153. $('#lr_generate').on('click', function () {
  154. learun.layerConfirm('是否确认生成帐号?', function (res) {
  155. if (res) {
  156. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Generate', {}, function () {
  157. refreshGirdData();
  158. });
  159. }
  160. });
  161. });
  162. $('#lr_update').on('click', function () {
  163. learun.layerConfirm('是否确认更新帐号?', function (res) {
  164. if (res) {
  165. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/UpdateAccount', {}, function () {
  166. refreshGirdData();
  167. })
  168. }
  169. })
  170. })
  171. //查看异动
  172. $("#lr_searchChange").on('click', function () {
  173. var keyValue = $('#gridtable').jfGridValue('StuId');
  174. if (learun.checkrow(keyValue)) {
  175. if (keyValue.indexOf(',') != -1) {
  176. learun.alert.warning("只能选择一条记录!");
  177. return;
  178. }
  179. learun.layerForm({
  180. id: 'form',
  181. title: '异动记录',
  182. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic_ChangeLog/Index?keyValue=' + keyValue,
  183. width: 800,
  184. height: 600,
  185. btn: null
  186. });
  187. }
  188. })
  189. //同步照片
  190. $('#lr_synPhoto').on('click', function () {
  191. learun.loading(true, '正在同步,请稍后')
  192. learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SynPhoto', {}, function (res) {
  193. learun.loading(false)
  194. })
  195. })
  196. //打印简历表
  197. $('#lr_printInfo').on('click', function () {
  198. var keyValue = $('#gridtable').jfGridValue('StuId');
  199. if (learun.checkrow(keyValue)) {
  200. if (keyValue.indexOf(',') != -1) {
  201. learun.alert.warning("只能选择一条记录进行查看!");
  202. return;
  203. }
  204. learun.layerForm({
  205. id: 'print',
  206. title: '学生简历表',
  207. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/Print?keyValue=' + keyValue,
  208. width: 1100,
  209. height: 800,
  210. btn: null
  211. });
  212. }
  213. });
  214. // 同步系部
  215. $('#lr_syn').on('click', function () {
  216. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SyncDept', function () {
  217. refreshGirdData();
  218. });
  219. });
  220. // 同步专业
  221. $('#lr_synmajor').on('click', function () {
  222. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/SyncMajor', function () {
  223. refreshGirdData();
  224. });
  225. });
  226. },
  227. // 初始化列表
  228. initGird: function () {
  229. $('#gridtable').jfGrid({
  230. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  231. headData: [
  232. { label: "学号", name: "StuNo", width: 100, align: "left" },
  233. { label: "学籍号", name: "StuCode", width: 100, align: "left" },
  234. { label: "考生号", name: "ksh", width: 100, align: "left" },
  235. { label: "通知书号", name: "NoticeNo", width: 100, align: "left" },
  236. { label: "姓名", name: "StuName", width: 100, align: "left" },
  237. {
  238. label: "性别", name: "GenderNo", width: 80, align: "left",
  239. formatter: function (cellvalue) {
  240. return cellvalue == true ? "男" : "女";
  241. }
  242. },
  243. { label: "出生日期", name: "Birthday", width: 100, align: "left" },
  244. { label: "身份证号", name: "IdentityCardNo", width: 100, align: "left" },
  245. {
  246. label: "民族", name: "NationalityNo", width: 100, align: "left",
  247. formatterAsync: function (callback, value, row, op, $cell) {
  248. learun.clientdata.getAsync('dataItem', {
  249. key: value,
  250. code: 'National',
  251. callback: function (_data) {
  252. callback(_data.text);
  253. }
  254. });
  255. }
  256. },
  257. {
  258. label: "政治面貌", name: "PartyFaceNo", width: 100, align: "left",
  259. formatterAsync: function (callback, value, row, op, $cell) {
  260. learun.clientdata.getAsync('dataItem', {
  261. key: value,
  262. code: 'BCdPartyFace',
  263. callback: function (_data) {
  264. callback(_data.text);
  265. }
  266. });
  267. }
  268. },
  269. {
  270. label: "系所", name: "DeptNo", width: 100, align: "left",
  271. formatterAsync: function (callback, value, row, op, $cell) {
  272. learun.clientdata.getAsync('custmerData', {
  273. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  274. key: value,
  275. keyId: 'deptno',
  276. callback: function (_data) {
  277. callback(_data['deptname']);
  278. }
  279. });
  280. }
  281. },
  282. {
  283. label: "专业", name: "MajorNo", width: 100, align: "left",
  284. formatterAsync: function (callback, value, row, op, $cell) {
  285. learun.clientdata.getAsync('custmerData', {
  286. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  287. key: value,
  288. keyId: 'majorno',
  289. callback: function (_data) {
  290. callback(_data['majorname']);
  291. }
  292. });
  293. }
  294. },
  295. {
  296. label: "班级", name: "ClassNo", width: 100, align: "left",
  297. formatterAsync: function (callback, value, row, op, $cell) {
  298. learun.clientdata.getAsync('custmerData', {
  299. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  300. key: value,
  301. keyId: 'classno',
  302. callback: function (_data) {
  303. callback(_data['classname']);
  304. }
  305. });
  306. }
  307. },
  308. { label: "年级", name: "Grade", width: 100, align: "left" },
  309. {
  310. label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  311. learun.clientdata.getAsync('dataItem', {
  312. key: value,
  313. code: 'EduSystem',
  314. callback: function (_data) {
  315. callback(_data.text);
  316. }
  317. });
  318. }
  319. },
  320. {
  321. label: "学习形式", name: "StudyModality", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  322. learun.clientdata.getAsync('dataItem', {
  323. key: value,
  324. code: 'StudyModality',
  325. callback: function (_data) {
  326. callback(_data.text);
  327. }
  328. });
  329. }
  330. },
  331. { label: "报到日期", name: "RegisterDate", width: 100, align: "left" },
  332. { label: "入学年月", name: "EntranceDate", width: 100, align: "left" },
  333. //{ label: "余额", name: "Balance", width: 100, align: "left" },
  334. { label: "通讯地址", name: "MailAddress", width: 100, align: "left" },
  335. { label: "联系电话", name: "mobile", width: 100, align: "left" },
  336. { label: "户口所在地", name: "FatherUnit", width: 100, align: "left" },
  337. { label: "档案所在地", name: "MatherUnit", width: 100, align: "left" },
  338. { label: "户籍所在地", name: "Domicile", width: 100, align: "left" },
  339. {
  340. label: "户口分类", name: "ResidenceNo", width: 100, align: "left",
  341. formatterAsync: function (callback, value, row, op, $cell) {
  342. learun.clientdata.getAsync('dataItem', {
  343. key: value,
  344. code: 'ResidenceNo',
  345. callback: function (_data) {
  346. callback(_data.text);
  347. }
  348. });
  349. }
  350. },
  351. {
  352. label: "籍贯 (省)", name: "F_ProvinceId", width: 100, align: "left",
  353. formatterAsync: function (callback, value, row, op, $cell) {
  354. learun.clientdata.getAsync('custmerData', {
  355. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_PROVINCE',
  356. key: value,
  357. keyId: 'pcode',
  358. callback: function (_data) {
  359. callback(_data['pname']);
  360. }
  361. });
  362. }
  363. },
  364. {
  365. label: "籍贯 (市)", name: "F_CityId", width: 100, align: "left",
  366. formatterAsync: function (callback, value, row, op, $cell) {
  367. learun.clientdata.getAsync('custmerData', {
  368. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_CITY',
  369. key: value,
  370. keyId: 'ccode',
  371. callback: function (_data) {
  372. callback(_data['cname']);
  373. }
  374. });
  375. }
  376. },
  377. {
  378. label: "籍贯 (县)", name: "F_CountyId", width: 100, align: "left",
  379. formatterAsync: function (callback, value, row, op, $cell) {
  380. learun.clientdata.getAsync('custmerData', {
  381. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'DIC_AREA',
  382. key: value,
  383. keyId: 'acode',
  384. callback: function (_data) {
  385. callback(_data['aname']);
  386. }
  387. });
  388. }
  389. },
  390. //{ label: "E-mail", name: "E-mail", width: 100, align: "center" },
  391. {
  392. label: "开户银行", name: "DepositBank", width: 100, align: "center",
  393. formatterAsync: function (callback, value, row, op, $cell) {
  394. learun.clientdata.getAsync('dataItem', {
  395. key: value,
  396. code: 'DepositBank',
  397. callback: function (_data) {
  398. callback(_data.text);
  399. }
  400. });
  401. }
  402. },
  403. { label: "开户卡账号", name: "BankCard", width: 100, align: "center" },
  404. { label: "开户银行位置", name: "BankLocation", width: 100, align: "center" },
  405. { label: "邮政编码", name: "PostalCode", width: 100, align: "center" },
  406. {
  407. label: "是否单亲", name: "IsSingle", width: 100, align: "left",
  408. formatter: function (value, row) {
  409. if (value == true) {
  410. return '是';
  411. }
  412. else if (value == false) {
  413. return '否';
  414. }
  415. }
  416. },
  417. { label: "父亲姓名", name: "FatherName", width: 100, align: "center" },
  418. { label: "身份证号", name: "OneIdCardNo", width: 100, align: "center" },
  419. { label: "父亲电话", name: "FatherPhone", width: 100, align: "center" },
  420. { label: "户籍地址", name: "OneDomicile", width: 100, align: "center" },
  421. { label: "现住址", name: "OneAddress", width: 100, align: "center" },
  422. { label: "母亲姓名", name: "MatherName", width: 100, align: "center" },
  423. { label: "身份证号", name: "TwoIdCardNo", width: 100, align: "center" },
  424. { label: "母亲电话", name: "MatherPhone", width: 100, align: "center" },
  425. { label: "户籍地址", name: "TwoDomicile", width: 100, align: "center" },
  426. { label: "现住址", name: "TwoAddress", width: 100, align: "center" },
  427. { label: "监护人姓名", name: "GuardianName", width: 100, align: "center" },
  428. { label: "身份证号", name: "GuardianIdCardNo", width: 100, align: "center" },
  429. { label: "监护人电话", name: "GuardianPhone", width: 100, align: "center" },
  430. { label: "户籍地址", name: "GuardianDomicile", width: 100, align: "center" },
  431. { label: "现住址", name: "GuardianAddress", width: 100, align: "center" },
  432. {
  433. label: "家庭出身", name: "FamilyOriginNo", width: 100, align: "center",
  434. formatterAsync: function (callback, value, row, op, $cell) {
  435. learun.clientdata.getAsync('dataItem', {
  436. key: value,
  437. code: 'BCdFamilyOrigin',
  438. callback: function (_data) {
  439. callback(_data.text);
  440. }
  441. });
  442. }
  443. },
  444. {
  445. label: "港澳台侨", name: "OverseasChineseNo", width: 100, align: "center",
  446. formatterAsync: function (callback, value, row, op, $cell) {
  447. learun.clientdata.getAsync('dataItem', {
  448. key: value,
  449. code: 'BCdOverseasChinese',
  450. callback: function (_data) {
  451. callback(_data.text);
  452. }
  453. });
  454. }
  455. },
  456. {
  457. label: "本专科", name: "GraduateNo", width: 100, align: "center",
  458. formatterAsync: function (callback, value, row, op, $cell) {
  459. learun.clientdata.getAsync('dataItem', {
  460. key: value,
  461. code: 'CollegeType',
  462. callback: function (_data) {
  463. callback(_data.text);
  464. }
  465. });
  466. }
  467. },
  468. { label: "毕业证号", name: "DiplomaNo", width: 100, align: "center" },
  469. {
  470. label: "毕业日期", name: "GraduateYear", width: 100, align: "center",
  471. formatter: function (cellvalue) {
  472. return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  473. }
  474. },
  475. { label: "毕业证书备注", name: "DiplomaRemark", width: 100, align: "center" },
  476. //{
  477. // label: "入党时间", name: "BankCard", width: 100, align: "center",
  478. // formatter: function (cellvalue) {
  479. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  480. // }
  481. //},
  482. //{
  483. // label: "入团时间", name: "BankCard", width: 100, align: "center",
  484. // formatter: function (cellvalue) {
  485. // return learun.formatDate(cellvalue, 'yyyy-MM-dd');
  486. // }
  487. //},
  488. { label: "校内地址", name: "InSchoolAddress", width: 100, align: "center" },
  489. { label: "校内电话", name: "InSchoolTelephone", width: 100, align: "center" },
  490. { label: "QQ", name: "QQ", width: 100, align: "center" },
  491. { label: "特长", name: "GoodAt", width: 100, align: "center" },
  492. { label: "备注", name: "Remark", width: 200, align: "center" },
  493. {
  494. label: "异动状态", name: "MoveStatus", width: 80, align: "center",
  495. formatter: function (cellvalue) {
  496. return cellvalue == "1" ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
  497. }
  498. },
  499. {
  500. label: "异动类型", name: "MoveType", width: 100, align: "left",
  501. formatterAsync: function (callback, value, row, op, $cell) {
  502. learun.clientdata.getAsync('dataItem', {
  503. key: value,
  504. code: 'StuChangeType',
  505. callback: function (_data) {
  506. callback(_data.text);
  507. }
  508. });
  509. }
  510. },
  511. {
  512. label: "审核状态", name: "CheckMark", width: 80, align: "center",
  513. formatter: function (cellvalue) {
  514. return cellvalue == "1" ? "<span class=\"label label-success\">已审核</span>" : "<span class=\"label label-danger\">未审核</span>";
  515. }
  516. }
  517. ],
  518. mainId: 'StuId',
  519. isPage: true,
  520. isMultiselect: true,
  521. //onSelectRow: function (rowdata) {
  522. // if (rowdata.CheckMark == "1") {
  523. // $("#check").hide();
  524. // $("#uncheck").show();
  525. // $("#lr_edit").hide();
  526. // $("#lr_delete").hide();
  527. // } else {
  528. // $("#uncheck").hide();
  529. // $("#check").show();
  530. // $("#lr_edit").show();
  531. // $("#lr_delete").show();
  532. // }
  533. //}
  534. });
  535. page.search();
  536. },
  537. search: function (param) {
  538. param = param || {};
  539. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  540. }
  541. };
  542. refreshGirdData = function () {
  543. page.search();
  544. };
  545. page.init();
  546. }