1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- {extend name="common/base"/}
- {block name="style"}
- <style>
- .layui-td-gray-2{
- text-align: center;
- }
-
- .footer{
- display: none;
- }
- </style>
- {/block}
- <!-- 主体 -->
- {block name="body"}
- <form class="layui-form p-4">
- <h3 class="pb-3">新建财政局列表</h3>
- <table class="layui-table layui-table-form">
- <tr>
- <td class="layui-td-gray-2">财政局<font>*</font></td>
- <td><input type="text" name="title" lay-verify="required" lay-reqText="请完善财政局" value="" autocomplete="off" placeholder="请输入财政局" class="layui-input"></td>
-
- </tr>
- <tr>
- <td class="layui-td-gray-2">座机<font>*</font></td>
- <td><input type="text" name="landline" lay-verify="required" lay-reqText="请完善座机" value="" autocomplete="off" placeholder="请输入座机" class="layui-input"></td>
- <td class="layui-td-gray-2">地址<font>*</font></td>
- <td><input type="text" name="address" lay-verify="required" lay-reqText="请完善地址" value="" autocomplete="off" placeholder="请输入地址" class="layui-input"></td>
- </tr>
- </table>
- <div class="pt-3">
- <input type="hidden" name="id" value="0"/>
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
- <button type="reset" class="layui-btn layui-btn-primary">重置</button>
- </div>
- </form>
- {/block}
- <!-- /主体 -->
- <!-- 脚本 -->
- {block name="script"}
- <script>
- var moduleInit = ['tool'];
- function gouguInit() {
- var form = layui.form, tool = layui.tool;
- let a = 1;
- //监听提交
- form.on('submit(webform)', function (data) {
- if(a){
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- tool.sideClose(1000);
- a = 1
- }
- }
- tool.post("/admin/cpuser.financial/add", data.field, callback);
- }
-
- a = 0
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|