12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- angular.module('push')
- .controller('SubsidyauditafteExportCtrl', function ($scope, $ionicActionSheet, ResourceLibraryService,UserService,dataToolsService,$ionicPopup,ConfigService, CommentService, UtilService, $timeout, CommonService) {
- $scope.rewardHollLists = [
- {title1: '待审核', type: "0"},
- {title1: '已退回', type: "-2"},
- {title1: '已通过', type: "1"},
- {title1: '已共享', type: '8,9'},
- ]
- $scope.page = 1
- $scope.selectedtypes= '0'
- entrylist(["0"])
- $scope.changeSelected = function (row) {
- entrylist(row.split(','))
- }
- function entrylist( demandStatus) {
- console.log(demandStatus)
- var pa = {
- demandStatus: demandStatus,
- nodeId: UserService.node,
- restType: 1611726857,
- userId: UserService.id,
- pageNum: $scope.page,
- pageFlag: false
- }
- //获取产学研补助审核列表
- ResourceLibraryService.cooperateresearchlist(pa).then(function (res) {
- console.log(res)
- $scope.checkList = res.data;
- })
- }
- $scope.exportResource=function(){
- var params={
- demandIds:[],
- userId:UserService.id
- }
- $scope.checkList.forEach(function (res) {
- if(res.isselected==true){
- params.demandIds.push(res.id)
- }
- })
- ResourceLibraryService.exportresearchcost(params).then(function (res) {
- console.log(res)
- if(res.code==3350){
- window.open(ConfigService.imgurl + res.data.sourceName);
- }else {
- $ionicPopup.alert({
- title: '提示',
- template: res.message
- });
- }
- })
- }
- $scope.clickResource1 = function (resource) {
- resource.isselected = !resource.isselected;
- }
- $scope.flag = true;
- $scope.choiceAllResource1 = function () {
- if ($scope.flag) {
- angular.forEach($scope.checkList, function (val) {
- val.isselected = true;
- })
- } else {
- angular.forEach($scope.checkList, function (val) {
- val.isselected = false;
- })
- }
- $scope.flag = !$scope.flag;
- }
- })
|