2013-04-03 02:30:38 +00:00
|
|
|
|
<?php
|
|
|
|
|
$this->headTitle($this->config->title->site);
|
|
|
|
|
$this->headTitle($this->config->title->data);
|
|
|
|
|
$this->headTitle('离线申请');
|
|
|
|
|
$this->headTitle()->setSeparator(' - ');
|
2013-09-05 01:54:50 +00:00
|
|
|
|
$this->nav[] = array('link'=>"/data/order",'title'=>'数据蓝');
|
|
|
|
|
$this->theme->AppendPlus($this,'colorbox');
|
|
|
|
|
$this->theme->AppendPlus($this,'uploadify');
|
|
|
|
|
$this->theme->AppendModel($this,'offlineapp-uploader');
|
2013-04-03 02:30:38 +00:00
|
|
|
|
?>
|
2013-07-17 09:53:44 +00:00
|
|
|
|
<div class="row">
|
2013-06-06 13:38:09 +00:00
|
|
|
|
|
2013-04-03 02:30:38 +00:00
|
|
|
|
<div class="span3">
|
|
|
|
|
<div class="well sidebar-nav">
|
|
|
|
|
<?= $this->partial('account/left.phtml'); ?>
|
|
|
|
|
</div><!--/.well -->
|
|
|
|
|
</div><!--/span-->
|
|
|
|
|
<div class="span9">
|
2013-07-17 09:53:44 +00:00
|
|
|
|
<h3>数据篮</h3>
|
2013-04-03 02:30:38 +00:00
|
|
|
|
<hr />
|
2013-07-17 09:53:44 +00:00
|
|
|
|
<?php
|
|
|
|
|
if(!empty($this->msg))
|
|
|
|
|
{
|
|
|
|
|
echo $this->msg;
|
|
|
|
|
}
|
2013-06-06 13:38:09 +00:00
|
|
|
|
?>
|
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
|
|
2013-09-26 03:28:43 +00:00
|
|
|
|
<li id="Nav-order-offline1"><a href="/data/order/ac/offline1">未生成的申请<?= !empty($this->counts['offline1']) ? '<span class="badge badge-info">'.$this->counts['offline1'].'</span>':'' ?></a></li>
|
|
|
|
|
<li id="Nav-order-offline2"><a href="/data/order/ac/offline2">待提交的订单<?= !empty($this->counts['offline2']) ? '<span class="badge badge-info">'.$this->counts['offline2'].'</span>':'' ?></a></li>
|
|
|
|
|
<li id="Nav-order-offline3"><a href="/data/order/ac/offline3">待审批的订单<?= !empty($this->counts['offline3']) ? '<span class="badge badge-info">'.$this->counts['offline3'].'</span>':'' ?></a></li>
|
2013-09-05 01:54:50 +00:00
|
|
|
|
<li id="Nav-order-offline4"><a href="/data/order/ac/offline4">已通过的申请<?= !empty($this->counts['offline4']) ? '<span class="badge badge-info">'.$this->counts['offline4'].'</span>':'' ?></a></li>
|
|
|
|
|
<li id="Nav-order-online"><a href="/data/order/ac/online">在线数据<?= !empty($this->counts['onlineapp']) ? '<span class="badge badge-info">'.$this->counts['onlineapp'].'</span>':'' ?></a></li>
|
2013-06-06 13:38:09 +00:00
|
|
|
|
</ul>
|
2013-07-17 09:53:44 +00:00
|
|
|
|
<!-- content -->
|
2013-06-06 13:38:09 +00:00
|
|
|
|
<?php if (!empty($this->paginator)) : ?>
|
2013-09-26 03:28:43 +00:00
|
|
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
|
|
|
<?php if ($this->tabID=='order-offline2') { ?>
|
|
|
|
|
<div class="well alert alert-error">重要说明:完成一个订单需要三个步骤,即<strong>生成pdf</strong>、<strong>上传签字后的pdf</strong>、<strong>确认订单</strong>。请确保上传的pdf和当前订单中的数据相同,否则无法受理。若不相同,请重新生成、上传。</div>
|
|
|
|
|
<?php } ?>
|
2013-06-06 13:38:09 +00:00
|
|
|
|
<table class="table table-bordered table-striped">
|
|
|
|
|
<thead>
|
|
|
|
|
<th>时间</th>
|
2013-07-17 09:53:44 +00:00
|
|
|
|
<th>标题</th>
|
|
|
|
|
<th>
|
|
|
|
|
<?php if ($this->tabID=='order-offline1') {
|
2013-09-26 03:28:43 +00:00
|
|
|
|
echo '<a class="btn btn-primary" href="/data/order/apply/all">全部放入订单</a>(最多5条)';
|
2013-07-17 09:53:44 +00:00
|
|
|
|
} elseif ($this->tabID=='order-offline2') {
|
2013-09-09 08:46:54 +00:00
|
|
|
|
if(count($this->paginator))
|
|
|
|
|
{
|
2013-09-26 03:28:43 +00:00
|
|
|
|
echo '<a class="btn btn-primary" href="/data/order/pdf/1">生成pdf</a> ';
|
2013-09-11 03:56:13 +00:00
|
|
|
|
if($this->offlineappid >1)
|
|
|
|
|
{
|
|
|
|
|
if(empty($this->applicationform))
|
|
|
|
|
{
|
2013-09-26 03:28:43 +00:00
|
|
|
|
echo '<a class="btn btn-primary" href="javascript:void(0);" onclick="upload.showUploadForm('.$this->offlineappid.');">上传pdf</a>';
|
2013-09-11 03:56:13 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2013-09-26 03:28:43 +00:00
|
|
|
|
echo '<a class="btn btn-warning" href="javascript:void(0);" onclick="upload.showUploadForm('.$this->offlineappid.');">重新上传pdf</a>
|
|
|
|
|
<a class="btn btn-success" href="/data/order/ac/commitapplicationform/?offlineappid='.$this->offlineappid.'">确认订单</a>';
|
2013-09-11 03:56:13 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2013-09-09 08:46:54 +00:00
|
|
|
|
}
|
2013-07-17 09:53:44 +00:00
|
|
|
|
} elseif ($this->tabID=='order-offline3') {
|
2013-09-05 01:54:50 +00:00
|
|
|
|
if(count($this->paginator))
|
|
|
|
|
{
|
2013-09-09 08:46:54 +00:00
|
|
|
|
echo "请等待审核";
|
2013-09-05 01:54:50 +00:00
|
|
|
|
}
|
2013-07-17 09:53:44 +00:00
|
|
|
|
} elseif ($this->tabID=='order-offline4') {
|
|
|
|
|
echo '通过时间';
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
|
2013-06-06 13:38:09 +00:00
|
|
|
|
</th>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2013-07-17 09:53:44 +00:00
|
|
|
|
<?php foreach($this->paginator as $order) : ?>
|
2013-06-06 13:38:09 +00:00
|
|
|
|
<tr>
|
2013-09-11 03:56:13 +00:00
|
|
|
|
<?php if($order['status'] < 4) { ?>
|
2013-06-06 13:38:09 +00:00
|
|
|
|
<td><?php echo date('Y-m-d H:i:s',strtotime($order['ts_created'])); ?></td>
|
2013-09-11 03:56:13 +00:00
|
|
|
|
<?php }else{ ?>
|
|
|
|
|
<td><?php echo date('Y-m-d H:i:s',strtotime($order['ts_received'])); ?></td>
|
|
|
|
|
<?php } ?>
|
2013-07-17 09:53:44 +00:00
|
|
|
|
<td><a href="/data/<?php echo $order['uuid']; ?>"><?php echo $order['title']; ?></a></td>
|
|
|
|
|
<td>
|
|
|
|
|
<?php
|
|
|
|
|
if ($this->tabID=='order-offline1') {
|
2013-09-26 03:28:43 +00:00
|
|
|
|
echo '<a href="/data/order/apply/'.$order['id'].'" class="btn btn-primary">放入订单</a>
|
|
|
|
|
<a href="/data/order/cancel/'.$order['id'].'" class="btn">移除</a>';
|
2013-07-17 09:53:44 +00:00
|
|
|
|
} elseif ($this->tabID=='order-offline2') {
|
2013-09-09 08:46:54 +00:00
|
|
|
|
switch($order['status']) {
|
|
|
|
|
case 2:
|
|
|
|
|
if(empty($order['applicationform']))
|
2013-09-26 05:09:53 +00:00
|
|
|
|
echo "请生成pdf并上传".' <a class="btn" href="/data/order/cancel/'.$order['id'].'">移除</a>';
|
2013-09-09 08:46:54 +00:00
|
|
|
|
else
|
2013-09-26 03:28:43 +00:00
|
|
|
|
echo '<span class="label label-success">PDF已上传,请确认订单</span>';
|
2013-09-09 08:46:54 +00:00
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
echo '<span class="label label-success">申请表已上传</span>';
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
2013-07-17 09:53:44 +00:00
|
|
|
|
} elseif ($this->tabID=='order-offline3') {
|
2013-06-06 13:38:09 +00:00
|
|
|
|
switch($order['status']) {
|
2013-09-09 08:46:54 +00:00
|
|
|
|
case 3:
|
|
|
|
|
if(!empty($order['applicationform']))
|
|
|
|
|
echo '<span class="label label-success">申请表已上传</span>';
|
|
|
|
|
else
|
|
|
|
|
echo '<span class="label label-warning">请上传申请表</span>';
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
if(!empty($order['applicationform']))
|
|
|
|
|
{ echo "已收到申请,请等待审批。日期:";echo date('Y-m-d',strtotime($order['ts_received']));}
|
|
|
|
|
else
|
|
|
|
|
echo '<span class="label label-warning">请上传申请表</span>';
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
echo "已通过申请,请查收邮件";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
2013-07-17 09:53:44 +00:00
|
|
|
|
} elseif ($this->tabID=='order-offline4') {
|
|
|
|
|
echo date('Y-m-d',strtotime($order['ts_approved']));
|
|
|
|
|
}
|
|
|
|
|
?>
|
2013-06-06 13:38:09 +00:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</tbody>
|
2013-07-17 09:53:44 +00:00
|
|
|
|
</table>
|
2013-06-06 13:38:09 +00:00
|
|
|
|
<?php endif; ?>
|
2013-04-03 02:30:38 +00:00
|
|
|
|
<!-- /content -->
|
|
|
|
|
</div><!--/span-->
|
2013-07-17 09:53:44 +00:00
|
|
|
|
</div><!--/row-->
|
2013-06-06 13:38:09 +00:00
|
|
|
|
<script>$('#Nav-<?= $this->tabID?>').addClass("active");</script>
|
2013-09-05 01:54:50 +00:00
|
|
|
|
<script>
|
|
|
|
|
var _this = {};
|
|
|
|
|
</script>
|
|
|
|
|
<?= $this->partial('data/offlineapp-uploaderform.phtml'); ?>
|