edit.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. {extend name="common/base"/}
  2. <!-- 主体 -->
  3. {block name="body"}
  4. <form class="layui-form p-4">
  5. <h3 class="pb-3">通知设置</h3>
  6. <table class="layui-table">
  7. <tr>
  8. <td class="layui-td-gray">通知情况<font>*</font></td>
  9. <td>
  10. <input type="hidden" name="id" value="{$data.id}">
  11. <input type="text" name="title" value="{$data.title}" lay-verify="required" autocomplete="off" placeholder="请输入通知情况" lay-reqText="请输入通知情况" class="layui-input">
  12. </td>
  13. <td class="layui-td-gray">上级通知情况<font>*</font></td>
  14. <td>
  15. <select name="pid" lay-verify="required" lay-reqText="请选择上级部门">
  16. <option value="0">作为顶级通知设置</option>
  17. {volist name="push_message" id="v"}
  18. <option value="{$v.id}" {eq name="$v.id" value="$data.pid"}selected{/eq}>{$v.title}</option>
  19. {/volist}
  20. </select>
  21. </td>
  22. <td class="layui-td-gray">可设置方<font>*</font></td>
  23. <td>
  24. <input type="checkbox" lay-filter="checkbox-filter" name="is_cost" value="财政局" title="财政局" {eq name="$data.is_cost" value="1" } checked{/eq}>
  25. <input type="checkbox" lay-filter="checkbox-filter" name="is_owner" value="业主" title="业主" {eq name="$data.is_owner" value="1" } checked{/eq}>
  26. <input type="checkbox" lay-filter="checkbox-filter" name="is_company" value="公司" title="公司" {eq name="$data.is_company" value="1" } checked{/eq}>
  27. </td>
  28. </tr>
  29. <tr>
  30. <td class="layui-td-gray-2">财政局-通知内容</td>
  31. <td colspan="3">
  32. <input type="text" name="content" value="{$data.content}" placeholder="请输入通知内容,可空" autocomplete="off" class="layui-input">
  33. </td>
  34. <td class="layui-td-gray">是否带<font>项目名称</font></td>
  35. <td>
  36. <input type="radio" name="is_project_name" value="1" title="是" {eq name="$data.is_project_name" value="1" }checked{/eq}>
  37. <input type="radio" name="is_project_name" value="0" title="否" {eq name="$data.is_project_name" value="0" }checked{/eq}>
  38. </td>
  39. <td class="layui-td-gray">人员</td>
  40. <td>
  41. <select name="is_people" lay-verify="" lay-reqText="请选择人员">
  42. <option value="" {eq name="$data.is_people" value=""}selected{/eq}>无</option>
  43. <option value="申请人" {eq name="$data.is_people" value="申请人"}selected{/eq}>申请人</option>
  44. <option value="审批人" {eq name="$data.is_people" value="审批人"}selected{/eq}>审批人</option>
  45. <option value="接收人" {eq name="$data.is_people" value="接收人"}selected{/eq}>接收人</option>
  46. </select>
  47. </td>
  48. <td class="layui-td-gray">是否微信推送</td>
  49. <td>
  50. <input type="radio" name="is_wechat" value="1" title="是" {eq name="$data.is_wechat" value="1" }checked{/eq}>
  51. <input type="radio" name="is_wechat" value="0" title="否" {eq name="$data.is_wechat" value="0" }checked{/eq}>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td class="layui-td-gray-2">公司-通知内容</td>
  56. <td colspan="3">
  57. <input type="text" name="content_company" value="{$data.content_company}" placeholder="请输入通知内容,可空" autocomplete="off" class="layui-input">
  58. </td>
  59. <td class="layui-td-gray">是否带<font>项目名称</font></td>
  60. <td>
  61. <input type="radio" name="is_project_name_company" value="1" title="是" {eq name="$data.is_project_name_company" value="1" }checked{/eq}>
  62. <input type="radio" name="is_project_name_company" value="0" title="否" {eq name="$data.is_project_name_company" value="0" }checked{/eq}>
  63. </td>
  64. <td class="layui-td-gray">人员</td>
  65. <td>
  66. <select name="is_people_company" lay-verify="" lay-reqText="请选择人员">
  67. <option value="" {eq name="$data.is_people_company" value=""}selected{/eq}>无</option>
  68. <option value="申请人" {eq name="$data.is_people_company" value="申请人"}selected{/eq}>申请人</option>
  69. <option value="审批人" {eq name="$data.is_people_company" value="审批人"}selected{/eq}>审批人</option>
  70. <option value="接收人" {eq name="$data.is_people_company" value="接收人"}selected{/eq}>接收人</option>
  71. </select>
  72. </td>
  73. <td class="layui-td-gray">是否微信推送</td>
  74. <td>
  75. <input type="radio" name="is_wechat_company" value="1" title="是" {eq name="$data.is_wechat_company" value="1" }checked{/eq}>
  76. <input type="radio" name="is_wechat_company" value="0" title="否" {eq name="$data.is_wechat_company" value="0" }checked{/eq}>
  77. </td>
  78. </tr>
  79. <tr>
  80. <td class="layui-td-gray-2">业主-通知内容</td>
  81. <td colspan="3">
  82. <input type="text" name="content_proprietor" value="{$data.content_proprietor}" placeholder="请输入通知内容,可空" autocomplete="off" class="layui-input">
  83. </td>
  84. <td class="layui-td-gray">是否带<font>项目名称</font></td>
  85. <td>
  86. <input type="radio" name="is_project_name_proprietor" value="1" title="是" {eq name="$data.is_project_name_proprietor" value="1" }checked{/eq}>
  87. <input type="radio" name="is_project_name_proprietor" value="0" title="否" {eq name="$data.is_project_name_proprietor" value="0" }checked{/eq}>
  88. </td>
  89. <td class="layui-td-gray">人员</td>
  90. <td>
  91. <select name="is_people_proprietor" lay-verify="" lay-reqText="请选择人员">
  92. <option value="" {eq name="$data.is_people_proprietor" value=""}selected{/eq}>无</option>
  93. <option value="申请人" {eq name="$data.is_people_proprietor" value="申请人"}selected{/eq}>申请人</option>
  94. <option value="审批人" {eq name="$data.is_people_proprietor" value="审批人"}selected{/eq}>审批人</option>
  95. <option value="接收人" {eq name="$data.is_people_proprietor" value="接收人"}selected{/eq}>接收人</option>
  96. </select>
  97. </td>
  98. <td class="layui-td-gray">是否微信推送</td>
  99. <td>
  100. <input type="radio" name="is_wechat_proprietor" value="1" title="是" {eq name="$data.is_wechat_proprietor" value="1" }checked{/eq}>
  101. <input type="radio" name="is_wechat_proprietor" value="0" title="否" {eq name="$data.is_wechat_proprietor" value="0" }checked{/eq}>
  102. </td>
  103. </tr>
  104. <tr>
  105. <td class="layui-td-gray">通知阶段</td>
  106. <!-- <td>
  107. <select name="rule_id" lay-verify="" lay-reqText="">
  108. <option value="0">未选择,可为空</option>
  109. {volist name="rule" id="v"}
  110. <option value="{$v.id}" {eq name="$v.id" value="$data.rule_id"}selected{/eq}>{$v.title}</option>
  111. {/volist}
  112. </select>
  113. </td> -->
  114. <td colspan="3">
  115. <input type="text" name="rule_url" value="{$data.rule_url}" placeholder="请输入通知阶段url,可空" autocomplete="off" class="layui-input">
  116. </td>
  117. </tr>
  118. <tr>
  119. <td class="layui-td-gray-2">说明<font>*</font></td>
  120. <td colspan="3"><strong class="red">注意:通知阶段选择后,通知内容若为空,则不会通知。</strong></td>
  121. </tr>
  122. </table>
  123. <div class="py-3">
  124. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
  125. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  126. </div>
  127. </form>
  128. {/block}
  129. <!-- /主体 -->
  130. <!-- 脚本 -->
  131. {block name="script"}
  132. <script>
  133. const moduleInit = ['tool'];
  134. function gouguInit() {
  135. var form = layui.form,tool=layui.tool;
  136. //监听提交
  137. form.on('submit(webform)', function(data){
  138. let callback = function (e) {
  139. layer.msg(e.msg);
  140. if (e.code == 0) {
  141. setTimeout(function () {
  142. parent.location.reload();
  143. }, 1000);
  144. }
  145. }
  146. tool.post("/admin/pushmessage/edit", data.field, callback);
  147. return false;
  148. });
  149. }
  150. </script>
  151. {/block}
  152. <!-- /脚本 -->