129 lines
4.6 KiB
HTML
129 lines
4.6 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" value="{$detail.name}"></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}" {if $detail.user_id==$vo.user_id} selected {/if}>{$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" value="{$detail.phone}">
|
|
</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}" {if $detail.two_user_id==$vo.user_id} selected {/if}>{$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" value="{$detail.two_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" value="{$detail.company}">
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
<div class="pt-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', 'tagpicker', 'tinymce'];
|
|
function gouguInit() {
|
|
var form = layui.form, tool = layui.tool, tagpicker = layui.tagpicker;
|
|
|
|
//上传缩略图
|
|
var upload_thumb = layui.upload.render({
|
|
elem: '#upload_btn_thumb',
|
|
url: '/admin/api/upload',
|
|
done: function (res) {
|
|
//如果上传失败
|
|
if (res.code == 1) {
|
|
layer.msg('上传失败');
|
|
return false;
|
|
}
|
|
//上传成功
|
|
$('#upload_box_thumb input').attr('value', res.data.filepath);
|
|
$('#upload_box_thumb img').attr('src', res.data.filepath);
|
|
}
|
|
});
|
|
|
|
//监听提交
|
|
form.on('submit(webform)', function (data) {
|
|
|
|
let callback = function (e) {
|
|
layer.msg(e.msg);
|
|
if (e.code == 0) {
|
|
tool.sideClose(1000);
|
|
}
|
|
}
|
|
tool.post("/admin/nk.party.branch/edit", data.field, callback);
|
|
return false;
|
|
});
|
|
|
|
}
|
|
</script>
|
|
{/block}
|
|
<!-- /脚本 --> |