123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- {extend name="common/common2" /}
- {block name="main"}
- <style>
- .av{
- background-color: #23c6c8 !important;
- border-color: #23c6c8 !important;
- }
- .btn-sm{
- color: #ffffff !important;
- }
- .pr{
- background-color: #23c6c8 !important;
- border-color: #23c6c8 !important;
- }
- </style>
- <div class="ibox">
- <div class="ibox-content">
- <div class="tab-content" style="text-align: right;">
- <form action="{:url('index')}" id="form-search" method="GET" class="form-inline">
- <div class="input-group">
- <input type="text" class="form-control" name="sn" placeholder="单号">
- </div>
- <div class="input-group">
- <span class="input-group-btn">
- <button class="btn-sm btn-primary" id ="search-btn" type="button" ><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 class="ibox-content" id="printer">
- <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 src="/static/browser.js"></script>
- <script src="/static/jquery.jqprint-0.3.js"></script>
- <script>
- laydate.render({
- elem: '#date',
- //设置开始日期、日期日期的 input 选择器
- //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
- trigger: 'click' ,
- theme: '#6eb7ff'
- });
- function load_index(self,key){
- $(self).addClass('active').siblings().removeClass('active')
- $("#is_spot").val(key);
- $("#search-btn").click();
- }
- function load_index1(self,key){
- $(self).addClass('av').siblings().removeClass('av')
- $("#is_ok").val(key);
- $("#search-btn").click();
- }
- $('#down').click(function () {
- var url = "{:url('export')}";
- var param = $('#form-search').serialize();
- window.location.href = url+'?ex_type=1'+param;
- })
- $('#down1').click(function () {
- var url = "{:url('export')}";
- var param = $('#form-search').serialize();
- window.location.href = url+'?ex_type=2'+param;
- })
- $(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:'refuse_id',index:'refuse_id',width:100,editable: false,sortable: false,formatter:function (a,b,c){
- // return '<span style="background-color: black;color: white" class="label">#'+a+'</span>'
- // }},
- {label:'订单号/状态',name:'status_txt',index:'status_txt',width:200,editable: false,sortable: false,formatter:function (a,b,c){
- return a;
- }},
- {label:'总价¥',name:'price',index:'price',width:100,sortable: false},
- {label:'下单人',name:'name',index:'name',width:200,editable: false,sortable: false,formatter:function (a,b,c){
- return ''+c.name+'<br />'+c.mobile+'<br />'+c.address+''
- }},
- {label:'备注',name:'remark',index:'remark',width:120,sortable: false},
- // {label:'购买物品',name:'item',index:'item',width:260,editable: false,sortable: false,formatter:function (a,b,c){
- // return a;
- // }},
- {label:'退单物品',name:'item_refuse',index:'item_refuse',width:260,editable: false,sortable: false,formatter:function (a,b,c){
- return a;
- }},
- {label:'下单/退单/审批时间',name:'name',index:'name',width:260,editable: false,sortable: false,formatter:function (a,b,c){
- return '下单:'+c.pay_time+'<br />退单:'+c.create_time+'<br />审批:'+c.op_time+''
- }},
- {label:'操作',width:100,sortable: false,formatter: function (a, b, c) {
- var editurl = "{:url('option',[],'')}/id/"+c.refuse_id;
- var delurl = "{:url('del',[],'')}/id/"+c.id;
- var btn = '';
- if(c.status==4){
- btn+= '<a url="'+editurl+'" href="javascript:;" data-title="审核退单申请" onclick="layer_open(this,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,
- autoScroll: false,
- shrinkToFit: true,
- mtype: 'post',
- height: 'auto',
- emptyrecords: "暂无数据",
- sortorder: "desc",
- caption:"退单列表",
- loadComplete: function (xhr) {
- if(xhr.code==0){
- layer.msg(xhr.msg);
- return false;
- }
- },
- });
- /*固定表头及侧边*/
- $("#table").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "auto" });
- $("#table").jqGrid('setFrozenColumns');
- });
- </script>
- {/block}
|