viewBusinessOpportunity.jsp 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <!-- by qianqw 20150317 -->
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9. <!-- end -->
  10. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  11. <title>查看商机信息</title>
  12. <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css" />
  13. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  14. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  15. <script type="text/javascript" src="/shares/js/constant.js"></script>
  16. <script type="text/javascript" src="/shares/js/common.js"></script>
  17. <script type="text/javascript" src="/shares/js/file.js"></script>
  18. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  19. <script type="text/javascript" src="/shares/datePicker/WdatePicker.js"></script>
  20. <script src="${pageContext.request.contextPath}/liger/lib/json2.js" type="text/javascript"></script>
  21. <script type="text/javascript" src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"></script>
  22. <script type="text/javascript">
  23. var commentGrid = null;
  24. var supportGrid = null;
  25. var checkValue = new Array(); //定义一个数组
  26. var i = 0;
  27. var curTab = 1;
  28. $(function (){
  29. var universalid = $("#oppo\\.universalid").val();
  30. if('' != "" && typeof ('') != "undefined"){
  31. checkValue = ''.split(",");
  32. }
  33. orderTab=$("#commentTab").ligerTab({ onAfterSelectTabItem: function (tabid){
  34. if(tabid == "tabitem1"){
  35. curTab = 1;
  36. searchComment(universalid);
  37. }else if(tabid == "tabitem2"){
  38. curTab = 2;
  39. searchSupport(universalid);
  40. }
  41. }});
  42. searchComment(universalid);
  43. });
  44. /**
  45. * 查询评论信息
  46. */
  47. function searchComment(universalid){
  48. var columns = [
  49. {
  50. display : '用户',
  51. name : 'name',
  52. width : 100
  53. }, {
  54. display : '评论内容',
  55. name : 'content',
  56. width : 300
  57. }, {
  58. display : '评论时间',
  59. name : 'create_date',
  60. width : 150
  61. }
  62. ];
  63. commentGrid = $("#commentGrid")
  64. .ligerGrid(
  65. {
  66. columns : columns,
  67. checkbox : true,
  68. pageSize : 20,
  69. url : 'opBusinessOpportunityAction.do?task=commentList&time=' + new Date().getTime()+'&universalid=' + universalid,
  70. pageParmName : 'p', //页索引参数名,(提交给服务器)
  71. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  72. width : '99.9%',
  73. height : 260
  74. });
  75. $("#pageloading").hide();
  76. //$(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
  77. }
  78. /**
  79. * 查询赞信息
  80. */
  81. function searchSupport(universalid){
  82. var columns = [
  83. {
  84. display : '点赞用户',
  85. name : 'name',
  86. width : 100
  87. }, {
  88. display : '点赞时间',
  89. name : 'create_date',
  90. width : 150
  91. }
  92. ];
  93. supportGrid = $("#supportGrid")
  94. .ligerGrid(
  95. {
  96. columns : columns,
  97. rownumbers : true,
  98. pageSize : 20,
  99. url : 'opBusinessOpportunityAction.do?task=supportList&time=' + new Date().getTime() + '&universalid=' + universalid,
  100. pageParmName : 'p', //页索引参数名,(提交给服务器)
  101. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  102. width : '99.9%',
  103. height : 260
  104. });
  105. $("#pageloading").hide();
  106. $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
  107. }
  108. function delComment(record_id){
  109. var rows = commentGrid.getCheckedRows();
  110. var ids = "";
  111. if(rows.length>0){
  112. for(var i=0;i<rows.length;i++){
  113. var universalid = rows[i].universalid;
  114. if(""!=ids){
  115. ids+=","+universalid;
  116. }else{
  117. ids+=universalid;
  118. }
  119. }
  120. $.ligerDialog.confirm('确定要删除评论吗?', function (yes)
  121. {
  122. if(yes){
  123. $.ajax({
  124. type:"POST",
  125. url:"opBusinessOpportunityAction.do?task=delComment",
  126. data : {"ids":ids},
  127. timeout:10000,
  128. cache:false,
  129. dataType:"json",
  130. success:function(data){
  131. var success = data.success;
  132. if(success){
  133. $.ligerDialog.success(success);
  134. searchComment(record_id);
  135. }else{
  136. showAjaxError(null, data.error);
  137. }
  138. },
  139. error:showAjaxError
  140. });
  141. }
  142. });
  143. }else{
  144. $.ligerDialog.warn('请选择需要删除的评论!');
  145. }
  146. }
  147. </script>
  148. <style type="text/css">
  149. .file-style{
  150. width: 550px;
  151. }
  152. .file-style input[type='file'] {
  153. width:300px ;
  154. height:24px;
  155. line-height:22px;
  156. vertical-align: bottom;
  157. background-color: #fff;
  158. border: 1px solid #cccccc;
  159. margin-top: 2px;
  160. margin-bottom: 2px;
  161. }
  162. .forum-container .l-table-title-td{
  163. font-size:30px;
  164. text-align:center;
  165. line-height:20px;
  166. }
  167. .forum-container .l-table-annotation-td{
  168. font-size:15px;
  169. text-align:center;
  170. line-height:20px;
  171. }
  172. </style>
  173. </head>
  174. <body>
  175. <form id="opBoForm" action="opBusinessOpportunityAction.do" method="post">
  176. <div class="container">
  177. <div class="forum-container">
  178. <table class="l-table-edit line">
  179. <tr >
  180. <td class="l-table-title-td">
  181. ${oppo.bo_title }
  182. </td>
  183. </tr>
  184. <tr>
  185. <td class="l-table-annotation-td" >发布人:${oppo.create_user_name }&nbsp;&nbsp;&nbsp;&nbsp;发布时间:${oppo.create_time_str }&nbsp;&nbsp;&nbsp;&nbsp;阅读:${oppo.read_count }</td>
  186. </tr>
  187. <tr>
  188. <td class="l-table-edit-td" >
  189. ${oppo.bo_content }
  190. </td>
  191. </tr>
  192. <tr>
  193. <td class="l-table-edit-td">
  194. 相关文件:
  195. <jsp:include page="/include/file.jsp">
  196. <jsp:param name="fieldName" value="bo_accessory" />
  197. <jsp:param name="folder" value="one_platform/businessOppo" />
  198. <jsp:param name="size" value="${bo_accessory_size }" />
  199. <jsp:param name="isView " value="1" />
  200. <jsp:param name="isDelFile" value="0" />
  201. <jsp:param name="definedCss" value="file-style" />
  202. <jsp:param name="documentId" value="${oppo.bo_accessory }" />
  203. </jsp:include>
  204. <input id="oppo.bo_accessory" name="oppo.bo_accessory" type="hidden" value="${oppo.bo_accessory }"/>
  205. </td>
  206. </tr>
  207. </table>
  208. </div>
  209. <input type="hidden" id="tabid" name="tabid" value="${param.tabid }">
  210. <input type="hidden" id="task" name="task" value="editBusinessOpportunity">
  211. <input type="hidden" id="isNeedCheck" name="isNeedCheck" value="${isNeedCheck }"/>
  212. <%-- <input id="oppo.au_state" name="oppo.au_state" type="hidden" value="${oppo.au_state }"/>
  213. <input id="oppo.state" name="oppo.state" type="hidden" value="${oppo.state }"/> --%>
  214. <input id="oppo.universalid" name="oppo.universalid" type="hidden" value="${oppo.universalid }"/>
  215. </div>
  216. <div style="clear:both;"></div>
  217. <div id="searchbar" class="tab2 l-tab">
  218. <div style="overflow: hidden; clear: both;">
  219. <div id="commentTab" >
  220. <div title="评论(${comCount })" id="myGatheringTab" style="overflow: hidden;">
  221. <input type="button" id="delComBtn" name="delComBtn" value="删除评论" onclick="delComment('${oppo.universalid }');" style="margin-left: 10px;margin-top: 2px;margin-bottom: 2px;"/>
  222. <div id="commentGrid" style="margin: 0; padding: 0"></div>
  223. </div>
  224. <div title="赞(${supportCount })" id="myReturnTab" style="overflow: hidden;">
  225. <div id="supportGrid" style="margin: 0; padding: 0"></div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </form>
  231. <%@include file="/include/message.jsp"%>
  232. </body>
  233. </html>