distribute.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>详情</title>
  7. <style>
  8. .line {
  9. display: block;
  10. text-align: left;
  11. background-color: #fff;
  12. color: #333;
  13. border-bottom: 1px solid #0a6999;
  14. border-color: #fff;
  15. border-bottom: 1px solid #0a6999;
  16. margin-top: 10px;
  17. vertical-align: middle;
  18. padding: 4px 12px;
  19. height: 31px;
  20. line-height: 31px;
  21. font-size: 14px;
  22. font-weight: bold;
  23. }
  24. </style>
  25. </head>
  26. <body layout:fragment="content">
  27. <article class="page-container">
  28. <form class="form form-horizontal">
  29. <div class="line">基本信息 <span style="float:right">项目来源:[[${data?.resource}]]</span></div>
  30. <div class="row cl">
  31. <label class="form-label col-xs-4 col-sm-2">项目标题:</label>
  32. <div class="formControls col-xs-4 col-sm-2">
  33. <p>[[${data?.title}]]</p>
  34. </div>
  35. <label class="form-label col-xs-2 col-sm-2">项目阶段:</label>
  36. <div class="formControls col-xs-4 col-sm-2">
  37. <p>[[${data?.process_stage_desc}]]</p>
  38. </div>
  39. </div>
  40. <div class="row cl">
  41. <label class="form-label col-xs-4 col-sm-2">项目用地:</label>
  42. <div class="formControls col-xs-8 col-sm-2">
  43. <p>[[${data?.location}]]</p>
  44. </div>
  45. <label class="form-label col-xs-2 col-sm-2">项目状态:</label>
  46. <div class="formControls col-xs-4 col-sm-2">
  47. <p>[[${data?.approve_status_desc}]]</p>
  48. </div>
  49. </div>
  50. <div class="row cl">
  51. <label class="form-label col-xs-4 col-sm-2"><span>项目介绍:</span></label>
  52. <div class="formControls col-xs-8 col-sm-9">
  53. <div th:utext="${data.content}">
  54. </div>
  55. </div>
  56. </div>
  57. <div class="row cl">
  58. <label class="form-label col-xs-4 col-sm-2"><span>附件:</span></label>
  59. <div class="formControls col-xs-8 col-sm-9">
  60. <!-- <div class="uploader-list">-->
  61. <!-- <th:block th:unless="${data.fileDown==null || data.fileDown.file_url== null}">-->
  62. <!-- <a style="color: #0c80fe;" th:href="${fileUrl} + ${data.fileDown.file_url}" target="_blank">[[${data.fileDown.file_name}]]</a>-->
  63. <!-- </th:block>-->
  64. <!-- </div>-->
  65. <div class="uploader-list">
  66. <th:block th:unless="${data.fileList==null}"
  67. th:each="item,itemStat: ${data.fileList}">
  68. <p><a style="color: #0c80fe;" th:href="${fileUrl} + ${item.file_url}" target="_blank">[[${item.file_name}]]</a>
  69. </p>
  70. </th:block>
  71. </div>
  72. </div>
  73. </div>
  74. <div class="line">项目信息补充</div>
  75. <div class="row cl">
  76. <label class="form-label col-xs-4 col-sm-2"><span>补充信息:</span></label>
  77. <div class="formControls col-xs-8 col-sm-9">
  78. <div th:utext="${data.supplement}">
  79. </div>
  80. </div>
  81. </div>
  82. <div class="row cl">
  83. <label class="form-label col-xs-4 col-sm-2"><span>补充附件:</span></label>
  84. <div class="formControls col-xs-8 col-sm-9">
  85. <div class="uploader-list">
  86. <th:block th:unless="${data.supplement_file==null || data.supplement_file.file_url== null}">
  87. <a style="color: #0c80fe;" th:href="${fileUrl} + ${data.supplement_file.file_url}"
  88. target="_blank">[[${data.supplement_file.file_name}]]</a>
  89. </th:block>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="line">咨询问题</div>
  94. <div class="row cl">
  95. <label class="form-label col-xs-4 col-sm-2"></label>
  96. <div class="formControls col-xs-8 col-sm-9">
  97. <table class="table table-border table-bordered table-bg table-hover processTb">
  98. <thead>
  99. <tr class="text-c">
  100. <th>咨询部门</th>
  101. <th>咨询问题</th>
  102. <th>反馈内容</th>
  103. <th>反馈文件</th>
  104. <th>剩余答复时间</th>
  105. <th>答复时间</th>
  106. <th>咨询时间</th>
  107. </tr>
  108. </thead>
  109. <tbody>
  110. <tr class="text-c" th:each="item : ${data.consultationList}">
  111. <td th:text="${item.department_name}"></td>
  112. <td th:text="${item.consultation}" class="viewComment" th:data="*{item.consultation}"></td>
  113. <td th:text="${item.feedback}" class="viewComment" th:data="*{item.feedback}"></td>
  114. <td>
  115. <th:block th:unless="${item.fileDown==null || item.fileDown.file_url== null}">
  116. <a style="color: #0c80fe;" th:href="${fileUrl} + ${item.fileDown.file_url}"
  117. target="_blank">[[${item.fileDown.file_name}]]</a>
  118. </th:block>
  119. </td>
  120. <td th:text="${item.remain_time}"></td>
  121. <td th:text="${item.feedback_time}"></td>
  122. <td th:text="${item.consultation_time}"></td>
  123. </tr>
  124. </tbody>
  125. </table>
  126. </div>
  127. </div>
  128. <div class="line">咨询汇总</div>
  129. <div class="row cl">
  130. <label class="form-label col-xs-4 col-sm-2"><span>汇总意见:</span></label>
  131. <div class="formControls col-xs-8 col-sm-9">
  132. <div th:utext="${data.consultation_summary}">
  133. </div>
  134. </div>
  135. </div>
  136. <div class="row cl">
  137. <label class="form-label col-xs-4 col-sm-2"><span>附件:</span></label>
  138. <div class="formControls col-xs-8 col-sm-9">
  139. <div class="uploader-list">
  140. <th:block
  141. th:unless="${data.consultation_summary_file==null || data.consultation_summary_file.file_url== null}">
  142. <a style="color: #0c80fe;" th:href="${fileUrl} + ${data.consultation_summary_file.file_url}"
  143. target="_blank">[[${data.consultation_summary_file.file_name}]]</a>
  144. </th:block>
  145. </div>
  146. </div>
  147. </div>
  148. <!--<div class="line">会签</div>
  149. <div class="row cl">
  150. <label class="form-label col-xs-4 col-sm-2"><span>会签说明:</span></label>
  151. <div class="formControls col-xs-8 col-sm-9">
  152. <div th:utext="${data.countersign_comment}">
  153. </div>
  154. </div>
  155. </div>
  156. <div class="row cl">
  157. <label class="form-label col-xs-4 col-sm-2"><span>文件:</span></label>
  158. <div class="formControls col-xs-8 col-sm-9">
  159. <div class="uploader-list">
  160. <th:block
  161. th:unless="${data.countersign_file==null || data.countersign_file.file_url== null}">
  162. <a style="color: #0c80fe;" th:href="${fileUrl} + ${data.countersign_file.file_url}"
  163. target="_blank">[[${data.countersign_file.file_name}]]</a>
  164. </th:block>
  165. </div>
  166. </div>
  167. </div>-->
  168. <div class="line">预审审批</div>
  169. <div class="row cl">
  170. <label class="form-label col-xs-4 col-sm-2"></label>
  171. <div class="formControls col-xs-8 col-sm-9">
  172. <table class="table table-border table-bordered table-bg table-hover processTb">
  173. <thead>
  174. <tr class="text-c">
  175. <th>审批角色</th>
  176. <th>审批结果</th>
  177. <th>审批意见</th>
  178. <th>文件</th>
  179. </tr>
  180. </thead>
  181. <tbody>
  182. <!-- <tr class="text-c">-->
  183. <!-- <td>商务局分管领导</td>-->
  184. <!-- <td th:text="${data.commerce_leader_pre_approve_operate}" class="viewComment"-->
  185. <!-- th:data="*{data.commerce_leader_pre_approve_operate}"></td>-->
  186. <!-- <td th:text="${data.commerce_leader_pre_approve_comment}" class="viewComment"-->
  187. <!-- th:data="*{data.commerce_leader_pre_approve_comment}"></td>-->
  188. <!-- <td>-->
  189. <!-- <th:block-->
  190. <!-- th:unless="${data.commerce_leader_pre_approve_file==null || data.commerce_leader_pre_approve_file.file_url== null}">-->
  191. <!-- <a style="color: #0c80fe;"-->
  192. <!-- th:href="${fileUrl} + ${data.commerce_leader_pre_approve_file.file_url}"-->
  193. <!-- target="_blank">[[${data.commerce_leader_pre_approve_file.file_name}]]</a>-->
  194. <!-- </th:block>-->
  195. <!-- </td>-->
  196. <!-- </tr>-->
  197. <tr class="text-c">
  198. <td>产业项目供地推进协调工作领导小组</td>
  199. <td th:text="${data.committee_leader_pre_approve_operate}" class="viewComment"
  200. th:data="*{data.committee_leader_pre_approve_operate}"></td>
  201. <td th:text="${data.committee_leader_pre_approve_comment}" class="viewComment"
  202. th:data="*{data.committee_leader_pre_approve_comment}"></td>
  203. <td>
  204. <th:block
  205. th:unless="${data.committee_leader_pre_approve_file==null || data.committee_leader_pre_approve_file.file_url== null}">
  206. <a style="color: #0c80fe;"
  207. th:href="${fileUrl} + ${data.committee_leader_pre_approve_file.file_url}"
  208. target="_blank">[[${data.committee_leader_pre_approve_file.file_name}]]</a>
  209. </th:block>
  210. </td>
  211. </tr>
  212. </tbody>
  213. </table>
  214. </div>
  215. </div>
  216. </form>
  217. <form class="form form-horizontal" id="form-add">
  218. <input id="id" name="id" type="hidden" th:value="${data.id}"/>
  219. <div class="line">分发文件</div>
  220. <div class="row cl" th:id=" 'department0'">
  221. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span><span>部门提报资料说明:</span></label>
  222. <!-- <div class="formControls col-xs-8 col-sm-9">-->
  223. <!-- <div class="uploader-thum-container">-->
  224. <!-- <input class="uploadFileName btn btn-upload radius" name="uploadFileName" readonly="readonly"-->
  225. <!-- type="text" value="上传文件"-->
  226. <!-- th:onclick="'javascript:addFileByName(\'/land_supply/addApplyFile'+'\',this);'"/>-->
  227. <!-- <input class="uploadFileId" type="hidden"-->
  228. <!-- th:name="'distributionList[20].distribution_file.file_id'"/>-->
  229. <!-- <input class="departmentId" type="hidden" value="0"-->
  230. <!-- th:name="'distributionList[20].department_id'"/>-->
  231. <!-- <a style="color: #0c80fe;" th:onclick="'javascript:deleteFile(this)'">删除</a>-->
  232. <!-- </div>-->
  233. <!-- </div>-->
  234. <div class="formControls col-xs-8 col-sm-9">
  235. <textarea id="description_of_submitted" name="description_of_submitted" required>[[${data.description_of_submitted}]]</textarea>
  236. </div>
  237. <label class="form-label col-xs-4 col-sm-2"></label>
  238. <div class="formControls col-xs-8 col-sm-9" style="margin-top: 40px;">
  239. <div><i class="Hui-iconfont" style="cursor: pointer;"
  240. th:onclick="'javascript:addFileLineS(\'department0\')'">&#xe600; 添加</i></div>
  241. <table class="table table-border table-bordered table-bg table-hover ">
  242. <thead>
  243. <tr class="text-c">
  244. <th>文件</th>
  245. <th>操作</th>
  246. </tr>
  247. </thead>
  248. <tbody class="add_file_line" th:id="'tbody_department0'">
  249. <!-- <tr class="text-c"-->
  250. <!-- th:each="landSupplyCons,landSupplyConsStat: ${industrialLandSupplyConsultationList}"-->
  251. <!-- th:if="*{item.id+''==landSupplyCons.department_id}">-->
  252. <tr class="text-c">
  253. <td class="td_material">
  254. <div>
  255. <input class="uploadFileName btn btn-upload radius" name="uploadFileName"
  256. readonly="readonly"
  257. type="text" value="上传文件"
  258. th:onclick="'javascript:addFileByName(\'/land_supply/addApplyFile\',this);'"/>
  259. <input class="uploadFileId distribution" type="hidden"
  260. th:name="'distributionList[99].distribution_file.file_id'"/>
  261. <input class="department_id" type="hidden" value="0"
  262. th:name="'distributionList[99].department_id'"/>
  263. </div>
  264. </td>
  265. <td class="icon_font"><i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1; 删除</i>
  266. </td>
  267. </tr>
  268. </tbody>
  269. </table>
  270. </div>
  271. </div>
  272. <!--注释了 现在只把department=0的这个公共文件给所有部门看-->
  273. <th:block th:each="item,itemStat : ${distDepartmentList}">
  274. <div hidden class="row cl" th:id="'department'+${item.id}">
  275. <label class="form-label col-xs-4 col-sm-2"><span>[[${item.name}]]可见:</span></label>
  276. <div class="formControls col-xs-8 col-sm-9">
  277. <!-- <div class="uploader-thum-container">-->
  278. <!-- <input class="uploadFileName btn btn-upload radius" name="uploadFileName" readonly="readonly"-->
  279. <!-- type="text" value="上传文件"-->
  280. <!-- th:onclick="'javascript:addFileByName(\'/land_supply/addApplyFile'+'\',this);'"/>-->
  281. <!-- <input class="uploadFileId" type="hidden"-->
  282. <!-- th:name="'distributionList['+${itemStat.index}+'].distribution_file.file_id'"/>-->
  283. <!-- <input class="departmentId" type="hidden" th:value="${item.id}"-->
  284. <!-- th:name="'distributionList['+${itemStat.index}+'].department_id'"/>-->
  285. <!-- <a style="color: #0c80fe;" th:onclick="'javascript:deleteFile(this)'">删除</a>-->
  286. <!-- </div>-->
  287. <div><i class="Hui-iconfont" style="cursor: pointer;"
  288. th:onclick="'javascript:addFileLine(\''+'department'+${item.id}+'\')'">&#xe600; 添加</i></div>
  289. <table class="table table-border table-bordered table-bg table-hover ">
  290. <thead>
  291. <tr class="text-c">
  292. <th>文件</th>
  293. <th>操作</th>
  294. </tr>
  295. </thead>
  296. <tbody class="add_file_line" th:id="'tbody_department'+${item.id}">
  297. <!-- <tr class="text-c"-->
  298. <!-- th:each="landSupplyCons,landSupplyConsStat: ${industrialLandSupplyConsultationList}"-->
  299. <!-- th:if="*{item.id+''==landSupplyCons.department_id}">-->
  300. <tr class="text-c">
  301. <td class="td_material">
  302. <div>
  303. <input class="uploadFileName btn btn-upload radius" name="uploadFileName"
  304. readonly="readonly"
  305. type="text" value="上传文件"
  306. th:onclick="'javascript:addFileByName(\'/land_supply/addApplyFile\',this);'"/>
  307. <input class="uploadFileId distribution" type="hidden"
  308. th:name="'distributionList[10'+${itemStat.index}+'].distribution_file.file_id'"/>
  309. <input class="department_id" type="hidden" th:value="${item.id}"
  310. th:name="'distributionList[10'+${itemStat.index}+'].department_id'"/>
  311. </div>
  312. </td>
  313. <td class="icon_font"><i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1; 删除</i>
  314. </td>
  315. </tr>
  316. </tbody>
  317. </table>
  318. </div>
  319. </div>
  320. </th:block>
  321. <div class="row cl text-c" style="background-color: white">
  322. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  323. <a onclick="save()" class="btn btn-secondary radius"><i class="Hui-iconfont">&#xe632;</i>提交</a>
  324. <a onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;返回&nbsp;&nbsp;</a>
  325. </div>
  326. </div>
  327. </form>
  328. </article>
  329. <script type="text/javascript" th:src="@{/h-ui/lib/webuploader/0.1.5/webuploader.min.js}"></script>
  330. <script th:inline="javascript">
  331. //富文本kindeditor初始化
  332. var editor;
  333. KindEditor.ready(function (K) {
  334. editor = K.create('#description_of_submitted', {
  335. uploadJson: pagePath + '/upload/kindEditorUpload',
  336. cssData: 'body {font-family: "微软雅黑"; font-size: 14px}',
  337. allowFileManager: false,
  338. allowUpload: true,
  339. width: "100%",
  340. height: "350px",
  341. items: array,
  342. syncType: "auto",
  343. filterMode: false,
  344. afterBlur: function () {
  345. this.sync();
  346. }
  347. });
  348. });
  349. function save() {
  350. if (editor.isEmpty()) {
  351. errorMessage('请填写部门提报资料说明');
  352. return false;
  353. }
  354. $("#form-add").ajaxSubmit({
  355. type: 'post',
  356. url: pagePath + "/land_supply/distribute",
  357. dataType: "json",
  358. data: {
  359. "description_of_submitted_text": editor.text()
  360. },
  361. success: function (data) {
  362. if (data.success) {
  363. succeedMessage(data.message);
  364. setTimeClose();
  365. } else {
  366. // $(form).find(":submit").attr("disabled", false);
  367. errorMessage(data.message);
  368. }
  369. },
  370. error: function () {
  371. errorMessage('系统错误!');
  372. }
  373. });
  374. }
  375. //添加相应name的文件
  376. function addFileByName(url, obj) {
  377. var name = $(obj).next().attr("name");
  378. url += "?fileIdName=" + name;
  379. layer_show('添加文件', pagePath + url, 800, 350);
  380. }
  381. function deleteFile(item) {
  382. $(item).parent().find(".uploadFileName").val("上传文件")
  383. $(item).parent().find(".uploadFileId").val(null)
  384. // console.log($(item).parent().find(".uploadFileName").val("上传文件"))
  385. // console.log($(item).parent().find(".uploadFileId").val(null))
  386. // console.log($(item).parent().find(".departmentId"))
  387. }
  388. $(function () {
  389. //查看完整意见
  390. $(".viewComment").on("click", function () {
  391. layer.alert(
  392. $(this).attr('data'),
  393. {area: ['800px', '500px']}
  394. )
  395. });
  396. });
  397. /**
  398. * 取消
  399. */
  400. function removeIframe() {
  401. var index = parent.layer.getFrameIndex(window.name);
  402. parent.layer.close(index);
  403. }
  404. var distDepartmentList = [[${distDepartmentList}]];
  405. var index = distDepartmentList.length;
  406. function addFileLine(divId) {
  407. var length = index;
  408. if ($("#" + divId).find('.add_file_line>tr').length > 0) {
  409. var html = "<i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1; 删除</i>";
  410. $("#" + divId).find(".add_file_line tr:eq(0)").clone().insertAfter($("#" + divId).find('.add_file_line>tr').eq(-1))
  411. .find(".distribution").removeAttr("name").attr("name", "distributionList[" + length + "].distribution_file.file_id").val("").end()
  412. .find(".department_id").removeAttr("name").attr("name", "distributionList[" + length + "].department_id").end()
  413. .find(".uploadFileName").val("上传文件").end()
  414. .find(".icon_font").html(html).end();
  415. } else {
  416. var str = "";
  417. str += "<tr class='text-c'>"
  418. str += "<td class='td_material'>"
  419. str += "<div>"
  420. str += "<input class='uploadFileName btn btn-upload radius' name='uploadFileName' readonly='readonly' type='text' value='上传文件' onclick=\"addFileByName('/land_supply/addApplyFile',this);\"/>"
  421. str += "<input class='uploadFileId distribution' hidden name='distributionList[" + length + "].distribution_file.file_id'/>"
  422. str += "<input class='department_id' hidden value='" + divId.split("department")[1] + "' name='distributionList[" + length + "].department_id' />"
  423. str += "</div>"
  424. str += "</td>"
  425. str += "<td class='icon_font'><i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1; 删除</i>"
  426. str += "</td>"
  427. str += "</tr>"
  428. $("#tbody_" + divId).html(str);
  429. }
  430. $('#layui-layer2').height(48);
  431. index++;
  432. }
  433. function addFileLineS(divId) {
  434. var length = index;
  435. if ($("#" + divId).find('.add_file_line>tr').length > 0) {
  436. var html = "<i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1; 删除</i>";
  437. $("#" + divId).find(".add_file_line tr:eq(0)").clone().insertAfter($("#" + divId).find('.add_file_line>tr').eq(-1))
  438. .find(".distribution").removeAttr("name").attr("name", "distributionList[" + length + "].distribution_file.file_id").val("").end()
  439. .find(".department_id").removeAttr("name").attr("name", "distributionList[" + length + "].department_id").end()
  440. .find(".uploadFileName").val("上传文件").end()
  441. .find(".icon_font").html(html).end();
  442. } else {
  443. var str = "";
  444. str += "<tr class='text-c'>"
  445. str += "<td class='td_material'>"
  446. str += "<div>"
  447. str += "<input class='uploadFileName btn btn-upload radius' name='uploadFileName' readonly='readonly' type='text' value='上传文件' onclick=\"addFileByName('/land_supply/addApplyFile',this);\"/>"
  448. str += "<input class='uploadFileId distribution' hidden name='distributionList[" + length + "].distribution_file.file_id'/>"
  449. str += "<input class='department_id' hidden value='0' name='distributionList[" + length + "].department_id' />"
  450. str += "</div>"
  451. str += "</td>"
  452. str += "<td class='icon_font'><i class='Hui-iconfont' onclick='removeLine(this)'>&#xe6a1; 删除</i>"
  453. str += "</td>"
  454. str += "</tr>"
  455. $("#tbody_" + divId).html(str);
  456. }
  457. $('#layui-layer2').height(48);
  458. index++;
  459. }
  460. function removeLine(obj) {
  461. $(obj).parent().parent().remove();
  462. }
  463. </script>
  464. </body>
  465. </html>