123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- {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>
- <td class="layui-td-gray-2">公司类型<font>*</font></td>
- <td><input type="text" name="company_type" lay-reqText="请完善公司类型" value="{$detail.company_type}"
- 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>
- <tr>
- <td class="layui-td-gray-2">部门联系电话</td>
- <td>
- <input type="text" name="landline" value="{$detail.phone}" placeholder="请输入部门联系电话,可空" autocomplete="off" class="layui-input">
- </td>
- <td class="layui-td-gray-2">有效期<font>*</font></td>
- <td id="date" style="display:flex;align-items: center;">
- <div class="layui-input-inline">
- <input type="text" id="start_time" name="start_time" readonly lay-reqText="请选择开始时间" placeholder="请选择" class="layui-input" value="{$detail.start_time|date='Y-m-d'}">
- </div>
- <span>-</span>
- <div class="layui-input-inline">
- <input type="text" id="end_time" name="end_time" readonly lay-reqText="请选择结束时间" placeholder="请选择" class="layui-input" value="{$detail.end_time|date='Y-m-d'}">
- </div>
- </td>
- <td class="layui-td-gray">状态</td>
- <td>
- <input type="radio" name="status" value="1" title="正常" {eq name="$detail.status" value="1"} checked{/eq}>
- <input type="radio" name="status" value="0" title="禁用" {eq name="$detail.status" value="0"} checked{/eq}>
- </td>
- </tr>
-
- <tr>
- <td class="layui-td-gray">付费状态</td>
- <td colspan="3" style="display:flex;align-items: center;flex-wrap: wrap;justify-content: center;">
- <input type="radio" name="is_pay" value="0" title="未付费" {eq name="$detail.is_pay" value="0"} checked{/eq}>
- <input type="radio" name="is_pay" value="1" title="已付费" {eq name="$detail.is_pay" value="1"} checked{/eq}>
- <span>(未付费时,限制已归档的项目不能查看)</span>
- </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;
- //日期选择
- 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
- }
- }
- console.log(data.field);
- tool.post("/admin/cpuser.company/edit", data.field, callback);
- }
-
- a = 0
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|