12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- app.controller('StdBindingCtrl', [ '$rootScope', '$scope', function($rootScope, $scope) {
- $scope.curStep = 'info';
- $scope.StdReg = {};
- $scope.goStep = function(step) {
- $scope.curStep = step;
- }
- $scope.stdBinding = function() {
- $scope.StdReg.cert_id = $.trim($scope.StdReg.cert_id);
- $scope.StdReg.std_code = $.trim($scope.StdReg.std_code);
- $scope.StdReg.std_name = $.trim($scope.StdReg.std_name);
- if ($scope.StdReg.cert_id == undefined || $scope.StdReg.cert_id.length == 0) {
- $.alert('请输入证件号码!');
- return false;
- }
- if ($scope.StdReg.std_code == undefined || $scope.StdReg.std_code.length == 0) {
- $.alert('请输入新生学号!');
- return false;
- }
- if ($scope.StdReg.std_name == undefined || $scope.StdReg.std_name.length == 0) {
- $.alert('请输入新生姓名!');
- return false;
- }
- $rootScope.ajaxRequest({
- url : '../enrol/std/aspect/ym.htm',
- data : $scope.StdReg
- }, function(response) {
- if (response.map) {
- $scope.std = response.map;
- $scope.curStep = 'success';
- } else {
- $.alert('未找到新生信息,请检查输入信息');
- }
- });
- }
- $scope.stdConfirm = function() {
- $.confirm("确定要进行报到操作吗?", "报到确认", function() {
- $rootScope.ajaxRequest({
- url : '../enrol/std/aspect/confirm.htm',
- data : $scope.StdReg
- }, function(response) {
- $scope.std.confirm_time = new Date();
- });
- }, function() {
- // 取消操作
- });
- }
- $scope.exit = function() {
- WeixinJSBridge.call('closeWindow');
- }
- } ])
|