2023-01-30 17:45:55 +08:00

113 lines
3.9 KiB
HTML

{extend name="common/base"/}
{block name="style"}
<style type="text/css">
.editormd-code-toolbar select {
display: inline-block
}
.editormd li {
list-style: inherit;
}
.layui-td-gray{
width: 110px;
}
</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">党支部名称<font>*</font></td>
<td colspan="7"><input type="text" name="name" lay-verify="required" lay-reqText="请输入党支部名称"
autocomplete="off" placeholder="请输入党支部名称" class="layui-input"></td>
</tr>
<tr>
<td class="layui-td-gray">党支部书记<font>*</font></td>
<td colspan="3">
<div class="layui-col-md6">
<select name="user_id" lay-verify="required" lay-search="">
<option value="" >请选择</option>
{volist name='users' id='vo'}
<option value="{$vo.user_id}" >{$vo.name}</option>
{/volist}
</select>
</div>
</td>
</tr>
<tr>
<td class="layui-td-gray">书记电话号码<font>*</font></td>
<td colspan="7">
<input type="text" name="phone" lay-verify="required|phone" lay-reqText="请输入书记电话号码"
autocomplete="off" placeholder="请输入书记电话号码" class="layui-input">
</td>
</tr>
<tr>
<td class="layui-td-gray">党支部副书记<font>*</font></td>
<td colspan="3">
<div class="layui-col-md6">
<select name="two_user_id" lay-verify="required" lay-search="">
<option value="" >请选择</option>
{volist name='users' id='vo'}
<option value="{$vo.user_id}" >{$vo.name}</option>
{/volist}
</select>
</div>
</td>
</tr>
<tr>
<td class="layui-td-gray">副书记电话号码<font>*</font></td>
<td colspan="7">
<input type="text" name="two_phone" lay-verify="required|phone" lay-reqText="请输入副书记电话号码"
autocomplete="off" placeholder="请输入副书记电话号码" class="layui-input" lay-type="phone">
</td>
</tr>
<tr>
<td class="layui-td-gray">单位<font>*</font></td>
<td colspan="7">
<input type="text" name="company" lay-verify="required" lay-reqText="请输入单位"
autocomplete="off" placeholder="请输入单位" class="layui-input">
</td>
</tr>
</table>
<div class="pt-3">
<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>
const editorType = '{$editor}';
var moduleInit = ['tool', 'tagpicker', 'tinymce'];
function gouguInit() {
var form = layui.form, tool = layui.tool, tagspicker = layui.tagpicker;
//监听提交
form.on('submit(webform)', function (data) {
let callback = function (e) {
layer.msg(e.msg);
if (e.code == 0) {
setTimeout(function () {
parent.location.reload();
}, 1000);
}
}
tool.post('/admin/nk.party.branch/add', data.field, callback);
return false;
});
}
</script>
{/block}
<!-- /脚本 -->