NewStudentEnter.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. var mnu;
  2. var WindowID;
  3. $(function () {
  4. mnu = $.SystemGeneral.getUrlParam("MNU");
  5. WindowID = $.SystemGeneral.getUrlParam("WindowID");
  6. });
  7. $("body").keydown(function () {
  8. if (event.keyCode == "13") {//keyCode=13是回车键
  9. search(); //换成按钮的id即可
  10. }
  11. });
  12. function search() {
  13. var examineeNum = $("#SerchExamineeNum").val();
  14. //var idNumber = $("#SerchIDNumber").val();
  15. var userName = $("#SerchUserName").val();
  16. var verifyCode = $("input[name='VerifyCode']").val();
  17. if (examineeNum == null || examineeNum == "") {
  18. $.messager.alert("系统提示", "请输入考生号");
  19. return;
  20. }
  21. if (userName == null || userName == "") {
  22. $.messager.alert("系统提示", "请输入姓名");
  23. return;
  24. }
  25. if (verifyCode == null || verifyCode == "") {
  26. $.messager.alert("系统提示", "请输入验证码");
  27. return;
  28. }
  29. $.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/Account/NewStudentEnter', { examineeNum: examineeNum, verifyCode: verifyCode, userName: userName }, function (data) {
  30. if (data != null && data != "") {
  31. if (data == "错误") {
  32. $.messager.alert("系统提示", "验证码输入错误!");
  33. $("input[name='VerifyCode']").val("");
  34. $("#vcodeimg").click();
  35. return;
  36. }
  37. $("#massagediv").show();
  38. $("#searchdiv").hide();
  39. $("#examineeNum").val(data.ExamineeNum);
  40. $("#userName").val(data.Name);
  41. $("#yearID").val(data.YearID);
  42. $("#standardCode").val(data.StandardCode);
  43. $("#standardName").val(data.StandardName);
  44. $("#educationName").val(data.EducationName);
  45. $("#learningformName").val(data.LearningformName);
  46. $("#learnSystem").val(data.LearnSystem);
  47. } else {
  48. $("#searchdiv").hide();
  49. $("#NotResult").show();
  50. }
  51. });
  52. }
  53. function print() {
  54. var examineeNum = $("#SerchExamineeNum").val();
  55. var userName = $("#SerchUserName").val();
  56. var redirectTo = CMS_SystemConfig.VirtualDirectoryPath + '/Account/Report';
  57. //window.open(redirectTo, "_blank");
  58. $.popupTopWindow('录取通知书打印', redirectTo, 710, 540, null, {
  59. examineeNum: examineeNum,
  60. userName: userName
  61. });
  62. }
  63. function goback() {
  64. $("#NotResult").hide();
  65. $("#massagediv").hide();
  66. $("#searchdiv").show();
  67. $("input[name='VerifyCode']").val("");
  68. $("#vcodeimg").click();
  69. }