feedback.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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 id="fileListPre" class="uploader-list">-->
  61. <!-- <th:block th:unless="${data.fileDown==null || data.fileDown.file_url== null}">-->
  62. <!-- <a th:href="${fileUrl} + ${data.fileDown.file_url}"-->
  63. <!-- target="_blank">[[${data.fileDown.file_name}]]</a>-->
  64. <!-- </th:block>-->
  65. <!-- </div>-->
  66. <div class="uploader-list">
  67. <th:block th:unless="${data.fileList==null}"
  68. th:each="item,itemStat: ${data.fileList}">
  69. <p><a style="color: #0c80fe;" th:href="${fileUrl} + ${item.file_url}" target="_blank">[[${item.file_name}]]</a>
  70. </p>
  71. </th:block>
  72. </div>
  73. </div>
  74. </div>
  75. <div class="line">项目信息补充</div>
  76. <div class="row cl">
  77. <label class="form-label col-xs-4 col-sm-2"><span>补充信息:</span></label>
  78. <div class="formControls col-xs-8 col-sm-9">
  79. <div th:utext="${data.supplement}">
  80. </div>
  81. </div>
  82. </div>
  83. <div class="row cl">
  84. <label class="form-label col-xs-4 col-sm-2"><span>补充附件:</span></label>
  85. <div class="formControls col-xs-8 col-sm-9">
  86. <div class="uploader-list">
  87. <th:block th:unless="${data.supplement_file==null || data.supplement_file.file_url== null}">
  88. <a style="color: #0c80fe;" th:href="${fileUrl} + ${data.supplement_file.file_url}"
  89. target="_blank">[[${data.supplement_file.file_name}]]</a>
  90. </th:block>
  91. </div>
  92. </div>
  93. </div>
  94. </form>
  95. <form class="form form-horizontal" id="form-add">
  96. <div class="line">咨询问题</div>
  97. <th:block th:each="item : ${data.consultationList}">
  98. <input hidden th:name="'consultationList['+${itemStat.index}+'].id'" th:value="${item.id}"/>
  99. <div class="row cl">
  100. <label class="form-label col-xs-4 col-sm-2">问题:</label>
  101. <div class="formControls col-xs-8 col-sm-9">
  102. <p>[[${item.consultation}]]</p>
  103. </div>
  104. </div>
  105. <th:block th:if="${item.isDefault}">
  106. <th:block th:if="${item.feedback_time != null}">
  107. <div class="row cl">
  108. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>是否同意:</label>
  109. <div class="formControls col-xs-8 col-sm-9">
  110. <input class="radio" type="radio" th:name="'consultationList['+${itemStat.index}+'].isAgree'" th:checked="${item.isAgree}" value="true" disabled>同意</input>
  111. <input class="radio" type="radio" th:name="'consultationList['+${itemStat.index}+'].isAgree'" th:checked="${!item.isAgree}" value="false" disabled>不同意</input>
  112. </div>
  113. </div>
  114. </th:block>
  115. <th:block th:if="${item.feedback_time == null}">
  116. <div class="row cl">
  117. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>是否同意:</label>
  118. <div class="formControls col-xs-8 col-sm-9">
  119. <input class="radio" type="radio" th:name="'consultationList['+${itemStat.index}+'].isAgree'" th:checked="${item.isAgree}" value="true">同意</input>
  120. <input class="radio" type="radio" th:name="'consultationList['+${itemStat.index}+'].isAgree'" th:checked="${!item.isAgree}" value="false">不同意</input>
  121. </div>
  122. </div>
  123. </th:block>
  124. </th:block>
  125. <div class="row cl">
  126. <label class="form-label col-xs-4 col-sm-2">剩余答复时间:</label>
  127. <div class="formControls col-xs-8 col-sm-9">
  128. <p>[[${item.remain_time}]]</p>
  129. </div>
  130. </div>
  131. <div class="row cl">
  132. <label class="form-label col-xs-4 col-sm-2">反馈内容:</label>
  133. <div class="formControls col-xs-8 col-sm-9">
  134. <th:block th:if="${item.feedback_time != null}">
  135. <textarea th:name="'consultationList['+${itemStat.index}+'].feedback'"
  136. style="width: 800px;height: 200px;font-size: 14px;" readonly>[[${item.feedback}]]</textarea>
  137. </th:block>
  138. <th:block th:if="${item.feedback_time == null}">
  139. <textarea th:name="'consultationList['+${itemStat.index}+'].feedback'"
  140. style="width: 800px;height: 200px;font-size: 14px;">[[${item.feedback}]]</textarea>
  141. </th:block>
  142. </div>
  143. </div>
  144. <div class="row cl">
  145. <label class="form-label col-xs-4 col-sm-2"><span>反馈文件:</span></label>
  146. <div class="formControls col-xs-8 col-sm-9">
  147. <div class="uploader-thum-container">
  148. <th:block th:unless="${item.fileDown==null || item.fileDown.file_url== null}">
  149. <p class="filea">
  150. <a style="color: #0c80fe;" th:href=" ${fileUrl} + ${item.fileDown.file_url}"
  151. target="_blank">[[${item.fileDown.file_name}]]</a>
  152. </p>
  153. </th:block>
  154. <th:block th:if="${item.feedback_time == null}">
  155. <input class="uploadFileName btn btn-upload radius" name="uploadFileName" readonly="readonly"
  156. type="text" value="上传文件"
  157. th:onclick="'javascript:addFileByName(\'/land_supply/addApplyFile'+'\',this);'"/>
  158. <input class="uploadFileId" type="hidden"
  159. th:name="'consultationList['+${itemStat.index}+'].fileDown.file_id'"/>
  160. <a style="color: #0c80fe;" th:onclick="'javascript:deleteFile(this)'">删除</a>
  161. </th:block>
  162. </div>
  163. </div>
  164. </div>
  165. <div class="line"></div>
  166. </th:block>
  167. <div class="row cl text-c" style="background-color: white">
  168. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  169. <a onclick="save()" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe632;</i>提交 </a>
  170. <a onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;返回&nbsp;&nbsp;</a>
  171. </div>
  172. </div>
  173. </form>
  174. </article>
  175. <script type="text/javascript" th:src="@{/h-ui/lib/webuploader/0.1.5/webuploader.min.js}"></script>
  176. <script th:inline="javascript">
  177. $(function () {
  178. // 初始化上传
  179. var options = {
  180. uploadBtnId: '#filePicker',
  181. picturePreId: 'fileListPre',
  182. hiddenPictureUrl: 'img',
  183. hiddenPictureName: 'imgName',
  184. width: 81,
  185. height: 81,
  186. fileSizeLimit: 100 * 1024 * 1024,
  187. fileSingleSizeLimit: 100 * 1024 * 1024
  188. };
  189. var webUploadDoc = new $WebUploadDoc(options);
  190. webUploadDoc.init();
  191. });
  192. function deleteFile(item) {
  193. $(item).parent().find(".uploadFileName").val("上传文件")
  194. $(item).parent().find(".uploadFileId").val(null)
  195. }
  196. function save() {
  197. var index = 0, valiAgree = false;
  198. //判断是否有默认的咨询 以及是否校验选择同意
  199. var consultationList = [[${data.consultationList}]];
  200. for (var i = 0; i < consultationList.length; i++) {
  201. if (consultationList[i].isDefault) {
  202. valiAgree = true;
  203. index = i;
  204. break;
  205. }
  206. }
  207. //是否校验选择同一
  208. if (valiAgree) {
  209. var isAgree = $("input[name='consultationList[" + index + "].isAgree']:checked").val();
  210. if (isAgree == undefined || isAgree == null || isAgree == "") {
  211. errorMessage("请选择是否同意!");
  212. return;
  213. }
  214. }
  215. $("#form-add").ajaxSubmit({
  216. type: 'post',
  217. url: pagePath + "/land_supply/feedback",
  218. dataType: "json",
  219. success: function (data) {
  220. if (data.success) {
  221. succeedMessage(data.message);
  222. setTimeClose();
  223. } else {
  224. // $(form).find(":submit").attr("disabled", false);
  225. errorMessage(data.message);
  226. }
  227. },
  228. error: function () {
  229. errorMessage('系统错误!');
  230. }
  231. });
  232. }
  233. //添加相应name的文件
  234. function addFileByName(url, obj) {
  235. var name = $(obj).next().attr("name");
  236. url += "?fileIdName=" + name;
  237. layer_show('添加文件', pagePath + url, 800, 350);
  238. }
  239. //跳转
  240. function jump_to(title, url, w, h) {
  241. var index = layer_show(title, pagePath + url, w, h);
  242. layer.full(index);
  243. }
  244. /**
  245. * 取消
  246. */
  247. function removeIframe() {
  248. var index = parent.layer.getFrameIndex(window.name);
  249. parent.layer.close(index);
  250. }
  251. </script>
  252. </body>
  253. </html>