notice.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. app.controller('StdNoticeEmsCtrl', [ '$rootScope', '$scope', '$http', '$location', '$q', '$timeout', '$sce', function($rootScope, $scope, $http, $location, $q, $timeout, $sce) {
  2. $scope.changeName = function($event) {
  3. if ($event.target.value == '' || $event.target.value.length < 3)
  4. return;
  5. // if ($event.keyCode == 13) {
  6. // $scope.queryJudge($.trim($event.target.value));
  7. // }
  8. }
  9. $scope.changeCertId = function($event) {
  10. if ($event.target.value == '' || $event.target.value.length < 3)
  11. return;
  12. // if ($event.keyCode == 13) {
  13. // $scope.queryJudge($.trim($event.target.value));
  14. // }
  15. }
  16. $scope.login = function() {
  17. var std_name = document.getElementById('std_name').value;
  18. var cert_id = document.getElementById('cert_id').value;
  19. if (!std_name) {
  20. alert('请输入姓名!');
  21. return;
  22. }
  23. if (!cert_id) {
  24. alert('请输入身份证!');
  25. return;
  26. }
  27. $scope.queryNotice($.trim(std_name),$.trim(cert_id));
  28. }
  29. $scope.queryNotice = function(std_name,cert_id) {
  30. $rootScope.ajaxRequest({
  31. url : '../std/notice/info.htm',
  32. data : {
  33. std_name : std_name,
  34. cert_id : cert_id
  35. }
  36. }, function(response) {
  37. $scope.stdNotice = response.map.StdNotice;
  38. })
  39. }
  40. $timeout(function() {
  41. $('#login_name').focus();
  42. // $scope.launchFullscreen();
  43. }, 100);
  44. } ]);