|
@@ -14,9 +14,16 @@ class merchant_orderControl extends mbMerchantControl
|
|
|
|
|
|
$cond['mchid'] = $this->mchid();
|
|
|
$cond['inner_status'] = 0;
|
|
|
- $cond['refill_order.order_time'] = ['time', [strtotime(date("Y-m-d")), strtotime(date("Y-m-d"))]];
|
|
|
if (!empty($_GET['card_type'])) {
|
|
|
- $cond['refill_order.card_type'] = $_GET['card_type'];
|
|
|
+ if(in_array($_GET['card_type'] , ['1' , '2' , '4' , '5' , '6'])) {
|
|
|
+ $cond['refill_order.card_type'] = $_GET['card_type'];
|
|
|
+ }
|
|
|
+ if($_GET['card_type'] == 'oil') {
|
|
|
+ $cond['refill_order.card_type'] = ['in' , ['1' , '2']];
|
|
|
+ }
|
|
|
+ if($_GET['card_type'] == 'phone') {
|
|
|
+ $cond['refill_order.card_type'] = ['in' , ['4' , '5' , '6']];
|
|
|
+ }
|
|
|
}
|
|
|
if (!empty($_GET['card_no'])) {
|
|
|
$cond['refill_order.card_no'] = $_GET['card_no'];
|
|
@@ -37,7 +44,7 @@ class merchant_orderControl extends mbMerchantControl
|
|
|
}
|
|
|
}
|
|
|
if ($_GET['start_time'] > 0 && $_GET['end_time'] > 0) {
|
|
|
- $cond['refill_order.order_time'] = ['between', [$_GET['start_time'], $_GET['end_time']]];
|
|
|
+ $cond['refill_order.order_time'] = ['time', [$_GET['start_time'], $_GET['end_time']]];
|
|
|
}
|
|
|
$fields = 'refill_order.*,vr_order.order_state';
|
|
|
$order_list = $model_vr_order->getMerchantOrderList($cond, $this->page, $fields, 'refill_order.order_id desc');
|
|
@@ -137,10 +144,21 @@ class merchant_orderControl extends mbMerchantControl
|
|
|
{
|
|
|
$minutes = intval($seconds / 60);
|
|
|
$second = intval($seconds % 60);
|
|
|
- if($minutes > 0){
|
|
|
- $result = "{$minutes}:{$second}s";
|
|
|
- }else{
|
|
|
- $result = "{$second}s";
|
|
|
+ if($minutes >= 60) {
|
|
|
+ $minute = $minutes % 60;
|
|
|
+ $hours = intval($minutes / 60);
|
|
|
+ $result = "{$minute}:{$second}";
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ if($minutes > 0){
|
|
|
+ $result = "{$minutes}:{$second}";
|
|
|
+ }else{
|
|
|
+ $result = "{$second}";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(isset($hours))
|
|
|
+ {
|
|
|
+ $result = "{$hours}:" . $result;
|
|
|
}
|
|
|
return $result;
|
|
|
}
|