3cba5c3bd755aa6f1bcb6e0a16d32fe5.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <?php /*a:2:{s:62:"D:\phpstudy_pro\WWW\caiping\app\admin\view\department\add.html";i:1723541257;s:59:"D:\phpstudy_pro\WWW\caiping\app\admin\view\common\base.html";i:1723541257;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="360-site-verification" content="a7c876fae8b6e3175a52ea9f19543f51" />
  9. <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">
  10. <script src="/static/dist/xm-select.js"></script>
  11. <link rel="mobile-prefetch" href=""/>
  12. <title><?php echo get_system_config('web','admin_title'); ?></title>
  13. <meta name="keywords" content="<?php echo get_system_config('web','keywords'); ?>"/>
  14. <meta name="description" content="<?php echo get_system_config('web','desc'); ?>"/>
  15. <link rel="stylesheet" href="/static/assets/gougu/css/gougu.css?v=<?php echo get_system_config('web','version'); ?>" media="all">
  16. <style>
  17. .footer{
  18. width: 100%;
  19. height: 25px;
  20. text-align: center;
  21. position: fixed;
  22. bottom: 0;
  23. }
  24. </style>
  25. </head>
  26. <body class="main-body">
  27. <!-- 主体 -->
  28. <form class="layui-form p-4">
  29. <h3 class="pb-3">部门架构</h3>
  30. <?php if($id == '0'): ?>
  31. <table class="layui-table">
  32. <tr>
  33. <td class="layui-td-gray">部门名称<font>*</font></td>
  34. <td>
  35. <input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入部门名称" lay-reqText="请输入部门名称" class="layui-input">
  36. </td>
  37. <td class="layui-td-gray">上级部门<font>*</font></td>
  38. <td>
  39. <select name="pid" lay-verify="required" lay-reqText="请选择上级部门">
  40. <option value="0">作为顶级部门</option>
  41. <?php if(is_array($department) || $department instanceof \think\Collection || $department instanceof \think\Paginator): $i = 0; $__LIST__ = $department;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
  42. <option value="<?php echo htmlentities($v['id']); ?>" <?php if($pid == $v['id']): ?> selected<?php endif; ?>><?php echo htmlentities($v['title']); ?></option>
  43. <?php endforeach; endif; else: echo "" ;endif; ?>
  44. </select>
  45. </td>
  46. </tr>
  47. <?php if($permission == 1): ?>
  48. <tr>
  49. <td class="layui-td-gray">单位类型:<font>*</font></td>
  50. <td>
  51. <input type="radio" name="type" value="-1" title="系统方" checked>
  52. <input type="radio" name="type" value="0" title="财政局">
  53. <input type="radio" name="type" value="1" title="业主">
  54. <input type="radio" name="type" value="2" title="公司">
  55. </td>
  56. </tr>
  57. <?php endif; ?>
  58. <tr>
  59. <td class="layui-td-gray-2">部门联系电话</td>
  60. <td colspan="3">
  61. <input type="text" name="phone" placeholder="请输入部门联系电话,可空" autocomplete="off" class="layui-input">
  62. </td>
  63. </tr>
  64. </table>
  65. <?php else: ?>
  66. <table class="layui-table">
  67. <tr>
  68. <td class="layui-td-gray">部门名称<font>*</font></td>
  69. <td>
  70. <input type="text" name="title" value="<?php echo htmlentities($detail['title']); ?>" lay-verify="required" autocomplete="off" placeholder="请输入部门名称" lay-reqText="请输入部门名称" class="layui-input">
  71. </td>
  72. <td class="layui-td-gray">上级部门<font>*</font></td>
  73. <td>
  74. <select name="pid" lay-verify="required" lay-reqText="请选择上级部门">
  75. <option value="0">作为顶级部门</option>
  76. <?php if(is_array($department) || $department instanceof \think\Collection || $department instanceof \think\Paginator): $i = 0; $__LIST__ = $department;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
  77. <option value="<?php echo htmlentities($v['id']); ?>" <?php if($detail['pid'] == $v['id']): ?> selected<?php endif; ?>><?php echo htmlentities($v['title']); ?></option>
  78. <?php endforeach; endif; else: echo "" ;endif; ?>
  79. </select>
  80. </td>
  81. </tr>
  82. <?php if($permission == 1): ?>
  83. <tr>
  84. <td class="layui-td-gray">单位类型:<font>*</font></td>
  85. <td>
  86. <input type="radio" name="type" value="-1" title="系统方" <?php if($d_type == '-1'): ?>checked<?php endif; ?>>
  87. <input type="radio" name="type" value="0" title="财政局"<?php if($d_type == '0'): ?>checked<?php endif; ?>>
  88. <input type="radio" name="type" value="1" title="业主"<?php if($d_type == '1'): ?>checked<?php endif; ?>>
  89. <input type="radio" name="type" value="2" title="公司"<?php if($d_type == '2'): ?>checked<?php endif; ?>>
  90. </td>
  91. </tr>
  92. <?php endif; ?>
  93. <tr>
  94. <td class="layui-td-gray-2">部门负责人</td>
  95. <td>
  96. <select name="leader_id">
  97. <option value="0">请选择部门负责人</option>
  98. <?php if(is_array($users) || $users instanceof \think\Collection || $users instanceof \think\Paginator): $i = 0; $__LIST__ = $users;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
  99. <option value="<?php echo htmlentities($v['id']); ?>" <?php if($detail['leader_id'] == $v['id']): ?> selected<?php endif; ?>><?php echo htmlentities($v['nickname']); ?></option>
  100. <?php endforeach; endif; else: echo "" ;endif; ?>
  101. </select>
  102. </td>
  103. <td class="layui-td-gray-2">部门联系电话</td>
  104. <td>
  105. <input type="text" name="phone" value="<?php echo htmlentities($detail['phone']); ?>" placeholder="请输入部门联系电话,可空" autocomplete="off" class="layui-input">
  106. </td>
  107. </tr>
  108. </table>
  109. <?php endif; ?>
  110. <div class="py-3">
  111. <input type="hidden" name="id" value="<?php echo htmlentities($id); ?>">
  112. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">立即提交</button>
  113. <button type="reset" class="layui-btn layui-btn-primary">重置</button>
  114. </div>
  115. </form>
  116. <!-- /主体 -->
  117. <!-- 底部 -->
  118. <div class="footer">
  119. 逸管工程项目管理系统 © www.yiguanfep.com
  120. <img src="/static/home/images/police.png" alt="" style="width:14.5px;height:16px;">
  121. <a href="https://beian.mps.gov.cn/#/query/websearch?code=45030202000160 " rel="\&quot;noreferrer'target=\”blank\&quot;" onclick="window.open(this.href); return false;">桂公网安备45030202000160号</a>
  122. <a href="https://beian.miit.gov.cn/#/Integrated/index" onclick="window.open(this.href); return false;">桂ICP备17000971号</a>
  123. </div>
  124. <!-- /底部 -->
  125. <!-- 脚本 -->
  126. <script>
  127. const moduleInit = ['tool'];
  128. function gouguInit() {
  129. var form = layui.form,tool=layui.tool;
  130. let a = 1;
  131. //监听提交
  132. form.on('submit(webform)', function(data){
  133. if(a){
  134. let callback = function (e) {
  135. layer.msg(e.msg);
  136. if (e.code == 0) {
  137. setTimeout(function () {
  138. parent.location.reload();
  139. a = 1
  140. }, 1000);
  141. }
  142. }
  143. tool.post("/admin/department/add", data.field, callback);
  144. }
  145. a = 0
  146. return false;
  147. });
  148. }
  149. </script>
  150. <!-- /脚本 -->
  151. <!-- <script src="/static/assets/layui/layui.js"></script> -->
  152. <script src="/static/assets/layui/layui.js"></script>
  153. <script src="/static/assets/third_party/echart/echarts.min.js"></script>
  154. <script src="/static/assets/gougu/gouguInit.js"></script>
  155. <script src="https://unpkg.com/pinyin-pro"></script>
  156. <script>
  157. var { pinyin } = pinyinPro;
  158. </script>
  159. <!-- 统计代码 -->
  160. <!-- /统计代码 -->
  161. </body>
  162. </html>