Просмотр исходного кода

refill order add search and condition vr_order.adddd+time

haru haru 3 лет назад
Родитель
Сommit
4a0faddca6
2 измененных файлов с 40 добавлено и 0 удалено
  1. 14 0
      admin/control/refill_order.php
  2. 26 0
      admin/templates/default/refill.order.index.php

+ 14 - 0
admin/control/refill_order.php

@@ -84,17 +84,28 @@ class refill_orderControl extends SystemControl
 
         if ($start_unixtime > 0 && $end_unixtime > $start_unixtime) {
             $condition['refill_order.order_time'] = [['egt', $start_unixtime], ['lt', $end_unixtime], 'and'];
+            $condition['vr_order.add_time'] = [['egt', $start_unixtime-1], ['lt', $end_unixtime-1], 'and'];
         } elseif ($start_unixtime > 0) {
             $condition['refill_order.order_time'] = ['egt', $start_unixtime];
+            $condition['vr_order.add_time'] = ['egt', $start_unixtime-1];
         } elseif ($end_unixtime > 0) {
             $condition['refill_order.order_time'] = ['lt', $end_unixtime];
+            $condition['vr_order.add_time'] = ['lt', $end_unixtime-1];
         } else {
             $start = time() - 3600;
             $_GET['query_start_time'] = date("Y-m-d H:i:s",$start);
             $condition['refill_order.order_time'] = ['egt', $start];
+            $condition['vr_order.add_time'] = ['egt', $start-1];
             $fToday = true;
         }
 
+        if(in_array($_GET['cardno_state'], ['0','1', '2', '4', '5'])) {
+            $condition['refill_order.cardno_state'] = $_GET['cardno_state'];
+        }
+        if(in_array($_GET['is_transfer'], ['0','1'])) {
+            $condition['refill_order.is_transfer'] = $_GET['is_transfer'];
+        }
+
         if (in_array($_GET['order_state'], ['0', '10', '20', '30', '40']))
         {
             $condition['vr_order.order_state'] = $_GET['order_state'];
@@ -102,9 +113,11 @@ class refill_orderControl extends SystemControl
             if ($_GET['order_state'] == ORDER_STATE_SEND) {
                 if ($_GET['time'] == 1) {
                     $condition['refill_order.order_time'] = ['between', [(time() - 3600), (time() - 1800)]];
+                    $condition['vr_order.add_time'] = ['between', [(time() - 3600 - 1), (time() - 1800 - 1)]];
                 }
                 if ($_GET['time'] == 2) {
                     $condition['refill_order.order_time'] = ['lt', (time() - 3600)];
+                    $condition['vr_order.add_time'] = ['lt', (time() - 3600 - 1)];
                 }
             }
         }
@@ -166,6 +179,7 @@ class refill_orderControl extends SystemControl
             if(!empty($condition['refill_order.order_time'])) {
                 $condition['refill_order.notify_time'] = $condition['refill_order.order_time'];
                 unset($condition['refill_order.order_time']);
+                unset($condition['vr_order.add_time']);
             }
         }
         $result = $this->getAllOrders($condition);

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

@@ -150,6 +150,32 @@
             <tr>
                 <th><label>充值卡卡号</label></th>
                 <td><input class="txt2" type="text" name="card_no" value="<?php echo $_GET['card_no']; ?>"/></td>
+                <th><label>卡号状态</label></th>
+                <td>
+                    <select name="cardno_state" class="querySelect">
+                        <option value=""><?php echo $lang['nc_please_choose']; ?></option>
+                        <option value="0"
+                                <?php if ($_GET['cardno_state'] == '0'){ ?>selected<?php } ?>>空号</option>
+                        <option value="1"
+                                <?php if ($_GET['cardno_state'] == '1'){ ?>selected<?php } ?>>实号</option>
+                        <option value="2"
+                                <?php if ($_GET['cardno_state'] == '2'){ ?>selected<?php } ?>>停机</option>
+                        <option value="3"
+                                <?php if ($_GET['cardno_state'] == '3'){ ?>selected<?php } ?>>库无</option>
+                        <option value="4"
+                                <?php if ($_GET['cardno_state'] == '4'){ ?>selected<?php } ?>>沉默号</option>
+                        <option value="5"
+                                <?php if ($_GET['cardno_state'] == '5'){ ?>selected<?php } ?>>风险号</option>
+                    </select>
+                    <label>是否携号转网</label>
+                    <select name="is_transfer">
+                        <option value=""><?php echo $lang['nc_please_choose']; ?></option>
+                        <option value="1"
+                                <?php if ($_GET['is_transfer'] == '1'){ ?>selected<?php } ?>>是</option>
+                        <option value="0"
+                                <?php if ($_GET['is_transfer'] == '0'){ ?>selected<?php } ?>>否</option>
+                    </select>
+                </td>
             </tr>
             <tr>