12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- {include file="common/header"/}
- <div class="LM-container">
- <div class="LM-main">
- <fieldset class="layui-elem-field layui-field-title">
- </fieldset>
- <form class="layui-form layui-form-pane" lay-filter="form">
- <!--<input type="hidden" name="id" id="id">-->
- <div class="layui-form-item">
- <label class="layui-form-label">开盘开关</label>
- <div class="layui-input-block">
- <input type="checkbox" name="open" lay-skin="switch" lay-text="ON|OFF">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">开盘时间</label>
- <div class="layui-input-inline">
- <input type="number" name="open_start" lay-verify="required" class="layui-input">
- </div>
- <div class="layui-form-mid layui-word-aux">
- 时间格式 如下午2点 写成14
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">闭盘时间</label>
- <div class="layui-input-inline">
- <input type="number" name="open_end" lay-verify="required" class="layui-input">
- </div>
- <div class="layui-form-mid layui-word-aux">
- 时间格式 如下午2点 写成14
- </div>
- </div>
- <div class="layui-form-item">
- <div class="layui-input-inline">
- <button type="button" class="layui-btn" lay-submit="" lay-filter="submit">{:lang('submit')}</button>
- <!--<a href="{:url('hlep')}" class="layui-btn layui-btn-primary">{:lang('back')}</a>-->
- </div>
- </div>
- </form>
- </div>
- </div>
- {include file="common/footer"/}
- <script>
- layui.use(['form', 'layer','upload','laydate'], function () {
- var form = layui.form, laydate=layui.laydate,layer = layui.layer,$= layui.jquery,upload = layui.upload ;
- var info = '';
- var config = {$config|raw};
- console.log("config",config)
- //日期范围
- laydate.render({
- elem: '#date'
- ,range: true
- });
- form.val("form", config);
- console.log("config",config["open"])
- if (config["open"]==1){
- $("#open").attr("checked",true)
- }else {
- $("#open").removeAttr("checked")
- }
- form.render();
- form.on('submit(submit)', function (data) {
- console.log("data",data.field)
- loading =layer.load(1, {shade: [0.1,'#fff']});
- $.post("", data.field, function (res) {
- layer.close(loading);
- if (res.code== 200) {
- layer.msg(res.msg, {time: 1800, icon: 1}, function () {
- // location.href = res.url;
- // location.href = res.url;
- });
- } else {
- layer.msg(res.msg, {time: 1800, icon: 2});
- }
- },"json");
- });
- });
- </script>
|