您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

318 行
16 KiB

  1. var refreshGirdData;
  2. var bootstrap = function ($, learun) {
  3. "use strict";
  4. var page = {
  5. init: function () {
  6. page.initGird();
  7. page.bind();
  8. },
  9. bind: function () {
  10. $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
  11. page.search(queryJson);
  12. }, 290, 400);
  13. $('#DeptNo').lrselect({
  14. allowSearch: true,
  15. value: "deptno",
  16. text: "deptname",
  17. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
  18. select: function (item) {
  19. if (item) {
  20. $('#MajorNo').lrselectRefresh({
  21. allowSearch: true,
  22. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  23. param: { strWhere: "DeptNo='" + item.deptno + "' AND CheckMark=1" }
  24. });
  25. } else {
  26. $('#MajorNo').lrselectRefresh({
  27. allowSearch: true,
  28. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  29. param: { strWhere: "1=1 AND CheckMark=1" }
  30. });
  31. }
  32. }
  33. });
  34. $('#MajorNo').lrselect({
  35. allowSearch: true,
  36. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo',
  37. value: "majorno",
  38. text: "majorname",
  39. param: { strWhere: "1=1 AND CheckMark=1" },
  40. select: function (item) {
  41. var Grades = $("#Grade").lrselectGet();
  42. if (Grades != null && Grades != "" && Grades != "undefined") {
  43. if (item) {
  44. $('#ClassNo').lrselectRefresh({
  45. allowSearch: true,
  46. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  47. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 AND Grade='" + Grades + "' order by classno desc" }
  48. });
  49. } else {
  50. $('#ClassNo').lrselectRefresh({
  51. allowSearch: true,
  52. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  53. param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
  54. });
  55. }
  56. } else {
  57. if (item) {
  58. $('#ClassNo').lrselectRefresh({
  59. allowSearch: true,
  60. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  61. param: { strWhere: "majorno='" + item.majorno + "' AND CheckMark=1 order by classno desc" }
  62. });
  63. } else {
  64. $('#ClassNo').lrselectRefresh({
  65. allowSearch: true,
  66. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  67. param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
  68. });
  69. }
  70. }
  71. }
  72. });
  73. $('#Grade').lrselect({
  74. url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
  75. value: "value",
  76. text: "text",
  77. select: function (item) {
  78. var MajorNos = $("#MajorNo").lrselectGet();
  79. if (MajorNos != null && MajorNos != "" && MajorNos != "undefined") {
  80. if (item) {
  81. $('#ClassNo').lrselectRefresh({
  82. allowSearch: true,
  83. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  84. param: {
  85. strWhere: "majorno='" + MajorNos + "' AND CheckMark=1 AND Grade='" + item.text + "' order by classno desc"
  86. }
  87. });
  88. } else {
  89. $('#ClassNo').lrselectRefresh({
  90. allowSearch: true,
  91. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  92. param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
  93. });
  94. }
  95. } else {
  96. if (item) {
  97. $('#ClassNo').lrselectRefresh({
  98. allowSearch: true,
  99. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  100. param: {
  101. strWhere: "CheckMark=1 AND Grade='" + item.text + "' order by classno desc"
  102. }
  103. });
  104. } else {
  105. $('#ClassNo').lrselectRefresh({
  106. allowSearch: true,
  107. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  108. param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
  109. });
  110. }
  111. }
  112. }
  113. });
  114. $('#ClassNo').lrselect({
  115. allowSearch: true,
  116. url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
  117. param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" },
  118. value: "classno",
  119. text: "classname"
  120. });
  121. $('#FinishSchoolMark').lrselect({
  122. data: [{ text: "已毕业", value: "2" }, { text: "准许毕业", value: "1" }, { text: "待准许", value: "0" }],
  123. text: "text",
  124. value: "value"
  125. })
  126. // 刷新
  127. $('#lr_refresh').on('click', function () {
  128. location.reload();
  129. });
  130. //档案关系转出
  131. $('#lr_filetransfer').on('click', function () {
  132. var keyValue = $('#gridtable').jfGridValue('StuId');
  133. var FileTransferStatus = $('#gridtable').jfGridValue('FileTransferStatus');
  134. if (learun.checkrow(keyValue)) {
  135. if (FileTransferStatus.indexOf('1') != -1) {
  136. return learun.alert.warning("选中项包括已转出数据!");
  137. }
  138. learun.layerConfirm('是否确认转出档案关系!', function (res) {
  139. if (res) {
  140. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFileTransfer', { keyValue: keyValue, status: '1', fort: '0' }, function () {
  141. refreshGirdData();
  142. });
  143. }
  144. });
  145. }
  146. })
  147. //取消档案关系转出
  148. $('#lr_cancelfiletransfer').on('click', function () {
  149. var keyValue = $('#gridtable').jfGridValue('StuId');
  150. var FileTransferStatus = $('#gridtable').jfGridValue('FileTransferStatus');
  151. if (learun.checkrow(keyValue)) {
  152. for (var i = 0; i < FileTransferStatus.split(',').length; i++) {
  153. if (FileTransferStatus.split(',')[i] != 1) {
  154. return learun.alert.warning("选中项包括未转出数据!");
  155. }
  156. }
  157. learun.layerConfirm('是否确认取消转出档案关系!', function (res) {
  158. if (res) {
  159. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFileTransfer', { keyValue: keyValue, status: '0', fort: '0' }, function () {
  160. refreshGirdData();
  161. });
  162. }
  163. });
  164. }
  165. })
  166. //组织关系转出
  167. $('#lr_Tissue').on('click', function () {
  168. var keyValue = $('#gridtable').jfGridValue('StuId');
  169. var FileTransferStatus = $('#gridtable').jfGridValue('TissueStatus');
  170. if (learun.checkrow(keyValue)) {
  171. if (FileTransferStatus.indexOf('1') != -1) {
  172. return learun.alert.warning("选中项包括已转出数据!");
  173. }
  174. learun.layerConfirm('是否确认转出组织关系!', function (res) {
  175. if (res) {
  176. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFileTransfer', { keyValue: keyValue, status: '1', fort: '1' }, function () {
  177. refreshGirdData();
  178. });
  179. }
  180. });
  181. }
  182. })
  183. //取消组织关系转出
  184. $('#lr_cancelTissue').on('click', function () {
  185. var keyValue = $('#gridtable').jfGridValue('StuId');
  186. var FileTransferStatus = $('#gridtable').jfGridValue('TissueStatus');
  187. if (learun.checkrow(keyValue)) {
  188. for (var i = 0; i < FileTransferStatus.split(',').length; i++) {
  189. if (FileTransferStatus.split(',')[i] != 1) {
  190. return learun.alert.warning("选中项包括未转出数据!");
  191. }
  192. }
  193. learun.layerConfirm('是否确认取消转出组织关系!', function (res) {
  194. if (res) {
  195. learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/IsFileTransfer', { keyValue: keyValue, status: '0', fort: '1' }, function () {
  196. refreshGirdData();
  197. });
  198. }
  199. });
  200. }
  201. })
  202. },
  203. // 初始化列表
  204. initGird: function () {
  205. $('#gridtable').jfGrid({
  206. url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetPageList',
  207. headData: [
  208. { label: "学号", name: "StuNo", width: 130, align: "left" },
  209. { label: "姓名", name: "StuName", width: 100, align: "left" },
  210. {
  211. label: "性别", name: "GenderNo", width: 50, align: "left",
  212. formatter: function (cellvalue) {
  213. return cellvalue == true ? "男" : "女";
  214. }
  215. },
  216. {
  217. label: "系所", name: "DeptNo", width: 100, align: "left",
  218. formatterAsync: function (callback, value, row, op, $cell) {
  219. learun.clientdata.getAsync('custmerData', {
  220. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
  221. key: value,
  222. keyId: 'deptno',
  223. callback: function (_data) {
  224. callback(_data['deptname']);
  225. }
  226. });
  227. }
  228. },
  229. {
  230. label: "专业", name: "MajorNo", width: 100, align: "left",
  231. formatterAsync: function (callback, value, row, op, $cell) {
  232. learun.clientdata.getAsync('custmerData', {
  233. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
  234. key: value,
  235. keyId: 'majorno',
  236. callback: function (_data) {
  237. callback(_data['majorname']);
  238. }
  239. });
  240. }
  241. },
  242. {
  243. label: "班级", name: "ClassNo", width: 100, align: "left",
  244. formatterAsync: function (callback, value, row, op, $cell) {
  245. learun.clientdata.getAsync('custmerData', {
  246. url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
  247. key: value,
  248. keyId: 'classno',
  249. callback: function (_data) {
  250. callback(_data['classname']);
  251. }
  252. });
  253. }
  254. },
  255. { label: "年级", name: "Grade", width: 50, align: "left" },
  256. {
  257. label: "学制", name: "EduSystem", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
  258. learun.clientdata.getAsync('dataItem', {
  259. key: value,
  260. code: 'EduSystem',
  261. callback: function (_data) {
  262. callback(_data.text);
  263. }
  264. });
  265. }
  266. },
  267. { label: "毕业证书号", name: "DiplomaNo", width: 100, align: "left" },
  268. {
  269. label: '毕业状态', name: 'FinishSchoolMark', width: 100, align: "left", formatter: function (val) {
  270. if (val == '0') {
  271. return '待准许';
  272. } else if (val == "1") {
  273. return '准许毕业';
  274. } else if (val == '2') {
  275. return '已毕业';
  276. } else {
  277. return '待准许';
  278. }
  279. }
  280. },
  281. { label: "毕业时间", name: "FinishSchoolDate", width: 130, align: "left" },
  282. {
  283. label: "档案转出状态", name: "FileTransferStatus", width: 100, align: "left",
  284. formatter: function (cellvalue) {
  285. return cellvalue == "1" ? "已转出" : "未转出"
  286. }
  287. },
  288. { label: "档案转出时间", name: "FileTransferDate", width: 130, align: "left" },
  289. {
  290. label: "组织关系转出状态", name: "TissueStatus", width: 110, align: "left",
  291. formatter: function (cellvalue) {
  292. return cellvalue == "1" ? "已转出" : "未转出"
  293. }
  294. },
  295. { label: "组织关系转出时间", name: "TissueDate", width: 130, align: "left" },
  296. ],
  297. mainId: 'StuId',
  298. isPage: true,
  299. rows: 100,
  300. isMultiselect: true,
  301. });
  302. page.search();
  303. },
  304. search: function (param) {
  305. param = param || {};
  306. $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
  307. }
  308. };
  309. refreshGirdData = function () {
  310. page.search();
  311. };
  312. page.init();
  313. }