测试订单查询修改

master
zhengchanglong 5 years ago
parent 42a0876ab2
commit d0de91e89d

@ -36,10 +36,23 @@ class TestOrderController extends ThinkController
if (!empty($_REQUEST['pay_way'])) {
$map['pay_way'] = $_REQUEST['pay_way'];
}
if(!empty($_REQUEST['timestart']) && !empty($_REQUEST['timeend'])){
$timestart = strtotime($_REQUEST['timestart']);
$timeend = strtotime($_REQUEST['timeend'])+86399;
$map['pay_time'] = array("between",array($timestart,$timeend));
}else if(!empty($_REQUEST['timestart']) && empty($_REQUEST['timeend'])) {
$timestart = strtotime($_REQUEST['timestart']);
$map['pay_time'] = array("EGT",$timestart);
}else if (!empty($_REQUEST['timeend']) && empty($_REQUEST['timestart'])) {
$timeend = strtotime($_REQUEST['timeend'])+86399;
$map['pay_time'] = array("ELT",$timeend);
}
$order_list = M('test_order', 'tab_')->where($map)->select();
$sum_order_amount = M('test_order', 'tab_')->where($map)->field('sum(order_amount) as sum_order_amount')->find();
$sum_pay_amount = M('test_order', 'tab_')->where($map)->field('sum(pay_amount) as sum_order_amount')->find();
$this->assign('datas', $order_list);
$this->assign('sum_order_amount', $sum_order_amount);
$this->assign('sum_pay_amount', $sum_pay_amount);
$this->display();
}

@ -63,10 +63,10 @@
<input type="text" name="user_account" placeholder="请输入测试账号" class="" value="{:I('user_account')}" style="width: 180px"/>&nbsp;
</div>
<div class="input-list">
<input type="text" readonly id="time-start" name="timestart" class="" value="{:I('timestart')}" placeholder="开始时间" autocomplete="off"/>
<input type="text" id="time-start" name="timestart" class="" value="{:I('timestart')}" placeholder="开始时间" autocomplete="off"/>
-
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" readonly id="time-end" name="timeend" class="" value="{:I('timeend')}" placeholder="结束时间" autocomplete="off"/>
<input type="text" id="time-end" name="timeend" class="" value="{:I('timeend')}" placeholder="结束时间" autocomplete="off"/>
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
@ -163,29 +163,18 @@
</volist>
<tr>
<td >总计</td>
<if condition="$_GET['model'] neq 'game_supersign'"><td >------</td></if>
<td >------</td>
<td >------</td>
<if condition="$_GET['model'] neq 'deposit'"><td >------</td></if>
<if condition="$_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><td >------</td></if>
<if condition="$_GET['model'] neq 'deposit' and $_GET['model'] neq 'game_supersign'"><td >------</td></if>
<td >{$sumAllData.cost}</td>
<td >{$sumAllData.pay_amount}</td>
<td >------</td>
<td >------</td>
</tr>
<tr>
<td><span>充值方式合计</span></td>
<td colspan="25">
<volist name="payTypeData" id="payTypeData" key="index">
<if condition="$key neq '其他支付金额'">
{$key}{$payTypeData} &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</if>
</volist>
</td>
<td >------</td>
<td >------</td>
<td >{$sum_order_amount['sum_order_amount']}</td>
<td >{$sum_pay_amount['sum_order_amount']}</td>
<td >------</td>
<td >------</td>
</tr>
</notemtpy>
</tbody>
</table>
</div>

Loading…
Cancel
Save