index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>报表填报</title>
  7. <style>
  8. .dateform {
  9. float: left;
  10. width: 120px;
  11. }
  12. .datelabel {
  13. float: left;
  14. width: 120px;
  15. }
  16. </style>
  17. </head>
  18. <body layout:fragment="content">
  19. <nav class="breadcrumb" th:action="@{/projectFilling/index}" th:method="post">
  20. <i class="Hui-iconfont">&#xe67f;</i>
  21. 首页
  22. <span th:unless="${is_label}" class="c-gray en">&gt; 报表填报</span>
  23. <span th:unless="${is_label}" class="c-gray en">&gt; 列表</span>
  24. <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
  25. href="javascript:location.replace(location.href);" title="刷新">
  26. <i class="Hui-iconfont">&#xe68f;</i>
  27. </a>
  28. </nav>
  29. <form id="myForm" th:action="@{/projectFilling/index}" th:method="post">
  30. <div class="page-container">
  31. <div>
  32. <label class="datelabel" style="width: 80px">填报项:</label>
  33. <input style="width:200px;" type="text" class="input-text dateform" placeholder="请输入填报项"
  34. id="projectName" name="projectName" th:value="${projectName}"/>
  35. <!--<label>项目大类:</label>
  36. <span class="select-box" style="width:200px; margin-right: 20px;">
  37. <select class="select" th:name="projectType" id="projectType" placeholder="请选择项目大类">
  38. <option value="">&#45;&#45; 请选择项目大类 &#45;&#45;</option>
  39. <option th:each="item : ${projectTypeList}" th:value="${item.value}" th:text="${item.name}"
  40. th:selected="${item.value}==${projectType}">
  41. </select>
  42. </span>-->
  43. <label>项目来源:</label>
  44. <span class="select-box" style="width:200px; margin-right: 20px;">
  45. <select class="select" th:name="projectSource" id="projectSource" placeholder="请选择项目来源">
  46. <option value="">-- 请选择项目来源 --</option>
  47. <option th:value="1" th:text="国家" th:selected="1==${projectSource}"></option>
  48. <option th:value="2" th:text="江苏省" th:selected="2==${projectSource}"></option>
  49. <option th:value="3" th:text="苏州市" th:selected="3==${projectSource}"></option>
  50. <option th:value="4" th:text="高新区" th:selected="4==${projectSource}"></option>
  51. </select>
  52. </span>
  53. <input type="button" value="搜索" class="btn btn-primary" onclick="$('#myForm').submit();">
  54. </div>
  55. <div class="cl pd-5 bg-1 bk-gray mt-20">
  56. <span class="l">
  57. <a th:onclick="'javascript:add1(\'新增\',\'/projectFilling/add\',\'1000\',\'500\');'"
  58. class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 新增</a>
  59. <!-- <a class="btn btn-primary radius activeProject">启用</a>
  60. <a class="btn btn-primary radius inactiveProject">禁用</a>-->
  61. </span>
  62. <span class="r">共有数据:<strong th:text="${pageInfo.total}" id="total">0</strong> 条</span>
  63. </div>
  64. <!-- 表格 -->
  65. <table id="index" class="table table-border table-bordered table-bg table-hover"
  66. style="table-layout: fixed;width:100%;">
  67. <thead>
  68. <tr class="text-c">
  69. <th style="width:135px;">填报项</th>
  70. <!--<th style="width:100px;">项目大类</th>
  71. <th style="width:100px;">服务事项</th>-->
  72. <th style="width:100px;">项目来源</th>
  73. <th style="width:100px;">发布日期</th>
  74. <th style="width:100px;">状态</th>
  75. <!--<th style="width:100px;">填报情况</th>-->
  76. <th style="width:200px;">操作</th>
  77. </tr>
  78. </thead>
  79. <tbody>
  80. <tr class="text-c" th:each="model,iterStat:${pageInfo.list}" th:object="${model}">
  81. <td th:text="*{project_name}" class="text-overflow" th:title="*{project_name}"></td>
  82. <!--<td th:text="*{project_type_name}" class="text-overflow"></td>
  83. <td th:text="*{project_service_type_name}" class="text-overflow"></td>-->
  84. <td th:if="*{project_source!='1' && project_source!='2'&& project_source!='3'&& project_source!='4'}"></td>
  85. <td th:if="*{project_source=='1'}">国家</td>
  86. <td th:if="*{project_source=='2'}">江苏省</td>
  87. <td th:if="*{project_source=='3'}">苏州市</td>
  88. <td th:if="*{project_source=='4'}">高新区</td>
  89. <td th:text="*{release_date}"></td>
  90. <!--<td th:if="*{is_forbidden=='0'}">已禁用</td>-->
  91. <td th:if="*{status=='0'}">待发布</td>
  92. <td th:if="*{status=='1'}">已发布</td>
  93. <!--<td th:if="*{project_type!='1' && project_type!='2' }">/</td>
  94. <td th:if="*{project_type=='1'}" th:text="*{count}"></td>
  95. <td th:if="*{project_type=='2'}" th:text="*{count+'/'+total}"></td>-->
  96. <td class="td-manage">
  97. <a title="详情" href="javascript:;" class="ml-5" style="text-decoration:none"
  98. th:onclick="'javascript:projectDetail(\'详情\',\'/projectFilling/detail/'+*{id}+'\');'">详情</a>
  99. <a title="编辑" href="javascript:;" class="ml-5" style="text-decoration:none"
  100. th:onclick="'javascript:editProject(\'编辑\',\'/projectFilling/edit/'+*{id}+'\');'">编辑</a>
  101. <a title="填报情况" th:if="*{status=='1'}" href="javascript:;"
  102. class="ml-5" style="text-decoration:none"
  103. th:onclick="'javascript:notify_detailInfo(\'填报情况\',\'/projectFilling/fillingDetail/'+*{id}+'\',\'800\',\'500\');'">填报情况</a>
  104. <a title="已推送" th:if="*{status=='1'}" href="javascript:;"
  105. class="ml-5" style="text-decoration:none"
  106. th:onclick="'javascript:notify_detailInfo(\'已推送\',\'/projectFilling/pushed/'+*{id}+'\',\'800\',\'500\');'">已推送</a>
  107. <a title="推送" th:if="*{status=='1'}" href="javascript:;"
  108. class="ml-5"
  109. style="text-decoration:none"
  110. th:onclick="'javascript:notify_addPush(\'推送\',\'/projectFilling/directPush/'+*{id}+'\',\'800\',\'500\');'">推送</a>
  111. <a title="删除" th:if="*{status=='0'}" href="javascript:;" class="ml-5" style="text-decoration:none"
  112. th:onclick="'javascript:deleteProject(\''+*{id}+'\');'">删除</a>
  113. </td>
  114. </tr>
  115. </tbody>
  116. </table>
  117. <div th:replace="admin/common/page :: page"></div>
  118. </div>
  119. </form>
  120. <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
  121. <script th:inline="javascript">
  122. //添加
  123. function add1(title, url, w, h) {
  124. var index = layer_show(title, pagePath + url, w, h);
  125. layer.full(index);
  126. }
  127. /*详情*/
  128. function projectDetail(title, url, w, h) {
  129. var index = layer_show(title, pagePath + url, w, h);
  130. layer.full(index);
  131. }
  132. /*编辑*/
  133. function editProject(title, url, w, h) {
  134. var index = layer_show(title, pagePath + url, w, h);
  135. layer.full(index);
  136. }
  137. /*删除*/
  138. function deleteProject(id) {
  139. layer.confirm('确认要删除吗?', function (index) {
  140. $.ajax({
  141. type: "GET",
  142. dataType: "json",
  143. url: pagePath + "/projectFilling/delete/" + id,
  144. success: function (result) {
  145. if (result.success) {
  146. smileMessage(result.message)
  147. setTime();
  148. } else {
  149. errorMessage(result.message);
  150. }
  151. },
  152. error: function () {
  153. errorMessage('系统错误!');
  154. }
  155. });
  156. });
  157. }
  158. /*
  159. 参数解释:
  160. title 标题
  161. url 请求的url
  162. id 需要操作的数据id
  163. w 弹出层宽度(缺省调默认值)
  164. h 弹出层高度(缺省调默认值)
  165. */
  166. /*管理员-*/
  167. function notify_addPush(title, url, w, h) {
  168. layer_show(title, pagePath + url, w, h);
  169. }
  170. function notify_detailInfo(title, url, w, h) {
  171. var index = layer_show(title, pagePath + url, w, h);
  172. layer.full(index);
  173. }
  174. $(".activeProject").click(function () {
  175. var ids = '';
  176. $("input:checkbox[name='checkbox']:checked").each(function (i) {
  177. var val = $(this).val();
  178. ids += val + ',';
  179. });
  180. if (ids.length <= 0) {
  181. errorMessage("请选择数据!");
  182. return;
  183. }
  184. layer.confirm('确认启用吗?', function (index) {
  185. $.ajax({
  186. url: pagePath + "/projectFilling/updateForbiddenStateBatch",
  187. type: "post",
  188. data: {
  189. 'ids': ids,
  190. 'isFrobidden': '1'
  191. },
  192. dataType: "json",
  193. success: function (result) {
  194. if (result.success) {
  195. smileMessage(result.message);
  196. setTime();
  197. } else {
  198. errorMessage(result.message);
  199. }
  200. },
  201. error: function () {
  202. errorMessage('系统错误!');
  203. }
  204. })
  205. });
  206. })
  207. $(".inactiveProject").click(function () {
  208. var ids = '';
  209. $("input:checkbox[name='checkbox']:checked").each(function (i) {
  210. var val = $(this).val();
  211. ids += val + ',';
  212. });
  213. if (ids.length <= 0) {
  214. errorMessage("请选择数据!");
  215. return;
  216. }
  217. layer.confirm('确认禁用吗?', function (index) {
  218. $.ajax({
  219. url: pagePath + "/projectFilling/updateForbiddenStateBatch",
  220. type: "post",
  221. data: {
  222. 'ids': ids,
  223. 'isFrobidden': '0'
  224. },
  225. dataType: "json",
  226. success: function (result) {
  227. if (result.success) {
  228. smileMessage(result.message);
  229. setTime();
  230. } else {
  231. errorMessage(result.message);
  232. }
  233. },
  234. error: function () {
  235. errorMessage('系统错误!');
  236. }
  237. })
  238. });
  239. })
  240. </script>
  241. </body>
  242. </html>