123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- {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('conveystatus',[],'')}">
- <div class="input-group">
- <input type="text" class="form-control" name="real_name" placeholder="运送员">
- </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>
- </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('conveystatus',['id'=>$id],'')}",
- datatype: "json",
- colModel:[
- {label:'运送员名称',name:'real_name',index:'real_name', width:50,sortable: false},
- {label:'今日送达次数',name:'nums',index:'nums',width:40,editable: false,sortable: false},
- {label:'上次位置',name:'title',index:'title',width:50,sortable: true},
- {label:'上次修改时间',name:'addr_time',index:'addr_time',width:60,sortable: true},
- {label:'驻守状态',name:'stationtxt',index:'stationtxt',width:40,sortable: false,formatter: function (a, b, c) {
- var station = "{:url('station',[],'')}/id/"+c.id;
- var btn = '';
- if(c.station==0){
- btn+= '<a href="'+station+'" class=" ajax-get" data-table="1"><span class="label label-danger" title="取消驻守">取消驻守</span></a>';
- }else{
- btn+= '<a href="'+station+'" class=" ajax-get" data-table="1"><span class="label label-primary" title="驻守">驻守</span></a>';
- }
- return btn;
- }},
- {label:'状态',name:'worktxt',index:'worktxt',width:40,sortable: false,formatter: function (a, b, c) {
- var btn = '';
- var work_url = "{:url('work',[],'')}/id/"+c.id;
- if(c.work==0){
- btn+= '<a href="'+work_url+'" class=" ajax-get" data-table="1"><span class="label label-danger" title="下班">下班</span></a> ';
- }else{
- btn+= '<a href="'+work_url+'" class=" ajax-get" data-table="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:"运送员列表",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|