caipan_shop_admin/view/manager/message/edit.html

91 lines
3.8 KiB
HTML

{layout name="manager/layout"}
<div class="layuimini-container location-operate-page">
<div class="layuimini-main">
<div class="layui-form layuimini-form">
<div class="layui-form-item">
<label class="layui-form-label">消息标题</label>
<div class="layui-input-block">
<input type="text" name="item[title]" placeholder="请输入消息标题" class="layui-input" maxlength="100" value="{$item.title ?? ''}">
</div>
</div>
<!--
<div class="layui-formitem">
<label class="layui-form-label">消息简述</label>
<div class="layui-input-block">
<input type="text" name="item[summary]" placeholder="请输入消息简述" class="layui-input" value="{$item.summary ?? ''}">
</div>
</div>
-->
<div class="layui-form-item field-div">
<label class="layui-form-label required">消息类型</label>
<div class="layui-input-block">
<select class="layui-select" name="item[type]">
{foreach $typeList as $ki => $kv}
<option value="{$ki}" {if $item.type == $ki} selected {/if}>{$kv}</option>
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label required">目标人群</label>
<div class="layui-input-block">
<select name="item[target]" lay-filter="target">
{foreach targetList as $ki => $kv}
<option value="{$ki}" {if $item.target == $ki} selected {/if}>{$kv}</option>
{/foreach}
</select>
</div>
</div>
<div class="layui-form-item target-list {if $item.target != 'part'}layui-hide{/if} ">
<label class="layui-form-label required">接收用户</label>
<div class="layui-input-block">
<div id="receive-users" data-show="{$targetListJson ?? ''}"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">发送时间</label>
<div class="layui-input-block">
<input type="text" name="item[send_at]" placeholder="留空,默认当前时间" class="layui-input" id="msg-send-at" value="{$item.send_at ?? ''}" autocomplete="off">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label required">消息内容</label>
<div class="layui-input-block">
<textarea name="item[content]" class="layui-textarea" placeholder="请输入消息内容" rows="10">{$item.content ?? ''}</textarea>
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<input type="hidden" name="id" value="{$id ?? 0}">
<button class="layui-btn layui-btn-normal" data-url="/manager/message/edit" lay-submit lay-filter="saveBtn">确认保存</button>
</div>
</div>
</div>
</div>
</div>
<script>
layui.use([ 'jquery', 'form',"xmSelect","laydate"], function () {
let $ = layui.jquery,
xmSelect = layui.xmSelect,
laydate = layui.laydate,
form = layui.form;
let curDateTime = date('Y-m-d H:i:s');
laydate.render({
elem: '#msg-send-at'
,type: 'datetime'
,min: curDateTime
});
})
</script>
<script src="__MANAGER__/js/message.js?v={:mt_rand()}"></script>