angular.module('push') .controller('cultivatelistCtrl', function ($scope,SelfcheckService,$stateParams,UserService,$ionicPopup, $timeout,$ionicModal,$ionicActionSheet,ionicDatePicker,$ionicScrollDelegate) { $scope.passname=$stateParams.name $scope.fostertype=$stateParams.restype $scope.isShowSearchButton = true; $scope.keyfilter='' $scope.findtype='01' $scope.tablist=[{name:'全部',type:true,value:'01'}, {name:'建议申报',type:false,value:'1'}, {name:'不建议申报',type:false,value:'0'}, ] $scope.CaseDatalist =function (orgname){ $scope.showLoadingToast(); var paramslist={ userid:UserService.id, restype:$stateParams.restype, node:UserService.node, orgname: orgname, isQualified:$scope.findtype } console.log(paramslist) SelfcheckService.getSelfchecklist(paramslist).then(function (res){ $scope.hideLoadingToast(); console.log(res) if(res.code==3350){ $scope.list=res.data }else { $ionicPopup.alert({ title: '提示', template: res.message }); } }).catch(function (res){ $scope.hideLoadingToast(); $ionicPopup.alert({ title: '提示', template: "服务器错误" }); }) } $scope.CaseDatalist('0') $scope.showSearchButtonLeft = function () { $scope.isShowSearchButton = false; $timeout(function () { $(".showSearchInput").focus(); }, 300) }; $scope.clearSearch = function () { $scope.isShowSearchButton = true; $scope.keyfilter= ''; $scope.CaseDatalist('0'); } $scope.handletab=function (item){ $scope.tablist.forEach((res)=>{ res.type=false }) item.type=true $scope.findtype=item.value $scope.CaseDatalist($scope.keyfilter?$scope.keyfilter:'0'); } $scope.ondetail=function (item){ if($scope.fostertype==0){ $scope.go('orgInspectDetail', {orgInspect: JSON.stringify(item), connid: item.id}); }else { let row={ id:item.id, type: '1', restype:$stateParams.restype, } $scope.go('Selfcheckdetail', {obj: JSON.stringify(row)}); } } })