明确后台离线申请的功能,实现拒绝功能,数据库offlineapp表中增加status字段,-1代表拒绝
This commit is contained in:
parent
1c45760a2b
commit
d24c32393e
|
@ -123,10 +123,15 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
$this->messenger->addMessage('提示信息:已删除该用户离线申请。');
|
||||
$this->_redirect('/admin/down/offlineapp/'.$page);
|
||||
} elseif ($deny) {
|
||||
//todo
|
||||
$sql="update dataorder set status=-1 where offlineappid=? and (status=3 or status=4)";
|
||||
$this->db->query($sql,array($deny));
|
||||
$sql="update offlineapp set ts_approved=now(),status=-1 where id=? and ts_approved is null";
|
||||
$this->db->query($sql,array($deny));
|
||||
$this->messenger->addMessage('提示信息:已拒绝该用户离线申请。');
|
||||
$this->_redirect('/admin/down/offlineapp/'.$page);
|
||||
}
|
||||
$select=$this->db->select();
|
||||
$select->from('offlineapp')->where('ts_approved is null')->where('pdflink is not null')->order('ts_created desc');
|
||||
$select->from('offlineapp')->where('ts_approved is null')->where('pdflink is not null and status>=0')->order('ts_created desc');
|
||||
$paginator = Zend_Paginator::factory($select);
|
||||
$paginator->setCurrentPageNumber($page);
|
||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
||||
|
@ -221,7 +226,7 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
|
||||
}
|
||||
$select=$this->db->select();
|
||||
$select->from('offlineapp')->where('ts_approved is not null')->where('pdflink is not null')->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->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
||||
|
|
|
@ -47,8 +47,8 @@
|
|||
<td class="action">
|
||||
<a href="/admin/down/offlineapp/start/<?= $item['id']; ?>">收到</a>
|
||||
<a href="/admin/down/offlineapp/finish/<?= $item['id']; ?>">通过</a>
|
||||
<a href="/admin/down/offlineapp/cancel/<?= $item['id']; ?>">取消</a>
|
||||
<a href="/admin/down/offlineapp/deny/<?= $item['id']; ?>">未通过</a></td>
|
||||
<a href="/admin/down/offlineapp/cancel/<?= $item['id']; ?>">删除</a>
|
||||
<a href="/admin/down/offlineapp/deny/<?= $item['id']; ?>">拒绝</a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody></table>
|
||||
|
|
Loading…
Reference in New Issue