温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

requireJS+angularJS+java+ireport统计报表

发布时间:2020-06-30 16:24:21 来源:网络 阅读:736 作者:紫枫5966 栏目:web开发
<script>
$("#wrapperShow").show();
</script>
<div class='right_container' ng-class="{true: 'switct_contenr_right', false: ''}[switchStyle]" >
    <div class="wrapper container">
        <div  class="view-container ml0">
            <div ng-include="'../../../view/public/header/approval/breadcrumb.html'" ></div> 
   <!--  Page content -->
            <div class="content-wrapper">
                <div class="panel">
                <div class="panel-heading border_search pt5 pb5"> 查询条件 <span class="tools pull-right"> <a data-toggle="collapse" data-parent="#accordion"
          href="#collapseOne" class="fa fa-chevron-down"></a>  </span> </div>
                    <div class="panel-body collapse in"  id="collapseOne">
                        <div class="row search searchTwo mb10">
                            <div class="col-xs-3">
                                <div class="input-group input-group-sm m-bot15">
                                       <span class="input-group-addon" >
                                           <span class="red">*</span>所属机构
                                    </span> 
                                    <input class="form-control input-xs" id="branchName_collection" name="branchName_collection" ng-model="branchName_collection" placeholder="请选择机构" minlength="1" maxlength="32" type="text" data-toggle="modal" data-target="#myModal_add4" ng-click="get_tree()" >
                                </div>
                            </div>
                            <div class="col-xs-3">
                                <div class="input-group input-group-sm m-bot15">
                                       <span class="input-group-addon" >
                                           <span class="red">*</span>起始日期
                                    </span> 
                                    <input type="text" class="form-control input-xs" placeholder="开始时间" id="LAY_demorange_s" ng-model="startDate">
                                </div>
                            </div>
                            <div class="col-xs-3">
                                <div class="input-group input-group-sm m-bot15">
                                       <span class="input-group-addon" >
                                           <span class="red">*</span>终止日期
                                    </span> 
                                    <input type="text" class="form-control input-xs" placeholder="开始时间" id="LAY_demorange_e" ng-model="endDate">
                                </div>
                            </div>
                            <div class="col-xs-3 ">
                                <div class="col-xs-6 pl0 pr5"> <a class="btn btn-danger iconfont" ng-click="QueryMessagePress()"><i class="fa fa-search" ></i> 查询</a> </div>
                                <div class="col-xs-6 pl5 pr0"> <a class="btn btn-info iconfont" ng-click="QueryMessageXls()"><i class="fa fa-download" ></i> 导出</a> </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel group_panel">
                    <div class="panel-heading"><h6>集中催收报表</h6></div>
                    <div class="panel-body">
                        <div class="adv-table editable-table ">
                            <div class="clearfix"></div>
                            <div class="space15"></div>
                            <div id="editable-sample_wrapper" class="dataTables_wrapper form-inline table-responsive" role="grid">
                                <iframe name="subFrame" src="about:blank" ></iframe>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 选择机构弹出页---转列经办行 -->
            <div class="modal fade" id="myModal_add4" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog" >
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                ×
                            </button>
                            <h5 class="modal-title" id="myModalLabel">
                                    选择机构
                            </h5>
                        </div>
                        <div class="modal-body">
                            <div id='trees' ></div>
                            <!-- <ul tree id="tree"  class="ztree" ng-model="selectNode" value="1" >  -->
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="getBranchName_dismiss()">取消
                            </button>
                            <button type="button" class="btn btn-info doBank" data-dismiss="modal" ng-click="getBranchName()">
                                    确定
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        
        </div>
    </div>  
</div>
'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
    }]);
});


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI