Browse Source

admin update

xiaoyu 3 years ago
parent
commit
5d93eca834
2 changed files with 12 additions and 11 deletions
  1. 12 2
      admin/control/ordersendlist.php
  2. 0 9
      admin/templates/default/provider.price.php

+ 12 - 2
admin/control/ordersendlist.php

@@ -121,9 +121,17 @@ class ordersendlistControl extends SystemControl
             $this->RefillOrderExport($orders_cond, 'time_out_order');
             return;
         }
-
+        $store_ids = Model('')->table('refill_order,vr_order,merchant')
+            ->join('inner,inner')
+            ->on('refill_order.order_id=vr_order.order_id,refill_order.mchid=merchant.mchid')
+            ->field('DISTINCT vr_order.store_id')
+            ->where($orders_cond)
+            ->group('vr_order.store_id')
+            ->order('store_id asc')
+            ->select();
+        $store_ids = array_column($store_ids, 'store_id');
         $merchant_list = $this->merchants();
-        $provider_list = $this->providers();
+        $provider_list = $this->providers(['store.store_id' => ['in', $store_ids]]);
         [$merchant_stat, $order_stat] = $this->merchant_timeout_stats($orders_cond);
         if (empty($_GET['mchid'])) {
             $order_count = $order_stat['order_count'];
@@ -195,6 +203,7 @@ class ordersendlistControl extends SystemControl
     private function merchant_timeout_stats($cond)
     {
         unset($cond['refill_order.mchid']);
+        unset($cond['vr_order.store_id']);
         $stats = Model('')->table('refill_order,vr_order,merchant')
             ->join('inner,inner')
             ->on('refill_order.order_id=vr_order.order_id,refill_order.mchid=merchant.mchid')
@@ -325,6 +334,7 @@ class ordersendlistControl extends SystemControl
 
     private function provider_timeout_stats($cond, $provider_list)
     {
+        unset($cond['refill_order.mchid']);
         unset($cond['vr_order.store_id']);
         $stats = Model('')->table('refill_order,vr_order')
             ->join('inner')

+ 0 - 9
admin/templates/default/provider.price.php

@@ -166,15 +166,6 @@
             <?php } ?>
             <?php } ?>
             </tbody>
-            <tfoot>
-            <tr class="tfoot">
-                <td></td>
-                <td colspan="7">
-                    <div class="pagination"><?php echo $output['show_page']; ?></div>
-                </td>
-            </tr>
-            </tfoot>
-        </table>
         </div>