You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.6 KiB
PHP
55 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace Admin\Controller;
|
|
|
|
use User\Api\UserApi as UserApi;
|
|
|
|
/**
|
|
* 推广查询控制器
|
|
* @author 王贺
|
|
*/
|
|
class StatementMangementController extends ThinkController
|
|
{
|
|
public function lists() {
|
|
|
|
$map = [];
|
|
|
|
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
|
$map['create_time'] = ['between', [strtotime(I('time_start')), strtotime(I('time_end')) + 86399]];
|
|
} elseif (isset($_REQUEST['time_start'])) {
|
|
$map['create_time'] = ['GT', strtotime(I('time_start'))];
|
|
} elseif (isset($_REQUEST['time_end'])) {
|
|
$map['create_time'] = ['LT', strtotime(I('time_end')) + 86399];
|
|
}
|
|
|
|
if ($_REQUEST['statement_type']) {
|
|
$map['statement_type'] = $_REQUEST['statement_type'];
|
|
}
|
|
|
|
if ($_REQUEST['company_id']) {
|
|
$map['company_name'] = $_REQUEST['company_id'];
|
|
}
|
|
|
|
$data = M("statement","tab_")
|
|
->where($map)
|
|
->select();
|
|
|
|
foreach($data as $key => $value) {
|
|
|
|
$data[$key]['create_time'] = date('Y-m-d H:i:s',$value['create_time']);
|
|
$data[$key]['statement_begin_time'] = date('Y-m-d H:i:s',$value['statement_begin_time']);
|
|
$data[$key]['statement_end_time'] = date('Y-m-d H:i:s',$value['statement_end_time']);
|
|
|
|
$data[$key]['is_confirm'] = $data[$key]['is_confirm']?'确认':'未确认';
|
|
$data[$key]['statement_type'] = $value['statement_type']?'公会对账单':'CP对账单';
|
|
|
|
}
|
|
|
|
$this->assign('data',$data);
|
|
|
|
$this->display();
|
|
|
|
}
|
|
|
|
}
|