xmzk.jsp 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192
  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. .layui-table-view .layui-table td {
  16. border-right: 1px solid #DDD !important;
  17. }
  18. .layui-table-body .layui-table-cell {
  19. padding: 5px !important;
  20. }
  21. .layui-table-header .layui-table-cell {
  22. height: 42px !important;
  23. }
  24. .qianse {
  25. color: #666666;
  26. }
  27. .lanse {
  28. color: #1869F6;
  29. }
  30. .shense {
  31. color: #111111;
  32. }
  33. .no-wrap {
  34. white-space: nowrap;
  35. }
  36. .lanse-first {
  37. color: #1C56A3;
  38. font-size: 12px;
  39. }
  40. .layui-table-col-special .layui-table-cell {
  41. display: flex;
  42. justify-content: space-between;
  43. }
  44. .queryTimeType {
  45. margin-top: -4px;
  46. position: absolute;
  47. }
  48. .hiddenParam,
  49. .hiddenParams {
  50. display: none;
  51. }
  52. .morePan {
  53. position: absolute;
  54. margin-left: 11px;
  55. }
  56. .morePan a {
  57. color: #2C6EC6;
  58. }
  59. .table_box .table_process {
  60. height: fit-content;
  61. max-height: 60vh;
  62. overflow-x: scroll;
  63. overflow-y: scroll;
  64. }
  65. .layui-table-body::-webkit-scrollbar {
  66. width: 0px;
  67. /*height: 10px;*/
  68. }
  69. .table_box,
  70. .table_box .table_process {
  71. overflow: visible;
  72. }
  73. .layui-form-select dl {
  74. height: 230px;
  75. }
  76. .layui-table-cell .cut {
  77. display: -webkit-box; /* 使用旧版的弹性盒子布局 */
  78. -webkit-box-orient: vertical; /* 设置为垂直方向排列 */
  79. overflow: hidden; /* 隐藏溢出内容 */
  80. text-overflow: ellipsis; /* 使用省略号表示溢出内容 */
  81. -webkit-line-clamp: 2; /* 显示的行数 */
  82. }
  83. </style>
  84. </head>
  85. <body>
  86. <div id="app"></div>
  87. <template id="template">
  88. <div class="layui-layout layui-layout-admin pd0">
  89. <!-- 内容区域 -->
  90. <div class="right_title">
  91. <div class="txt">项目总库 <div class="top-breadcrumb"></div></div>
  92. <div class="layui-collapse search_form">
  93. <div class="layui-colla-item">
  94. <div class="layui-colla-content layui-show">
  95. <form class="layui-form" lay-filter="searchForm" id="searchForm">
  96. <input type="hidden" name="queryType" value="1">
  97. <div class="layui-row">
  98. <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
  99. <div class="layui-form-item">
  100. <label class="layui-form-label label-longers required">项目名称</label>
  101. <div class="layui-input-block">
  102. <input type="text" name="subName" placeholder="请输入" autocomplete="off"
  103. class="layui-input">
  104. </div>
  105. </div>
  106. </div>
  107. <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
  108. <div class="layui-form-item">
  109. <label class="layui-form-label required label-longers">项目属地</label>
  110. <div class="layui-input-block">
  111. <select name="subjectId">
  112. <option value="">请选择</option>
  113. <c:forEach items="${JSDD }" var="hy">
  114. <option value="${hy.code }">${hy.title }</option>
  115. </c:forEach>
  116. </select>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="layui-col-xs3 layui-col-sm3 layui-col-md3">
  121. <div class="layui-form-item">
  122. <label class="layui-form-label required label-longers">行业类别</label>
  123. <div class="layui-input-block">
  124. <%-- <div id="indusKind"></div>--%>
  125. <select name="indusKind">
  126. <option value="">请选择</option>
  127. <c:forEach items="${HYFL }" var="hy">
  128. <option value="${hy.code }">${hy.title}
  129. <c:forEach items="${hy.children }" var="hy2">
  130. <option value="${hy2.code }">&ensp;&ensp;${hy2.title}
  131. </c:forEach>
  132. </option>
  133. </c:forEach>
  134. </select>
  135. </div>
  136. </div>
  137. </div>
  138. <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
  139. <div class="layui-form-item">
  140. <label class="layui-form-label required label-longers" style="width: 100px;">项目总投资(亿元)</label>
  141. <div class="layui-input-block time_box">
  142. <input type="number" name="startAmt" placeholder="请输入最小金额"
  143. autocomplete="off"
  144. class="layui-input">
  145. <span class="split_txt">至</span>
  146. <input type="number" name="endAmt" placeholder="请输入最大金额" autocomplete="off"
  147. class="layui-input">
  148. </div>
  149. </div>
  150. </div>
  151. <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
  152. <div class="layui-form-item">
  153. <label class="layui-form-label required label-longers">投资类型</label>
  154. <div class="layui-input-block">
  155. <div id="kindNature"></div>
  156. </div>
  157. </div>
  158. </div>
  159. <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParam">
  160. <div class="layui-form-item">
  161. <label class="layui-form-label label-longers">项目单位</label>
  162. <div class="layui-input-block">
  163. <input type="text" name="sbdw" placeholder="请输入项目项目单位名称"
  164. autocomplete="off"
  165. class="layui-input">
  166. </div>
  167. </div>
  168. </div>
  169. <div class="layui-col-xs3 layui-col-sm3 layui-col-md3 hiddenParams">
  170. <div class="layui-form-item">
  171. <label class="layui-form-label"></label>
  172. <div class="layui-input-block">
  173. <button type="button" class="layui-btn layui-btn-normal" @click="search">查询
  174. </button>
  175. <span class="morePan" @click="showMore"><a v-if="!showMoreFlag">更多 <ion-icon
  176. name="chevron-forward-outline"></ion-icon></a><a
  177. v-if="showMoreFlag">收起 V</a></span>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. <div class="layui-row">
  183. </div>
  184. </form>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. <div class="table_box" style="padding-top: 0;">
  190. <div class="table_process" style="position: relative">
  191. <div style="position: relative; display: inline-block" @mouseover="openExport" @mouseout="choseExport">
  192. <div class="export">
  193. <img src="${WebSite.asset}/css/images/left/export.svg"/>
  194. <span>导出</span>
  195. </div>
  196. <div class="export-item" v-if="showExport" :style="{ top: '-62px' }">
  197. <button type="button" class="" @click="exportTotalExcel">汇总导出</button>
  198. <button type="button" class="" @click="exportMoreExcel">自定义导出</button>
  199. </div>
  200. </div>
  201. <table id="table1" lay-filter="test"></table>
  202. <div class="pagination-box" id="pagination"></div>
  203. </div>
  204. </div>
  205. <div style="height: 20px;"></div>
  206. </div>
  207. </template>
  208. <div id="setReason" style="display: none;">
  209. <form class="layui-form" lay-filter="reasonForm">
  210. <div class="layui-row">
  211. <div class="layui-col-xs6 layui-col-sm6">
  212. <div class="layui-form-item">
  213. <label class="layui-form-label">已开工未入库原因:</label>
  214. <div class="layui-input-block">
  215. <textarea name="reasonNoRk" maxlength="200" style="height: 50px;width: 80%;" id="reasonNoRk"
  216. autocomplete="off" class="layui-textarea"></textarea>
  217. </div>
  218. </div>
  219. </div>
  220. <div class="layui-col-xs6 layui-col-sm6">
  221. <div class="layui-form-item">
  222. <label class="layui-form-label">已入库无投资原因:</label>
  223. <div class="layui-input-block">
  224. <textarea name="reasonNoAmt" maxlength="200" style="height: 50px;width: 80%;" id="reasonNoAmt"
  225. autocomplete="off" class="layui-textarea"></textarea>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. <div class="layui-row">
  231. <div class="layui-col-xs6 layui-col-sm6">
  232. <div class="layui-form-item">
  233. <label class="layui-form-label">是否入统:</label>
  234. <div class="layui-input-block">
  235. <input type="radio" name="isRk" value="0" title="否" checked="checked"/>
  236. <input type="radio" name="isRk" value="1" title="是"/>
  237. </div>
  238. </div>
  239. </div>
  240. <div class="layui-col-xs6 layui-col-sm6">
  241. <div class="layui-form-item">
  242. <label class="layui-form-label">未开工建设原因:</label>
  243. <div class="layui-input-block">
  244. <textarea name="reasonNoKg" maxlength="200" style="height: 50px;width: 80%;" id="reasonNoKg"
  245. autocomplete="off" class="layui-textarea"></textarea>
  246. </div>
  247. </div>
  248. </div>
  249. </div>
  250. <div class="layui-row">
  251. <div class="layui-col-xs6 layui-col-sm6">
  252. <div class="layui-form-item">
  253. <label class="layui-form-label">存在的问题:</label>
  254. <div class="layui-input-block">
  255. <textarea name="reasonq" maxlength="200" style="height: 50px;width: 80%;" id="reasonq"
  256. autocomplete="off" class="layui-textarea"></textarea>
  257. </div>
  258. </div>
  259. </div>
  260. <div class="layui-col-xs6 layui-col-sm6">
  261. <div class="layui-form-item">
  262. <label class="layui-form-label">已开工进度慢原因:</label>
  263. <div class="layui-input-block">
  264. <textarea name="reasonJd" maxlength="200" style="height: 50px;width: 80%;" id="reasonJd"
  265. autocomplete="off" class="layui-textarea"></textarea>
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. </form>
  271. </div>
  272. <div id="problem" class="layuimini-main" style="display: none;">
  273. <form class="layui-form" lay-filter="problemForm">
  274. <div class="layui-row">
  275. <div class="layui-col-xs12 layui-col-sm12">
  276. <div class="layui-form-item">
  277. <label class="layui-form-label">状态:</label>
  278. <div class="layui-input-block block-width">
  279. <input type="radio" name="statusF" value="2" title="红灯" checked="checked"/>
  280. <input type="radio" name="statusF" value="1" title="黄灯"/>
  281. <input type="radio" name="statusF" value="0" title="绿灯"/>
  282. </div>
  283. </div>
  284. </div>
  285. </div>
  286. <div class="layui-row">
  287. <div class="layui-col-xs12 layui-col-sm12">
  288. <div class="layui-form-item">
  289. <label class="layui-form-label">问题描述:</label>
  290. <div class="layui-input-block block-width">
  291. <textarea name="status_reason" maxlength="400" style="height: 300px;width: 80%;"
  292. id="problemReason" autocomplete="off" class="layui-textarea"></textarea>
  293. </div>
  294. </div>
  295. </div>
  296. </div>
  297. <div class="layui-row">
  298. <div class="layui-col-xs12 layui-col-sm12">
  299. <div class="layui-form-item">
  300. <label class="layui-form-label">要求解决日期:</label>
  301. <div class="layui-input-block block-width" style="width: 25%">
  302. <input type="text" id="dateConfirm" name="dateConfirm" autocomplete="off" class="layui-input">
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. </form>
  308. </div>
  309. <div id="toBack" class="layuimini-main" style="display: none;">
  310. <form class="layui-form" lay-filter="toBackForm">
  311. <div class="layui-row">
  312. <div class="layui-col-xs12 layui-col-sm12">
  313. <div class="layui-form-item">
  314. <label class="layui-form-label" style="width: 100px">退回到状态:</label>
  315. <div class="layui-input-block">
  316. <input type="radio" name="status" value="1" title="项目前期" checked="checked"/>
  317. <input type="radio" name="status" value="6" title="待开工"/>
  318. <input type="radio" name="status" value="7" title="施工中"/>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. </form>
  324. </div>
  325. <script type="text/html" id="subName">
  326. <span lay-event="toDetail" title="{{d.subName}}">{{d.subName}}</span>
  327. </script>
  328. <script type="text/html" id="mainName">
  329. <span lay-event="toManagerUnit" title="{{d.mainName}}">{{d.mainName}}</span>
  330. </script>
  331. <script type="text/html" id="unitName">
  332. <span lay-event="toQcc" title="{{d.unitName}}">{{d.unitName}}</span>
  333. </script>
  334. <script type="text/html" id="date">
  335. <div title="">
  336. <div class="line"><span class="qianse">计划开工:</span> <span class="shense">{{d.beginDate}}</span>
  337. </div>
  338. <div class="line"><span class="qianse">计划竣工:</span> <span class="shense">{{d.endDate}}</span>
  339. </div>
  340. </div>
  341. </script>
  342. <script type="text/html" id="amtTotal">
  343. <div title="">
  344. <span class="qianse">总投资金额:</span><span class="lanse">{{d.amtTotal}}</span> 万元<br/>
  345. </div>
  346. </script>
  347. <script type="text/html" id="zjly">
  348. <div title="">
  349. <span class="lanse">{{d.zjlyName}}</span>
  350. </div>
  351. </script>
  352. <script type="text/html" id="abcSpan">
  353. {{# if(d.abc == "A") { }}
  354. <span style="font-size:16px;font-weigh:500 !important;color: #26B520">{{d.abc||''}}</span>
  355. {{#} }}
  356. {{# if(d.abc == "B") { }}
  357. <span style="font-size:16px;font-weigh:500 !important;color: #1869F6">{{d.abc||''}}</span>
  358. {{#} }}
  359. {{# if(d.abc == "C") { }}
  360. <span style="font-size:16px;font-weigh:500 !important;color: #FF9600">{{d.abc||''}}</span>
  361. {{#} }}
  362. </script>
  363. <%-- table操作按钮 --%>
  364. <script type="text/html" id="toolBar">
  365. <div class="toolBar">
  366. <span title="项目查询" lay-event="toDetail" class="no-wrap">项目查询</span>
  367. </div>
  368. </script>
  369. <script type="text/html" id="imageDiv">
  370. <div style="width:50px;height:50px" onclick="showImage(this)">
  371. {{# if(d.fileId != null && d.fileId != '') { }}
  372. <img src="${domain}/static/file/{{d.fileId}}/showfile" realUrl="${domain}/static/file/{{d.fileId}}/showfile"
  373. width="50px" height="50px"/>
  374. {{#} }}
  375. </div>
  376. </script>
  377. <script type="text/html" id="offsetLight">
  378. {{#if(d.offset >= -30 && d.offset <= -10 ) { }}
  379. <span style="color: yellow"><image class="light-rgb"
  380. src="${WebSite.asset}/css/images/bigScreen/light-yellow.png"></image></span>
  381. {{#} else if(d.offset < -30) { }}
  382. <span style="color: red"><image class="light-rgb"
  383. src="${WebSite.asset}/css/images/bigScreen/light-red.png"></image></span>
  384. {{#}}}
  385. {{#if(d.offset !="" || d.offset != undefined || d.offset != null) { }}
  386. {{#if(d.offset<0) { }}
  387. <span class="grey">{{d.offset||"--"}}%</span>
  388. {{# } }}
  389. {{#if(d.offset>0) { }}
  390. <span class="green">{{d.offset||"--"}}%</span>
  391. {{# } }}
  392. {{# } }}
  393. </script>
  394. <script type="text/html" id="openLight">
  395. {{# var computedPer1 = function(beginDate){
  396. var beginDate =new Date(beginDate);
  397. var beginDate7 =new Date(beginDate);
  398. var beginDate3 =new Date(beginDate);
  399. beginDate7.setDate(beginDate7.getDate()-7);
  400. beginDate3.setDate(beginDate3.getDate()-3);
  401. var newDate = new Date();
  402. if(newDate.getTime() >=beginDate7.getTime() && newDate.getTime() <=beginDate3.getTime()){
  403. return "yellow";
  404. }else if(newDate.getTime() >=beginDate3.getTime() && newDate.getTime() <= beginDate.getTime() ){
  405. return "red";
  406. }else{
  407. return "-";
  408. }
  409. };
  410. }}
  411. {{#if(computedPer1(d.beginDate)=="yellow" ) { }}
  412. <span style="color: yellow"> <image style="width:20px;height:20px;margin: auto;"
  413. src="${WebSite.asset}/css/images/bigScreen/light-yellow.png"></image></span>
  414. {{#} else if(computedPer1(d.beginDate)=="red") { }}
  415. <span style="color: red"> <image style="width:20px;height:20px;margin: auto;"
  416. src="${WebSite.asset}/css/images/bigScreen/light-red.png"></image></span>
  417. {{#}}}
  418. </script>
  419. <script>
  420. layui.use('element', function () {
  421. let element = layui.element;
  422. });
  423. let vm = new Vue({
  424. el: "#app",
  425. template: "#template",
  426. data: {
  427. JSDD: [],
  428. winH: 0,
  429. dataList: [],
  430. startDate: "",
  431. endDate: "",
  432. tableName: 'test',
  433. cacheName: 'TzQueryParam_cb_${currUser.id}',
  434. pageNo: 1,
  435. kind: {},
  436. beginRate: {},
  437. showMoreFlag: false,
  438. light: null,
  439. sort: {field: "abc", type: ""},
  440. pageSize: 10,
  441. showExport: false,
  442. moveDbParam:{
  443. status: "",
  444. id: ""
  445. }
  446. },
  447. mounted: function () {
  448. this.init()
  449. },
  450. methods: {
  451. closeAllLayers() {
  452. layui.layer.closeAll(); // 关闭所有弹框
  453. },
  454. confirmMove: function () {
  455. let param = this.moveDbParam
  456. App.postJson("/api/subject/subInfo/moveDb",param, (res)=>{
  457. App.msg.success(res.msg);
  458. })
  459. this.closeAllLayers();
  460. },
  461. init: function () {
  462. let self = this;
  463. layui.form.on("select(moveStatus)", function (data) {
  464. self.moveDbParam.status = data.value;
  465. });
  466. App.postJson("/api/dict/query/index", {}, function (res) {
  467. self.JSDD = res.data.JSDD;
  468. })
  469. this.winH = document.body.clientHeight;
  470. var nowdate = new Date();
  471. nowdate.setMonth(nowdate.getMonth() + 1);
  472. var y = nowdate.getFullYear();
  473. var m = nowdate.getMonth() + 1;
  474. var d = nowdate.getDate();
  475. layui.laydate.render({
  476. elem: '#startTime',
  477. range: '~',
  478. theme: layDateTheme,
  479. /* value: y + "-01-01 ~ " + y + "-12-31"*/
  480. });
  481. var formatwdate = y + '-' + m + '-' + d;
  482. layui.laydate.render({
  483. elem: '#dateConfirm',
  484. theme: layDateTheme,
  485. value: formatwdate
  486. });
  487. /* $("#month").val(new Date().getMonth() + 1);*/
  488. var xmlx = [];
  489. <c:forEach items="${XMLX}" var="xm">
  490. xmlx.push({value: "${xm.code}", name: "${xm.title}"});
  491. </c:forEach>
  492. <%--var indusKindData = [];--%>
  493. <%--<c:forEach items="${HYFL}" var="xm">--%>
  494. <%--var childData = [];--%>
  495. <%--<c:forEach items="${xm.children}" var="c">--%>
  496. <%--childData.push({--%>
  497. <%-- value: "${c.code}",--%>
  498. <%-- name: "${c.title}",--%>
  499. <%--})--%>
  500. <%--</c:forEach>--%>
  501. <%--indusKindData.push(--%>
  502. <%-- {--%>
  503. <%-- value: "${xm.code}",--%>
  504. <%-- name: "${xm.title}",--%>
  505. <%-- children: childData--%>
  506. <%-- });--%>
  507. <%--</c:forEach>--%>
  508. <%--this.indusKind = layui.xmSelect.render({--%>
  509. <%-- el: "#indusKind",--%>
  510. <%-- language: 'zn',--%>
  511. <%-- data: indusKindData,--%>
  512. <%--});--%>
  513. var kindNatureData = [];
  514. <c:forEach items="${TZXZ}" var="xm">
  515. kindNatureData.push({value: "${xm.code}", name: "${xm.title}"});
  516. </c:forEach>
  517. this.kindNature = layui.xmSelect.render({
  518. el: "#kindNature",
  519. language: 'zn',
  520. data: kindNatureData
  521. });
  522. layui.laydate.render({
  523. elem: '#year',
  524. type: 'year',
  525. theme: layDateTheme,
  526. /* value: new Date().getFullYear()*/
  527. })
  528. var params = window.localStorage.getItem(this.cacheName);
  529. if (params) {
  530. layui.form.val("searchForm", JSON.parse(params));
  531. }
  532. <%--if(${isHydw}) {--%>
  533. <%-- this.light = layui.xmSelect.render({--%>
  534. <%-- el: "#light",--%>
  535. <%-- language:'zn',--%>
  536. <%-- data: [--%>
  537. <%-- {value: '0', name:'绿灯'},--%>
  538. <%-- {value: '1', name:'黄灯'},--%>
  539. <%-- {value: '2', name:'红灯'}--%>
  540. <%-- ]--%>
  541. <%-- })--%>
  542. <%--}--%>
  543. this.getData();
  544. window.addEventListener('message', this.receiveMessage, false);
  545. window.parent.postMessage('init loaded')
  546. window.toDetail = this.toDetail;
  547. window.levelList = this.levelList;
  548. window.showImage = this.showImage;
  549. $(".hiddenParams").show();
  550. },
  551. leaderSupervise: function (obj) {
  552. App.openLayer({
  553. title: "督办信息",
  554. content: App.getUrl("/meetingRecords/leaderMeeting?subId=" + obj.data.id),
  555. height: "600",
  556. width: "800"
  557. })
  558. },
  559. setIsNew: function (obj) {
  560. var self = this;
  561. App.msg.confirm("是否移入新建库?", function () {
  562. App.postJson("/api/subject/subInfo/setIsNew", {subId: obj.data.id}, function (res) {
  563. if (res.success) {
  564. App.msg.success("设置成功");
  565. self.getData();
  566. layer.close(index);
  567. }
  568. });
  569. });
  570. },
  571. showImage: function (that) {
  572. var imageUrl = $(that).find("img").eq(0).attr("realUrl");
  573. if (imageUrl) {
  574. // layer.open({
  575. // type: 2,
  576. // content: imageUrl,
  577. // area: ['500px', '1000px'],
  578. // offset: 'auto',
  579. // success: function(obj,index){
  580. // layer.full(index);
  581. // }
  582. // })
  583. layer.photos({
  584. photos: {
  585. "title": "",
  586. "id": "",
  587. "start": 0,
  588. "data": [
  589. {
  590. "alt": "",
  591. "pid": "",
  592. "src": imageUrl,
  593. "thumb": imageUrl
  594. }
  595. ]
  596. },
  597. anim: 5,
  598. closeBtn: "1",
  599. success: function () {
  600. //以鼠标位置为中心的图片滚动放大缩小
  601. $(document).on("mousewheel", ".layui-layer-photos", function (ev) {
  602. var oImg = this;
  603. var ev = event || window.event;//返回WheelEvent
  604. //ev.preventDefault();
  605. var delta = ev.detail ? ev.detail > 0 : ev.wheelDelta < 0;
  606. var ratioL = (ev.clientX - oImg.offsetLeft) / oImg.offsetWidth,
  607. ratioT = (ev.clientY - oImg.offsetTop) / oImg.offsetHeight,
  608. ratioDelta = !delta ? 1 + 0.1 : 1 - 0.1,
  609. w = parseInt(oImg.offsetWidth * ratioDelta),
  610. h = parseInt(oImg.offsetHeight * ratioDelta),
  611. l = Math.round(ev.clientX - (w * ratioL)),
  612. t = Math.round(ev.clientY - (h * ratioT));
  613. $(".layui-layer-photos").css({
  614. width: w, height: h
  615. , left: l, top: t
  616. });
  617. $("#layui-layer-photos").css({width: w, height: h});
  618. $("#layui-layer-photos>img").css({width: w, height: h});
  619. });
  620. }
  621. , end: function () { //销毁回调
  622. }
  623. });
  624. }
  625. },
  626. setQueryForm2: function () {
  627. $("#searchForm").find(".layui-form-item").parent()
  628. .removeClass("layui-col-xs3").removeClass("layui-col-sm3").removeClass("layui-col-md3")
  629. .addClass("layui-col-xs5").addClass("layui-col-sm5").addClass("layui-col-md5");
  630. },
  631. setQueryForm4: function () {
  632. $("#searchForm").find(".layui-form-item").parent()
  633. .removeClass("layui-col-xs5").removeClass("layui-col-sm5").removeClass("layui-col-md5")
  634. .addClass("layui-col-xs3").addClass("layui-col-sm3").addClass("layui-col-md3");
  635. },
  636. showMore: function () {
  637. this.showMoreFlag = !this.showMoreFlag;
  638. if (this.showMoreFlag) {
  639. $(".hiddenParam").show();
  640. } else {
  641. $(".hiddenParam").hide();
  642. }
  643. /* var self = this;
  644. layer.open({
  645. title: "查询条件",
  646. type: 1,
  647. area: ['800px', ''],
  648. offset:0,
  649. shade: 0.1,
  650. shadeClose: true,
  651. content: $("#searchForm"),
  652. btn: ["查询"],
  653. yes: function (index) {
  654. self.search();
  655. layer.close(index);
  656. },
  657. success: function () {
  658. self.setQueryForm2();
  659. $(".hiddenParam").show();
  660. $(".hiddenParams").hide();
  661. },
  662. end: function () {
  663. self.setQueryForm4();
  664. $(".hiddenParam").hide();
  665. $(".hiddenParams").show();
  666. }
  667. })*/
  668. },
  669. getSearchParams: function () {
  670. var param = layui.form.getValue("searchForm");
  671. if (param.rangeDate) {
  672. param.beginDate = param.rangeDate.split(" ~ ")[0];
  673. param.endDate = param.rangeDate.split(" ~ ")[1];
  674. param.rangeDate = null;
  675. }
  676. if (this.light) {
  677. param.light = this.light.getValue("valueStr");
  678. }
  679. if (this.indusKind) {
  680. param.indusKind = this.indusKind.getValue("valueStr");
  681. }
  682. if (this.kindNature) {
  683. param.kindNature = this.kindNature.getValue("valueStr");
  684. }
  685. delete (param.select);
  686. /* param.kind = this.kind.getValue("value").sort().join(",");*/
  687. return param;
  688. },
  689. getData: function () {
  690. var self = this;
  691. var param = this.getSearchParams();
  692. param.pageNo = this.pageNo;
  693. param.pageSize = this.pageSize;
  694. param.orderBy = this.sort.field;
  695. param.orderType = this.sort.type || "asc";
  696. // 查询 table 数据列表
  697. // App.postJson("/api/subInfo/query/all", param, function (res) {
  698. // self.dataList = res.rows;
  699. // self.loadPage(res.total);
  700. // self.loadTable();
  701. // });
  702. // 表格分页数据
  703. App.postJson("/api/subInfo/query/queryPage", param, function (res) {
  704. self.dataList = res.rows;
  705. self.loadPage(res.total);
  706. self.loadTable();
  707. });
  708. // 统计数据
  709. App.postJson("/api/subInfo/query/statistics", param, function (res) {
  710. if (res.success) {
  711. self.beginRate = res.data;
  712. self.beginRate.hyflList = self.beginRate.hyflData;
  713. self.beginRate.jsddList = self.beginRate.jsddData;
  714. }
  715. });
  716. /*App.postJson("/api/subInfo/query/beginRate", param, function (res) {
  717. if (res.success) {
  718. self.beginRate = res.data;
  719. self.beginRate.hyflList = self.beginRate.hyflData.split(";");
  720. self.beginRate.tzlxList = self.beginRate.tzlxData.split(";");
  721. self.beginRate.jsddList = self.beginRate.jsddData.split(";");
  722. if (res.data.total != 0) {
  723. self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2);
  724. } else {
  725. self.beginRate.beginRate = 0;
  726. }
  727. if (res.data.yearAmt != 0) {
  728. self.beginRate.amtRate = (res.data.yearAmtSj * 100 / res.data.yearAmt).toFixed(2);
  729. } else if (res.data.yearAmtSj != 0) {
  730. self.beginRate.amtRate = 100;
  731. } else {
  732. self.beginRate.amtRate = 0;
  733. }
  734. if (res.data.total != 0) {
  735. self.beginRate.noRate = (res.data.noNum * 100 / res.data.total).toFixed(2) + '%';
  736. self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2) + '%';
  737. self.beginRate.endRate = (res.data.endNum * 100 / res.data.total).toFixed(2) + '%';
  738. self.beginRate.stopRate = (res.data.stopNum * 100 / res.data.total).toFixed(2) + '%';
  739. self.beginRate.aRate = (res.data.aNum * 100 / res.data.total).toFixed(2) + '%';
  740. self.beginRate.bRate = (res.data.bNum * 100 / res.data.total).toFixed(2) + '%';
  741. self.beginRate.cRate = (res.data.cNum * 100 / res.data.total).toFixed(2) + '%';
  742. } else {
  743. self.beginRate.noRate = "0%";
  744. self.beginRate.beginRate = "0%";
  745. self.beginRate.endRate = "0%";
  746. self.beginRate.stopRate = "0%";
  747. self.beginRate.aRate = "0%";
  748. self.beginRate.bRate = "0%";
  749. self.beginRate.cRate = "0%";
  750. }
  751. } else {
  752. self.beginRate.beginRate = 0;
  753. self.beginRate.amtRate = 0;
  754. }
  755. });*/
  756. },
  757. getStatusName: function (status) {
  758. const statusMap = {
  759. '1': '储备',
  760. '2': '新建',
  761. '3': '在建',
  762. '9': '投产'
  763. };
  764. return statusMap[status] || '未知状态';
  765. },
  766. adjustFrozenRowHeight: function () {
  767. $(".layui-table-body tr").each(function (index, val) {
  768. const fixedRow = $(".layui-table-fixed .layui-table-body table tr")[index];
  769. $(fixedRow).height($(val).height());
  770. });
  771. },
  772. loadTable: function () {
  773. this.dataList.forEach(item => {
  774. item.statusName = this.getStatusName(item.status);
  775. });
  776. const self = this;
  777. layui.table.render({
  778. elem: '#table1',
  779. even: true,
  780. autoSort: false,
  781. initSort: self.sort,
  782. cols: [[
  783. {type: 'numbers', align: 'center', width: 44, title: '序号',fixed: 'left'},
  784. {field: 'subName', title: '项目名称', minWidth: 200, templet: '#subName',fixed: 'left'},
  785. {field: 'subjectName', title: '项目所在地', width: 100},
  786. {field: 'content', title: '建设内容', minWidth: 300,
  787. templet: function (row) {
  788. return row.content ? '<span class="cut" title="' + row.content + '">' + row.content + '</span>' : '';
  789. }},
  790. {
  791. field: 'amtTotal',
  792. title: '总投资',
  793. width: 100,
  794. templet: d => (d.amtTotal / 10000).toFixed(2) + "亿元"
  795. },
  796. {field: 'statusName', title: '状态', width: 160},
  797. {field: 'beginDate', title: '计划开工日期', minWidth: 160},
  798. {field: 'endDate', title: '计划完工日期', minWidth: 160},
  799. {title: '操作', minWidth: 225, toolbar: '#toolBar', fixed: 'right'},
  800. ]],
  801. fixed: true,
  802. height: $(window).height() - $('#table1').offset().top - 50,
  803. data: self.dataList,
  804. done: function () {
  805. self.adjustFrozenRowHeight();
  806. }
  807. });
  808. layui.table.on('tool(' + this.tableName + ')', obj => {
  809. const { event } = obj;
  810. if (typeof self[event] === 'function') {
  811. self[event](obj);
  812. } else {
  813. console.warn(`未定义的事件: ${event}`);
  814. }
  815. });
  816. layui.table.on('sort(' + this.tableName + ')', function (obj) {
  817. self.sort = obj;
  818. self.getData();
  819. });
  820. },
  821. toBack: function (obj) {
  822. layer.open({
  823. type: 1,
  824. title: "退回",
  825. content: $("#toBack"),
  826. area: ['600px', ''],
  827. btn: ["保存", "取消"],
  828. yes: function (index) {
  829. var data = layui.form.val("toBackForm");
  830. var status = data.status;
  831. if (status != undefined) {
  832. if (parseInt(obj.data.status) <= parseInt(data.status)) {
  833. App.msg.warn("只能退回下级状态,请检查!!!!");
  834. return;
  835. }
  836. }
  837. App.postJson("/api/subject/subInfo/toTemp", {
  838. subId: obj.data.id,
  839. status: data.status
  840. }, function (res) {
  841. if (res.success) {
  842. layer.msg("成功", {icon: 6, time: 1000});
  843. //
  844. window.location.href = App.getUrl("subject/subInfo/projTz?type=4");
  845. }
  846. });
  847. },
  848. close: function (index) {
  849. layer.close(index);
  850. }
  851. })
  852. },
  853. isNoHide: function (obj) {
  854. var self = this;
  855. App.msg.confirm("是否移除在建库?", function () {
  856. App.postJson("/api/subject/subInfo/setBackIsHide", {subId: obj.data.id}, function (res) {
  857. if (res.success) {
  858. App.msg.success("设置成功");
  859. self.getData();
  860. layer.close(index);
  861. }
  862. });
  863. });
  864. },
  865. move (obj) {
  866. this.moveDbParam.id = obj.data.id
  867. this.moveDbParam.status = obj.data.cbStatus
  868. layer.open({
  869. type: 1,
  870. title: '标题',
  871. content: '<div class="layui-form" style="padding: 20px;">' +
  872. '<div class="layui-form-item">' +
  873. '<label class="layui-form-label">当前状态:</label>' +
  874. '<div class="layui-input-block">' +
  875. '<input type="text" name="currentState" value="储备库" disabled class="layui-input">' +
  876. '</div>' +
  877. '</div>' +
  878. '<div class="layui-form-item">' +
  879. '<label class="layui-form-label">移入到:</label>' +
  880. '<div class="layui-input-block">' +
  881. '<select v-model="subInfo.status" lay-filter="moveStatus" lay-verify="required">' +
  882. '<option value="">请选择</option>' +
  883. '<option value="2">新建</option>' +
  884. '<option value="3">在建</option>' +
  885. '<option value="9">投产</option>' +
  886. '</select>' +
  887. '</div>' +
  888. '</div>' +
  889. '<div class="layui-form-item" style="text-align: right;">' +
  890. '<button type="button" class="layui-btn layui-btn-primary layui-border" onclick="vm.closeAllLayers()">取消</button>' +
  891. '<button type="button" class="layui-btn moveConfirm" onclick="vm.confirmMove()">确认移入</button>' +
  892. '</div>' +
  893. '</div>',
  894. area: ['350px', '300px'],
  895. success: function(layero, index){
  896. layui.form.render();
  897. }
  898. });
  899. },
  900. isHide: function (obj) {
  901. var self = this;
  902. App.msg.confirm("是否移入在建库?", function () {
  903. App.postJson("/api/subject/subInfo/setIsHide", {subId: obj.data.id}, function (res) {
  904. if (res.success) {
  905. App.msg.success("设置成功");
  906. self.getData();
  907. layer.close(index);
  908. }
  909. });
  910. });
  911. },
  912. loadPage: function (totalCount) {
  913. var self = this;
  914. layui.laypage.render({
  915. elem: 'pagination',
  916. count: totalCount,
  917. curr: self.pageNo,
  918. limit: self.pageSize,
  919. layout: ['count', 'prev', 'page', 'next', 'skip'],
  920. jump: function (obj, first) {
  921. //首次不执行
  922. if (!first) {
  923. self.pageNo = obj.curr;
  924. self.getData();
  925. }
  926. }
  927. });
  928. },
  929. yearPlan: function (obj) {
  930. window.location.href = App.getUrl("amtPlan/detail?subId=" + obj.data.id);
  931. },
  932. setSubReason: function (obj) {
  933. var self = this;
  934. layui.form.val("reasonForm", obj.data);
  935. layer.open({
  936. type: 1,
  937. title: "项目原因录入",
  938. content: $("#setReason"),
  939. area: ['880px', '560px'],
  940. btn: ["保存", "取消"],
  941. yes: function (index) {
  942. var reason = layui.form.val("reasonForm");
  943. reason.subId = obj.data.id;
  944. App.postJson("/api/subject/subInfo/setSubReason", reason, function (res) {
  945. if (res.success) {
  946. App.msg.success("设置成功");
  947. self.getData();
  948. layer.close(index);
  949. }
  950. });
  951. },
  952. close: function (index) {
  953. layer.close(index);
  954. }
  955. })
  956. },
  957. problem: function (obj) {
  958. var self = this;
  959. obj.data.status_reason = "";
  960. layui.form.val("problemForm", obj.data);
  961. layer.open({
  962. type: 1,
  963. title: "问题督办",
  964. content: $("#problem"),
  965. area: ['800px', '600px'],
  966. btn: ["保存", "取消"],
  967. yes: function (index) {
  968. var reason = layui.form.val("problemForm");
  969. reason.subId = obj.data.id;
  970. if (reason.statusF == "2" || reason.statusF == "1") {
  971. if (reason.status_reason == "" || reason.status_reason == undefined) {
  972. layer.msg("红灯,黄灯必须输入原因");
  973. return;
  974. }
  975. }
  976. App.postJson("/api/subject/subInfo/setStatus", {
  977. subId: obj.data.id,
  978. statusFgw: reason.statusF,
  979. reason: reason.status_reason,
  980. dateConfirm: reason.dateConfirm
  981. }, function (res) {
  982. if (res.success) {
  983. App.msg.success("设置成功");
  984. self.getData();
  985. layer.close(index);
  986. }
  987. });
  988. },
  989. close: function (index) {
  990. layer.close(index);
  991. }
  992. })
  993. },
  994. exportTotalExcel: function () {
  995. var param = this.getSearchParams();
  996. App.common.utils.downFile(App.getUrl("subInfoExport/exportTotalExcelByStatus"), "POST", param, "项目情况表(总库).xlsx", "导出失败");
  997. },
  998. exportDetailExcel: function () {
  999. var param = this.getSearchParams();
  1000. App.common.utils.downFile(App.getUrl("subInfoExport/exportDetailExcel"), "POST", param, "项目明细表(总库).xlsx", "导出失败");
  1001. },
  1002. exportExcel: function () {
  1003. var param = this.getSearchParams();
  1004. App.common.utils.downFile(App.getUrl("subInfoExport/exportSumExcel"), "POST", param, "项目情况表.xlsx", "导出失败");
  1005. },
  1006. exportExcelByIndusKind: function () {
  1007. var param = this.getSearchParams();
  1008. App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelByIndusKind"), "POST", param, "项目情况表(按所属行业统计).xlsx", "导出失败");
  1009. },
  1010. exportSchedulingExcel: function () {
  1011. var param = this.getSearchParams();
  1012. App.common.utils.downFile(App.getUrl("subInfoExport/exportSchedulingExcel"), "POST", param, "项目调度表.xlsx", "导出失败");
  1013. },
  1014. /* exportExcel2: function(){
  1015. var param = this.getSearchParams();
  1016. App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelTz"),"POST", param,"项目详情信息表.xlsx", "导出失败");
  1017. }, */
  1018. exportMoreExcel: function () {
  1019. top.window.getSearchParams = this.getSearchParams;
  1020. App.openLayer({
  1021. title: "自定义导出",
  1022. content: App.getUrl("/subInfoExport/index"),
  1023. height: "800",
  1024. width: "1000"
  1025. })
  1026. },
  1027. toQcc: function (obj) {
  1028. window.open('https://www.qcc.com/web/search?key=' + obj.data.unitName, '_blank')
  1029. },
  1030. toManagerUnit: function (obj) {
  1031. //详情
  1032. var index = layer.open({
  1033. type: 2,
  1034. title: '',
  1035. area: ['1000px', '800px'],
  1036. // /subject/subInfo/editSubInfo
  1037. content: App.getUrl("/subject/subInfo/manageUnit?subId=" + obj.data.id + "&queryType=3"),
  1038. });
  1039. layui.layer.full(index);
  1040. },
  1041. toDetail: function (obj) {
  1042. //详情
  1043. var index = layer.open({
  1044. type: 2,
  1045. title: '',
  1046. area: ['1000px', '800px'],
  1047. content: App.getUrl("/subject/subInfo/detailView2?layer=true&subId=" + obj.data.id + "&lastUrl=" + window.location.href),
  1048. });
  1049. layui.layer.full(index);
  1050. },
  1051. /* toDetail: function (obj) {
  1052. //详情
  1053. var index = layer.open({
  1054. type: 2,
  1055. title: '',
  1056. area: ['1000px', '800px'],
  1057. content: App.getUrl("/subject/subInfo/detailView?layer=true&subId=" + obj.data.id + "&lastUrl=" + window.location.href),
  1058. });
  1059. layui.layer.full(index);
  1060. },*/
  1061. levelList: function (field, title, val) {
  1062. //详情
  1063. var param = field + "," + title + "," + val
  1064. var params = encodeURIComponent(JSON.stringify(this.getSearchParams()));
  1065. var index = top.layer.open({
  1066. type: 2,
  1067. title: '',
  1068. area: ['90%', '90%'],
  1069. content: App.getUrl("/subject/subInfo/levelList?layer=true&type=" + this.getSearchParams().queryType + "&curParam=" + param + "&params=" + params),
  1070. });
  1071. //top.layer.full(index);
  1072. },
  1073. print: function (obj) {
  1074. window.open(App.getUrl("/subject/apply/downPdf?subId=" + obj.data.id));
  1075. },
  1076. toEditSubInfo: function (obj) {
  1077. window.location.href = App.getUrl("/subject/subInfo/editSubInfo2?subId=" + obj.data.id + "&queryType=3");
  1078. },
  1079. preNew: function (obj) {
  1080. window.location.href = App.getUrl("/subPreNew/todo?subId=" + obj.data.id);
  1081. },
  1082. toTh: function (obj) {
  1083. if (obj.data.statusJh == null || obj.data.statusJh == '0' || obj.data.statusJh == '1') {
  1084. App.msg.confirm("是否需要退回到暂存状态?", function () {
  1085. App.postJson("/api/subject/subInfo/toTemp", {subId: obj.data.id, status: "0"}, function (res) {
  1086. if (res.success) {
  1087. layer.msg("成功", {icon: 6, time: 1000});
  1088. //
  1089. window.location.href = App.getUrl("subject/subInfo/projTz");
  1090. }
  1091. });
  1092. })
  1093. } else {
  1094. App.msg.warn("已做过开工申报,需要走变更流程");
  1095. }
  1096. },
  1097. search: function () {
  1098. var param = layui.form.getValue("searchForm");
  1099. window.localStorage.setItem(this.cacheName, JSON.stringify(param));
  1100. this.pageNo = 1;
  1101. this.getData();
  1102. },
  1103. openExport: function () {
  1104. this.showExport = true;
  1105. console.log('移入了')
  1106. },
  1107. choseExport: function () {
  1108. this.showExport = false;
  1109. console.log('移出了')
  1110. },
  1111. receiveMessage (e) {
  1112. console.log('cb receiveMessage: ', e.data)
  1113. if (e.data.topBreadcrumb) {
  1114. $(".top-breadcrumb").html(e.data.topBreadcrumb)
  1115. }
  1116. }
  1117. }
  1118. });
  1119. </script>
  1120. </body>
  1121. </html>