<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<title>{echo admin_title()}</title>
<!--header-->
{template _:header}
</head>
<body>
<div class="layui-layout layui-layout-admin">
<!--top-->
{template _main_top}
<!--nav-->
{template _main_nav}
	<div class="position"><h1>分润设置</h1></div>
	<div class="layui-body admin-body">
		<div class="admin-content">
			<form name="theform" id="theform" method="post" action="{echo \befen\get_url()}">
			<table class="layui-table" style="margin-top:0;">
				<thead>
					<tr>
						<th>渠道名称</th>
						<th>交易费率（%）</th>
						<th>加盟费（元）</th>
						<th>加盟费分润（%）</th>
					</tr>
				</thead>
				<tbody>
					<!--{loop $list $key $val}-->
					<tr id="">
						<input type="hidden" name="level_id[]" value="{$val[level_id]}">
						<td><input type="text" name="level_name[]" id="level_name_{$val[level_id]}" class="layui-input" value="{$val[level_name]}"></td>
						<td><input type="text" name="trade_rates[]" id="trade_rates_{$val[level_id]}" class="layui-input" value="{$val[trade_rates]}"></td>
						<td><input type="text" name="join_cost[]" id="join_cost_{$val[level_id]}" class="layui-input" value="{$val[join_cost]}"></td>
						<td><input type="text" name="join_rates[]" id="join_rates_{$val[level_id]}" class="layui-input" value="{$val[join_rates]}"></td>
					</tr>
					<!--{/loop}-->
				</tbody>
			</table>
			<div style="text-align:right;">
				<button type="submit" name="submit" value="submit" id="submit" class="layui-btn">保存</button>
			</div>
			</form>
		</div>
	</div>
</div>
<!--footer-->
{template _:footer}
<script type="text/javascript">
$("#submit").click(function(){
	ajaxSubmit(this, "", "#theform");
});
</script>
</body>
</html>