123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- {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">通知情况<font>*</font></td>
- <td>
- <input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入通知情况" lay-reqText="请输入通知情况" class="layui-input">
- </td>
- <td class="layui-td-gray">上级通知情况<font>*</font></td>
- <td>
- <select name="pid" lay-verify="required" lay-reqText="请选择上级部门">
- <option value="0">作为顶级通知设置</option>
- {volist name="push_message" id="v"}
- <option value="{$v.id}" {eq name="$pid" value="$v.id"} selected{/eq}>{$v.title}</option>
- {/volist}
- </select>
- </td>
- <td class="layui-td-gray">可设置方<font>*</font></td>
- <td>
- <input type="checkbox" name="is_who" value="0" title="财政局" lay-skin="primary" checked>
- <input type="checkbox" name="is_who" value="1" title="业主" lay-skin="primary">
- <input type="checkbox" name="is_who" value="2" title="公司" lay-skin="primary">
- </td>
- </tr>
- <tr>
- <td class="layui-td-gray-2">财政局-通知内容</td>
- <td colspan="3">
- <input type="text" name="content" placeholder="请输入通知内容,可空" autocomplete="off" class="layui-input">
- </td>
- <td class="layui-td-gray">是否带<font>项目名称</font></td>
- <td>
- <input type="radio" name="is_project_name" value="1" title="是" checked>
- <input type="radio" name="is_project_name" value="0" title="否">
- </td>
- <td class="layui-td-gray">人员</td>
- <td>
- <select name="is_people" lay-verify="" lay-reqText="请选择人员">
- <option value="">无</option>
- <option value="申请人">申请人</option>
- <option value="审批人">审批人</option>
- <option value="接收人">接收人</option>
- </select>
- </td>
- <td class="layui-td-gray">是否微信推送</td>
- <td>
- <input type="radio" name="is_wechat" value="1" title="是" checked>
- <input type="radio" name="is_wechat" value="0" title="否">
- </td>
- </tr>
- <tr>
- <td class="layui-td-gray-2">公司-通知内容</td>
- <td colspan="3">
- <input type="text" name="content_company" placeholder="请输入通知内容,可空" autocomplete="off" class="layui-input">
- </td>
- <td class="layui-td-gray">是否带<font>项目名称</font></td>
- <td>
- <input type="radio" name="is_project_name_company" value="1" title="是" checked>
- <input type="radio" name="is_project_name_company" value="0" title="否">
- </td>
- <td class="layui-td-gray">人员</td>
- <td>
- <select name="is_people_company" lay-verify="" lay-reqText="请选择人员">
- <option value="">无</option>
- <option value="申请人">申请人</option>
- <option value="审批人">审批人</option>
- <option value="接收人">接收人</option>
- </select>
- </td>
- <td class="layui-td-gray">是否微信推送</td>
- <td>
- <input type="radio" name="is_wechat_company" value="1" title="是" checked>
- <input type="radio" name="is_wechat_company" value="0" title="否">
- </td>
- </tr>
- <tr>
- <td class="layui-td-gray-2">业主-通知内容</td>
- <td colspan="3">
- <input type="text" name="content_proprietor" placeholder="请输入通知内容,可空" autocomplete="off" class="layui-input">
- </td>
- <td class="layui-td-gray">是否带<font>项目名称</font></td>
- <td>
- <input type="radio" name="is_project_name_proprietor" value="1" title="是" checked>
- <input type="radio" name="is_project_name_proprietor" value="0" title="否">
- </td>
- <td class="layui-td-gray">人员</td>
- <td>
- <select name="is_people_proprietor" lay-verify="" lay-reqText="请选择人员">
- <option value="">无</option>
- <option value="申请人">申请人</option>
- <option value="审批人">审批人</option>
- <option value="接收人">接收人</option>
- </select>
- </td>
- <td class="layui-td-gray">是否微信推送</td>
- <td>
- <input type="radio" name="is_wechat_proprietor" value="1" title="是" checked>
- <input type="radio" name="is_wechat_proprietor" value="0" title="否">
- </td>
- </tr>
- <tr>
- <td class="layui-td-gray">通知阶段</td>
- <!-- <td>
- <select name="rule_id" lay-verify="" lay-reqText="">
- <option value="0">未选择,可为空</option>
- {volist name="rule" id="v"}
- <option value="{$v.id}" >{$v.title}</option>
- {/volist}
- </select>
- </td> -->
- <td colspan="3">
- <input type="text" name="rule_url" placeholder="请输入通知阶段url,可空" autocomplete="off" class="layui-input">
- </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){
- let callback = function (e) {
- layer.msg(e.msg);
- if (e.code == 0) {
- setTimeout(function () {
- parent.location.reload();
- }, 1000);
- }
- }
- var is_who = [];
- $('input:checkbox[name="is_who"]:checked').each(function(){
- is_who.push($(this).val());
- });
- // alert(is_who);
- // console.log(is_who);
- data.field.is_who = is_who;
- tool.post("/admin/pushmessage/add", data.field,callback);
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|