1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- {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('selfAdd',[],'')}/mode/{$mode}" data-title="创建{$m_name}订单" onclick="layer_open(this,1)" class="btn btn-sm btn-primary">创建{$m_name}订单</a>
- </div>
- <div class="col-xs-9" style="text-align: right;">
- <form class="form-inline" id="form-search" action="{:url('selfIndex')}?mode={$mode}">
- <div class="input-group">
- <input type="text" class="form-control" name="sn" placeholder="订单编号">
- </div>
- <div class="input-group">
- <select name="order_mode" class="form-control">
- <option value="">选择状态</option>
- {foreach $order_mode_list as $k=>$v}
- <option value="{$v['id']}">{$v['in_content']}</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>
- </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>
- $(function () {
- $(window).bind("resize",function(){
- var width=$(".jqGrid_wrapper").width();
- $("#table").setGridWidth(width);
- });
- $.jgrid.defaults.styleUI="Bootstrap";
- $("#table").jqGrid({
- url:"{:url('selfIndex')}?mode={$mode}",
- datatype: "json",
- colModel:[
- {label:'编号',name:'sn',index:'sn', width:80,sortable: false},
- {label:'申请时间',name:'create_time',index:'create_time',width:50,sortable: true},
- {label:'开始地点',name:'start_name',index:'start_name',width:40,sortable: true},
- {label:'内容',name:'content',index:'content',width:60,sortable: true},
- {label:'状态',name:'order_mode_text',index:'order_mode_text',width:60,sortable: true,formatter:function (a, b, c) {
- return '<span style="color: '+c.order_mode_color+'">'+a+'</span>'
- }},
- {label:'操作',width:50,sortable: false,formatter: function (a, b, c) {
- var detail_url = "{:url('detail',[],'')}/id/"+c.id;
- var cancel_url = "{:url('cancel',[],'')}/id/"+c.id;
- //var btn = '<a href="'+detail_url+'" ><span class="label label-primary" title="详情">详情</span></a> ';
- var btn = '<a url="'+detail_url+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-primary" title="详情">详情</span></a> ';
- if(c.order_mode==1){
- btn += '<a href="'+cancel_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: 'id',
- viewrecords: true,
- autowidth:true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "desc",
- caption:"{$m_name}订单列表",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- });
- </script>
- {/block}
|