<!--{include file="<!--{$oapath}-->public/ins_page.tpl"}-->
<block name="content">
	<div class="page-header clearfix">
	<h1 class="col-sm-8"><!--{$folder_name}--></h1>
	<div class="col-sm-4 search_box">
		<form name="form_search" id="form_search" method="post" class="pull-right">
			<div class="input-group col-20">
				<input class="form-control" type="text" name="keyword" id="keyword">
				<div class="input-group-btn">
					<a class="btn btn-sm btn-info" onclick="submit_search();"><i class="fa fa-search"></i></a>
					
				</div>
			</div>
		</form>
	</div>
</div>
	<form method="post" name="form_adv_search" id="form_adv_search">
		<div class="adv_search panel panel-default  hidden"  id="adv_search">
			<div class="panel-heading">
				<div class="row">
					<h4 class="col-xs-6">高级搜索</h4>
					<div class="col-xs-6 text-right">
						<a  class="btn btn-sm btn-info" onclick="submit_adv_search();">搜索</a>
						<a  class="btn btn-sm " onclick="close_adv_search();">关闭</a>
					</div>
				</div>
			</div>
			<div class="panel-body">
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="li_name">标题：</label>
					<div class="col-sm-8">
						<input  class="form-control" type="text" id="li_name" name="li_name" >
					</div>
				</div>
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="li_content">内容：</label>
					<div class="col-sm-8">
						<input  class="form-control" type="text" id="li_content" name="li_content" >
					</div>
				</div>
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="eq_user_name">登录人：</label>
					<div class="col-sm-8">
						<input  class="form-control" type="text" id="eq_user_name" name="eq_user_name" >
					</div>
				</div>
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="be_create_time">登录时间：</label>
					<div class="col-sm-8">
						<div class="input-daterange input-group" >
							<input type="text" class="input-sm form-control text-center" name="be_create_time" readonly="readonly"/>
							<span class="input-group-addon">-</span>
							<input type="text" class="input-sm form-control text-center" name="en_create_time" readonly="readonly"/>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
	<div class="space-8"></div>
	<div class="operate panel panel-default">
		<div class="panel-body">
			<div class="pull-left">
				<ul class="nav nav-pills">
                                    <li <!--{if $fid == 'all'}-->class="active"<!--{/if}-->>
						<a href="oa.php?c=Task&fid=all">所有</a>
					</li>
					<li <!--{if $fid == 'no_finish'}-->class="active"<!--{/if}-->>
						<a href="oa.php?c=Task&fid=no_finish">我未完成
					      <!--{if $no_finish_task_count != '0'}-->
							<span class="badge badge-pink"><!--{$no_finish_task_count}--></span>
						<!--{/if}-->
                                                </a>
					</li>
					<li <!--{if $fid == 'dept'}-->class="active"<!--{/if}-->>
						<a href="oa.php?c=Task&fid=dept">部门任务
						<!--{if $dept_task_count != '0'}-->
							<span class="badge badge-pink"><!--{$dept_task_count}--></span>
						<!--{/if}--></a>
					</li>
					<li <!--{if $fid == 'no_assign'}-->class="active"<!--{/if}-->>
						<a href="oa.php?c=Task&fid=no_assign" >不知让谁处理
						 <!--{if $no_assign_task_count != '0'}-->
							<span class="badge badge-pink"><!--{$no_assign_task_count}--></span>
						<!--{/if}--></a>
					</li>					
					<li <!--{if $fid == 'finished'}-->class="active"<!--{/if}-->>
						<a href="oa.php?c=Task&fid=finished">我已完成</a>
					</li>
					<li <!--{if $fid == 'my_task'}-->class="active"<!--{/if}-->>
						<a href="oa.php?c=Task&fid=my_task">我发布的</a>
					</li>
					<li <!--{if $fid == 'my_assign'}-->class="active"<!--{/if}-->>
						<a href="oa.php?c=Task&fid=my_assign">我指派的</a>
					</li>				
				</ul>
			</div>
			<if condition="$auth['write']">
				<div class="pull-right">
					<a class="btn btn-sm btn-primary" onclick="add()">发布任务</a>
				</div>
			</if>
		</div>
	</div>
	<div class="ul_table ul_table_responsive">
		<ul>
			<li class="thead">
				<div class="pull-left">
					<span class="col-8 ">编号</span>
					<span class="col-8 ">发起人</span>
				</div>
				<div class="pull-right">
					<span class="col-12 autocut">指派给</span>
					<span class="col-20">发起时间</span>
					<span class="col-20">期望完成时间</span>
					<span class="col-6 ">状态</span>
					<span class="col-6 text-center">操作</span>
				</div>
				<div class="auto autocut">
					标题
				</div>
			</li>
			<!--{if empty($list)}-->
				<li class="no-data">
					没找到数据
				</li>
				<!--{else}-->
				<!--{foreach $list as  $key=>$vo}-->
					<li class="tbody">
						<div class="pull-left">
							<span class="col-8 "><!--{$vo.task_no}--></span>
							<span class="col-8 "><!--{$vo.user_name}--></span>
						</div>
						<div class="pull-right">
							<span class="col-12 autocut">&nbsp;<!--{$vo.executor}--></span>
							<span class="col-20"><!--{$vo.create_time|date_format:'%Y-%m-%d %H:%M:%S'}-->&nbsp;</span>
							<span class="col-20"><!--{$vo.expected_time}-->&nbsp;</span>
							<span class="col-6">   <!--{if $vo.status=='0'}--> 
                                                                        待处理
                                                           <!--{elseif $vo.status=='10'}-->
                                                                        进行中
                                                           <!--{elseif $vo.status=='20'}-->
                                                                        已完成
                                                           <!--{elseif $vo.status=='22'}-->
                                                                        已拒绝
                                                            <!--{elseif $vo.status=='30'}-->
                                                                        已完成
                                                            <!--{/if}-->&nbsp;</span>
							<span class="col-6 text-center">
                                                            <!--{if $vo.status<'30' and  $vo.user_id==$user_id}--> 
                                                                  <a href="oa.php?c=Task&a=add&id=<!--{$vo.id}-->">修改</a>&nbsp;<a href="oa.php?c=Task&a=del&id=<!--{$vo.id}-->">删除</a>
                                                             <!--{/if}-->
								
                                                        </span>
						</div>
						<div class="auto autocut">
							<a href="oa.php?c=Task&a=read&id=<!--{$vo.id}-->"><!--{$vo.name}--></a>
						</div>
					</li>
				 <!--{/foreach}-->
				<div class="pagination">
					<!--{$showpage}-->
				</div>
			<!--{/if}-->
		</ul>
	</div>
</block>

					
				</div>
			</div>
		</div>
		<!--<iframe src="{:U('push/client')}" class="push" id="push"></iframe>-->
		<!-- Mainly scripts -->
		<script src="<!--{$oapath}-->Ins/js/jquery-2.1.1.js"></script>
		<script src="<!--{$oapath}-->Ins/js/bootstrap.min.js"></script>
		<script src="<!--{$oapath}-->Ins/js/plugins/metisMenu/jquery.metisMenu.js"></script>
		<script src="<!--{$oapath}-->Ins/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
		<!-- Custom and plugin javascript -->
		<script src="<!--{$oapath}-->Ins/js/inspinia.js"></script>
		<script src="<!--{$oapath}-->Ins/js/common.js"></script>
		<script src="<!--{$oapath}-->Ins/js/plugins/pace/pace.min.js"></script>
                
		<script src="<!--{$oapath}-->Ins/js/plugins/toastr/toastr.min.js"></script>
                <script src="<!--{$oapath}-->Ins/js/plugins/gritter/jquery.gritter.min.js"></script>
                <script src="<!--{$oapath}-->Ins/js/plugins/bootbox/bootbox.min.js"></script>
		<include file="Layout:ins_plugin_js"/>
<block name="js">
	<script type="text/javascript">
		function add() {
			window.open("oa.php?c=Task&a=add", "_self");
		}


		$(document).ready(function() {
			set_return_url();
		});

	</script>
</block>
	</body>
</html>
