123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- app.controller('StdInfoCtrl', [ '$rootScope', '$scope', '$http', '$timeout', '$state', '$stateParams', function($rootScope, $scope, $http, $timeout, $state, $stateParams) {
- $scope.StdReg = angular.copy($rootScope.ArtStdReg);
-
- //生源地
- $rootScope.ajaxRequest({
- url : '../enrol/reg/province/list.htm'
- }, function(response) {
- $scope.provinceArray = response.array;
- });
- //邮寄省份
- $rootScope.ajaxRequest({
- url : '../enrol/std/reg/province/list.htm'
- }, function(response) {
- $scope.provArray = response.array;
- });
- //邮寄城市初始列表
- $rootScope.ajaxRequest({
- url : '../enrol/std/reg/city/alllist.htm'
- }, function(response) {
- $scope.cityArray = response.array;
- });
- //过滤城市
- $scope.freshCity = function() {
- $rootScope.ajaxRequest({
- url : '../enrol/std/reg/city/list.htm?province_id=' + $scope.StdReg.link_province
- }, function(response) {
- $scope.cityArray = response.array;
- });
- }
- /**************
- * 完善个人信息
- */
- $scope.saveExtendInfo = function(){
- // 判断是否修改过属性
- var change = false;
- for ( var attr in $scope.StdReg) {
- if ($scope.StdReg[attr] !== $rootScope.ArtStdReg[attr]) {
- change = true;
- break;
- }
- }
-
- /*if(change) {
- $.alert("报名时间已过,不允许修改个人信息!");
- return;
- }
- if ($scope.StdReg["link_addr"] !== $rootScope.ArtStdReg["link_addr"]) {
- $.alert("已过邮寄地址修改时间[2021-01-12 22:00:00],不能修改!");
- return;
- }
- if ($scope.StdReg["link_province"] !== $rootScope.ArtStdReg["link_province"]) {
- $.alert("已过邮寄地址修改时间[2021-01-12 22:00:00],不能修改!");
- return;
- }
- if ($scope.StdReg["link_city"] !== $rootScope.ArtStdReg["link_city"]) {
- $.alert("已过邮寄地址修改时间[2021-01-12 22:00:00],不能修改!");
- return;
- }*/
- $.showLoading("正在提交考生信息,请稍后...")
- $rootScope.ajaxRequest({
- url : '../enrol/std/info/save.htm',
- data : $scope.StdReg
- }, function(response) {
- $.toast("考生信息已保存!");
- $.hideLoading();
- $rootScope.ArtStdReg = response.entity;
- });
- }
- } ])
|