SpecialityScoreByFinal.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. var isFirstLoadGradeYear = true;
  2. var isFirstLoadClassmajor = true;
  3. var isPageLoad = true;
  4. function SpecialityScoreSumTable() {
  5. var collegeID = $("#CollegeDropdown").combobox("getValue");
  6. var standardID = $("#DictionaryStandard").combogridX("getValue");
  7. var classmajorID = $("#ClassmajorDropdown").combogridX("getValue");
  8. var yearID = $("#DictionarySchoolyear").combobox("getValue");
  9. var schoolyearNumID = $("#DictionarySchoolyearNum").combobox("getValue");
  10. var schoolcodeID = $("#DictionarySchoolcode").combobox("getValue");
  11. //var InSchoolStatus = $("#InSchoolStatusDictionaryDropDown").combobox("getValue");
  12. var courseTypeIDs = document.getElementsByName("CourseTypeID");
  13. var Credit = $("#IsCredit").is(':checked')
  14. var courseTypeIDList = "";
  15. for (i = 0; i < courseTypeIDs.length; i++) {
  16. if (courseTypeIDs[i].checked) {
  17. var courseType = courseTypeIDs[i].value;
  18. courseTypeIDList = courseTypeIDList + courseType + ',';
  19. }
  20. }
  21. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/SpecialityScoreSum/SpecialityScoreByScoreList', { collegeID: collegeID, standardID: standardID, classmajorID: classmajorID, yearID: yearID, schoolyearNumID: schoolyearNumID, schoolcodeID: schoolcodeID, CourseTypeID: courseTypeIDList },
  22. function (data) {
  23. $("#SpecialityScoreSumtable").find("tr.row").remove();
  24. if (data) {
  25. var d = [];
  26. var firstRow = [];
  27. var secondRow = [];
  28. var secondRow1 = [];
  29. var secondRow2 = [];
  30. var secondRow3 = [];
  31. var thirdRow = [];
  32. var forthRow = [];
  33. var detailRow = [];
  34. //生成第一、二、三行表头,学年和学期和课程
  35. //第一行(左上角)开头
  36. var containerWidth = $("#SpecialityScoreSumtable").width() - 210;
  37. firstRow.push("<div id='divConner' style='width: 208px; height: 292px; float: left;'><table cellpadding='0' cellspacing='0' style='width:208px'>");
  38. firstRow.push("<tr style='background-color:#f0f0f0;'>");
  39. firstRow.push("<td colspan='3' style='width: 206px; height: 20px;'>学期</td>");
  40. firstRow.push("</tr>");
  41. firstRow.push("<tr style='background-color:#f0f0f0'>");
  42. firstRow.push("<td width='28' height='228'>次序</td>");
  43. firstRow.push("<td width='114'>学号</td>");
  44. firstRow.push("<td width='60'>姓名</td>");
  45. firstRow.push("</tr>");
  46. firstRow.push("<tr style='background-color:#f0f0f0'>");
  47. firstRow.push("<td width='28' height='20'></td>");
  48. firstRow.push("<td width='114'></td>");
  49. firstRow.push("<td width='60'></td>");
  50. firstRow.push("</tr>");
  51. firstRow.push("<tr style='background-color:#f0f0f0'>");
  52. firstRow.push("<td width='28' height='20'></td>");
  53. firstRow.push("<td width='114'></td>");
  54. firstRow.push("<td width='60'></td>");
  55. firstRow.push("</tr>");
  56. firstRow.push("</table></div>");
  57. //第二行(右上角)开头(表头后补,因为长度未知,高度定292)
  58. secondRow.push("<tr style='background-color:#f0f0f0'>");
  59. secondRow1.push("<tr style='background-color:#f0f0f0'>");
  60. secondRow2.push("<tr style='background-color:#f0f0f0'>");
  61. secondRow3.push("<tr style='background-color:#f0f0f0'>");
  62. if (Credit) {
  63. secondRow.push("<td colspan='10' style='height: 20px; width: 398px;'>学分统计</td>");
  64. secondRow1.push("<td width='38'>总学分</td>");
  65. secondRow1.push("<td width='38'>必修学分</td>");
  66. secondRow1.push("<td width='38'>限选学分</td>");
  67. secondRow1.push("<td width='38'>通识教育</td>");
  68. secondRow1.push("<td width='38'>任选学分</td>");
  69. secondRow1.push("<td width='38'>方向选修</td>");
  70. secondRow1.push("<td width='38'>公共选修</td>");
  71. secondRow1.push("<td width='38'>实践环节</td>");
  72. secondRow1.push("<td width='38'>俱乐部(含校本)</td>");
  73. secondRow1.push("<td width='38'>平均分</td>");
  74. secondRow2.push("<td width='38'></td>");
  75. secondRow2.push("<td width='38'></td>");
  76. secondRow2.push("<td width='38'></td>");
  77. secondRow2.push("<td width='38'></td>");
  78. secondRow2.push("<td width='38'></td>");
  79. secondRow2.push("<td width='38'></td>");
  80. secondRow2.push("<td width='38'></td>");
  81. secondRow2.push("<td width='38'></td>");
  82. secondRow2.push("<td width='38'></td>");
  83. secondRow2.push("<td width='38'></td>");
  84. secondRow3.push("<td width='38'></td>");
  85. secondRow3.push("<td width='38'></td>");
  86. secondRow3.push("<td width='38'></td>");
  87. secondRow3.push("<td width='38'></td>");
  88. secondRow3.push("<td width='38'></td>");
  89. secondRow3.push("<td width='38'></td>");
  90. secondRow3.push("<td width='38'></td>");
  91. secondRow3.push("<td width='38'></td>");
  92. secondRow3.push("<td width='38'></td>");
  93. secondRow3.push("<td width='38'></td>");
  94. }
  95. //第三行(左下角)开头
  96. thirdRow.push("<div id='divStudents' style='width: 208px; height: 300px; overflow-y: hidden; overflow-x: scroll; float: left;'><table border='0' cellpadding='0' cellspacing='0' style='width:208px'>");
  97. //第四行(右下角)(表头后补,因为长度未知)
  98. for (var i = 0; i < data.StudentList.length; i++) {
  99. var student = data.StudentList[i];
  100. var credit = data.SpecialityCreditView[i];
  101. var tmpThirdRow = [];
  102. tmpThirdRow.push("<tr>");
  103. tmpThirdRow.push("<td width='28'>" + (i + 1).toString() + "</td>");
  104. tmpThirdRow.push("<td width='114'>" + student.LoginID + "</td>");
  105. tmpThirdRow.push("<td width='60'>" + student.UserName + "</td>");
  106. tmpThirdRow.push("</tr>");
  107. thirdRow.push(tmpThirdRow.join(''));
  108. forthRow[i] = [];
  109. forthRow[i].push("<tr>");
  110. if (Credit && credit != null) {
  111. forthRow[i].push("<td width='38'>" + credit.TotalCredit + "</td>");
  112. forthRow[i].push("<td width='38'>" + credit.RequiredCredit + "</td>");
  113. forthRow[i].push("<td width='38'>" + credit.OptionalCourseCredit + "</td>");
  114. forthRow[i].push("<td width='38'>" + credit.GeneralEducationCredit + "</td>");
  115. forthRow[i].push("<td width='38'>" + credit.FreeSelectionCourseCredit + "</td>");
  116. forthRow[i].push("<td width='38'>" + credit.ElectiveCredit + "</td>");
  117. forthRow[i].push("<td width='38'>" + credit.ElectivePublicCredit + "</td>");
  118. forthRow[i].push("<td width='38'>" + credit.PractiseNotCredit + "</td>");
  119. forthRow[i].push("<td width='38'>" + credit.ClubWithSchoolbasedCredit + "</td>");
  120. forthRow[i].push("<td width='38'>" + credit.AvgScore + "</td>");
  121. }
  122. else if (Credit && credit == null) {
  123. forthRow[i].push("<td width='38'>0</td>");
  124. forthRow[i].push("<td width='38'>0</td>");
  125. forthRow[i].push("<td width='38'>0</td>");
  126. forthRow[i].push("<td width='38'>0</td>");
  127. forthRow[i].push("<td width='38'>0</td>");
  128. forthRow[i].push("<td width='38'>0</td>");
  129. forthRow[i].push("<td width='38'>0</td>");
  130. forthRow[i].push("<td width='38'>0</td>");
  131. forthRow[i].push("<td width='38'>0</td>");
  132. forthRow[i].push("<td width='38'>0</td>");
  133. }
  134. }
  135. thirdRow.push("</table></div>");
  136. var totalWidth = 208;
  137. if (Credit) {
  138. totalWidth += 400;
  139. }
  140. //前三行明细
  141. for (var i = 0; i < data.SchoolyearNums.length; i++) {
  142. var schoolyearWidth = data.SchoolyearNums[i].CoursematerialNum * 30;
  143. totalWidth += schoolyearWidth + 2;
  144. var schoolyearNum = data.SchoolyearNums[i];
  145. for (var j = 0; j < schoolyearNum.SchoolCodeView.length; j++) {
  146. var schoolcode = schoolyearNum.SchoolCodeView[j];
  147. var schoolcodeWidth = schoolcode.CoursematerialList.length * 30;
  148. secondRow.push("<td height='20' width='" + (schoolcodeWidth - 2).toString() + "' colspan='" + schoolcode.CoursematerialList.length + "'>" + schoolcode.Title + "</td>");
  149. for (var k = 0; k < schoolcode.CoursematerialList.length; k++) {
  150. var coursematerial = schoolcode.CoursematerialList[k];
  151. if (coursematerial.Title.length <= 12) {
  152. secondRow1.push("<td width='28' height='228' style='word-break: break-all;' title='" + coursematerial.Title + "'>" + coursematerial.Title.split('').join('<br/>') + "</td>");
  153. } else {
  154. var str = coursematerial.Title.substring(0, 12) + "...";
  155. secondRow1.push("<td width='28' height='228' style='word-break: break-all;' title='" + coursematerial.Title + "'>" + str.split('').join('<br/>') + "</td>");
  156. }
  157. secondRow2.push("<td width='28' height='20' style='word-break: break-all;'>" + coursematerial.Tag + "</td>");
  158. secondRow3.push("<td width='28' height='20' style='word-break: break-all;'>" + coursematerial.Credit + "</td>");
  159. for (var l = 0; l < coursematerial.ScoreList.length; l++) {
  160. var score = coursematerial.ScoreList[l];
  161. var index = -1;
  162. for (var m = 0; m < data.StudentList.length; m++) {
  163. if (data.StudentList[m].UserID == score.UserID) {
  164. index = m;
  165. }
  166. }
  167. if (index < 0) continue;
  168. if (score.Score != null && score.Score != "") {
  169. if (score.Score >= 60)
  170. forthRow[index].push("<td width='28' style='word-break: break-all;'>" + score.Score + "</td>");
  171. else
  172. forthRow[index].push("<td width='28' style='color:red;word-break: break-all;'>" + score.Score + "</td>");
  173. }
  174. else if (score.Score == 0) {
  175. forthRow[index].push("<td width='28' style='color:red;word-break: break-all;'>" + score.Score + "</td>");
  176. }
  177. else {
  178. forthRow[index].push("<td width='28' style='color:red;word-break: break-all;'>&nbsp;</td>");
  179. }
  180. }
  181. }
  182. }
  183. }
  184. secondRow.push("</tr>");
  185. secondRow1.push("</tr>");
  186. secondRow2.push("</tr>");
  187. secondRow3.push("</tr>");
  188. //扣除滚动条宽度
  189. containerWidth -= 16;
  190. d.push(firstRow.join(""));
  191. d.push("<div id='divLabels' style='overflow-x: hidden; overflow-y: scroll; width: " + containerWidth.toString() + "px; float: left;'><table cellpadding='0' cellspacing='0' style='width:" + totalWidth.toString() + "px;'>");
  192. d.push(secondRow.join(""));
  193. d.push(secondRow1.join(""));
  194. d.push(secondRow2.join(""));
  195. d.push(secondRow3.join(""));
  196. d.push("</table></div>");
  197. d.push(thirdRow.join(""));
  198. d.push("<div id='divScore' style='height: 300px; overflow-x: scroll; overflow-y: scroll;width: " + containerWidth.toString() + "px; float: left;'><table border='0' cellpadding='0' cellspacing='0' style='width:" + totalWidth.toString() + "px;'>");
  199. for (var i = 0; i < data.StudentList.length; i++) {
  200. d.push(forthRow[i].join(""));
  201. d.push("</tr>");
  202. }
  203. d.push("</table></div>");
  204. // totalWidth = totalWidth + 16;
  205. // d.push("<div style='height: 300px; overflow-x: auto; overflow-y: auto;width: " + totalWidth.toString() + "px;'><table cellpadding='0' cellspacing='0'>");
  206. // // for (var i = 0; i < data.StudentList.length; i++) {
  207. // // d.push(forthRow[i].join(""));
  208. // // d.push("</tr>");
  209. // // }
  210. // d.push("</table></div>");
  211. $("#SpecialityScoreSumtable").html(d.join(""));
  212. resizeGrids();
  213. $("#divScore").scroll(scoreOnScroll);
  214. } else {
  215. $.messager.alert("系统提示", "对不起,未找到数据!");
  216. }
  217. });
  218. }
  219. function resizeGrids() {
  220. var scoreList = $("#divScore table tr");
  221. var studentsList = $("#divStudents table tr");
  222. var connerDiv = $("#divConner");
  223. var studentsDiv = $("#divStudents");
  224. var labelsDiv = $("#divLabels");
  225. var scoreDiv = $("#divScore");
  226. var scoreTable = $("#divScore table");
  227. var studentsTable = $("#divStudents table");
  228. var connerFirstRow = $("#divConner table tr:eq(0) td");
  229. var labelsFirstRow = $("#divLabels table tr:eq(0) td");
  230. var isIE = navigator.userAgent.indexOf("compatible") > -1 && navigator.userAgent.indexOf("MSIE") > -1 && navigator.userAgent.indexOf("Opera") <= -1;
  231. var labelsFirstRowHeight = labelsFirstRow.height();
  232. if (isIE) {
  233. labelsFirstRowHeight += 2;
  234. }
  235. connerFirstRow.height(labelsFirstRowHeight);
  236. connerDiv.height(labelsDiv.height());
  237. labelsDiv.height(labelsDiv.height());
  238. // if (isIE) {
  239. // studentsDiv.css("margin-top", (labelsFirstRowHeight - 16) + "px");
  240. // } else {
  241. // studentsDiv.css("margin-top", (labelsFirstRowHeight - 18) + "px");
  242. // }
  243. //studentsTable.height(scoreTable.height());
  244. //scoreTable.height(studentsTable.height());
  245. for (var i = 0; i < scoreList.length; i++) {
  246. // var studentRowOffset = $(studentsList[i]).find("td:eq(0)").offset();
  247. // var scoreRowOffset = $(scoreList[i]).find("td:eq(0)").offset();
  248. // $(studentsList[i]).find("td:eq(0)").offset({
  249. // top: scoreRowOffset.top,
  250. // left: studentRowOffset.left
  251. // });
  252. if (!isIE) {
  253. $(studentsList[i]).find("td").height($(scoreList[i]).find("td:eq(0)").height());
  254. $(scoreList[i]).find("td:eq(0)").height($(studentsList[i]).find("td:eq(0)").height());
  255. $(studentsList[i]).height($(scoreList[i]).height());
  256. $(scoreList[i]).height($(studentsList[i]).height());
  257. } else {
  258. $(studentsList[i]).find("td:eq(0)").height($(scoreList[i]).find("td:eq(0)").height());
  259. //$(scoreList[i]).find("td:eq(0)").height($(studentsList[i]).find("td:eq(0)").height());
  260. $(studentsList[i]).height($(scoreList[i]).height());
  261. //$(scoreList[i]).height($(studentsList[i]).height());
  262. var studentsListOffset = $(studentsList[i]).offset();
  263. var scoreListOffset = $(scoreList[i]).offset();
  264. if (studentsListOffset.top > scoreListOffset.top) {
  265. $(scoreList[i]).find("td:eq(0)").css("padding-top", (1 + studentsListOffset.top - scoreListOffset.top) + "px");
  266. } else if (studentsListOffset.top < scoreListOffset.top) {
  267. $(studentsList[i]).find("td:eq(0)").css("padding-top", (1 + scoreListOffset.top - studentsListOffset.top) + "px");
  268. }
  269. }
  270. }
  271. resizeDiv();
  272. }
  273. function scoreOnScroll() {
  274. var scoreDiv = $("#divScore");
  275. var labelsDiv = $("#divLabels");
  276. var studentsDiv = $("#divStudents");
  277. studentsDiv.scrollTop(scoreDiv.scrollTop());
  278. labelsDiv.scrollLeft(scoreDiv.scrollLeft());
  279. }
  280. function switchPanel() {
  281. var showDivs = $("#formQuery div");
  282. if (showDivs.css("display") == "none") {
  283. showDivs.show();
  284. $("#divDownIcon").show();
  285. $("#divUpIcon").hide();
  286. } else {
  287. showDivs.hide();
  288. $("#divDownIcon").hide();
  289. $("#divUpIcon").show();
  290. }
  291. resizeDiv();
  292. }
  293. function resizeDiv() {
  294. var scoreDiv = $("#divScore");
  295. var labelsDiv = $("#divLabels");
  296. var studentsDiv = $("#divStudents");
  297. if (labelsDiv.length > 0) {
  298. var contentHeight = $(window).height() - $("#SpecialityScoreSumtable").offset().top - labelsDiv.height() - 2;
  299. scoreDiv.height(contentHeight);
  300. studentsDiv.height(contentHeight);
  301. }
  302. }
  303. //个人成绩报表(松山、工大、科大等)
  304. function StudentScore_Report() {
  305. var classmajorID = $("#ClassmajorDropdown").combogridX("getValue");
  306. if (classmajorID == "") {
  307. $.messager.alert("系统提示", "请选择班级!");
  308. return;
  309. }
  310. var InSchoolStatus = $("#InSchoolStatusDictionaryDropDown").combobox("getValue");
  311. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/SpecialityScoreSum/StudentScoreReport?MNU=' + mnu
  312. + "&ClassmajorID=" + classmajorID + "&InSchoolStatus=" + InSchoolStatus;
  313. $.popupTopWindow('学生成绩表', redirectTo, 1100, 550, null, null);
  314. }
  315. //个人成绩报表(广体等)
  316. function StudentScore_NewReport() {
  317. var courseTypeIDs = document.getElementsByName("CourseTypeID");
  318. var courseTypeIDList = "";
  319. for (i = 0; i < courseTypeIDs.length; i++) {
  320. if (courseTypeIDs[i].checked) {
  321. var courseType = courseTypeIDs[i].value;
  322. courseTypeIDList = courseTypeIDList + courseType + ',';
  323. }
  324. }
  325. courseTypeIDList = courseTypeIDList.substring(0, courseTypeIDList.length - 1);
  326. var collegeID = $("#CollegeDropdown").combobox("getValue");
  327. var standardID = $("#DictionaryStandard").combogridX("getValue");
  328. var yearID = $("#DictionarySchoolyear").combobox("getValue");
  329. var schoolyearNumID = $("#DictionarySchoolyearNum").combobox("getValue");
  330. var schoolcodeID = $("#DictionarySchoolcode").combobox("getValue");
  331. var classmajorID = $("#ClassmajorDropdown").combogridX("getValue");
  332. // if (classmajorID == "") {
  333. // $.messager.alert("系统提示", "请选择班级!");
  334. // return;
  335. // }
  336. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/SpecialityScoreSum/StudentScoreNewReport?MNU=' + mnu
  337. + "&CollegeID=" + collegeID + "&StandardID=" + standardID + "&YearID=" + yearID
  338. + "&SchoolyearNumID=" + schoolyearNumID + "&SchoolcodeID=" + schoolcodeID + "&ClassmajorID=" + classmajorID + "&CourseTypeID=" + courseTypeIDList;
  339. $.popupTopWindow('成绩报表', redirectTo, 1000, 550, null, null);
  340. }
  341. function QueryCollegeDropdownList(data) {
  342. if (((data.length && data.length > 0) || data)
  343. && $("#DictionarySchoolyear").length > 0 && $.data($("#DictionarySchoolyear")[0], "combobox")) {
  344. var url = CMS_SystemConfig.VirtualDirectoryPath + "/Common/SchoolYearDropDown?bindType=2";
  345. $("#DictionarySchoolyear").combobox("reload", url);
  346. }
  347. }
  348. function QueryYearDropdownList(data) {
  349. if (((data.length && data.length > 0) || data)
  350. && $("#DictionaryStandard").length > 0 && $.data($("#DictionaryStandard")[0], "combogridX")) {
  351. reloadStandard();
  352. }
  353. }
  354. function reloadStandard() {
  355. var url = CMS_SystemConfig.VirtualDirectoryPath + "/Facultymajor/BindStandardDropDownList?bindType=0";
  356. var collegeID = $("#CollegeDropdown").combobox("getValue");
  357. if (collegeID != nonSelect) url += "&collegeID=" + collegeID;
  358. $("#DictionaryStandard").combobox("reload", url);
  359. }
  360. function QueryStandardComboGrid(data) {
  361. if (((data.length && data.length > 0) || data)
  362. && $("#ClassmajorDropdown").length > 0 && $.data($("#ClassmajorDropdown")[0], "combobox")) {
  363. reloadClassmajor();
  364. }
  365. }
  366. //function reloadClassmajor() {
  367. // var url = CMS_SystemConfig.VirtualDirectoryPath + "/Classmajor/BindDropdownList?bindType=2";
  368. // var college = $("#CollegeDropdown").combobox("getValue");
  369. // var year = $("#DictionarySchoolyear").combobox("getValue");
  370. // var standard = $("#DictionaryStandard").combobox("getValue");
  371. // if (college != nonSelect) url += "&collegeID=" + college;
  372. // if (year != nonSelect) url += "&schoolYear=" + year;
  373. // if (standard != nonSelect) url += "&standardID=" + standard;
  374. // $("#ClassmajorDropdown").combobox("clear");
  375. // $("#ClassmajorDropdown").combobox("reload", url);
  376. //}
  377. //function QueryClassmajorDropdownList(data) {
  378. // if (((data.length && data.length > 0) || data)) {
  379. // if (isFirstLoadClassmajor) {
  380. // isFirstLoadClassmajor = false;
  381. // } else if (!isPageLoad) {
  382. // if (data.length > 0) {
  383. // $("#ClassmajorDropdown").combobox("setValue", data[0].Value);
  384. // } else {
  385. // $("#ClassmajorDropdown").combobox("clear");
  386. // }
  387. // }
  388. // }
  389. //}
  390. function reload() {
  391. // var collegeID = $("#CollegeDropdown").combobox("getValue");
  392. var classmajorID = $("#ClassmajorDropdown").combogridX("getValue");
  393. // var specialtyID = $("#DictionaryStandard").combogridX("getValue");
  394. // var schoolyear = $("#DictionarySchoolyear").combobox("getValue");
  395. // if (collegeID == "") {
  396. // $.messager.alert("系统提示", "请选择" + EMIS_CollegeLabel + "!");
  397. // return;
  398. // }
  399. // if (schoolyear == "-1") {
  400. // $.messager.alert("系统提示", "请选择年级!");
  401. // return;
  402. // }
  403. // if (specialtyID == "") {
  404. // $.messager.alert("系统提示", "请选择专业!");
  405. // return;
  406. // }
  407. //if (classmajorID == "") {
  408. // $.messager.alert("系统提示", "请选择班级!");
  409. // return;
  410. //}
  411. SpecialityScoreSumTable();
  412. }
  413. function getExcel() {
  414. var collegeID = $("#CollegeDropdown").combobox("getValue");
  415. var classmajorID = $("#ClassmajorDropdown").combogridX("getValue");
  416. var specialtyID = $("#DictionaryStandard").combogridX("getValue");
  417. var schoolyear = $("#DictionarySchoolyear").combobox("getValue");
  418. var courseTypeIDs = document.getElementsByName("CourseTypeID");
  419. var Credit = $("#IsCredit").is(':checked')
  420. var courseTypeIDList = "";
  421. for (i = 0; i < courseTypeIDs.length; i++) {
  422. if (courseTypeIDs[i].checked) {
  423. var courseType = courseTypeIDs[i].value;
  424. courseTypeIDList = courseTypeIDList + courseType + ',';
  425. }
  426. }
  427. if (collegeID == "") {
  428. $.messager.alert("系统提示", "请选择" + EMIS_CollegeLabel + "!");
  429. return;
  430. }
  431. if (schoolyear == "-1") {
  432. $.messager.alert("系统提示", "请选择年级!");
  433. return;
  434. }
  435. if (specialtyID == "") {
  436. $.messager.alert("系统提示", "请选择专业!");
  437. return;
  438. }
  439. document.getElementById("formQuery").action = "GTExcel?CourseTypeIDs=" + courseTypeIDList + "&IsCredit=" + Credit;
  440. document.getElementById("formQuery").submit();
  441. }
  442. function queryStandard(data) {
  443. queryClass();
  444. }
  445. function queryClass() {
  446. var jsonString = "";
  447. var parameterString = "";
  448. //var campusID = $("#CampusDropdown").combogridX("getValue");
  449. var collegeID = $("#CollegeDropdown").combobox("getValue");
  450. var standardID = $("#DictionaryStandard").combogridX("getValue");
  451. var schoolyearID = $("#DictionarySchoolyear").combobox("getValue");
  452. if (schoolyearID != nonSelect) parameterString += "DictionaryGrade|*|" + schoolyearID + "|@|";
  453. //if (campusID != nonSelect) parameterString += "CampusDropdown|*|" + campusID + "|@|";
  454. if (collegeID != nonSelect) parameterString += "CollegeDropdown|*|" + collegeID + "|@|";
  455. if (standardID != nonSelect) parameterString += "DictionaryStandard|*|" + standardID + "|@|";
  456. if (parameterString != "") {
  457. jsonString = "({'QueryParamsDatas':'" + parameterString + "'})";
  458. $("#ClassmajorDropdown").combogridX("reload", eval(jsonString));
  459. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  460. } else {
  461. $("#ClassmajorDropdown").combogridX("reload");
  462. $("#DictionaryStandard").combogridX("reload", eval(jsonString));
  463. }
  464. //reload();
  465. }