123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-12" style="text-align: right">
- <form class="form-inline" id="form-search" action="{:url('index',['mode'=>$mode])}">
- <div class="input-group">
- <input class="form-control" id="start" readonly placeholder="开始时间" name="start" >
- </div>
- <div class="input-group">
- <input class="form-control" id="end" readonly placeholder="结束时间" name="end" >
- </div>
- <div class="input-group">
- <input type="text" class="form-control" style="width: 200px" name="title" placeholder="地点">
- </div>
- <div class="input-group">
- <select name="plan_id" class="form-control">
- <option value="">选择计划</option>
- {volist name="plans" id="v"}
- <option value="{$v.id}">{$v.title}</option>
- {/volist}
- </select>
- </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-success" title="导出" data-url="{:url('export',['mode'=>$mode])}" type="button" onclick="exports(this)"><i class="fa fa-cloud-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>
- </div>
- {/block}
- {block name="script"}
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- <script>
- $(function () {
- laydate.render({
- elem: '#start',
- trigger: 'click' ,
- theme: '#148d8f'
- });
- laydate.render({
- elem: '#end',
- trigger: 'click' ,
- theme: '#148d8f'
- });
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('index',['mode'=>$mode])}",
- datatype: "json",
- colModel:[
- {label:'编号',name:'id',index:'id', width:30,sortable: false},
- {label:'执行人',name:'task_user',index:'task_user', width:40,sortable: false},
- {label:'计划名称',name:'task_title',index:'task_title', width:80,sortable: false},
- {label:'地点',name:'title',index:'title', width:80,sortable: false},
- {label:'内容',name:'content',index:'content', width:60,sortable: false},
- // {label:'状态',name:'is_normal',status:'is_normal',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- // if(a == 0){
- // return '<span title="正常">正常</span>';
- // }
- // if(a == 1){
- // return '<span title="异常">异常</span>';
- // }
- // }},
- {label:'检查项异常',name:'exception',status:'exception',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- if(a == 0){
- return '<span title="是">是</span>';
- }
- if(a == 1){
- return '<span title="否">否</span>';
- }
- }},
- {label:'提交日期',name:'create_time',index:'create_time', width:60,sortable: false},
- {label:'操作',width:80,sortable: false,formatter: function (a, b, c) {
- var detailsurl = "{:url('details',[],'')}/id/"+c.id+'?mode='+c.patrol_mode;
- //var btn = '<a href="'+detailsurl+'"><span class="label label-info" title="详情">详情</span></a> ';
- var btn= '<a url="'+detailsurl+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-info" title="详情">详情</span></a> ';
- if(c.zg_type >0 &&c.order_id >0){
- var zgdetail = "{:url('orders/zg_detail',[],'')}/id/"+c.order_id;
- btn+= '<a url="'+zgdetail+'" href="javascript:;" data-title="整改详情" onclick="layer_open(this,1)"><span class="label label-primary" title="整改详情">整改详情</span></a>';
- }
- return btn;
- }},
- ],
- 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 exports(_self) {
- var param = $("#form-search").serialize();
- window.location.href = $(_self).attr('data-url')+'?'+param;
- }
- </script>
- {/block}
|