123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- {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('index')}">
- <div class="input-group">
- <select name="cate_id" class="form-control">
- <option value="">选择分类</option>
- {foreach $cate as $k=>$v}
- <option value="{$v.id}">{$v.title}</option>
- {/foreach}
- </select>
- </div>
- <div class="input-group">
- <input type="text" id="date" readonly class="form-control" name="begin" placeholder="开始日期">
- </div>
- <div class="input-group">
- <input type="text" id="date1" readonly class="form-control" name="end" placeholder="结束日期">
- </div>
- <div class="input-group">
- <input type="text" class="form-control" style="width: 180px;" name="order_sn" placeholder="订单号">
- </div>
- <div class="input-group">
- <input type="text" class="form-control" style="width: 150px;" name="name" placeholder="收货人姓名">
- </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}
- <option value="99">已退款</option>
- </select>
- </div>
- <!-- <div class="input-group">-->
- <!-- <select name="order_type" class="form-control">-->
- <!-- <option value="">订单类型</option>-->
- <!-- <option value="0">普通订单</option>-->
- <!-- <option value="1">桶装水订单</option>-->
- <!-- </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-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>
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- {/block}
- {block name="script"}
- <script>
- laydate.render({
- elem: '#date',
- //设置开始日期、日期日期的 input 选择器
- //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
- trigger: 'click' ,
- theme: '#ffaa2d'
- });
- laydate.render({
- elem: '#date1',
- //设置开始日期、日期日期的 input 选择器
- //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
- trigger: 'click' ,
- theme: '#ffaa2d'
- });
- $(function () {
- $(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:'id',index:'id', width:30,sortable: false},
- {label:'订单号',name:'order_sn',index:'order_sn', width:80,sortable: false},
- {label:'订单金额',name:'amount',index:'amount', width:40,sortable: false},
- {label:'收货人',name:'name',index:'name', width:60,sortable: false},
- {label:'联系方式',name:'phone',index:'phone', width:60,sortable: false},
- {label:'状态',name:'status_name',index:'status_name',width:80,editable: false,sortable: false,formatter:function (a,b,c){
- return '<span title="'+a+'">'+a+'</span>';
- }},
- // {label:'订单类型',name:'order_type',status:'order_type',width:30,editable: false,sortable: false,formatter:function (a,b,c){
- // if(a == 0){
- // return '<span title="普通订单">普通订单</span>';
- // }
- // if(a == 1){
- // return '<span title="桶装水订单">桶装水订单</span>';
- // }
- // }},
- // {label:'押金',name:'cash_price',index:'cash_price', width:70,sortable: false},
- // {label:'押金备注',name:'remark',index:'remark', width:70,sortable: false},
- {label:'订单备注',name:'order_remark',index:'order_remark', width:70,sortable: false},
- {label:'退款金额',name:'refund_money',index:'refund_money', width:70,sortable: false},
- {label:'创建时间',name:'create_time',index:'create_time', width:70,sortable: false},
- {label:'操作',width:100,sortable: false,formatter: function (a, b, c) {
- var detailsurl = "{:url('details',[],'')}/id/"+c.id;
- var send = "{:url('send',[],'')}/id/"+c.id;
- var btn = '<a url="'+detailsurl+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-info" title="详情">详情</span></a> ';
- if(c.status==1 && c.checkOrderSend==0 ||c.checkOrderSend==1){
- btn += '<a href="'+send+'" 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:"{$meta_title}",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- var yzf = xhr.yzf;
- var ytk = xhr.ytk;
- $('#pager_left').html('<span style="color:red;font-size: 10px;">已支付金额:'+yzf+' 元 <span style="color:red;font-size: 10px;">已退款金额:'+ytk+'元');
- },
- });
- });
- </script>
- {/block}
|