| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>历史列表</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link href="../css/init.css" rel="stylesheet" />
- <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
- <script src="../js/laydate/laydate.js"></script>
- <style type="text/css">
- .time-box{
- display: inline-block;
- position: relative;
- }
- .toolRight input{
- padding-right: 30px;
- }
- .tub{
- position: absolute;
- right: 8px;
- top: 5px;
- font-size: 18px;
- color: #00a0ca;
- }
- .detailHtml{
- width: 100%;
- padding: 15px;
- }
-
- .inpBox {
- border: 1px solid #e5e6e7;
- height: 34px;
- width: 220px;
- display: inline-block;
- position: relative;
- vertical-align: middle;
- }
-
- .addTree {
- background: #fff;
- position: absolute;
- width: 100%;
- border: 1px solid #e5e6e7;
- right: 0;
- top: 32px;
- display: none;
- z-index: 222;
- }
-
- .xl {
- display: inline-block;
- background: url(../img/dropDown.png) no-repeat;
- height: 100%;
- background-position: center center;
- width: 20px;
- position: absolute;
- right: 0;
- top: 0px;
- /* background-color: #f7bc8b; */
- cursor: pointer;
- }
-
- .ztree li span {
- border: none;
- padding: 0;
- }
-
- .inps {
- width: 217px;
- height: 32px;
- outline: none;
- border: 0;
- border-image-width: 0;
- padding: 0;
- padding-left: 3px;
- }
- .Cleans{
- display: inline-block;
- width: 16px;
- position: absolute;
- right: 21px;
- top: 10px;
- display: none;
- }
-
- </style>
- </head>
- <body class="gray-bg">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn>
- <i class="syIcon"></i>位置:
- <a href="javaScript:;" id="ReIndex">首页</a>>
- <a href="javaScript:;">绩效质检</a>>
- <a href="javaScript:;" class="nowPosition">单位绩效历史列表</a>
- </sapn>
- </div>
- <div class="dhRight">
- <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
- </div>
- </div>
- <div class="wrapper wrapper-content">
- <div class="th-top clearfix">
- <div class="form-inline th-bar clearfix">
-
- <div class="time-box form-group" >
- <i class="tub fa fa-calendar"></i>
- <input class="form-control" type="text" id="startTime" placeholder="选择时间">
- </div>
- <div class="time-box form-group" >
- <input type="hidden" id="depId" />
- <div class="inpBox">
- <input type="text" class="inps" />
- <i class="Cleans fa fa-close"></i>
- <i class="xl xl_one"></i>
- <div class="addTree xlAdd">
- <ul id="addTreeDemo" class="ztree">
- </ul>
- </div>
- </div>
- </div>
- <div class="form-group tool_bars pull-right">
- <button class="btns search">搜索</button>
- <!--<a class="btns export">导出</a>-->
- </div>
- </div>
- </div>
- <div class="Content_box">
- <!--待处理/-->
- <div class="complain Shows">
- <div style="width: 100%;padding: 10px;">
- <table id="lists" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
- <thead>
- <tr>
- <th data-field="state" data-checkbox="true" data-align="center"></th>
- <th data-field="F_Year" data-align="center" data-formatter="yearMonth">年月</th>
- <th data-field="F_DeptId" data-align="center" >部门</th>
- <th data-field="F_TotalPoint" data-align="center">总分</th>
- <th data-align="center" data-formatter="formatterDetail">操作</th>
- </tr>
- </thead>
- </table>
- <!--<p style="margin-top: 20px;"><button class="btns allDel">批量删除</button></p>-->
- </div>
- </div>
-
- </div>
- </div>
- <script src="../js/zTree/jquery.ztree.core.js"></script>
- <script>
- var editHtml='<div class="detailHtml"><table class="table table-striped table-bordered table-condensed tabless">'+
- '<thead>'+
- '<th>名称</th>'+
- '<th>分数</th>'+
- '<th>数量</th>'+
- '<th>总数</th>'+
- '</thead>'+
- '<tbody>'+
- '<tr>'+
- '<td>按期办结</td>'+
- '<td>0</td>'+
- '<td>10</td>'+
- '<td>20</td>'+
- '</tr>'+
- '</tbody>'+
- '</table></div>'
- $(document).ready(function() {
- //年月选择器
- laydate.render({
- elem: '#startTime'
- ,format: 'yyyy-MM',
- type: 'month',
- theme: '#00a1cb'
- });
- initTables();
- //搜索
- $('.search').click(function(){
- initTables();
- })
- //所属分类下拉
- $('.inps').focus(function() {
- $('.xlAdd').css('display', 'block')
- })
- $('.xl').click(function() {
- if($('.xlAdd').css('display') == 'block') {
- $('.xlAdd').css('display', 'none')
- } else {
- $('.xlAdd').css('display', 'block')
- }
- })
- $('.addTree').mouseleave(function() {
- $(this).css('display', 'none')
- })
- //清除
- $(".Cleans ").click(function(){
- $('.inps').val("");
- $("#depId").val("");
- })
- tree()
- })
- //列表
- function initTables() {
- //先销毁表格
- $('#lists').bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $("#lists").bootstrapTable({
- method: "get", //使用get请求到服务器获取数据
- url: huayi.config.callcenter_url + "CheckPoint/GetCheckPointList", //获取数据的Servlet地址
- contentType: "application/x-www-form-urlencoded",
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 10, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [10, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- sidePagination: "server", //表示服务端请求
- // clickToSelect: true,
- //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
- //设置为limit可以获取limit, offset, search, sort, order
- queryParamsType: "undefined",
- queryParams: function queryParams(params) { //设置查询参数
- var param = {
- pageindex: params.pageNumber,
- pagesize: params.pageSize,
- year:$('#startTime').val().split('-')[0],
- month:$('#startTime').val().split('-')[1],
- deptid:$('#depId').val(),
- token: $.cookie("token")
- };
- return param;
- },
- onLoadSuccess: function (data) { //加载成功时执行
-
-
- },
- onLoadError: function () { //加载失败时执行
- //layer.msg("加载数据失败", { time: 1500, icon: 2 });
- }
- });
- }
- //年月
- function yearMonth(val,row){
- return '<div>'+ val+'-'+row.F_Month +'</div>'
- }
-
- //操作
- function formatterDetail(val,row){
- return '<div> <a title="查看详情" onclick=go("'+ row.F_ItemJson +'")><i class="fa fa-bars"></i></a></div>'
-
- }
- //详情
- function go(items){
- var item=JSON.parse(items);
- console.log(item)
- layer.open({
- type: 1,
- title: '查看考核详情',
- area: ['80%', '75%'], //宽高
- content: editHtml
- });
- $('.tabless tbody').html('');
- $(item).each(function(i,n){
- $('<tr>'+
- '<td>'+ n.name+'</td>'+
- '<td>'+ n.point+'</td>'+
- '<td>'+ n.count+'</td>'+
- '<td>'+ n.total+'</td>'+
- '</tr>').appendTo('.tabless tbody')
- })
-
-
-
- }
-
- function tree() {
- $.get(huayi.config.callcenter_url + 'Department/GetSecondDeptList', {
- "token": $.cookie("token"),
- "iscbdw": 1
- }, function(result) {
- result = $.parseJSON(result);
- $.fn.zTree.init($("#addTreeDemo"), setting1, result.data); //实例化树形图
- });
- }
- var setting1 = {
- data: {
- key: {
- name: "F_DeptName"
- },
- simpleData: {
- enable: true,
- idKey: "F_DeptId",
- pIdKey: "F_PartentId",
- rootPId: 0
- }
- },
- callback: {
- onClick: zTreeOnClick
- }
- };
- function zTreeOnClick(event, treeId, treeNode) {
- if(treeNode.level == 2) {
- $('.inps').val(treeNode.F_DeptName);
- $("#depId").val(treeNode.F_DeptId);
- // $("#Dpment").val(treeNode.F_DeptName);
- $(".Cleans").show();
- }
- };
- </script>
- </body>
- </html>
|