chooseUnitTypeCtrl.js 772 B

12345678910111213141516171819202122232425262728
  1. angular.module('push')
  2. .controller('chooseUnitTypeCtrl', function ($scope, UtilService, accountModel) {
  3. if($scope.app){
  4. $scope.setStatusBar(0);
  5. }
  6. $scope.orgtypelist = accountModel.getOrgtypeList();
  7. var orgtype = -1;
  8. angular.forEach($scope.orgtypelist, function (val, ind) {
  9. val.selind = 0;
  10. });
  11. $scope.selectOrgType = function (orgt, index) {
  12. angular.forEach($scope.orgtypelist, function (val, ind) {
  13. val.selind = 0;
  14. });
  15. $scope.orgtypelist[index].selind = 1;
  16. orgtype = orgt;
  17. };
  18. $scope.goUnitIdentify = function () {
  19. if(orgtype == -1){
  20. UtilService.showMess("请选择单位类型!");
  21. return;
  22. }
  23. $scope.go("unitIdentify", {orgtype: orgtype});
  24. }
  25. });