xmzk.jsp 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260
  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="kindNature"></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. </div>
  387. </script>
  388. <script type="text/html" id="imageDiv">
  389. <div style="width:50px;height:50px" onclick="showImage(this)">
  390. {{# if(d.fileId != null && d.fileId != '') { }}
  391. <img src="${domain}/static/file/{{d.fileId}}/showfile" realUrl="${domain}/static/file/{{d.fileId}}/showfile"
  392. width="50px" height="50px"/>
  393. {{#} }}
  394. </div>
  395. </script>
  396. <script type="text/html" id="offsetLight">
  397. {{#if(d.offset >= -30 && d.offset <= -10 ) { }}
  398. <span style="color: yellow"><image class="light-rgb"
  399. src="${WebSite.asset}/css/images/bigScreen/light-yellow.png"></image></span>
  400. {{#} else if(d.offset < -30) { }}
  401. <span style="color: red"><image class="light-rgb"
  402. src="${WebSite.asset}/css/images/bigScreen/light-red.png"></image></span>
  403. {{#}}}
  404. {{#if(d.offset !="" || d.offset != undefined || d.offset != null) { }}
  405. {{#if(d.offset<0) { }}
  406. <span class="grey">{{d.offset||"--"}}%</span>
  407. {{# } }}
  408. {{#if(d.offset>0) { }}
  409. <span class="green">{{d.offset||"--"}}%</span>
  410. {{# } }}
  411. {{# } }}
  412. </script>
  413. <script type="text/html" id="openLight">
  414. {{# var computedPer1 = function(beginDate){
  415. var beginDate =new Date(beginDate);
  416. var beginDate7 =new Date(beginDate);
  417. var beginDate3 =new Date(beginDate);
  418. beginDate7.setDate(beginDate7.getDate()-7);
  419. beginDate3.setDate(beginDate3.getDate()-3);
  420. var newDate = new Date();
  421. if(newDate.getTime() >=beginDate7.getTime() && newDate.getTime() <=beginDate3.getTime()){
  422. return "yellow";
  423. }else if(newDate.getTime() >=beginDate3.getTime() && newDate.getTime() <= beginDate.getTime() ){
  424. return "red";
  425. }else{
  426. return "-";
  427. }
  428. };
  429. }}
  430. {{#if(computedPer1(d.beginDate)=="yellow" ) { }}
  431. <span style="color: yellow"> <image style="width:20px;height:20px;margin: auto;"
  432. src="${WebSite.asset}/css/images/bigScreen/light-yellow.png"></image></span>
  433. {{#} else if(computedPer1(d.beginDate)=="red") { }}
  434. <span style="color: red"> <image style="width:20px;height:20px;margin: auto;"
  435. src="${WebSite.asset}/css/images/bigScreen/light-red.png"></image></span>
  436. {{#}}}
  437. </script>
  438. <script type="text/html" id="moveForm">
  439. <div class="layui-form" style="padding: 20px;">
  440. <div class="layui-form-item" style="display: flex; align-items: center;">
  441. <label class="layui-form-label" style="text-align: right; width: 90px;">当前状态:</label>
  442. <div class="layui-input-block" style="flex: 1; max-width: calc(100% - 120px);">
  443. <input type="text" name="currentState" value="储备库" disabled class="layui-input">
  444. </div>
  445. </div>
  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. <select class="custom-select" lay-filter="moveStatus" lay-verify="required">
  450. <option value="">请选择</option>
  451. <option value="1">储备</option>
  452. <option value="2">新建</option>
  453. <option value="3">在建</option>
  454. <option value="9">投产</option>
  455. </select>
  456. </div>
  457. </div>
  458. <div class="layui-form-item" style="display: flex; align-items: center;">
  459. <label class="layui-form-label" style="text-align: right; width: 90px;"></label>
  460. <div class="layui-input-block" style="flex: 1; max-width: calc(100% - 120px); text-align: right;">
  461. <button type="button" class="layui-btn layui-btn-primary layui-border" onclick="vm.closeAllLayers()">取消</button>
  462. <button type="button" class="layui-btn moveConfirm" onclick="vm.confirmMove()">确认转库</button>
  463. </div>
  464. </div>
  465. </div>
  466. </script>
  467. <script>
  468. layui.use('element', function () {
  469. let element = layui.element;
  470. });
  471. let vm = new Vue({
  472. el: "#app",
  473. template: "#template",
  474. data: {
  475. JSDD: [],
  476. winH: 0,
  477. dataList: [],
  478. startDate: "",
  479. endDate: "",
  480. tableName: 'test',
  481. cacheName: 'TzQueryParam_cb_${currUser.id}',
  482. pageNo: 1,
  483. kind: {},
  484. beginRate: {},
  485. showMoreFlag: false,
  486. light: null,
  487. sort: {field: "abc", type: ""},
  488. pageSize: 10,
  489. showExport: false,
  490. moveDbParam:{
  491. status: "",
  492. id: ""
  493. }
  494. },
  495. mounted: function () {
  496. this.init()
  497. },
  498. methods: {
  499. closeAllLayers() {
  500. layui.layer.closeAll(); // 关闭所有弹框
  501. },
  502. confirmMove: function () {
  503. let param = this.moveDbParam
  504. // 数据验证
  505. if (!param || !param.status) {
  506. App.msg.error("请选择转库状态");
  507. return;
  508. }
  509. const statusMap = {
  510. 1: "储备",
  511. 2: "新建",
  512. 3: "在建",
  513. 9: "投产"
  514. };
  515. param.statusName = statusMap[param.status] || "未知状态";
  516. let self = this;
  517. self.closeAllLayers();
  518. App.msg.confirm(`是否转入` + param.statusName + `库?`, () => {
  519. App.postJson("/api/subject/subInfo/moveDb", {id: param.id, status: param.status}, (res) => {
  520. if (res.success) {
  521. App.msg.success("转库成功");
  522. self.getData()
  523. } else {
  524. App.msg.error(res.message || "转库失败,请重试");
  525. }
  526. })
  527. });
  528. },
  529. move(obj) {
  530. this.moveDbParam.id = obj.data.id
  531. const formTemplate = document.getElementById('moveForm').innerHTML;
  532. layer.open({
  533. type: 1,
  534. title: '转库',
  535. content: formTemplate,
  536. area: ['350px', '300px'],
  537. success: function (layero, index) {
  538. layui.form.render();
  539. }
  540. });
  541. },
  542. init: function () {
  543. let self = this;
  544. layui.form.on("select(moveStatus)", function (data) {
  545. self.moveDbParam.status = data.value;
  546. });
  547. // 文件上传
  548. layui.upload.render({
  549. elem: '#uploadBtn',
  550. url: App.getUrl("/api/subject/subInfo/importXmzkDetailExcel"),
  551. accept: 'file', // 普通文件
  552. exts: 'xls|xlsx', // 限制文件类型
  553. done: function (res) {
  554. if (res.success === true) {
  555. self.getData();
  556. layui.layer.msg('导入成功!');
  557. } else {
  558. layui.layer.msg('导入失败:' + res.message, {icon: 5});
  559. }
  560. },
  561. error: function (res) {
  562. layui.layer.msg('上传失败,请稍后再试' + res.message, {icon: 5});
  563. }
  564. });
  565. App.postJson("/api/dict/query/index", {}, function (res) {
  566. self.JSDD = res.data.JSDD;
  567. })
  568. this.winH = document.body.clientHeight;
  569. var nowdate = new Date();
  570. nowdate.setMonth(nowdate.getMonth() + 1);
  571. var y = nowdate.getFullYear();
  572. var m = nowdate.getMonth() + 1;
  573. var d = nowdate.getDate();
  574. layui.laydate.render({
  575. elem: '#startTime',
  576. range: '~',
  577. theme: layDateTheme,
  578. /* value: y + "-01-01 ~ " + y + "-12-31"*/
  579. });
  580. var formatwdate = y + '-' + m + '-' + d;
  581. layui.laydate.render({
  582. elem: '#dateConfirm',
  583. theme: layDateTheme,
  584. value: formatwdate
  585. });
  586. /* $("#month").val(new Date().getMonth() + 1);*/
  587. var xmlx = [];
  588. <c:forEach items="${XMLX}" var="xm">
  589. xmlx.push({value: "${xm.code}", name: "${xm.title}"});
  590. </c:forEach>
  591. <%--var indusKindData = [];--%>
  592. <%--<c:forEach items="${HYFL}" var="xm">--%>
  593. <%--var childData = [];--%>
  594. <%--<c:forEach items="${xm.children}" var="c">--%>
  595. <%--childData.push({--%>
  596. <%-- value: "${c.code}",--%>
  597. <%-- name: "${c.title}",--%>
  598. <%--})--%>
  599. <%--</c:forEach>--%>
  600. <%--indusKindData.push(--%>
  601. <%-- {--%>
  602. <%-- value: "${xm.code}",--%>
  603. <%-- name: "${xm.title}",--%>
  604. <%-- children: childData--%>
  605. <%-- });--%>
  606. <%--</c:forEach>--%>
  607. <%--this.indusKind = layui.xmSelect.render({--%>
  608. <%-- el: "#indusKind",--%>
  609. <%-- language: 'zn',--%>
  610. <%-- data: indusKindData,--%>
  611. <%--});--%>
  612. var kindNatureData = [];
  613. <c:forEach items="${TZXZ}" var="xm">
  614. kindNatureData.push({value: "${xm.code}", name: "${xm.title}"});
  615. </c:forEach>
  616. this.kindNature = layui.xmSelect.render({
  617. el: "#kindNature",
  618. language: 'zn',
  619. data: kindNatureData
  620. });
  621. layui.laydate.render({
  622. elem: '#year',
  623. type: 'year',
  624. theme: layDateTheme,
  625. /* value: new Date().getFullYear()*/
  626. })
  627. var params = window.localStorage.getItem(this.cacheName);
  628. if (params) {
  629. layui.form.val("searchForm", JSON.parse(params));
  630. }
  631. <%--if(${isHydw}) {--%>
  632. <%-- this.light = layui.xmSelect.render({--%>
  633. <%-- el: "#light",--%>
  634. <%-- language:'zn',--%>
  635. <%-- data: [--%>
  636. <%-- {value: '0', name:'绿灯'},--%>
  637. <%-- {value: '1', name:'黄灯'},--%>
  638. <%-- {value: '2', name:'红灯'}--%>
  639. <%-- ]--%>
  640. <%-- })--%>
  641. <%--}--%>
  642. this.getData();
  643. window.addEventListener('message', this.receiveMessage, false);
  644. window.parent.postMessage('init loaded')
  645. window.toDetail = this.toDetail;
  646. window.levelList = this.levelList;
  647. window.showImage = this.showImage;
  648. $(".hiddenParams").show();
  649. },
  650. leaderSupervise: function (obj) {
  651. App.openLayer({
  652. title: "督办信息",
  653. content: App.getUrl("/meetingRecords/leaderMeeting?subId=" + obj.data.id),
  654. height: "600",
  655. width: "800"
  656. })
  657. },
  658. setIsNew: function (obj) {
  659. var self = this;
  660. App.msg.confirm("是否移入新建库?", function () {
  661. App.postJson("/api/subject/subInfo/setIsNew", {subId: obj.data.id}, function (res) {
  662. if (res.success) {
  663. App.msg.success("设置成功");
  664. self.getData();
  665. layer.close(index);
  666. }
  667. });
  668. });
  669. },
  670. showImage: function (that) {
  671. var imageUrl = $(that).find("img").eq(0).attr("realUrl");
  672. if (imageUrl) {
  673. // layer.open({
  674. // type: 2,
  675. // content: imageUrl,
  676. // area: ['500px', '1000px'],
  677. // offset: 'auto',
  678. // success: function(obj,index){
  679. // layer.full(index);
  680. // }
  681. // })
  682. layer.photos({
  683. photos: {
  684. "title": "",
  685. "id": "",
  686. "start": 0,
  687. "data": [
  688. {
  689. "alt": "",
  690. "pid": "",
  691. "src": imageUrl,
  692. "thumb": imageUrl
  693. }
  694. ]
  695. },
  696. anim: 5,
  697. closeBtn: "1",
  698. success: function () {
  699. //以鼠标位置为中心的图片滚动放大缩小
  700. $(document).on("mousewheel", ".layui-layer-photos", function (ev) {
  701. var oImg = this;
  702. var ev = event || window.event;//返回WheelEvent
  703. //ev.preventDefault();
  704. var delta = ev.detail ? ev.detail > 0 : ev.wheelDelta < 0;
  705. var ratioL = (ev.clientX - oImg.offsetLeft) / oImg.offsetWidth,
  706. ratioT = (ev.clientY - oImg.offsetTop) / oImg.offsetHeight,
  707. ratioDelta = !delta ? 1 + 0.1 : 1 - 0.1,
  708. w = parseInt(oImg.offsetWidth * ratioDelta),
  709. h = parseInt(oImg.offsetHeight * ratioDelta),
  710. l = Math.round(ev.clientX - (w * ratioL)),
  711. t = Math.round(ev.clientY - (h * ratioT));
  712. $(".layui-layer-photos").css({
  713. width: w, height: h
  714. , left: l, top: t
  715. });
  716. $("#layui-layer-photos").css({width: w, height: h});
  717. $("#layui-layer-photos>img").css({width: w, height: h});
  718. });
  719. }
  720. , end: function () { //销毁回调
  721. }
  722. });
  723. }
  724. },
  725. setQueryForm2: function () {
  726. $("#searchForm").find(".layui-form-item").parent()
  727. .removeClass("layui-col-xs3").removeClass("layui-col-sm3").removeClass("layui-col-md3")
  728. .addClass("layui-col-xs5").addClass("layui-col-sm5").addClass("layui-col-md5");
  729. },
  730. setQueryForm4: function () {
  731. $("#searchForm").find(".layui-form-item").parent()
  732. .removeClass("layui-col-xs5").removeClass("layui-col-sm5").removeClass("layui-col-md5")
  733. .addClass("layui-col-xs3").addClass("layui-col-sm3").addClass("layui-col-md3");
  734. },
  735. showMore: function () {
  736. this.showMoreFlag = !this.showMoreFlag;
  737. if (this.showMoreFlag) {
  738. $(".hiddenParam").show();
  739. } else {
  740. $(".hiddenParam").hide();
  741. }
  742. /* var self = this;
  743. layer.open({
  744. title: "查询条件",
  745. type: 1,
  746. area: ['800px', ''],
  747. offset:0,
  748. shade: 0.1,
  749. shadeClose: true,
  750. content: $("#searchForm"),
  751. btn: ["查询"],
  752. yes: function (index) {
  753. self.search();
  754. layer.close(index);
  755. },
  756. success: function () {
  757. self.setQueryForm2();
  758. $(".hiddenParam").show();
  759. $(".hiddenParams").hide();
  760. },
  761. end: function () {
  762. self.setQueryForm4();
  763. $(".hiddenParam").hide();
  764. $(".hiddenParams").show();
  765. }
  766. })*/
  767. },
  768. getSearchParams: function () {
  769. var param = layui.form.getValue("searchForm");
  770. if (param.rangeDate) {
  771. param.beginDate = param.rangeDate.split(" ~ ")[0];
  772. param.endDate = param.rangeDate.split(" ~ ")[1];
  773. param.rangeDate = null;
  774. }
  775. if (this.light) {
  776. param.light = this.light.getValue("valueStr");
  777. }
  778. if (this.indusKind) {
  779. param.indusKind = this.indusKind.getValue("valueStr");
  780. }
  781. if (this.kindNature) {
  782. param.kindNature = this.kindNature.getValue("valueStr");
  783. }
  784. delete (param.select);
  785. /* param.kind = this.kind.getValue("value").sort().join(",");*/
  786. return param;
  787. },
  788. getData: function () {
  789. var self = this;
  790. var param = this.getSearchParams();
  791. param.pageNo = this.pageNo;
  792. param.pageSize = this.pageSize;
  793. param.orderBy = this.sort.field;
  794. param.orderType = this.sort.type || "asc";
  795. // 查询 table 数据列表
  796. // App.postJson("/api/subInfo/query/all", param, function (res) {
  797. // self.dataList = res.rows;
  798. // self.loadPage(res.total);
  799. // self.loadTable();
  800. // });
  801. // 表格分页数据
  802. App.postJson("/api/subInfo/query/queryPage", param, function (res) {
  803. self.dataList = res.rows;
  804. self.loadPage(res.total);
  805. self.loadTable();
  806. });
  807. // 统计数据
  808. App.postJson("/api/subInfo/query/statistics", param, function (res) {
  809. if (res.success) {
  810. self.beginRate = res.data;
  811. self.beginRate.hyflList = self.beginRate.hyflData;
  812. self.beginRate.jsddList = self.beginRate.jsddData;
  813. }
  814. });
  815. /*App.postJson("/api/subInfo/query/beginRate", param, function (res) {
  816. if (res.success) {
  817. self.beginRate = res.data;
  818. self.beginRate.hyflList = self.beginRate.hyflData.split(";");
  819. self.beginRate.tzlxList = self.beginRate.tzlxData.split(";");
  820. self.beginRate.jsddList = self.beginRate.jsddData.split(";");
  821. if (res.data.total != 0) {
  822. self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2);
  823. } else {
  824. self.beginRate.beginRate = 0;
  825. }
  826. if (res.data.yearAmt != 0) {
  827. self.beginRate.amtRate = (res.data.yearAmtSj * 100 / res.data.yearAmt).toFixed(2);
  828. } else if (res.data.yearAmtSj != 0) {
  829. self.beginRate.amtRate = 100;
  830. } else {
  831. self.beginRate.amtRate = 0;
  832. }
  833. if (res.data.total != 0) {
  834. self.beginRate.noRate = (res.data.noNum * 100 / res.data.total).toFixed(2) + '%';
  835. self.beginRate.beginRate = (res.data.beginNum * 100 / res.data.total).toFixed(2) + '%';
  836. self.beginRate.endRate = (res.data.endNum * 100 / res.data.total).toFixed(2) + '%';
  837. self.beginRate.stopRate = (res.data.stopNum * 100 / res.data.total).toFixed(2) + '%';
  838. self.beginRate.aRate = (res.data.aNum * 100 / res.data.total).toFixed(2) + '%';
  839. self.beginRate.bRate = (res.data.bNum * 100 / res.data.total).toFixed(2) + '%';
  840. self.beginRate.cRate = (res.data.cNum * 100 / res.data.total).toFixed(2) + '%';
  841. } else {
  842. self.beginRate.noRate = "0%";
  843. self.beginRate.beginRate = "0%";
  844. self.beginRate.endRate = "0%";
  845. self.beginRate.stopRate = "0%";
  846. self.beginRate.aRate = "0%";
  847. self.beginRate.bRate = "0%";
  848. self.beginRate.cRate = "0%";
  849. }
  850. } else {
  851. self.beginRate.beginRate = 0;
  852. self.beginRate.amtRate = 0;
  853. }
  854. });*/
  855. },
  856. getStatusName: function (status) {
  857. const statusMap = {
  858. '1': '储备',
  859. '2': '新建',
  860. '3': '在建',
  861. '9': '投产'
  862. };
  863. return statusMap[status] || '未知状态';
  864. },
  865. adjustFrozenRowHeight: function () {
  866. $(".layui-table-body tr").each(function (index, val) {
  867. const fixedRow = $(".layui-table-fixed .layui-table-body table tr")[index];
  868. $(fixedRow).height($(val).height());
  869. });
  870. },
  871. loadTable: function () {
  872. this.dataList.forEach(item => {
  873. item.statusName = this.getStatusName(item.status);
  874. });
  875. const self = this;
  876. layui.table.render({
  877. elem: '#table1',
  878. even: true,
  879. autoSort: false,
  880. initSort: self.sort,
  881. cols: [[
  882. {type: 'numbers', align: 'center', width: 44, title: '序号',fixed: 'left'},
  883. {field: 'subName', title: '项目名称', minWidth: 200, templet: '#subName',fixed: 'left'},
  884. {field: 'subjectName', title: '项目所在地', width: 100},
  885. {field: 'content', title: '建设内容', minWidth: 300,
  886. templet: function (row) {
  887. return row.content ? '<span class="cut" title="' + row.content + '">' + row.content + '</span>' : '';
  888. }},
  889. {
  890. field: 'amtTotal',
  891. title: '总投资',
  892. width: 100,
  893. templet: d => (d.amtTotal / 10000).toFixed(2) + "亿元"
  894. },
  895. {field: 'statusName', title: '状态', width: 60},
  896. {field: 'beginDate', title: '计划开工日期', minWidth: 100},
  897. {field: 'endDate', title: '计划完工日期', minWidth: 100},
  898. {title: '操作', minWidth: 150, toolbar: '#toolBar', fixed: 'right'},
  899. ]],
  900. fixed: true,
  901. height: $(window).height() - $('#table1').offset().top - 50,
  902. data: self.dataList,
  903. done: function () {
  904. self.adjustFrozenRowHeight();
  905. }
  906. });
  907. layui.table.on('tool(' + this.tableName + ')', obj => {
  908. const { event } = obj;
  909. if (typeof self[event] === 'function') {
  910. self[event](obj);
  911. } else {
  912. console.warn(`未定义的事件: ${event}`);
  913. }
  914. });
  915. layui.table.on('sort(' + this.tableName + ')', function (obj) {
  916. self.sort = obj;
  917. self.getData();
  918. });
  919. },
  920. toBack: function (obj) {
  921. layer.open({
  922. type: 1,
  923. title: "退回",
  924. content: $("#toBack"),
  925. area: ['600px', ''],
  926. btn: ["保存", "取消"],
  927. yes: function (index) {
  928. var data = layui.form.val("toBackForm");
  929. var status = data.status;
  930. if (status != undefined) {
  931. if (parseInt(obj.data.status) <= parseInt(data.status)) {
  932. App.msg.warn("只能退回下级状态,请检查!!!!");
  933. return;
  934. }
  935. }
  936. App.postJson("/api/subject/subInfo/toTemp", {
  937. subId: obj.data.id,
  938. status: data.status
  939. }, function (res) {
  940. if (res.success) {
  941. layer.msg("成功", {icon: 6, time: 1000});
  942. //
  943. window.location.href = App.getUrl("subject/subInfo/projTz?type=4");
  944. }
  945. });
  946. },
  947. close: function (index) {
  948. layer.close(index);
  949. }
  950. })
  951. },
  952. isNoHide: function (obj) {
  953. var self = this;
  954. App.msg.confirm("是否移除在建库?", function () {
  955. App.postJson("/api/subject/subInfo/setBackIsHide", {subId: obj.data.id}, function (res) {
  956. if (res.success) {
  957. App.msg.success("设置成功");
  958. self.getData();
  959. layer.close(index);
  960. }
  961. });
  962. });
  963. },
  964. isHide: function (obj) {
  965. var self = this;
  966. App.msg.confirm("是否移入在建库?", function () {
  967. App.postJson("/api/subject/subInfo/setIsHide", {subId: obj.data.id}, function (res) {
  968. if (res.success) {
  969. App.msg.success("设置成功");
  970. self.getData();
  971. layer.close(index);
  972. }
  973. });
  974. });
  975. },
  976. loadPage: function (totalCount) {
  977. var self = this;
  978. layui.laypage.render({
  979. elem: 'pagination',
  980. count: totalCount,
  981. curr: self.pageNo,
  982. limit: self.pageSize,
  983. layout: ['count', 'prev', 'page', 'next', 'skip'],
  984. jump: function (obj, first) {
  985. //首次不执行
  986. if (!first) {
  987. self.pageNo = obj.curr;
  988. self.getData();
  989. }
  990. }
  991. });
  992. },
  993. yearPlan: function (obj) {
  994. window.location.href = App.getUrl("amtPlan/detail?subId=" + obj.data.id);
  995. },
  996. setSubReason: function (obj) {
  997. var self = this;
  998. layui.form.val("reasonForm", obj.data);
  999. layer.open({
  1000. type: 1,
  1001. title: "项目原因录入",
  1002. content: $("#setReason"),
  1003. area: ['880px', '560px'],
  1004. btn: ["保存", "取消"],
  1005. yes: function (index) {
  1006. var reason = layui.form.val("reasonForm");
  1007. reason.subId = obj.data.id;
  1008. App.postJson("/api/subject/subInfo/setSubReason", reason, function (res) {
  1009. if (res.success) {
  1010. App.msg.success("设置成功");
  1011. self.getData();
  1012. layer.close(index);
  1013. }
  1014. });
  1015. },
  1016. close: function (index) {
  1017. layer.close(index);
  1018. }
  1019. })
  1020. },
  1021. problem: function (obj) {
  1022. var self = this;
  1023. obj.data.status_reason = "";
  1024. layui.form.val("problemForm", obj.data);
  1025. layer.open({
  1026. type: 1,
  1027. title: "问题督办",
  1028. content: $("#problem"),
  1029. area: ['800px', '600px'],
  1030. btn: ["保存", "取消"],
  1031. yes: function (index) {
  1032. var reason = layui.form.val("problemForm");
  1033. reason.subId = obj.data.id;
  1034. if (reason.statusF == "2" || reason.statusF == "1") {
  1035. if (reason.status_reason == "" || reason.status_reason == undefined) {
  1036. layer.msg("红灯,黄灯必须输入原因");
  1037. return;
  1038. }
  1039. }
  1040. App.postJson("/api/subject/subInfo/setStatus", {
  1041. subId: obj.data.id,
  1042. statusFgw: reason.statusF,
  1043. reason: reason.status_reason,
  1044. dateConfirm: reason.dateConfirm
  1045. }, function (res) {
  1046. if (res.success) {
  1047. App.msg.success("设置成功");
  1048. self.getData();
  1049. layer.close(index);
  1050. }
  1051. });
  1052. },
  1053. close: function (index) {
  1054. layer.close(index);
  1055. }
  1056. })
  1057. },
  1058. exportTotalExcel: function () {
  1059. var param = this.getSearchParams();
  1060. App.common.utils.downFile(App.getUrl("subInfoExport/exportTotalExcelByStatus"), "POST", param, "项目情况表(总库).xlsx", "导出失败");
  1061. },
  1062. exportFixDetailExcel: function () {
  1063. var param = this.getSearchParams();
  1064. App.common.utils.downFile(App.getUrl("/subInfoExport/exportXmzkDetailExcel"), "POST", param, "项目明细表(总库).xlsx", "导出失败");
  1065. },
  1066. exportDetailExcel: function () {
  1067. var param = this.getSearchParams();
  1068. App.common.utils.downFile(App.getUrl("subInfoExport/exportDetailExcel"), "POST", param, "项目明细表(总库).xlsx", "导出失败");
  1069. },
  1070. exportExcel: function () {
  1071. var param = this.getSearchParams();
  1072. App.common.utils.downFile(App.getUrl("subInfoExport/exportSumExcel"), "POST", param, "项目情况表.xlsx", "导出失败");
  1073. },
  1074. exportExcelByIndusKind: function () {
  1075. var param = this.getSearchParams();
  1076. App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelByIndusKind"), "POST", param, "项目情况表(按所属行业统计).xlsx", "导出失败");
  1077. },
  1078. exportSchedulingExcel: function () {
  1079. var param = this.getSearchParams();
  1080. App.common.utils.downFile(App.getUrl("subInfoExport/exportSchedulingExcel"), "POST", param, "项目调度表.xlsx", "导出失败");
  1081. },
  1082. /* exportExcel2: function(){
  1083. var param = this.getSearchParams();
  1084. App.common.utils.downFile(App.getUrl("subInfoExport/exportExcelTz"),"POST", param,"项目详情信息表.xlsx", "导出失败");
  1085. }, */
  1086. exportMoreExcel: function () {
  1087. top.window.getSearchParams = this.getSearchParams;
  1088. App.openLayer({
  1089. title: "自定义导出",
  1090. content: App.getUrl("/subInfoExport/index"),
  1091. height: "800",
  1092. width: "1000"
  1093. })
  1094. },
  1095. toQcc: function (obj) {
  1096. window.open('https://www.qcc.com/web/search?key=' + obj.data.unitName, '_blank')
  1097. },
  1098. toManagerUnit: function (obj) {
  1099. //详情
  1100. var index = layer.open({
  1101. type: 2,
  1102. title: '',
  1103. area: ['1000px', '800px'],
  1104. // /subject/subInfo/editSubInfo
  1105. content: App.getUrl("/subject/subInfo/manageUnit?subId=" + obj.data.id + "&queryType=3"),
  1106. });
  1107. layui.layer.full(index);
  1108. },
  1109. toDetail: function (obj) {
  1110. //详情
  1111. var index = layer.open({
  1112. type: 2,
  1113. title: '',
  1114. area: ['1000px', '800px'],
  1115. content: App.getUrl("/subject/subInfo/detailView2?layer=true&subId=" + obj.data.id + "&lastUrl=" + window.location.href),
  1116. });
  1117. layui.layer.full(index);
  1118. },
  1119. /* toDetail: function (obj) {
  1120. //详情
  1121. var index = layer.open({
  1122. type: 2,
  1123. title: '',
  1124. area: ['1000px', '800px'],
  1125. content: App.getUrl("/subject/subInfo/detailView?layer=true&subId=" + obj.data.id + "&lastUrl=" + window.location.href),
  1126. });
  1127. layui.layer.full(index);
  1128. },*/
  1129. levelList: function (field, title, val) {
  1130. //详情
  1131. var param = field + "," + title + "," + val
  1132. var params = encodeURIComponent(JSON.stringify(this.getSearchParams()));
  1133. var index = top.layer.open({
  1134. type: 2,
  1135. title: '',
  1136. area: ['90%', '90%'],
  1137. content: App.getUrl("/subject/subInfo/levelList?layer=true&type=" + this.getSearchParams().queryType + "&curParam=" + param + "&params=" + params),
  1138. });
  1139. //top.layer.full(index);
  1140. },
  1141. print: function (obj) {
  1142. window.open(App.getUrl("/subject/apply/downPdf?subId=" + obj.data.id));
  1143. },
  1144. toEditSubInfo: function (obj) {
  1145. window.location.href = App.getUrl("/subject/subInfo/editSubInfo2?subId=" + obj.data.id + "&queryType=3");
  1146. },
  1147. preNew: function (obj) {
  1148. window.location.href = App.getUrl("/subPreNew/todo?subId=" + obj.data.id);
  1149. },
  1150. toTh: function (obj) {
  1151. if (obj.data.statusJh == null || obj.data.statusJh == '0' || obj.data.statusJh == '1') {
  1152. App.msg.confirm("是否需要退回到暂存状态?", function () {
  1153. App.postJson("/api/subject/subInfo/toTemp", {subId: obj.data.id, status: "0"}, function (res) {
  1154. if (res.success) {
  1155. layer.msg("成功", {icon: 6, time: 1000});
  1156. //
  1157. window.location.href = App.getUrl("subject/subInfo/projTz");
  1158. }
  1159. });
  1160. })
  1161. } else {
  1162. App.msg.warn("已做过开工申报,需要走变更流程");
  1163. }
  1164. },
  1165. search: function () {
  1166. var param = layui.form.getValue("searchForm");
  1167. window.localStorage.setItem(this.cacheName, JSON.stringify(param));
  1168. this.pageNo = 1;
  1169. this.getData();
  1170. },
  1171. openExport: function () {
  1172. this.showExport = true;
  1173. console.log('移入了')
  1174. },
  1175. choseExport: function () {
  1176. this.showExport = false;
  1177. console.log('移出了')
  1178. },
  1179. receiveMessage (e) {
  1180. console.log('cb receiveMessage: ', e.data)
  1181. if (e.data.topBreadcrumb) {
  1182. $(".top-breadcrumb").html(e.data.topBreadcrumb)
  1183. }
  1184. }
  1185. }
  1186. });
  1187. </script>
  1188. </body>
  1189. </html>