Selaa lähdekoodia

admin refill order list stat control

ayHaru 4 vuotta sitten
vanhempi
commit
6aee578a44
2 muutettua tiedostoa jossa 28 lisäystä ja 2 poistoa
  1. 13 2
      admin/control/merchant.php
  2. 15 0
      admin/templates/default/refill.order.index.php

+ 13 - 2
admin/control/merchant.php

@@ -756,6 +756,12 @@ class merchantControl extends SystemControl
 
     public function refill_orderOp()
     {
+        $fShowStat = $_GET['fShowStat'];
+        $this->refill_order($fShowStat==1);
+    }
+
+    public function refill_order($fShowStat = false)
+    {
         $model_refill_order = Model('refill_order');
         $condition['inner_status'] = 0;
 
@@ -857,7 +863,8 @@ class merchantControl extends SystemControl
             $order_list[$order_id]['diff_time'] = $diff_time;
         }
 
-        $stat = $this->all_order_state_stat($condition);
+
+
         $provider_list = Model('')->table('refill_provider,store')
             ->field('refill_provider.*,store.store_name')
             ->join('inner')
@@ -866,7 +873,11 @@ class merchantControl extends SystemControl
             ->limit(1000)
             ->select();
 
-        Tpl::output('stat', $stat);
+        if ($fShowStat) {
+            $stat = $this->all_order_state_stat($condition);
+            Tpl::output('stat', $stat);
+        }
+
         Tpl::output('ftoday', $fToday);
         Tpl::output('order_list', $order_list);
         Tpl::output('provider_list', $provider_list);

+ 15 - 0
admin/templates/default/refill.order.index.php

@@ -32,6 +32,7 @@
         <input type="hidden" name="act" value="merchant"/>
         <input type="hidden" name="op" value="refill_order"/>
         <input type="hidden" name="export" value=""/>
+        <input type="hidden" name="fShowStat" value=""/>
         <table class="tb-type1 noborder search">
             <tbody>
             <tr>
@@ -175,6 +176,11 @@
                        title="<?php echo $lang['nc_query']; ?>">&nbsp;
                     </a>
                 </td>
+                <td>
+                    <a href="javascript:void(0);" id="ncstat" class="btns">
+                        <span>搜索+统计</span>
+                    </a>
+                </td>
             </tr>
             <tr>
                 <td></td>
@@ -210,6 +216,7 @@
             </tbody>
         </table>
     </form>
+    <?php if($_GET['fShowStat'] == 1){?>
       <table class="table tb-type2" id="prompt">
         <tbody>
           <tr class="space odd">
@@ -269,6 +276,7 @@
           </tr>
         </tbody>
       </table>
+    <?php }?>
     <table class="table tb-type2 nobdb">
         <thead>
         <tr class="thead">
@@ -380,6 +388,13 @@
             $('#formSearch').submit();
             $('input[name="export"]').val('');
         })
+        //搜索+统计 
+        $('#ncstat').click(function () {
+            $('input[name="fShowStat"]').val('1');
+            $('input[name="op"]').val('refill_order');
+            $('#formSearch').submit();
+            $('input[name="fShowStat"]').val('');
+        })
         // 日期选择器
         laydate.render({
             elem: '#startTime',