123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- angular.module('push')
- .controller('TeclcontractlistCtrl', function ($scope, SelfcheckService,$ionicActionSheet,ConfigService,
- UserService, CommentService, UtilService, $timeout, CommonService) {
- $scope.rewardHollLists = [
- {title: '待初审', selected: true, type: 0},
- {title: '已退回', selected: false, type: 2},
- {title: '已通过', selected: false, type: 1},
- ]
- entrylist(0)
- function entrylist(type) {
- var params = {
- userId:'',
- status:type
- }
- SelfcheckService.getcontractlist(params).then(function (res) {
- console.log(res)
- if (res.code == 3350) {
- res.data.forEach((item)=>{
- if(item.url){
- item.url = JSON.parse(item.url)
- }
- })
- $scope.checkList = res.data;
- }
- })
- }
- $scope.shouBigImage = function (val) { //传递一个参数(图片的URl)
- window.open(ConfigService.imgurl + val);
- return;
- };
- $scope.changeSelecteds = function (index, type) {
- angular.forEach($scope.rewardHollLists, function (val) {
- val.selected = false;
- })
- $scope.rewardHollLists[index].selected = true;
- entrylist($scope.rewardHollLists[index].type)
- }
- $scope.onstate=function (row,type){
- $scope.showLoadingToastUtilEnd();
- let pams={
- id:row.id,
- status:type,
- userId:row.creater
- }
- SelfcheckService.getcontaudit(pams).then((res)=>{
- $scope.hideLoadingToast();
- console.log(res)
- if(res.code==3350){
- CommonService.prompt('操作成功');
- entrylist(0)
- }else {
- $ionicPopup.alert({
- title: '提示',
- template: res.message
- });
- }
- }).catch(function () {
- $ionicPopup.alert({
- title: '提示',
- template: "服务器错误"
- });
- })
- }
- });
|