Ver código fonte

Merge branch 'raccount' of 39.97.239.116:gyfl/xyzshop into raccount

stanley-king 1 mês atrás
pai
commit
99f67675a0

+ 19 - 10
admin/control/ordersendlist.php

@@ -280,10 +280,18 @@ class ordersendlistControl extends SystemControl
         {
             $base_cond['refill_order.mch_order'] = ['in', $buyback_mch_orders];
         }
-        else if (in_array($_GET['order_state'], ['0', '30', '40']))
+        else if (in_array($_GET['order_state'], ['30', '40']))
         {
             $base_cond['vr_order.order_state'] = intval($_GET['order_state']);
         }
+        else if ($_GET['order_state'] === '0')
+        {
+            $base_cond['vr_order.order_state'] = intval($_GET['order_state']);
+
+            if (!empty($buyback_mch_orders)) {
+                $base_cond['refill_order.mch_order'] = ['not in', $buyback_mch_orders];
+            }
+        }
         else if (empty($order_state))
         { //没选择订单状态,默认只显示充值中和已取消(未返销)
             $base_cond['vr_order.order_state'] = ['in', [ORDER_STATE_CANCEL, ORDER_STATE_SEND]];
@@ -304,15 +312,16 @@ class ordersendlistControl extends SystemControl
         }
         else
         {
-            $cur_time = time();
-            $order_by = 'refill_order.order_time desc';
-            $order_list = 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("refill_order.*,vr_order.order_state,({$cur_time} - refill_order.order_time - merchant.time_out) as mtime_out")
-                ->where($base_cond)
-                ->order($order_by)
-                ->select();
+//            $order_by = 'refill_order.order_time desc';
+//            $order_list = 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("refill_order.*,vr_order.order_state,({$cur_time} - refill_order.order_time - merchant.time_out) as mtime_out")
+//                ->where($base_cond)
+//                ->order($order_by)
+//                ->select();
+            $order_list = $model_refill_order->getOrderMonitorTransfer($base_cond, 200, 5000,
+                "refill_order.*,vr_order.order_state,({$cur_time} - refill_order.order_time - merchant.time_out) as mtime_out");
 
             $merchant_list = $merchants_getter($all_mchids);
             if(!empty($order_list))

+ 2 - 1
admin/templates/default/js/stats-merchant-ratios-report.js

@@ -246,7 +246,8 @@ class MerchantComponent extends Component {
 
         const companyList = [
             {name: '为均'},
-            {name: '焱祺'}
+            {name: '焱祺'},
+            {name: '卡单'}
         ];
         companyList.forEach(item=> {
             content += '<option>' + item.name + '</option>';

+ 3 - 3
admin/templates/default/monitor_transfer.php

@@ -346,7 +346,7 @@
                         <?php } ?>
                     </td>
                     <td class="align-center"><?php echo orderState($order); ?></td>
-                    <td class="align-center"><?php echo $order['buyback'] === true ? '已销': '/';?></td>
+                    <td class="align-center"><?php echo $order['buyback'] === true ? '已销': '/';?></td>
                     <td class="align-center"><?php echo $order['quality_text']; ?></td>
                     <td class="align-left"><?php echo $order['err_msg']; ?></td>
                     <td class="align-left"><?php echo $order['mch_order']; ?></td>
@@ -633,7 +633,7 @@
     function hCopyChannel(e) {
         let str = ''
         $('#tbody tr').each(function () {
-            let res = $(this).find('td').eq(17).text()
+            let res = $(this).find('td').eq(18).text()
             str += res + '\n'
         })
         let oInput = document.createElement("textarea");
@@ -665,7 +665,7 @@
     function hCopyMchOrder(e) {
         let str = ''
         $('#tbody tr').each(function () {
-            let res = $(this).find('td').eq(15).text()
+            let res = $(this).find('td').eq(16).text()
             str += res + '\n'
         })
         let oInput = document.createElement("textarea");

+ 17 - 0
data/model/refill_order.model.php

@@ -113,6 +113,23 @@ class refill_orderModel extends Model
         return $orders;
     }
 
+    public function getOrderMonitorTransfer($condition, $pagesize = '', $total = 0, $field = '*', $order = 'refill_order.order_time desc', $limit = '', $master = false)
+    {
+        $cur_time = time();
+
+        $list = $this->table('refill_order,vr_order,merchant')
+            ->join('inner,inner')
+            ->on('refill_order.order_id=vr_order.order_id,refill_order.mchid=merchant.mchid')
+            ->field("refill_order.*,vr_order.order_state,({$cur_time} - refill_order.order_time - merchant.time_out) as mtime_out")
+            ->where($condition)
+            ->page($pagesize, $total)
+            ->order($order)
+            ->select();
+
+        if (empty($list)) return [];
+        return $list;
+    }
+
     public function first_item()
     {
         return $this->table('refill_order')->field('order_time')->where(['order_id' => ['gt',0]])->order('order_id asc')->find();