app.controller('ZxStdReexamInfoCtrl', [ '$rootScope', '$scope', '$stateParams', '$timeout', function($rootScope, $scope, $stateParams, $timeout) { $scope.curStep = 'appointment'; $scope.getAspect = function() { $rootScope.ajaxRequest({ url: '../conf/agent/aspect/find.htm', data: { aspect_id : $stateParams.aspect_id } }, function(response) { $scope.aspect = response.entity; }); } $scope.getAppointmentArray = function() { $rootScope.ajaxRequest({ url: '../conf/agent/aspect/appointment/date.htm', data: { aspect_id: $stateParams.aspect_id } }, function(respponse) { $scope.appointmentArray = respponse.array; $scope.curStep = 'appointment'; }); } $scope.goStep = function(step) { $scope.curStep = step; } /************************ * 选择预约日期 */ $scope.chooseAppDate = function(app) { if(app.appointment_capacity-app.appointment_num == 0) { $.alert('该日期预约已满,请选择其他空余的日期!'); return; } $rootScope.ajaxRequest({ url: '../conf/agent/aspect/appointment/time.htm', data: app }, function(response) { $scope.appTimeArray = response.array; $scope.curStep = "appointment_time"; }); } /************************ * 选择预约时间 */ $scope.chooseTime = function(time) { if(time.appointment_capacity - time.appointment_num == 0) { $.alert('该时段预约已满,请选择其他空余的时段!'); return; } $.confirm('
预约招考方向:【' + $scope.aspect.aspect_name + "】 |
预约日期:【" + time.appointment_date + "】 |
预约时段:【" + time.start_time + "~" + time.end_time + "】 |