xmzk.jsp 58 KB

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