增加了已通过的服务记录的搜索,增加了操作时的确认按钮

This commit is contained in:
Li Jianxuan 2013-11-05 07:57:17 +00:00
parent ed711d9a3b
commit 5d80b35553
6 changed files with 46 additions and 16 deletions

View File

@ -4,6 +4,7 @@ use Files\Files;
use Files\Output;
use Files\Listener\FileListener;
use Order\Manager\Offlineapp;
use Order\Manager\Application;
use data\DataService;
use Mail\Mail;
@ -1137,16 +1138,15 @@ class Admin_DownController extends Zend_Controller_Action
->setBody($objWriter->save('php://output'));*/
}
$select=$this->db->select();
$select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->where('status>=0')->order('ts_created desc');
$paginator = Zend_Paginator::factory($select);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage($this->view->config->page->max);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->paginator=$paginator;
$this->view->page = $this->_getParam('page');
$application = new Application();
$this->view->q = $application->keyword = $this->_getParam('q');
$application->filter = $this->_getParam('filter');
view::addPaginator($application->passed(),$this,20);
return true;
}
//在线数据下载情况仅针对onlineapp表自2011-9-8开始记录。
function onlineAction()

View File

@ -27,8 +27,20 @@
</div>
<?php endif; ?>
<div class="right_title">离线数据服务记录</div>
<a href="/admin/down/offline/add/1">添加新的离线服务记录</a> | <a href="/admin/down/offline/down/1">下载所有离线服务记录</a> | <a href="/admin/down/offline/update/1" onclick="return confirm('该操作需要较长时间,请不要中途刷新页面,是否确定继续?')">自动匹配离线下载用户与网站用户</a> | <a href="/admin/down/offline/emaillist/1">下载服务用户邮箱列表</a>
<a href="/admin/down/offline/add/1">添加新的离线服务记录</a> | <a href="/admin/down/offline/down/1">下载所有离线服务记录</a> | <a href="/admin/down/offline/update/1" onclick="return confirm('该操作需要较长时间,请不要中途刷新页面,是否确定继续?')">自动匹配离线下载用户与网站用户</a> | <a href="/admin/down/offline/emaillist/1">下载服务用户邮箱列表</a>
| <a href="/admin/down/offline/monthreport/1">下载上月服务记录(科技部上报)</a>
<div>
<div class="input-append">
<form id="datasearch" class="search_form" action="">
<input type="text" id="keyword" name="q" value="<?php if(!empty($this->q)) echo $this->q; ?>" />
<input type="hidden" name="order" value="<?php if(!empty($this->search_order)) echo $this->search_order; ?>" />
<input type="hidden" name="sort" value="<?php if(!empty($this->search_sort)) echo $this->search_sort; ?>" />
<button type="submit" class="btn" id="search_btn">搜索</button>
</form>
</div>
</div>
<?php if (count($this->paginator)): ?>
<table>
<thead><tr>

View File

@ -54,7 +54,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
<td>
<a href="/admin/down/offlineapps/ac/view/?offlineappid=<?= $item['id'] ?>">查看详细</a>
<a href="/admin/down/offlineapps/ac/receive/?offlineappid=<?= $item['id'] ?>">接收</a>
<a href="/admin/down/offlineapps/ac/return/?offlineappid=<?= $item['id'] ?>">退回</a>
<a href="/admin/down/offlineapps/ac/deny/offlineappid/<?= $item['id'] ?>">退回</a>
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传申请表</a>
<a href="/admin/down/offlineapps/ac/resetappform/?offlineappid=<?= $item['id'] ?>" onclick="return confirm('是否确认重置该用户的申请表?')">重置申请表</a>
</td>

View File

@ -1,5 +1,5 @@
<?php
namespace Application\Event;
namespace Order\Event;
interface ApplicationEvent
{

View File

@ -1,12 +1,12 @@
<?php
namespace Application\Handler;
namespace Order\Handler;
use \Helpers\View as view;
use \Helpers\dbh;
use \Helpers\Table;
use \Files\Files;
class ApplicationHandler implements \Application\Event\ApplicationEvent
class ApplicationHandler implements \Order\Event\ApplicationEvent
{
private $db; //传入PDO对象误
private $config; //全局配置

View File

@ -3,7 +3,7 @@ namespace Order\Manager;
use \Helpers\View as view;
use \Helpers\dbh;
use Order\Listener\ApplicationListener as Listener;
use \Order\Listener\ApplicationListener as Listener;
class Application
{
@ -11,7 +11,8 @@ class Application
public $db;
public $table;
public $checkFiled = array('phone','realname','unit','address');
public $keyword;
public $filter;
public function __construct($db = NULL,$auth = NULL)
{
@ -43,6 +44,23 @@ class Application
//已经通过的所有申请
public function passed()
{
$select=$this->db->select();
$select ->from('offlineapp')
->where('ts_approved is not null')
->where('pdflink is not null')
->where('status>=0')
->order('ts_created desc');
if(!empty($this->keyword))
{
$select ->where(" (username LIKE '%{$this->keyword}%' OR
unit LIKE '%{$this->keyword}%' OR
project_id LIKE '%{$this->keyword}%' OR
project_type LIKE '%{$this->keyword}%' OR
project_leader LIKE '%{$this->keyword}%' OR
project LIKE '%{$this->keyword}%' )");
}
return $select;
}
}