123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- {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="{$detail.title}" 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-reqText="请完善座机"
- value="{$detail.landline}" autocomplete="off" placeholder="请输入座机" class="layui-input"></td>
- <td class="layui-td-gray-2">地址<font>*</font></td>
- <td><input type="text" name="address" lay-reqText="请完善地址"
- value="{$detail.address}" autocomplete="off" placeholder="请输入地址" class="layui-input"></td>
- </tr>
- </table>
- <div class="py-3">
- <input type="hidden" name="id" value="{$detail.id}"/>
- <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/edit", data.field, callback);
- }
-
- a = 0
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|