1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- {extend name="common/base"/}
- <!-- 主体 -->
- {block name="body"}
- <form class="layui-form p-4">
- <h3 class="pb-3">通知设置</h3>
- <table class="layui-table">
- <tr>
- <td class="layui-td-gray">通知阶段</td>
- <td>
- <input type="hidden" name="message_id" value="{$data.id}">
- <input type="text" name="" value="{$data.title}" lay-verify="" autocomplete="off" placeholder="请输入通知情况" lay-reqText="请输入通知情况" class="layui-input">
- </td>
-
- </tr>
- <tr>
- <td class="layui-td-gray">抄送人员</td>
- <td>
- <div id="memberSelect"></div>
- </td>
-
-
- </tr>
-
- <!-- <tr>
- <td class="layui-td-gray-2">说明<font>*</font></td>
- <td colspan="3"><strong class="red">注意:通知阶段选择后,通知内容若为空,则不会通知。</strong></td>
- </tr> -->
- </table>
-
- <div class="py-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 moduleInit = ['tool'];
- function gouguInit() {
- var form = layui.form,tool=layui.tool;
- //监听提交
- form.on('submit(webform)', function(data){
- // selectMember = memberSelect.getValue();
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- setTimeout(function () {
- parent.location.reload();
- }, 1000);
- }
- }
- // data.field.member_id = selectMember;
- tool.post("/admin/pushmember/edit", data.field, callback);
- return false;
- });
- var person = {:json_encode($person)};
- var member = {:json_encode($member)};
- // console.log(person);
- // console.log(member);
- var memberSelect = xmSelect.render({
-
- el: '#memberSelect', // div的id值
- toolbar: { // 工具条【‘全选’,‘清空’】
- show: true, // 开启工具条
- showIcon: false, // 隐藏工具条的图标
- },
-
- filterable: true, // 开启搜索模式,默认按照name进行搜索
- paging: false, // 启用分页
- pageSize: 3, // 每页的数据个数
- data: person, // 默认是name(相当于我们常传的value值)和value(相当于我们常传的id)
- prop: {
- value: 'id',
- name: 'nickname',
- },
- });
- memberSelect.setValue(member);
- }
- </script>
- {/block}
- <!-- /脚本 -->
|