123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- {include file="common/header"/}
- <div class="LM-container">
- <div class="LM-main">
- <div class="admin-main layui-anim layui-anim-upbit">
- <fieldset class="layui-elem-field layui-field-title">
- <legend>{$title}</legend>
- </fieldset>
- <form class="layui-form layui-form-pane" lay-filter="form">
- <div class="layui-form-item">
- <label class="layui-form-label">等级名</label>
- <div class="layui-input-inline">
- <input type="text" name="level_name" lay-verify="required" placeholder="{:lang('pleaseEnter')}等级名" class="layui-input">
- </div>
- <div class="layui-form-mid layui-word-aux">
- 在4到25个字符之间。
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">等级金额</label>
- <div class="layui-input-inline">
- <input type="text" name="amount" lay-verify="required|number" placeholder="{:lang('pleaseEnter')}等级金额" class="layui-input">
- </div>
- <div class="layui-form-mid layui-word-aux">
- 整数
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">折扣</label>
- <div class="layui-input-inline">
- <input type="text" name="discount" value="100" placeholder="{:lang('pleaseEnter')}折扣" class="layui-input">
- </div>
- <div class="layui-form-mid layui-word-aux">
- 100 不打折,90 九折
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">描述</label>
- <div class="layui-input-inline">
- <input type="text" name="description" value="" placeholder="{:lang('pleaseEnter')}描述" class="layui-input">
- </div>
- <div class="layui-form-mid layui-word-aux">
- 100 不打折,90 九折
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">状态</label>
- <div class="layui-input-inline">
- <input type="radio" name="status" lay-filter="status" checked value="1" title="开启">
- <input type="radio" name="status" lay-filter="status" value="0" title="关闭">
- </div>
- </div>
- <div class="layui-form-item">
- <div class="layui-input-inline">
- <input type="hidden" name="id" >
- <button type="button" class="layui-btn" lay-submit="" lay-filter="submit">{:lang('submit')}</button>
- <a href="{:url('levelIndex')}" class="layui-btn layui-btn-primary">{:lang('back')}</a>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- {include file="common/footer"/}
- <script>
- layui.use(['form', 'layer','upload','laydate'], function () {
- var form = layui.form,layer = layui.layer,$= layui.jquery,upload = layui.upload;
- var info = '';
- info = {:json_encode($info)};
- form.val("form", info);
- if(info){
- $('#addPic').attr('src',info.avatar);
- }
- form.render();
- form.on('submit(submit)', function (data) {
- loading =layer.load(1, {shade: [0.1,'#fff']});
- $.post("", data.field, function (res) {
- layer.close(loading);
- if (res.code > 0) {
- layer.msg(res.msg, {time: 1800, icon: 1}, function () {
- location.href = res.url;
- });
- } else {
- layer.msg(res.msg, {time: 1800, icon: 2});
- }
- });
- });
- });
- </script>
|