index.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="ibox">
  4. <div class="ibox-content">
  5. <div class="row">
  6. <div class="col-xs-12" style="text-align: right;">
  7. <form class="form-inline" id="form-search" action="{:url('index')}">
  8. <div class="input-group">
  9. <select name="cate_id" class="form-control">
  10. <option value="">选择分类</option>
  11. {foreach $cate as $k=>$v}
  12. <option value="{$v.id}">{$v.title}</option>
  13. {/foreach}
  14. </select>
  15. </div>
  16. <div class="input-group">
  17. <input type="text" id="date" readonly class="form-control" name="begin" placeholder="开始日期">
  18. </div>
  19. <div class="input-group">
  20. <input type="text" id="date1" readonly class="form-control" name="end" placeholder="结束日期">
  21. </div>
  22. <div class="input-group">
  23. <input type="text" class="form-control" style="width: 180px;" name="order_sn" placeholder="订单号">
  24. </div>
  25. <div class="input-group">
  26. <input type="text" class="form-control" style="width: 150px;" name="name" placeholder="收货人姓名">
  27. </div>
  28. <div class="input-group">
  29. <select name="status" class="form-control">
  30. <option value="">选择状态</option>
  31. {foreach $status as $k=>$v}
  32. <option value="{$k}">{$v}</option>
  33. {/foreach}
  34. <option value="99">已退款</option>
  35. </select>
  36. </div>
  37. <!-- <div class="input-group">-->
  38. <!-- <select name="order_type" class="form-control">-->
  39. <!-- <option value="">订单类型</option>-->
  40. <!-- <option value="0">普通订单</option>-->
  41. <!-- <option value="1">桶装水订单</option>-->
  42. <!-- </select>-->
  43. <!-- </div>-->
  44. <div class="input-group">
  45. <span class="input-group-btn">
  46. <button class="btn-sm btn-primary" type="button" id ="search-btn" ><i class="fa fa-search"></i></button>
  47. </span>
  48. <span class="input-group-btn">
  49. <button class="btn-sm btn-primary " type="button" id="search-clear"><i class="fa fa-undo"></i></button>
  50. </span>
  51. </div>
  52. </form>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="ibox-content">
  57. <div class="jqGrid_wrapper">
  58. <table id="table" style="border-collapse: collapse"></table>
  59. <div id="pager"></div>
  60. </div>
  61. </div>
  62. </div>
  63. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  64. {/block}
  65. {block name="script"}
  66. <script>
  67. laydate.render({
  68. elem: '#date',
  69. //设置开始日期、日期日期的 input 选择器
  70. //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
  71. trigger: 'click' ,
  72. theme: '#ffaa2d'
  73. });
  74. laydate.render({
  75. elem: '#date1',
  76. //设置开始日期、日期日期的 input 选择器
  77. //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
  78. trigger: 'click' ,
  79. theme: '#ffaa2d'
  80. });
  81. $(function () {
  82. $(window).bind("resize",function(){
  83. var width=$(".jqGrid_wrapper").width();
  84. $("#table").setGridWidth(width);
  85. });
  86. $.jgrid.defaults.styleUI="Bootstrap";
  87. $("#table").jqGrid({
  88. url:"{:url('index')}",
  89. datatype: "json",
  90. colModel:[
  91. {label:'#',name:'id',index:'id', width:30,sortable: false},
  92. {label:'订单号',name:'order_sn',index:'order_sn', width:80,sortable: false},
  93. {label:'订单金额',name:'amount',index:'amount', width:40,sortable: false},
  94. {label:'收货人',name:'name',index:'name', width:60,sortable: false},
  95. {label:'联系方式',name:'phone',index:'phone', width:60,sortable: false},
  96. {label:'状态',name:'status_name',index:'status_name',width:80,editable: false,sortable: false,formatter:function (a,b,c){
  97. return '<span title="'+a+'">'+a+'</span>';
  98. }},
  99. // {label:'订单类型',name:'order_type',status:'order_type',width:30,editable: false,sortable: false,formatter:function (a,b,c){
  100. // if(a == 0){
  101. // return '<span title="普通订单">普通订单</span>';
  102. // }
  103. // if(a == 1){
  104. // return '<span title="桶装水订单">桶装水订单</span>';
  105. // }
  106. // }},
  107. // {label:'押金',name:'cash_price',index:'cash_price', width:70,sortable: false},
  108. // {label:'押金备注',name:'remark',index:'remark', width:70,sortable: false},
  109. {label:'订单备注',name:'order_remark',index:'order_remark', width:70,sortable: false},
  110. {label:'退款金额',name:'refund_money',index:'refund_money', width:70,sortable: false},
  111. {label:'创建时间',name:'create_time',index:'create_time', width:70,sortable: false},
  112. {label:'操作',width:100,sortable: false,formatter: function (a, b, c) {
  113. var detailsurl = "{:url('details',[],'')}/id/"+c.id;
  114. var send = "{:url('send',[],'')}/id/"+c.id;
  115. var btn = '<a url="'+detailsurl+'" href="javascript:;" data-title="详情" onclick="layer_open(this,1)"><span class="label label-info" title="详情">详情</span></a>&nbsp;';
  116. if(c.status==1 && c.checkOrderSend==0 ||c.checkOrderSend==1){
  117. btn += '<a href="'+send+'" class="confirm ajax-get" data-confirm="确定要发货吗?" data-table="1"><span class="label label-danger" title="发货">发货</span></a>';
  118. }
  119. return btn;
  120. }},
  121. ],
  122. rowNum:10,
  123. rowList:[10,20,30,50,100],
  124. pager: '#pager',
  125. sortname: 'id',
  126. viewrecords: true,
  127. autowidth:true,
  128. mtype: 'post',
  129. height: 'auto',
  130. emptyrecords: "暂无数据",
  131. sortorder: "desc",
  132. caption:"{$meta_title}",
  133. loadComplete: function (xhr) {
  134. if(xhr.code==0){
  135. layer.msg(xhr.msg);
  136. return false;
  137. }
  138. var yzf = xhr.yzf;
  139. var ytk = xhr.ytk;
  140. $('#pager_left').html('<span style="color:red;font-size: 10px;">已支付金额:'+yzf+' 元 <span style="color:red;font-size: 10px;">已退款金额:'+ytk+'元');
  141. },
  142. });
  143. });
  144. </script>
  145. {/block}