2011-09-29 02:24:47 +00:00
|
|
|
|
<?php
|
|
|
|
|
$this->headTitle($this->config->title->site);
|
|
|
|
|
$this->headTitle('后台管理');
|
|
|
|
|
$this->headTitle()->setSeparator(' - ');
|
|
|
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
|
|
|
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
|
|
|
|
$this->breadcrumb('<a href="/admin/down">申请管理</a>');
|
2014-01-07 07:01:25 +00:00
|
|
|
|
$this->Theme->AppendPlus($this,'colorbox');
|
|
|
|
|
$this->Theme->AppendPlus($this,'uploadify');
|
2011-09-29 02:24:47 +00:00
|
|
|
|
$this->breadcrumb('离线数据申请管理</a>');
|
|
|
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
|
|
|
?>
|
2014-01-07 07:01:25 +00:00
|
|
|
|
<style>
|
|
|
|
|
table thead tr th {background:#EBF2F6;color:#444;}
|
|
|
|
|
.high{background:#444;color:#FFF;}
|
|
|
|
|
</style>
|
|
|
|
|
<div class="row-fluid">
|
2014-01-07 07:28:45 +00:00
|
|
|
|
<div class="span3">
|
|
|
|
|
<?= $this->partial('down/left.phtml'); ?>
|
|
|
|
|
</div>
|
2014-01-07 07:01:25 +00:00
|
|
|
|
<div class="span9">
|
2014-01-07 07:28:45 +00:00
|
|
|
|
<?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; ?>
|
2013-11-05 07:57:17 +00:00
|
|
|
|
</div>
|
2014-01-07 07:28:45 +00:00
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
<h4>离线数据服务记录</h4>
|
|
|
|
|
|
|
|
|
|
<div class="pull-left">
|
|
|
|
|
<a href="/admin/down/offline/add/1" class="btn btn-info">添加新的离线服务记录</a>
|
|
|
|
|
<a href="/admin/down/offline/down/1" class="btn btn-info">下载所有离线服务记录</a>
|
|
|
|
|
<a href="/admin/down/offline/update/1" class="btn btn-info" onclick="return confirm('该操作需要较长时间,请不要中途刷新页面,是否确定继续?')">自动匹配离线下载用户与网站用户</a>
|
|
|
|
|
<a href="/admin/down/offline/emaillist/1" class="btn btn-info">下载服务用户邮箱列表</a>
|
|
|
|
|
<a href="/admin/down/offline/monthreport/1" class="btn btn-info">下载上月服务记录(科技部上报)</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="input-append pull-right">
|
|
|
|
|
<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>
|
2011-09-29 02:24:47 +00:00
|
|
|
|
<?php if (count($this->paginator)): ?>
|
2014-01-07 07:28:45 +00:00
|
|
|
|
<table class="table table-bordered table-hover">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2014-01-07 07:01:25 +00:00
|
|
|
|
<th width="52">姓名</th>
|
|
|
|
|
<th>单位</th>
|
|
|
|
|
<th>地址</th>
|
|
|
|
|
<th>邮编</th>
|
|
|
|
|
<th>用途</th>
|
|
|
|
|
<th>数据清单</th>
|
|
|
|
|
<th>申请时间</th>
|
|
|
|
|
<th>操作</th>
|
2011-09-29 02:24:47 +00:00
|
|
|
|
</tr></thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<?php $autoindex=0;?>
|
|
|
|
|
<?php foreach ($this->paginator as $item): ?>
|
|
|
|
|
<?php $autoindex++;?>
|
2011-10-12 14:53:03 +00:00
|
|
|
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
2014-01-07 07:28:45 +00:00
|
|
|
|
<td><a href="/admin/down/user/show/<?php echo $item['userid'];?>"><?= $item['username']?></a></td>
|
2011-09-29 02:24:47 +00:00
|
|
|
|
<td><?= $item['unit']; ?></td>
|
|
|
|
|
<td><?= $item['address']; ?></td>
|
|
|
|
|
<td><?= $item['postcode']; ?></td>
|
2014-01-07 07:01:25 +00:00
|
|
|
|
<td><textarea readonly="readonly" style="width:280px;height:100px;border:none;font-size:12px;"><?= $item['project'].'['.$item['project_title'].' | '.$item['project_type'].' | '.$item['project_id'].']'; ?></textarea></td>
|
|
|
|
|
<td><textarea readonly="readonly" style="width:280px;height:100px;border:none;font-size:12px;"><?= $item['datalist']; ?></textarea></td>
|
2011-09-29 02:24:47 +00:00
|
|
|
|
<td><?= date('Y-m-d',strtotime($item['ts_created'])); ?></td>
|
|
|
|
|
<td>
|
2014-01-07 07:28:45 +00:00
|
|
|
|
<a href="/admin/down/offline/edit/<?= $item['id']; ?><?php if(empty($this->page)) "" ; else echo "/page/".$this->page; ?>">编辑</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/offline/show/<?= $item['id']; ?>">详细</a> |
|
|
|
|
|
<a href="javascript:action('finish',<?= $item['id']; ?>);" onclick="return confirm('确定确定重新通过该申请?')">重新通过</a> |
|
|
|
|
|
<a href="javascript:void(0);" onclick="upload.showUploadForm(<?= $item['id'] ?>);">上传签字申请表</a>
|
2014-01-07 07:01:25 +00:00
|
|
|
|
<?php if(!empty($item['applicationform'])) { ?>
|
|
|
|
|
| <a href="/admin/down/applicationform/ac/view/?link=<?= urlencode($item['applicationform'])?>">查看签字申请表</a>
|
|
|
|
|
<?php }?>
|
2011-09-29 02:24:47 +00:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</tbody></table>
|
|
|
|
|
<?php endif; ?>
|
2011-10-12 14:53:03 +00:00
|
|
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
2012-09-28 08:52:44 +00:00
|
|
|
|
</div>
|
2014-01-07 07:01:25 +00:00
|
|
|
|
</div><!-- row -->
|
|
|
|
|
<div id="upload-form" class="modal hide fade" tabindex="-1" aria-hidden="true">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
|
<h3 id="myModalLabel">申请表上传</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<form id="application-form">
|
|
|
|
|
<div id="fsUploadProgress">允许上传30M以内的 PDF 文件</div>
|
|
|
|
|
<input type="file" name="Filedata" id="file_upload" />
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button class="btn" data-dismiss="modal" aria-hidden="true">取消上传</button>
|
|
|
|
|
<button class="btn btn-primary">上传完成</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
//var param = {};
|
|
|
|
|
//var upload_count = 0;
|
|
|
|
|
var uploader;
|
|
|
|
|
var param;
|
|
|
|
|
$(function() {
|
|
|
|
|
$('#file_upload').uploadify({
|
|
|
|
|
'swf' : '/js/lib/uploadify/uploadify.swf',
|
|
|
|
|
'uploader' : '/admin/down/uploadapplicationform',
|
|
|
|
|
'multi' : false,
|
|
|
|
|
'auto' : true,
|
|
|
|
|
'fileTypeExts' : '*.pdf; *.jpg',
|
|
|
|
|
'onUploadSuccess' : function(file, data, response) {
|
|
|
|
|
upload.onsuccess(file, data, response);
|
|
|
|
|
},
|
|
|
|
|
'onUploadStart' : function(file) {
|
|
|
|
|
$('#file_upload').uploadify('settings','formData',param);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var upload = {
|
|
|
|
|
onsuccess : function(file, data, response){
|
|
|
|
|
_data = $.parseJSON(data);
|
|
|
|
|
if(!$.isEmptyObject(_data.error))
|
|
|
|
|
{
|
|
|
|
|
alert(_data.error);
|
|
|
|
|
}else{
|
|
|
|
|
$('#upload-form').modal('hide');
|
|
|
|
|
window.location = window.location;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
showUploadForm : function(id){
|
|
|
|
|
$('#upload-form').modal('show');
|
|
|
|
|
param = {
|
|
|
|
|
"PHPSESSID" : "<?php echo session_id(); ?>",
|
|
|
|
|
'orderid' : id
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
2012-09-28 08:52:44 +00:00
|
|
|
|
<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>
|