<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="__SELF__" data-auto="true" method="post">
    {foreach $channels as $v}
    <div class="layui-form-item">
        <label class="layui-form-label">{$v.title}</label>
        <div class="layui-input-block">
            <input type="number" name="channel_ids[{$v.id}]" value="{$userRate[$v['id']]|default=''}" title="请输入{$v.title}" placeholder="请输入{$v.title}" class="layui-input">
            <span>单位：千分率，充值费率：{$v.lowrate*1000}‰ 封顶费率：{$v.highrate*1000}‰</span>
        </div>
    </div>
    {/foreach}

    <div class="hr-line-dashed"></div>

    <div class="layui-form-item text-center">
        <input type="hidden" name="user_id" value="{$user_id}">
        <button class="layui-btn" type='submit'>保存</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消吗？" data-close>取消</button>
    </div>

</form>

<script>
    layui.use('form', function(){
        var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
        form.render();
    });
</script>
