<!--{include file="<!--{$oapath}-->public/ins_page.tpl"}-->

<block name="content">
	<div class="page-header">
	<h1>账户设置</h1>
</div>
	<div class="space-8"></div>
	<if condition="$auth['write']">
		<div class="operate panel panel-default">
			<div class="panel-body">
				<div class="pull-left">
					<a class="btn btn-sm btn-primary" href="oa.php?c=Finance">返回</a>
				</div>
				<div class="pull-right">
					<a class="btn btn-sm btn-primary" onclick="add()">新建</a>
				</div>
			</div>
		</div>
	</if>
	<div class="ul_table">
		<ul>
			<li class="thead">
				<span class="col-10 ">账户名称</span>
				<span class="col-8 ">日期</span>
				<span class="col-20 ">开户银行</span>
				<span class="col-20 ">帐号</span>
				<span class="col-8 text-center">初始金额</span>
				<span class="col-8 text-center">账户余额</span>
				<div class="pull-right">
					<span class="col-8 text-center">操作</span>
				</div>
				<span class="auto autocut">备注 </span>
			</li>
			<!--{if empty($list)}-->
				<li class="no-data">
					没找到数据
				</li>
				<!--{else}-->
				<!--{foreach $list as  $key=>$vo}-->
					<li class="tbody">
						<span class="col-10 "><a href="oa.php?c=Finance&a=add_account&id=<!--{$vo.id}-->"><!--{$vo.name}--></a></span>
						<span class="col-8"><!--{$vo.create_time|date_format:"%Y-%m-%d"}--></span>
						<span class="col-20 "><!--{$vo.bank}--></span>
						<span class="col-20 "><!--{$vo.no}--></span>
						<span class="col-8 text-center"><!--{$vo.init}--></span>
						<span class="col-8 text-center"><!--{$vo.balance}--></span>
						<div class="pull-right">
							<span class="col-8 text-center"><a onclick="del(<!--{$vo.id}--> );">删除</a></span>
						</div>
						<span class="auto autocut"><!--<{$vo.remark}--> </span>

					</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">
		$(document).ready(function() {
			set_return_url(location.href,1);
		});

		function add() {
			window.open("oa.php?c=Finance&a=add_account", "_self");
		}

		function del(id) {
			ui_confirm('确定要删除吗?', function() {
				window.open(fix_url("oa.php?c=Finance&a=del_account&account_id=" + id), "_self");
			});
		};

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