xmzk.jsp 60 KB

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