快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

requireJS+angularJS+java+ireport统计报表



    
        
            
                                                     查询条件     
                                                                                                                                                                                               *所属机构                                                                                                            
                                                                                                                                                                              *起始日期                                                                                                                                                                                                                                                                                           *终止日期                                                                                                                                                                                                         查询                                    导出                                                                                                                                   
集中催收报表
                                                                                                                                                                                                                                                                                                                                                                                                                                     ×                                                                                               选择机构                                                                                                                                                                                                                        取消                                                                                               确定                                                                                                                                  
'use strict';
// 担保对照
var a = 0;
var page = 0;
var gro = "";
define([ 'app', 'appModule' ],function(app){
    // 弹出层自适应居中
    $(function() {
        $(".modal-body").height($(window).height() - 360);
        // 当文档窗口发生改变时 触发
        $(window).resize(function() {
            $(".modal-body").height($(window).height() - 360);
        });
        $(this).on('show.bs.modal', function() {
            $('body').addClass('modal-open');
        });
        $(this).on('hide.bs.modal', function() {
            $('body').removeClass('modal-open');
        });
    });
    
    app.register.controller('focuscollCtrl',['$rootScope','$scope','$cookies','coreUrl','lodinDataService','lodinDatadService','$http',function($rootScope,$scope, $cookies, coreUrl,lodinDataService, lodinDatadService,$http) {
        if (lodinDatadService.getObject('lodinDatad') == 0) {
            $scope.LoginList = lodinDataService.getObject('lodinData');
        }
        if (lodinDataService.getObject('lodinData') == 0) {
            $scope.LoginList = lodinDatadService.getObject('lodinDatad');
        }
        $rootScope.parentCru = lodinDataService.get('parentCru');
        $rootScope.childCru = lodinDataService.get('childCru');
        $rootScope.userId = $scope.LoginList.userId;
        $rootScope.branchId = $scope.LoginList.branchId;
        $scope.data = lodinDatadService.getObject('branchData');
            //新增机构-弹出框显示隐藏
            $scope.get_tree = function(){
                if($scope.data){
                    $scope.tree($scope.data.row);
                }
            };
         $scope.tree = function(data){
             $('#trees').on("changed.jstree", function(e, data) {
                if(data.selected.length) {
                    $scope.id = data.instance.get_node(data.selected[0]).id;
                    $scope.text = data.instance.get_node(data.selected[0]).text;
                } //输出点击的内容
            }).jstree({
                'core': {
                    'data': data
                }
            }); //动态生成tree菜单
         }; 
         $scope.getBranchName = function(){
             if($scope.text == undefined || $scope.text == ""){
                alert("温馨提示!", '请选择机构!', function () {
                }, {type: 'warning',showConfirmButton:true});
                }else{
                    $scope.branchId_collection = $scope.id;
                    $scope.branchName_collection = $scope.text;
                }
         };
         //查询--选择机构--取消
        $scope.getBranchName_dismiss = function(){
            $('#myModal_add4').modal('hide');
        };
        //获取报表种类
        var CoreUrl = new coreUrl({
            "transCode" : "B000704",
            "bizTypeCode" : "LOAN_PRESS_TYPE"
        });
        CoreUrl.$save(function(objc){
            $scope.actualChannelList = objc.rows;
        });        
        //查询    
        $scope.QueryMessagePress= function(){
            var href_Base = "jasperreport/reportFocusCollHtml?";
            $scope.startDate = document.getElementById('LAY_demorange_s').value;
            $scope.endDate = document.getElementById('LAY_demorange_e').value;
            if($scope.branchName_collection != undefined && $scope.startDate.length>0 && $scope.endDate.length>0){    
                href_Base += "groupId=";
                href_Base += $scope.branchId_collection;
                href_Base += "&groupName=";
                href_Base += $scope.branchName_collection;
                href_Base += "&startDate=";
                var sDate = $scope.startDate;
                sDate = sDate.replace(/-/, "年");
                sDate = sDate.replace(/-/, "月");
                sDate += "日"; 
                href_Base += sDate;
                href_Base += "&endDate=";
                var eDate = $scope.endDate;
                eDate = eDate.replace(/-/, "年");
                eDate = eDate.replace(/-/, "月");
                eDate += "日"; 
                href_Base += eDate;
                $scope.href_Base = href_Base;
                window.subFrame.location.href = $scope.href_Base;
            }else{
                alert("温馨提示!", '请输入查询条件', function () {}, {type: 'warning',showConfirmButton:true});
            }
        };
        //导出
        $scope.QueryMessageXls= function(){
            var href_Base = "jasperreport/reportFocusCollXls?";
            $scope.startDate = document.getElementById('LAY_demorange_s').value;
            $scope.endDate = document.getElementById('LAY_demorange_e').value;
            if($scope.branchName_collection != undefined && $scope.startDate.length>0 && $scope.endDate.length>0){    
                href_Base += "groupId=";
                href_Base += $scope.branchId_collection;
                href_Base += "&groupName=";
                href_Base += $scope.branchName_collection;
                href_Base += "&startDate=";
                var sDate = $scope.startDate;
                sDate = sDate.replace(/-/, "年");
                sDate = sDate.replace(/-/, "月");
                sDate += "日"; 
                href_Base += sDate;
                href_Base += "&endDate=";
                var eDate = $scope.endDate;
                eDate = eDate.replace(/-/, "年");
                eDate = eDate.replace(/-/, "月");
                eDate += "日"; 
                href_Base += eDate;
                $scope.href_Base = href_Base;
                window.subFrame.location.href = $scope.href_Base;
            }else{
                alert("温馨提示!", '请输入导出条件', function () {}, {type: 'warning',showConfirmButton:true});
            }
        };
        //输入框屏蔽特殊字符
        /*var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]") ;
        $('input').bind('input propertychange', function() {
            $('input').val($('input').val().replace(pattern,""));
        });*/
        //------end--------
        //转列日期--时间控件
        layui.use('laydate', function(){
            var laydate = layui.laydate;
            var start = {
                // min:
                // laydate.now()
                max : laydate.now(),
                istoday : false,
                choose : function(datas) {
                    $scope.startDate = datas;
                    end.min = datas; //开始日选好后,重置结束日的最小日期
                    end.start = datas //将结束日的初始值设定为开始日
                }
            };
            var end = {
                    //min: laydate.now()
                max : laydate.now(),
                istoday: false,
                choose: function(datas){
                    $scope.endDate = datas;
                    start.max = datas; //结束日选好后,重置开始日的最大日期
                }
              };
              document.getElementById('LAY_demorange_s').onclick = function(){
                  start.elem = this;
                  laydate(start);
              };
              document.getElementById('LAY_demorange_e').onclick = function(){
                  end.elem = this;
                  laydate(end);
              };
        });
        //转列日期-时间控件end
    }]);
});

新闻名称:requireJS+angularJS+java+ireport统计报表
本文来源:http://6mz.cn/article/piecji.html