12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- {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>
- <td class="layui-td-gray-2">公司类型<font>*</font></td>
- <td><input type="text" name="company_type" 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>
- <td colspan='2'></td>
- </tr>
- <tr>
- <td class="layui-td-gray-2">部门联系座机</td>
- <td>
- <input type="text" name="landline" value="" placeholder="请输入部门联系电话,可空" autocomplete="off" class="layui-input">
- </td>
- <td class="layui-td-gray-2">有效期<font>*</font></td>
- <td id="date">
- <div class="layui-input-inline">
- <input type="text" id="start_time" name="start_time" readonly lay-verify="required" lay-reqText="请选择开始时间" placeholder="请选择" class="layui-input" value="">
- </div>
- -
- <div class="layui-input-inline">
- <input type="text" id="end_time" name="end_time" readonly lay-verify="required" lay-reqText="请选择结束时间" placeholder="请选择" class="layui-input" value="">
- </div>
- </td>
- <td class="layui-td-gray-2">状态</td>
- <td>
- <input type="radio" name="status" value="1" title="正常" checked>
- <input type="radio" name="status" value="0" title="禁用">
- </td>
- </tr>
- </table>
- <div class="pt-3">
- <input type="hidden" name="" 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;
- //日期选择
- layui.laydate.render({
- elem: '#date',
- range: ['#start_time', '#end_time'],
- rangeLinked:true
- });
- //监听提交
- 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.company/add", data.field, callback);
- }
-
- a = 0
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|