123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-9">
- <form class="form-inline" id="form-search" action="{:url('record',['id'=>$id])}">
- <div class="input-group" style="width: 200px">
- <span class="input-group-addon">开始时间</span>
- <input class="form-control dialog-datetime" id="startTime" name="start" type="text" data-date-format="yyyy-mm-dd" value="{$start}" placeholder="" readonly/>
- </div>
- <div class="input-group" style="width: 200px">
- <span class="input-group-addon">结束时间</span>
- <input class="form-control dialog-datetime" id="endTime" name="end" type="text" data-date-format="yyyy-mm-dd" value="{$end}" placeholder="" readonly/>
- </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>
- </div>
- </form>
- </div>
- <div class="col-xs-3" style="text-align: right;">
- <div class="ibox-tools">
- <a href="{:url('index')}" class="toback">返回上一页</a>
- </div>
- </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 () {
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('record',['id'=>$id])}",
- datatype: "json",
- colModel:[
- {label:'提交人',name:'user_name',index:'user_name',width:60,editable: false,sortable: false},
- {label:'总分',name:'score1',index:'score1',width:40,sortable: true},
- {label:'得分',name:'score2',index:'score2',width:40,sortable: true},
- {label:'扣分',name:'score',index:'score',width:40,sortable: true},
- {label:'项目',name:'org_name',index:'org_name',width:40,sortable: true},
- {label:'提交时间',name:'create_time',index:'create_time',width:40,sortable: true},
- {label:'操作',width:50,sortable: false,formatter: function (a, b, c) {
- var record_detail_url = "{:url('recordDetail',[],'')}/id/"+c.id;
- var record_del_url = "{:url('recordDel',[],'')}/id/"+c.id;
- var btn = '<a href="'+record_detail_url+'" ><span class="label label-primary" title="详情">详情</span></a> ';
- btn += '<a href="'+record_del_url+'" class="confirm ajax-get" data-confirm="确定要删除此记录吗?" data-table="1"><span class="label label-danger" title="删除">删除</span></a>';
- return btn;
- }},
- ],
- rowNum:10,
- rowList:[10,20,30,50,100],
- pager: '#pager',
- sortname: 'sort',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "asc",
- caption:"品质督察记录",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- laydate.render({
- elem: '#startTime',
- trigger: 'click',
- theme: '#6eb7ff'
- });
- laydate.render({
- elem: '#endTime',
- trigger: 'click',
- theme: '#6eb7ff'
- });
- </script>
- {/block}
|