123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-title">
- <h5>{$meta_title}任务统计</h5>
- <div class="ibox-tools">
- </div>
- </div>
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-12" style="text-align: left;">
- <form class="form-inline" id="form-search" action="{:url('tj',['mode'=>$mode])}">
- <div class="input-group" style="width: 200px">
- {:widget_view('common/laydate',['name'=>'start','title' => '开始时间', 'val' => $start])}
- </div>
- <div class="input-group" style="width: 200px">
- {:widget_view('common/laydate',['name'=>'end','title' => '结束时间', 'val' => $end])}
- </div>
- <div class="input-group">
- <div class="input-group">
- <input type="text" class="form-control" name="title" value="" placeholder="执行人名称">
- </div>
- </div>
- <div class="input-group">
- <span class="input-group-btn">
- <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
- </span>
- <span class="input-group-btn">
- <button class="btn-sm btn-warning " type="button" id="search-clear"><i class="fa fa-undo"></i></button>
- </span>
- <!-- <span class="input-group-btn">-->
- <!-- <button class="btn-sm btn-info" type="button" onclick="printer()"><i class="glyphicon glyphicon-print"></i>打印</button>-->
- <!-- </span> -->
- <span class="input-group-btn">
- <button class="btn-sm btn-danger" type="button" onclick="exportExcel()"><i class="glyphicon glyphicon-download"></i>导出</button>
- </span>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="ibox-content">
- <div class="jqGrid_wrapper">
- <table id="table" style="border-collapse: collapse"></table>
- <div id="pager"></div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script src="/static/browser.js"></script>
- <script src="/static/jquery.jqprint-0.3.js"></script>
- <script>
- $(function () {
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('tj',['mode'=>$mode])}",
- datatype: "json",
- colModel:[
- {label:'编号',name:'user_id',index:'user_id', width:20,sortable: false},
- {label:'姓名',name:'title',index:'title', width:60,sortable: false},
- {label:'未执行',name:'c1',index:'c1',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- var s1 = "{:url('tjList',[],'')}/userId/"+c.user_id+'/status/0/'+'patrol_mode/{$mode}'+'/start/'+c.st+'/end/'+c.et;
- if(a > 0){
- return '<a href="javascript:;" data-title="未执行列表" onclick="layer_open(this,1)" url="'+s1+'">'+a+'</a>';
- }else{
- return '<span title="未执行列表">'+a+'</span>';
- }
- }},
- {label:'执行中',name:'c2',index:'c2',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- var s1 = "{:url('tjList',[],'')}/userId/"+c.user_id+'/status/1/'+'patrol_mode/{$mode}'+'/start/'+c.st+'/end/'+c.et;
- if(a > 0){
- return '<a href="javascript:;" data-title="执行中列表" onclick="layer_open(this,1)" url="'+s1+'">'+a+'</a>';
- }else{
- return '<span title="执行中列表">'+a+'</span>';
- }
- }},
- {label:'已完成',name:'c3',index:'c3',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- var s1 = "{:url('tjList',[],'')}/userId/"+c.user_id+'/status/2/'+'patrol_mode/{$mode}'+'/start/'+c.st+'/end/'+c.et;
- if(a > 0){
- return '<a href="javascript:;" data-title="已完成列表" onclick="layer_open(this,1)" url="'+s1+'">'+a+'</a>';
- }else{
- return '<span title="已完成列表">'+a+'</span>';
- }
- }},
- {label:'未完成',name:'c4',index:'c4',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- var s1 = "{:url('tjList',[],'')}/userId/"+c.user_id+'/status/3'+'/patrol_mode/{$mode}'+'/start/'+c.st+'/end/'+c.et;
- if(a > 0){
- return '<a href="javascript:;" data-title="未完成列表" onclick="layer_open(this,1)" url="'+s1+'">'+a+'</a>';
- }else{
- return '<span title="未完成列表">'+a+'</span>';
- }
- }},
- {label:'中断',name:'c5',index:'c5',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- var s1 = "{:url('tjList',[],'')}/userId/"+c.user_id+'/status/5/'+'patrol_mode/{$mode}'+'/start/'+c.st+'/end/'+c.et;
- if(a > 0){
- return '<a href="javascript:;" data-title="中断列表" onclick="layer_open(this,1)" url="'+s1+'">'+a+'</a>';
- }else{
- return '<span title="中断列表">'+a+'</span>';
- }
- }},
- {label:'已关闭',name:'c6',index:'c6',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- var s1 = "{:url('tjList',[],'')}/userId/"+c.user_id+'/status/6/'+'patrol_mode/{$mode}'+'/start/'+c.st+'/end/'+c.et;
- if(a > 0){
- return '<a href="javascript:;" data-title="已关闭列表" onclick="layer_open(this,1)" url="'+s1+'"</a>';
- }else{
- return '<span title="已关闭列表">'+a+'</span>';
- }
- }},
- ],
- rowNum:10,
- rowList:[10,20,30,50,100],
- pager: '#pager',
- sortname: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "desc",
- caption:"{$meta_title}",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- function empty_search(){
- window.location.href = "{:url('tj',[],'')}/mode/{$mode}";
- }
- function printer(){
- $('#printer').jqprint();
- }
- function exportExcel() {
- window.location.href = "{:url('tjExport',[],'')}/mode/{$mode}?"+$('#form-search').serialize();
- }
- </script>
- {/block}
|