增加了离线服务记录单条记录查看的功能

This commit is contained in:
Li Jianxuan 2011-09-16 08:00:20 +00:00
parent c38937f042
commit f281ce6a39
3 changed files with 59 additions and 2 deletions

View File

@ -184,6 +184,7 @@ class Admin_DownController extends Zend_Controller_Action
$delete=(int)$this->_getParam('delete'); $delete=(int)$this->_getParam('delete');
$down=(int)$this->_getParam('down'); $down=(int)$this->_getParam('down');
$update=$this->_getParam('update'); $update=$this->_getParam('update');
$show=$this->_getParam('show');
if ($add) { if ($add) {
$form=new OfflinelogForm(); $form=new OfflinelogForm();
@ -284,6 +285,19 @@ class Admin_DownController extends Zend_Controller_Action
$this->_redirect('/admin/down/offline'); $this->_redirect('/admin/down/offline');
}//同步用户账户与离线申请记录 }//同步用户账户与离线申请记录
else if($show){
$sql="select * from offlineapp where id='$show'";
$rs = $this->db->query($sql);
$row= $rs->fetch();
$this->view->infos=$row;
$this->_helper->viewRenderer('offlineshow');
}//查看单条记录
$select=$this->db->select(); $select=$this->db->select();
$select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null and status>=0')->order('ts_created desc'); $select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null and status>=0')->order('ts_created desc');
$paginator = Zend_Paginator::factory($select); $paginator = Zend_Paginator::factory($select);
@ -358,7 +372,7 @@ class Admin_DownController extends Zend_Controller_Action
->where('o.status=0 or o.status=5'); ->where('o.status=0 or o.status=5');
if(!empty($search) && !empty($keyword)) if(!empty($search) && !empty($keyword))
{ {
$select ->Where('u.realname like ? ','%'.$keyword.'%'); $select ->Where('u.realname like ? or u.unit like ? ','%'.$keyword.'%');
$select ->orWhere('u.unit like ? ','%'.$keyword.'%'); $select ->orWhere('u.unit like ? ','%'.$keyword.'%');
$this->view->title='“'.$keyword.'”的搜索结果 :'; $this->view->title='“'.$keyword.'”的搜索结果 :';
} }

View File

@ -49,7 +49,7 @@
<td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['datalist']; ?></textarea></td> <td><textarea readonly="readonly" style="width:300px;height:100px;border:none;font-size:12px;<?php if($autoindex%2 == 0) echo 'background:#CCCCCC;'; else echo 'background:#FFF;'; ?>"><?= $item['datalist']; ?></textarea></td>
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td> <td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
<td> <td>
<a href="/admin/down/offline/edit/<?= $item['id']; ?>">编辑</a> | <a href="/admin/down/offline/delete/<?= $item['id']; ?>" onclick="return confirm('确定将此记录删除?')">删除</a>| <a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> <a href="/admin/down/offline/edit/<?= $item['id']; ?>">编辑</a> | <a href="/admin/down/offline/delete/<?= $item['id']; ?>" onclick="return confirm('确定将此记录删除?')">删除</a>| <a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> | <a href="/admin/down/offline/show/<?= $item['id']; ?>">查看详细</a>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>

View File

@ -0,0 +1,43 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台管理首页</a>');
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
$this->breadcrumb('详细信息');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/prototype.js');
?>
<div id="divContent">
<div id="leftPanel">
<?= $this->partial('down/left.phtml'); ?>
</div>
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div id="rightPanel">
<table>
<tr><td width='80'>姓名</td><td><?php echo $this->infos['username'];?></td></tr>
<tr><td>单位</td><td><?php echo $this->infos['unit'];?></td></tr>
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
<tr><td>地址</td><td><?php echo $this->infos['address'];?></td></tr>
<tr><td>邮编</td><td><?php echo $this->infos['postcode'];?></td></tr>
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
<tr><td>Email</td><td><?php echo $this->infos['email'];?></td></tr>
<tr><td>用途</td><td><textarea style="width:500px;height:200px;font-size:12px;" readonly="readonly"><?php echo $this->infos['project'];?></textarea></td></tr>
<tr><td>时间</td><td><?php echo date('Y-m-d H:i:s', strtotime($this->infos['ts_created']));?></td></tr>
</table>
</div>
</div>