123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- ##tlayout("admin/layout.htm"){
- <div class="breadcrumbs" style="padding-top:10px;height: 55px;">
- <div class="col-xs-6 breadcrumbs_title" style="margin-top: -10px;">订单列表</div>
- <div class="col-xs-6">
- <form action="/admin/orders/index" method="post" id="search_form_code" style="text-align: right;">
- <input type="text" placeholder="请输入订单号" name="code" value="${code!}" style="height: 35px;width:200px;" />
- <button class="btn btn-sm" onclick="$('#search_form_code').submit()" style="padding: 4px 10px;" type="button">确定</button>
- </form>
- </div>
- </div>
- <div class="page-content">
- <div class="row">
- <div class="col-xs-12">
- <form action="javascript:void(0)" class="clearfix" id="search_form">
- ##if(exist("status")){
- <label><a href="/admin/orders" style="color: #000">全部</a></label>
- ##if(status==0){
- <label class="cur"><a href="/admin/orders?status=0" style="color: #000">未付款</a></label>
- ##}else{
- <label><a href="/admin/orders?status=1" style="color: #000">未付款</a></label>
- ##}
- ##if(status==1){
- <label class="cur"><a href="/admin/orders?status=1" style="color: #000">付款审核中</a></label>
- ##}else{
- <label><a href="/admin/orders?status=1" style="color: #000">付款审核中</a></label>
- ##}
- ##if(status==2){
- <label class="cur"><a href="/admin/orders?status=2" style="color: #000">待发货</a></label>
- ##}else{
- <label><a href="/admin/orders?status=2" style="color: #000">待发货</a></label>
- ##}
- ##if(status==3){
- <label class="cur"><a href="/admin/orders?status=3" style="color: #000">已发货</a></label>
- ##}else{
- <label><a href="/admin/orders?status=3" style="color: #000">已发货</a></label>
- ##}
- ##if(status==4){
- <label class="cur"><a href="/admin/orders?status=4" style="color: #000">已收货</a></label>
- ##}else{
- <label><a href="/admin/orders?status=4" style="color: #000">已收货</a></label>
- ##}
- ##if(status==5){
- <label class="cur"><a href="/admin/orders?status=5" style="color: #000">已完成</a></label>
- ##}else{
- <label><a href="/admin/orders?status=5" style="color: #000">已完成</a></label>
- ##}
- ##if(status==9){
- <label class="cur"><a href="/admin/orders?status=9" style="color: #000">退款中</a></label>
- ##}else{
- <label><a href="/admin/orders?status=9" style="color: #000">退款中</a></label>
- ##}
- ##}else{
- <label class="cur"><a href="/admin/orders" style="color: #000">全部</a></label>
- <label><a href="/admin/orders?status=0" style="color: #000">未付款</a></label>
- <label><a href="/admin/orders?status=1" style="color: #000">付款审核中</a></label>
- <label><a href="/admin/orders?status=2" style="color: #000">待发货</a></label>
- <label><a href="/admin/orders?status=3" style="color: #000">已发货</a></label>
- <label><a href="/admin/orders?status=4" style="color: #000">已收货</a></label>
- <label><a href="/admin/orders?status=5" style="color: #000">已完成</a></label>
- <label><a href="/admin/orders?status=9" style="color: #000">退款中</a></label>
- ##}
- </form>
- </div>
- <div class="col-xs-12">
- <div class="table-responsive">
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th>订单号</th>
- <th>付款类型</th>
- <th>订单状态</th>
- <th>运单号</th>
- <th>订单金额</th>
- <th>创建时间</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- ##if(results!=null && results.list.~size!=0){
- ##for(_item in results.list!){
- <tr>
- <td>
- <a href="/admin/orders/ordersMsg?id=${_item.id!}">${_item.code!}</a>
- </td>
- <td>
- ##if(_item.payment==1){
- 微信支付
- ##}else if(_item.payment==2){
- 银行卡支付
- ##}else if(_item.payment==3){
- 支付宝支付
- ##}
- </td>
- <td>
- ##if(_item.status==0){
- 未付款
- ##}else if(_item.status==1){
- 付款审核中
- ##}else if(_item.status==2){
- 待发货
- ##}else if(_item.status==3){
- 已发货
- ##}else if(_item.status==4){
- 已收货
- ##}else if(_item.status==5){
- 已完成
- ##}else{
- 退款中
- ##}
- </td>
- <td>
- ##if(_item.tracking_code!=null && _item.tracking_code!=""){
- <div>${_item.tracking_company!}(<a href="javascript:showAlert('/admin/orders/trackingMsg?id=${_item.id!}')">${_item.tracking_code!}</a>)</div>
- <div style="margin-top: 10px;">${_item.tracking_date!,dateFormat='yyyy-MM-dd HH:mm'}</div>
- ##}
- </td>
- <td>¥${_item.grand_total!}</td>
- <td>${_item.create_date!,dateFormat='yyyy-MM-dd HH:mm:ss'}</td>
- <td style="width:100px;">
- <div class="btn-group">
- <button class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown">
- 操作<span class="icon-caret-down icon-on-right"></span>
- </button>
- <ul class="dropdown-menu dropdown-info pull-right">
- <li><a href="/admin/orders/ordersMsg?id=${_item.id!}">详细信息</a></li>
- ##if(_item.status==1){
- <li><a href="javascript:changeStatus(${_item.id!}, 2, '设置为已收款')">设置已收款</a></li>
- <li><a href="javascript:changeStatus(${_item.id!}, 0, '款项未收到')">款项未收到</a></li>
- ##}
- ##if(_item.status==2){
- <li><a href="javascript:showAlert('/admin/orders/addTracking?id=${_item.id!}')">设置为已发货</a></li>
- ##}
- ##if(_item.status==9){
- <li><a href="javascript:changeStatus(${_item.id!}, 5, '退款通过')">退款通过</a></li>
- <li><a href="javascript:changeStatus(${_item.id!}, 4, '退款驳回')">退款驳回</a></li>
- ##}
- <li><a href="/admin/orders/print?id=${_item.id!}" target="_blank">打印订单</a></li>
- <li><a href="javascript:deleteOrders(${_item.id!})">删除订单</a></li>
- </ul>
- </div>
- </td>
- </tr>
- ##}
- ##}
- </tbody>
- </table>
- ##if(totalPage>1){
- <div class="fenye">
- <#_pagination page="${results!}" params="status,code">
- <ul id="Pagination"></ul>
- </#_pagination>
- </div>
- ##}
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- function changeStatus(id, status, msg){
-
- if(confirm("确定要" + msg + "该记录吗?")){
- $.post("/admin/orders/changeStatus",{id:id,status:status},function(data){
- alert(data.msg);
- if(data.success){
- location.reload();
- }
- });
- }
- }
- function deleteOrders(id){
-
- if(confirm("确定要删除该记录吗?")){
- $.post("/admin/orders/deleteOrders",{id:id},function(data){
- alert(data.msg);
- if(data.success){
- location.reload();
- }
- });
- }
- }
- </script>
- ##}
|