public function ZB_credit_order()
{
$this->pageTab[] = array('title' => '提现记录', 'tabHash' => 'ZB_credit_order', 'url' => U('admin/Application/ZB_credit_order'));
$this->pageButton[] = array('title' => '搜索记录', 'onclick' => "admin.fold('search_form')");
$this->pageButton[] = array('title' => '批量驳回', 'onclick' => 'admin.setReason()');
$this->pageKeyList = array('order_number', 'uid', 'uname', 'account', 'gold', 'amount', 'ctime', 'utime', 'status', 'DOACTION');
$this->searchKey = array('uid', 'order_number', 'account');
$this->{$searchPostUrl} = U('admin/Application/ZB_credit_order');
$this->_listpk = 'order_number';
if ($_POST) {
$_POST['uid'] && ($map['uid'] = $_POST['uid']);
$_POST['order_number'] && ($map['order_number'] = array('like', '%' . $_POST['order_number'] . '%'));
$_POST['account'] && ($map['account'] = array('like', '%' . $_POST['account'] . '%'));
}
$list = D('credit_order')->where($map)->findPage(20);
foreach ($list['data'] as $key => &$value) {
if ($value['status'] == 0) {
$value['DOACTION'] = '<a href="' . U('admin/Application/pass', array('number' => $value['order_number'])) . '">处理</a> ';
$value['DOACTION'] .= ' <a href="javascript:;" onclick="admin.setReason(\'' . $value['order_number'] . '\')">驳回</a>';
}
switch ($value['status']) {
case '0':
$value['status'] = '<font color="orange">待处理</font>';
break;
case '1':
$value['status'] = '<font color="green">已处理</font>';
break;
case '2':
$value['status'] = '<font color="red">已驳回</font>';
break;
}
$value['ctime'] = date('Y-m-d h:i:s', $value['ctime']);
$value['utime'] = empty($value['utime']) ? '暂无处理' : date('Y-m-d h:i:s', $value['utime']);
$value['uname'] = getUserName($value['uid']);
}
$this->displayList($list);
}