12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- {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="parent_company" lay-verify="required" lay-reqText="请完善总公司" value="{$detail.parent_company}" autocomplete="off" placeholder="请输入总公司" class="layui-input"></td><td class="layui-td-gray-2">名称<font>*</font></td>
- <td><input type="text" name="name" lay-verify="required" lay-reqText="请完善名称" value="{$detail.name}" autocomplete="off" placeholder="请输入名称" class="layui-input"></td><td class="layui-td-gray-2">负责人<font>*</font></td>
- <td><input type="text" name="principal" lay-verify="required" lay-reqText="请完善负责人" value="{$detail.principal}" autocomplete="off" placeholder="请输入负责人" class="layui-input"></td>
- </tr>
- <tr><td class="layui-td-gray-2">电话<font>*</font></td>
- <td><input type="text" name="phone" lay-verify="required" lay-reqText="请完善电话" value="{$detail.phone}" autocomplete="off" placeholder="请输入电话" class="layui-input"></td><td class="layui-td-gray-2">公司类型<font>*</font></td>
- <td><input type="text" name="type" lay-verify="required" lay-reqText="请完善公司类型" value="{$detail.type}" autocomplete="off" placeholder="请输入公司类型" class="layui-input"></td><td class="layui-td-gray-2">授权模块<font>*</font></td>
- <td>
- <select name="module" lay-verify="required" lay-reqText="请完善授权模块">
- <option value="">请选择</option>
- <option value="1" {eq name="$detail.module" value="1"} selected{/eq}>选项一</option>
- <option value="2" {eq name="$detail.module" value="2"} selected{/eq}>选项二</option>
- </select>
- </td>
- </tr>
- <tr><td class="layui-td-gray-2">到期时间</td>
- <td><input type="text" name="maturity_time" value="{$detail.maturity_time|time_format=###,'Y-m-d'}" readonly readonly id="laydate_maturity_time" autocomplete="off" placeholder="请选择" class="layui-input"></td><td class="layui-td-gray-2">创建时间</td>
- <td><input type="text" name="create_time" value="{$detail.create_time|time_format=###,'Y-m-d'}" readonly readonly id="laydate_create_time" autocomplete="off" placeholder="请选择" class="layui-input"></td><td class="layui-td-gray-2">更新时间</td>
- <td><input type="text" name="update_time" value="{$detail.update_time|time_format=###,'Y-m-d'}" readonly readonly id="laydate_update_time" autocomplete="off" placeholder="请选择" class="layui-input"></td>
- </tr>
- <tr><td class="layui-td-gray-2">删除时间</td>
- <td><input type="text" name="delete_time" value="{$detail.delete_time|time_format=###,'Y-m-d'}" readonly readonly id="laydate_delete_time" autocomplete="off" placeholder="请选择" class="layui-input"></td><td colspan='4'></td>
- </tr>
- </table>
- <div class="py-3">
- <input type="hidden" name="" 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;
- //日期选择
- layui.laydate.render({
- elem: '#laydate_maturity_time' //指定元素
- });//日期选择
- layui.laydate.render({
- elem: '#laydate_create_time' //指定元素
- });//日期选择
- layui.laydate.render({
- elem: '#laydate_update_time' //指定元素
- });//日期选择
- layui.laydate.render({
- elem: '#laydate_delete_time' //指定元素
- });
-
-
- 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.institution/edit", data.field, callback);
- }
-
- a = 0
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|