delView.jsp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <jsp:include page="../../common/common-meta-include.jsp"></jsp:include>
  8. <jsp:include page="../../common/common-js-include.jsp"></jsp:include>
  9. <jsp:include page="../../common/common-css-include.jsp"></jsp:include>
  10. <!--[if lt IE 9]>
  11. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  12. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  13. <![endif]-->
  14. <style type="text/css">
  15. .toolBar {
  16. display: flow-root;
  17. height: 70px;
  18. }
  19. .toolBar span {
  20. width: 30px;
  21. cursor: pointer;
  22. color: #03A9F4;
  23. /*border-left: solid 2px;*/
  24. padding-right: 2px;
  25. text-indent: 20px;
  26. }
  27. .toolBar span:first-child {
  28. border-left: none !important;
  29. }
  30. /*.table_box .table_process .layui-table-cell {*/
  31. /* height: 75px;*/
  32. /*}*/
  33. .layui-table-col-special .layui-table-cell{
  34. display:flex;
  35. justify-content:space-between;
  36. }
  37. .layui-table-col-special .layui-table-cell .step_red{
  38. background-color:red;
  39. }
  40. .table_box .table_process .step_red:before {
  41. border:2px solid red;
  42. }
  43. .layui-table-col-special .layui-table-cell .step_yellow{
  44. background-color:yellow;
  45. }
  46. .table_box .table_process .step_yellow:before {
  47. border:2px solid yellow;
  48. }
  49. .layui-table-col-special .layui-table-cell .step_green{
  50. background-color:green;
  51. }
  52. .table_box .table_process .step_green:before {
  53. border:2px solid green;
  54. }
  55. .queryTimeType{
  56. margin-top: -9px;
  57. position: absolute;
  58. }
  59. .hiddenParam {
  60. display: none;
  61. }
  62. .morePan{
  63. margin-top: 4px;
  64. position: absolute;
  65. margin-left: 11px;
  66. }
  67. .morePan a{
  68. color: #49a2cfe6;
  69. }
  70. </style>
  71. </head>
  72. <body>
  73. <div id="app"></div>
  74. <template id="template">
  75. <div class="layui-layout layui-layout-admin">
  76. <!-- 内容区域 -->
  77. <div class="right_title">
  78. <span class="txt">项目信息删除列表</span>
  79. <div class="layui-collapse">
  80. <div class="layui-colla-item">
  81. <%-- <h2 class="layui-colla-title">筛选</h2>--%>
  82. <div class="layui-colla-content layui-show">
  83. <form class="layui-form" lay-filter="searchForm">
  84. <input name="neTemp" type="hidden" value="${neTemp }"/>
  85. <input name="isZj" type="hidden" value="${isZj }"/>
  86. <input name="otherStatus" type="hidden" value="${projStatus }"/>
  87. <div class="layui-row">
  88. <%-- <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">--%>
  89. <%-- <div class="layui-form-item">--%>
  90. <%-- <label class="layui-form-label">项目名称:</label>--%>
  91. <%-- <div class="layui-input-block">--%>
  92. <%-- <input type="text" name="subName" placeholder="请输入" autocomplete="off" class="layui-input">--%>
  93. <%-- <button type="button" class="layui-btn layui-btn-normal" @click="search"><i class="layui-icon layui-icon-search"></i>查询</button>--%>
  94. <%-- </div>--%>
  95. <%-- </div>--%>
  96. <%-- </div>--%>
  97. <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
  98. <div class="layui-form-item">
  99. <label class="layui-form-label">项目名称</label>
  100. <div class="layui-input-block">
  101. <input type="text" name="subName" placeholder="请输入" autocomplete="off" class="layui-input">
  102. </div>
  103. </div>
  104. </div>
  105. <div class="layui-col-xs6 layui-col-sm6 layui-col-md3">
  106. <button type="button" class="layui-btn layui-btn-normal" @click="search">查询</button>
  107. </div>
  108. </div>
  109. </form>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. <div class="table_box" style="padding-top: 0;">
  115. <div class="table_process">
  116. <table id="table1" lay-filter="test"></table>
  117. <div class="pagination-box" id="pagination"></div>
  118. </div>
  119. </div>
  120. <div style="height: 20px;"></div>
  121. </div>
  122. </template>
  123. <script type="text/html" id="subName">
  124. <%-- {{# if(d.usersub == "1") { }}--%>
  125. <span title="{{d.subName}}">{{d.subName}}</span>
  126. <%-- {{# }else { }}--%>
  127. <%-- <span title="{{d.subName}}">{{d.subName}}</span>--%>
  128. <%-- {{#}}}--%>
  129. </script>
  130. <script type="text/html" id="amt">
  131. {{# var computedPer = function(total, now){
  132. return (total == 0) ? 0 : parseInt(now * 100 / total +0.5);
  133. };
  134. }}
  135. <span title="">总投资:{{d.amtTotal}}万元 <br/>
  136. 年度计划投资:{{d.yearPlanAmt}}万元 <br/>
  137. 年度完成投资:{{d.yearEndAmt}}万元( {{computedPer(d.yearPlanAmt, d.yearEndAmt)}} %)</span>
  138. </script>
  139. <script type="text/html" id="date">
  140. <div title="">
  141. <div class="line">计划开工:{{d.beginDate}}
  142. </div>
  143. <div class="line">计划竣工:{{d.endDate}}
  144. </div>
  145. </div>
  146. </script>
  147. <script type="text/html" id="toolBar">
  148. <div class="toolBar">
  149. <span title="项目信息" lay-event="toDetail">项目信息</span>
  150. <span title="项目信息删除" lay-event="del">项目信息删除</span>
  151. </div>
  152. </script>
  153. <script>
  154. new Vue({
  155. el: "#app",
  156. template: "#template",
  157. data: {
  158. winH: 0,
  159. dataList : [],
  160. startDate:"",
  161. endDate:"",
  162. tableName : 'test',
  163. pageNo : 1,
  164. kind: {},
  165. showMoreFlag: false,
  166. light: null,
  167. sort: {field: "amtTotal", type:""},
  168. pageSize : 10
  169. },
  170. mounted : function() {
  171. this.init()
  172. },
  173. methods: {
  174. init : function() {
  175. this.winH = document.body.clientHeight
  176. layui.laydate.render({
  177. elem: '#startTime',
  178. theme: layDateTheme,
  179. range: '~'
  180. });
  181. var nowdate = new Date();
  182. nowdate.setMonth(nowdate.getMonth()+1);
  183. var y = nowdate.getFullYear();
  184. var m = nowdate.getMonth()+1;
  185. var d = nowdate.getDate();
  186. var formatwdate = y+'-'+m+'-'+d;
  187. layui.laydate.render({
  188. elem: '#dateConfirm',
  189. theme: layDateTheme,
  190. value: formatwdate
  191. });
  192. $("#month").val(new Date().getMonth()+1);
  193. var xmlx = [];
  194. <c:forEach items="${XMLX}" var="xm">
  195. xmlx.push({value:"${xm.code}", name:"${xm.title}"});
  196. </c:forEach>
  197. this.kind = layui.xmSelect.render({
  198. el: "#kind",
  199. language:'zn',
  200. data:xmlx
  201. });
  202. layui.laydate.render({
  203. elem: '#year',
  204. type: 'year',
  205. theme: layDateTheme,
  206. value: new Date().getFullYear()
  207. })
  208. if(${isHydw}) {
  209. this.light = layui.xmSelect.render({
  210. el: "#light",
  211. language:'zn',
  212. data: [
  213. {value: '0', name:'绿灯'},
  214. {value: '1', name:'黄灯'},
  215. {value: '2', name:'红灯'}
  216. ]
  217. })
  218. }
  219. this.getData();
  220. window.toDetail = this.toDetail;
  221. },
  222. showMore: function() {
  223. this.showMoreFlag = !this.showMoreFlag;
  224. $(".hiddenParam").toggle();
  225. },
  226. getData : function(){
  227. var self = this;
  228. var param = layui.form.getValue("searchForm");
  229. // if(param.rangeDate) {
  230. // param.beginDate = param.rangeDate.split(" ~ ")[0];
  231. // param.endDate = param.rangeDate.split(" ~ ")[1];
  232. // param.rangeDate = null;
  233. // }
  234. // if(this.light) {
  235. // param.light = this.light.getValue("valueStr");
  236. // }
  237. // param.kind = this.kind.getValue("value").sort().join(",");
  238. param.pageNo = this.pageNo;
  239. param.pageSize = this.pageSize;
  240. // param.orderBy = this.sort.field;
  241. // param.orderType = this.sort.type || null;
  242. App.postJson("/api/subject/subInfo/pageQueryDel",param, function(res){
  243. self.dataList = res.rows;
  244. self.loadPage(res.total);
  245. self.loadTable();
  246. });
  247. },
  248. loadTable : function(){
  249. for(var i=0;i<this.dataList.length;i++){
  250. var tem = this.dataList[i];
  251. switch(tem.status){
  252. case '0':
  253. tem.statusName = '暂存';
  254. break;
  255. case '1':
  256. tem.statusName = '项目前期';
  257. break;
  258. case '6':
  259. tem.statusName = '待开工';
  260. break;
  261. case '7':
  262. tem.statusName = '施工中';
  263. break;
  264. case '8':
  265. tem.statusName = '暂时停工';
  266. break;
  267. case 'A':
  268. tem.statusName = '已竣工';
  269. break;
  270. }
  271. }
  272. var self = this;
  273. layui.table.render({
  274. elem: '#table1', // 指定原始表格元素选择器(推荐id选择器)
  275. even: true,
  276. autoSort: false,
  277. initSort: self.sort,
  278. cols: [[ // 设置表头
  279. {type: 'numbers', fixed: 'left', align: 'center'},
  280. {title: '', fixed: 'left',width:100, align:'center', templet: function(row) {
  281. var temp="";
  282. if (${isHydw}){
  283. if(row.status_fgw==="2"){
  284. temp=temp+ ' <image style="width: 28px;height:28px;margin: auto;" src="${WebSite.asset}/css/images/bigScreen/light-red.png"></image>'
  285. // temp=temp+ '<span class="step step_red' + '"></span>'
  286. }else if (row.status_fgw==="1"){
  287. // temp=temp+ '<span class="step step_yellow' + '"></span>'
  288. temp=temp+ ' <image style="width: 28px;height:28px;margin: auto;" src="${WebSite.asset}/css/images/bigScreen/light-yellow.png"></image>'
  289. }else{
  290. // temp=temp+ '<span class="step step_green' + '"></span>'
  291. temp=temp+ ' <image style="width: 28px;height:28px;margin: auto;" src="${WebSite.asset}/css/images/bigScreen/light-green.png"></image>'
  292. }
  293. }
  294. return temp;
  295. }},
  296. {field: 'subName', fixed: 'left', title: '项目名称', minWidth: 300, templet: '#subName'},
  297. {field: 'unitName', title: '项目单位', minWidth: 150},
  298. {field: 'mainName', title: '监管单位', minWidth: 150},
  299. //{field: 'manageName', title: '监管单位', minWidth: 100,},
  300. {field: 'amtTotal', title: '总投资额', minWidth: 250, templet: '#amt', sort:"amtTotal"},
  301. {field: 'state', title: '计划时间', width: 250, templet: '#date'},
  302. {field: 'statusName', title: '项目进度', width: 200},
  303. {field: 'reason', title: '退回/不同意原因', width: 160},
  304. {title: '操作', width: 200, align:'center', toolbar: '#toolBar'}
  305. ]],
  306. data : self.dataList,
  307. done: function(res, curr, count){
  308. res.data.forEach(function(item, index) {
  309. //1.当前行的背景颜色cur_color
  310. if (item.usersub == 1) {
  311. $('.layui-table').find('tr[data-index="' + index + '"]').find("td").css('background-color', "#0a99eb");
  312. }
  313. });
  314. }
  315. });
  316. layui.table.on('tool('+this.tableName+')', function(obj){
  317. var event = obj.event;
  318. self[event].call(this, obj);
  319. });
  320. layui.table.on('sort('+this.tableName+')', function(obj) {
  321. self.sort = obj;
  322. self.getData();
  323. return;
  324. })
  325. },
  326. loadPage : function(totalCount){
  327. var self = this;
  328. layui.laypage.render({
  329. elem: 'pagination',
  330. count: totalCount,
  331. curr : self.pageNo,
  332. limit : self.pageSize,
  333. layout: ['count', 'prev', 'page', 'next', 'skip'],
  334. jump: function(obj, first) {
  335. //首次不执行
  336. if(!first) {
  337. self.pageNo = obj.curr;
  338. self.getData();
  339. }
  340. }
  341. });
  342. },
  343. toDetail : function(obj){
  344. //详情
  345. var index = layer.open({
  346. type: 2,
  347. title: '',
  348. area: ['1000px', '800px'],
  349. content: App.getUrl("/subject/subInfo/detailView?layer=true&subId="+ obj.data.id + "&lastUrl=" + window.location.href),
  350. });
  351. layui.layer.full(index);
  352. },
  353. del : function(obj) {
  354. var self = this;
  355. App.msg.confirm("是否删除该项目的所有信息?", function(){
  356. App.postJson("/api/subject/subInfo/delSubAllInfo", {id: obj.data.id}, function(res){
  357. if(res.success){
  358. self.getData();
  359. }
  360. })
  361. })
  362. },
  363. search : function(){
  364. var param = layui.form.getValue("searchForm");
  365. this.pageNo = 1;
  366. this.getData();
  367. }
  368. }
  369. });
  370. </script>
  371. </body>
  372. </html>