123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <!--<div class="col-xs-3">-->
- <!--<!–<a href="javascript:;" url="{:url('add')}" data-title="新增{$m_name}" onclick="layer_open(this,1)" class="btn btn-sm btn-primary">批量转运</a>–>-->
- <!--<!––>-->
- <!--<a href="javascript:;" class="btn btn-sm batch-finish btn-primary">批量转运</a>-->
- <!--<a href="javascript:;" class="btn btn-sm batch-apply btn-primary">修该申请</a>-->
- <!--</div>-->
- <div class="col-xs-12" style="text-align: right;">
- <form class="form-inline" id="form-search" action="{:url('index')}">
- <div class="input-group">
- <input type="text" id="start" readonly class="form-control" name="start" placeholder="开始日期">
- </div>
- <div class="input-group">
- <input type="text" id="end" readonly class="form-control" name="end" placeholder="结束日期">
- </div>
- <div class="input-group">
- <select name="cateid" class="form-control">
- <option value="">请选择类型</option>
- {foreach $type as $k=>$v}
- <option value="{$v.id}">{$v.title}</option>
- {/foreach}
- </select>
- </div>
- <div class="input-group">
- <select name="addrId" class="form-control">
- <option value="">请选择地点</option>
- {foreach $addr as $k=>$v}
- <option value="{$v.id}">{$v.title}</option>
- {/foreach}
- </select>
- </div>
- <div class="input-group">
- <select name="status" class="form-control">
- <option value="">全部</option>
- {foreach $status as $k=>$v}
- <option value="{$k}">{$v}</option>
- {/foreach}
- </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 data-url="{:url('export')}" title="导出" class="btn-sm btn-primary" onclick="excel_download(this)" type="button" ><i class="fa fa-cloud-download"></i></button>
- <!--<button data-url="{:url('print')}" title="打印" class="btn-sm btn-primary" onclick="printer(this)" type="button" ><i class="glyphicon glyphicon-print"></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 type="text/javascript" src="/static/layDate-v5.0.9/laydate.js"></script>
- <script>
- //导出
- function excel_download(_self){
- var url = $(_self).attr('data-url');
- var param = $('#form-search').serialize();
- window.location.href = url+'?'+param;
- }
- //打印
- function printer(_self){
- var url = $(_self).attr('data-url');
- var param = $('#form-search').serialize();
- window.location.href = url+'?'+param;
- }
- $(function () {
- laydate.render({
- elem: '#start',
- trigger: 'click' ,
- theme:'#6eb7ff'
- });
- laydate.render({
- elem: '#end',
- trigger: 'click' ,
- theme:'#6eb7ff'
- });
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('index')}",
- datatype: "json",
- colModel:[
- {label:'ID',name:'id',index:'id', width:30,sortable: false},
- {label:'医废id',name:'record_id',index:'record_id',width:80,editable: false,sortable: false},
- {label:'收取地点',name:'waste_device',index:'waste_device',width:80,editable: false,sortable: false},
- {label:'收取人',name:'real_name',index:'real_name',width:40,sortable: true},
- {label:'类别',name:'cate',index:'cate',width:40,sortable: true},
- {label:'重量(kg)',name:'weight',index:'weight',width:40,sortable: true},
- {label:'时间',name:'create_time',index:'create_time',width:80,sortable: true},
- {label:'备注',name:'remark',index:'remark',width:100,sortable: true},
- {label:'状态',name:'statusName',index:'statusName',width:40,editable: false,sortable: false},
- {label:'操作',width:80,sortable: false,formatter: function (a, b, c) {
- var edit = "{:url('edit',[],'')}/id/"+c.id;
- var info = "{:url('info',[],'')}/id/"+c.id;
- var withdraw = "{:url('withdraw',[],'')}/id/"+c.id;
- var btn ='';
- if(c.status==0){
- btn += '<a href="'+withdraw+'" class="confirm ajax-get" data-confirm="确定要撤回此记录吗?" data-table="1"><span class="label label-danger" title="撤回">撤回</span></a> ';
- }
- btn+= '<a url="'+info+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-info" 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:"医废修改",
- //multiselect: true,//可多选
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|