123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- angular.module('push')
- .controller('orgInspectDetailCtrl', function ($scope, ConfigService, $ionicPopup, $stateParams, taskModuleService, ResourceLibraryService, CommentService, UtilService, $timeout, CommonService,UserService) {
- $scope.orgInspect = JSON.parse($stateParams.orgInspect);
- $scope.connnumber = $stateParams.connnumber;//填报次数
- $scope.year = new Date().getFullYear();
- ResourceLibraryService.getOrgByName($scope.orgInspect.title,UserService.node).then(function (res) {
- if (res.code == 3350) {
- $scope.orglogo = res.data.logo;
- }
- })
- //通过企业id获取企业创立时间及对应标签
- taskModuleService.getOrgAndLabelInfo($scope.orgInspect.orgid).then(function (res) {
- if (res.code == 3350) {
- $scope.fullOrgInfo = res.data;
- }
- })
- $scope.orgInspectHistoryList = [];
- taskModuleService.getInspectList($scope.orgInspect.title, "createtime", '0', false).then(function (res) {
- if (res.code == 3350) {
- angular.forEach(res.data, function (val) {
- if (val.id != $scope.orgInspect.id) {
- $scope.orgInspectHistoryList.push(val);
- }
- })
- }
- })
- //获取高企自评数据
- taskModuleService.getHighOrgInspectInfo($scope.orgInspect.id).then(function (res) {
- if (res.code == 3350) {
- $scope.highInspectOrg = res.data;
- taskModuleService.getRespectOrgInfo($scope.orgInspect.id).then(function (res1) {
- if (res1.code == 3350) {
- $scope.highorginspection = JSON.parse(res1.data);
- }
- })
- }
- })
- $scope.goToOrgInspect = function (value) {
- if (value == 1) {
- //进入自评报告页面
- var scoreConnid = $scope.orgInspect.scoretotal + "," + $scope.orgInspect.id;
- $scope.go('orgSelfReport', {scoreConnid: scoreConnid, registerdate: $scope.highorginspection.registerdate, connid: $scope.orgInspect.id});
- }
- if (value == 2) {
- //进入知识产权页面
- $scope.go('secondOrgSelfReport', {
- value: value,
- highorginspection: $scope.highorginspection,
- connid: $scope.orgInspect.id
- });
- }
- if (value == 3) {
- //进入收支信息页面
- $scope.go('secondOrgSelfReport', {
- value: value,
- highorginspection: $scope.highorginspection,
- connid: $scope.orgInspect.id
- });
- }
- }
- $scope.goOrgInspectDetail = function (orginspect) {
- $scope.go('orgInspectDetail', {
- orgInspect: JSON.stringify(orginspect),
- connnumber: $scope.connnumber ? $scope.connnumber : $scope.orgInspect.connnumber
- });
- }
- $scope.exportReport = function () {
- taskModuleService.exportHighOrgReport($scope.orgInspect.id).then(function (res) {
- console.log(res)
- if (res.code == 3350) {
- var file = res.data;
- // window.open(ConfigService.imgurl + file.sourceName);
- var aEle = document.createElement("a");
- aEle.setAttribute("href", ConfigService.imgurl + file.sourceName);;
- aEle.click()
- // let a = document.createElement("a");
- // a.setAttribute("href", ConfigService.imgurl + file.sourceName);
- // a.click();
- return;
- } else {
- $ionicPopup.alert({
- title: '提示',
- template: '导出失败!'
- })
- return;
- }
- })
- }
- })
- ;
|