修改申请通过的操作方式

This commit is contained in:
Li Jianxuan 2012-09-28 08:52:44 +00:00
parent a1e3c21c4d
commit 9ff5f24b0e
1 changed files with 53 additions and 2 deletions

View File

@ -6,6 +6,10 @@
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>'); $this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/down">申请管理</a>'); $this->breadcrumb('<a href="/admin/down">申请管理</a>');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->breadcrumb('离线数据申请管理</a>'); $this->breadcrumb('离线数据申请管理</a>');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
?> ?>
@ -53,11 +57,58 @@
<a href="/admin/down/offline/delete/<?= $item['id']; ?>" title="该操作将删除此记录并且删除与此记录有关的申请记录!请谨慎操作" onclick="return confirm('请仅删除测试用途的离线服务记录!')">删除</a> | <a href="/admin/down/offline/delete/<?= $item['id']; ?>" title="该操作将删除此记录并且删除与此记录有关的申请记录!请谨慎操作" onclick="return confirm('请仅删除测试用途的离线服务记录!')">删除</a> |
<a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> | <a href="/admin/down/offlineapp/view/<?= $item['id']; ?>">PDF</a> |
<a href="/admin/down/offline/show/<?= $item['id']; ?>">详细</a> | <a href="/admin/down/offline/show/<?= $item['id']; ?>">详细</a> |
<a href="/admin/down/offlineapp/finish/<?= $item['id']; ?>">重新通过</a> <a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定重新通过该申请?')">重新通过</a>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody></table> </tbody></table>
<?php endif; ?> <?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div> <div class="pagenavi"><?= $this->paginator; ?></div>
</div> </div>
<script>
function action(name,id){
var url;
if(name == "start")
{url = '/admin/down/offlineapp/start/'+id;}
if(name == "finish")
{url = '/admin/down/offlineapp/finish/'+id;}
if(name == "deleted")
{url = '/admin/down/offlineapp/cancel/'+id;}
if(name == "deny")
{url = '/admin/down/offlineapp/deny/'+id;}
if(name == "reset")
{url = '/admin/down/offlineapp/reset/'+id;}
$.ajax({
'type':"POST",
'url':url,
'data':'',
'success':OnDataLoad,
'timeout': 30000,
'error': AjaxError
});
}
function OnDataLoad(data){
if (typeof(data)=='object')
{
if(typeof(data.error)!='undefined')
{Alert(data.error);return false;}
if(typeof(data.msg)!='undefined')
{Alert(data.msg);}
if(typeof(data.started)!='undefined')
{$('#start_'+data.started).remove();}
if(typeof(data.finish) != 'undefined')
{$('#list_'+data.finish).fadeOut();}
}
else{
Alert('出现错误,请稍后再试');
}
}
function AjaxError(){
$.colorbox({'innerWidth':'50%','html':'<img src="/images/alert_big_error.png" /><h4>处理中出现错误,请刷新页面后重试</h4>'});
}
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
$(".inline").colorbox({inline:true, width:"50%"});
function Alert(html){
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
}
</script>