109 lines
3.1 KiB
HTML
109 lines
3.1 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="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">文章id<font>*</font></td>
|
|
<td colspan="3">
|
|
<div class="layui-col-md6">
|
|
<select name="party_branch" lay-verify="required" lay-search="">
|
|
<option value="" >请选择</option>
|
|
{volist name='article' id='vo'}
|
|
<option value="{$vo.id}" >{$vo.title}</option>
|
|
{/volist}
|
|
</select>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td class="layui-td-gray">标识<font>*</font></td>
|
|
<td colspan="7">
|
|
<select name="status" lay-verify="required">
|
|
<option value="1" >文章</option>
|
|
<option value="2" >朋友圈</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="layui-td-gray">投诉内容<font>*</font></td>
|
|
<td colspan="6">
|
|
<textarea class="layui-textarea"></textarea>
|
|
</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,laydate = layui.laydate;
|
|
//监听提交
|
|
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.complaint/add', data.field, callback);
|
|
return false;
|
|
});
|
|
//日期选择
|
|
laydate.render({
|
|
elem: '#formDate',
|
|
max: 7,
|
|
showBottom: false
|
|
});
|
|
|
|
}
|
|
</script>
|
|
{/block}
|
|
<!-- /脚本 --> |