123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="ibox">
- <div class="ibox-content">
- <div class="row">
- <div class="col-xs-3">
- <a href="{:url('add')}" class="btn btn-sm btn-primary">创建退库单</a>
- </div>
- <div class="col-xs-9" style="text-align: right;">
- <form class="form-inline" id="form-search" action="{:url('index')}">
- <div class="input-group">
- <input type="text" class="form-control" name="title" placeholder="姓名">
- </div>
- <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">
- <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-primary " 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: '#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:'单据编号',name:'sn',index:'sn', width:70,sortable: false},
- {label:'经办人',name:'user_name',index:'user_name', width:70,sortable: false},
- {label:'经办部门',name:'agent_dep_name',index:'agent_dep_name', width:70,sortable: false},
- {label:'退库部门',name:'with_dep_name',index:'with_dep_name', width:70,sortable: false},
- {label:'备注',name:'remark',index:'remark', width:70,sortable: false},
- {label:'登记时间',name:'create_time',index:'create_time', width:70,sortable: false},
- {label:'操作',width:80,sortable: false,formatter: function (a, b, c) {
- var report_url = "{:url('report',[],'')}/id/"+c.id;
- var detail_url = "{:url('detail',[],'')}/id/"+c.id;
- var btn = '<a url="'+report_url+'" href="javascript:;" data-title="报表" onclick="layer_open(this,1)" data-width="800px" data-height="600px" ><span class="label label-primary" title="报表">报表</span></a> ';
- btn += '<a href="'+detail_url+'" ><span class="label label-primary" 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;
- }
- },
- });
- });
- </script>
- {/block}
|