adCheckList.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  6. <title>广告审核列表</title>
  7. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  8. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  9. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  10. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
  13. <script type="text/javascript" src="/shares/js/constant.js"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script type="text/javascript" src="/shares/js/file.js"></script>
  16. <script type="text/javascript" src="/shares/datePicker/WdatePicker.js"></script>
  17. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  18. <script type="text/javascript">
  19. var grid = null;
  20. $(function() {
  21. searchByKword();
  22. });
  23. function initTargetGrid(params) {
  24. var columns = [
  25. {
  26. display : '广告图片',
  27. name : 'photo_doc_id',
  28. width : 210,
  29. render : function(row) {
  30. var html = '';
  31. if(null==row.path){
  32. html += '<img src="'+row.path+'" width="200px;" height="150px;" alt="图片不存在"></img>';
  33. }else{
  34. html += '<img src="'+row.path+'" width="200px;" height="150px;" onclick="view_img('+row.photo_doc_id+');"></img>';
  35. }
  36. return html;
  37. }
  38. }, {
  39. display : '广告投放位置',
  40. name : 'position_name',
  41. width : 100,
  42. render : function(row) {
  43. var html = '';
  44. html += '<span style="text-align:center;line-height:150px;">'+row.position_name+'</span>';
  45. return html;
  46. }
  47. }, {
  48. display : '发布范围',
  49. name : 'scope_name',
  50. width : 100,
  51. render : function(row) {
  52. var html = '';
  53. html += '<span style="text-align:center;line-height:150px;">'+row.scope_name+'</span>';
  54. return html;
  55. }
  56. },{
  57. display : '开始日期',
  58. name : 'start_date',
  59. width : 100,
  60. render : function(row) {
  61. var start_date = row.start_date;
  62. if(null!=start_date){
  63. start_date = start_date.substring(0,10);
  64. }else{
  65. start_date="";
  66. }
  67. var html = '';
  68. html += '<span style="text-align:center;line-height:150px;">'+start_date+'</span>';
  69. return html;
  70. }
  71. },{
  72. display : '截止日期',
  73. name : 'end_date',
  74. width : 100,
  75. render : function(row) {
  76. var end_date = row.end_date;
  77. if(null!=end_date){
  78. end_date = end_date.substring(0,10);
  79. }else{
  80. end_date="";
  81. }
  82. var html = '';
  83. html += '<span style="text-align:center;line-height:150px;">'+end_date+'</span>';
  84. return html;
  85. }
  86. },{
  87. display : '发布人',
  88. name : 'create_user_name',
  89. width : 80,
  90. render : function(row) {
  91. var html = '';
  92. html += '<span style="text-align:center;line-height:150px;">'+row.create_user_name+'</span>';
  93. return html;
  94. }
  95. },{
  96. display : '发布时间',
  97. name : 'create_time',
  98. width : 150,
  99. render : function(row) {
  100. var create_time = row.create_time;
  101. /* create_time = create_time.substring(0,10); */
  102. var html = '';
  103. html += '<span style="text-align:center;line-height:150px;">'+create_time+'</span>';
  104. return html;
  105. }
  106. }
  107. ];
  108. columns.push({
  109. display : '审核状态',
  110. name : 'au_state_name',
  111. width : 80,
  112. render : function(row) {
  113. var au_note = row.au_note ;
  114. var au_user_name = row.au_user_name;
  115. var au_time = row.au_time;
  116. if(null==au_user_name){
  117. au_user_name = "";
  118. }
  119. if(null==au_time){
  120. au_time = "";
  121. }
  122. if(null==au_note){
  123. au_note = "";
  124. }
  125. var html = '';
  126. if("0"==row.au_state){
  127. html += ''+'<span style="text-align:center;line-height:150px;">'+row.au_state_name+'</span>';
  128. }else{
  129. html += '<a style="color:blue;line-height:150px;" title="'
  130. +'审核人:'+au_user_name+'&#10;'
  131. +'审核时间:'+au_time+'&#10;'
  132. +'审核意见:'+au_note
  133. +'">'+row.au_state_name+'</a>';
  134. }
  135. return html;
  136. }
  137. });
  138. columns
  139. .push({
  140. display : '操作',
  141. width : 130,
  142. isAllowHide : false,
  143. render : function(row) {
  144. var html = '';
  145. if('0'==row.au_state){
  146. html += '<a style="line-height:150px;" href=\"#\" onclick=\"auditPass('+ row.universalid + ')\"><font color=blue>同意</font></a>&nbsp;';
  147. html += '<a style="line-height:150px;" href=\"#\" onclick=\"auditReject('+ row.universalid + ')\"><font color=blue>不同意</font></a>&nbsp;';
  148. }
  149. return html;
  150. }
  151. });
  152. grid = $("#maingrid4")
  153. .ligerGrid(
  154. {
  155. columns : columns,
  156. pageSize : getPageSize(grid),
  157. url : 'opAdCheckAction.do?task=checkPageList&time=' + new Date().getTime() + params,
  158. pageParmName : 'p', //页索引参数名,(提交给服务器)
  159. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  160. width : '99.9%',
  161. height : '99%',
  162. rowHeight : 150
  163. });
  164. $("#pageloading").hide();
  165. $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
  166. }
  167. function getPageSize(grid){
  168. if(grid){
  169. return grid.get("pageSize");
  170. }else{
  171. return 20;
  172. }
  173. }
  174. //查询
  175. function searchByKword() {
  176. var s = "";
  177. var position_id = $("#position_id").val(); //广告投放位置
  178. if (position_id != "" && typeof (position_id) != "undefined") {
  179. s += "&position_id=" + encodeURI(encodeURI(position_id));
  180. }
  181. var auState = $("#auState").val();//广告审核状态
  182. if (auState != "" && typeof (auState != "undefined")) {
  183. s += "&auState=" + encodeURI(encodeURI(auState));
  184. }
  185. var create_time_start = $("#create_time_start").val();//发布日期开始
  186. if (create_time_start != "" && typeof (create_time_start) != "undefined") {
  187. s += "&create_time_start=" + create_time_start ;
  188. }
  189. var create_time_end = $("#create_time_end").val();//发布日期结束
  190. if (create_time_end != "" && typeof (create_time_end) != "undefined") {
  191. s += "&create_time_end=" + create_time_end;
  192. }
  193. if(null!=grid){
  194. grid.set("newPage","1");
  195. }
  196. initTargetGrid(s);
  197. }
  198. /**
  199. * 预览图片
  200. */
  201. function view_img(fileId){
  202. viewFile(fileId, null)
  203. }
  204. /**
  205. * 不同意
  206. */
  207. function auditReject(universalid){
  208. $.ligerDialog.prompt('驳回原因','',true, function (yes,value)
  209. {
  210. var au_note = encodeURI(value);
  211. if(yes){
  212. $.ajax({
  213. type:"POST",
  214. url:"opAdCheckAction.do?task=auditReject&toAuditDate=${toAuditDate}",
  215. data : {"universalid":universalid,"au_note":au_note},
  216. timeout:10000,
  217. cache:false,
  218. dataType:"json",
  219. success:function(data){
  220. var success = data.success;
  221. var update = data.update;
  222. if("update"==update){
  223. window.top.$.ligerDialog.error("信息有变更,请刷新列表,重新审核!");
  224. }else{
  225. if(success){
  226. window.top.$.ligerDialog.success(success);
  227. searchByKword();
  228. }else{
  229. showAjaxError(null, data.error);
  230. }
  231. }
  232. },
  233. error:showAjaxError
  234. });
  235. }
  236. });
  237. }
  238. /**
  239. * 同意
  240. */
  241. function auditPass(universalid){
  242. $.ligerDialog.confirm('确定要通过审核吗?', function (yes)
  243. {
  244. if(yes){
  245. $.ajax({
  246. type:"POST",
  247. url:"opAdCheckAction.do?task=auditPass&toAuditDate=${toAuditDate}",
  248. data : {"universalid":universalid},
  249. timeout:10000,
  250. cache:false,
  251. dataType:"json",
  252. success:function(data){
  253. var success = data.success;
  254. var update = data.update;
  255. if("update"==update){
  256. window.top.$.ligerDialog.error("信息有变更,请刷新列表,重新审核!");
  257. }else{
  258. if(success){
  259. window.top.$.ligerDialog.success(success);
  260. searchByKword();
  261. }else{
  262. showAjaxError(null, data.error);
  263. }
  264. }
  265. },
  266. error:showAjaxError
  267. });
  268. }
  269. });
  270. }
  271. </script>
  272. </head>
  273. <body>
  274. <%@ include file="/include/message.jsp"%>
  275. <div class="container">
  276. <div class="default_search" >
  277. <ul class="list_search" >
  278. <li class="title" style="width:100px;">广告投放位置:</li>
  279. <li class="text">
  280. <select id="position_id" name="position_id">
  281. <option value="">--请选择--</option>
  282. <c:forEach items="${positionList }" var="pos">
  283. <option value="${pos.universalid }">${pos.position_name }</option>
  284. </c:forEach>
  285. </select>
  286. </li>
  287. </ul>
  288. <ul class="list_search">
  289. <li class="title">状态:</li>
  290. <li class="text">
  291. <select id="auState" name="auState">
  292. <option value="">--请选择--</option>
  293. <c:forEach items="${auStateList }" var="auState">
  294. <option value="${auState.dvalue }"
  295. <c:if test="${auState.dvalue==0 }">
  296. selected="selected"
  297. </c:if>
  298. >${auState.dname }</option>
  299. </c:forEach>
  300. </select>
  301. </li>
  302. </ul>
  303. <ul class="list_search" >
  304. <li class="title"> 发布日期:</li>
  305. <li class="text" >
  306. <input type="text" class="Wdate" name="create_time_start" id="create_time_start" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'create_time_end\',{d:-1})}'})">
  307. <input type="text" class="Wdate" name="create_time_end" id="create_time_end" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'create_time_start\',{d:1})}'})">
  308. </li>
  309. </ul>
  310. <ul >
  311. <li class="search-button">
  312. <input type="button" class='l-button'
  313. name="search" onclick="searchByKword()" value="查询" /></li>
  314. </ul>
  315. </div>
  316. <div style="clear:both;"></div>
  317. <div id="searchbar">
  318. <div style="overflow: hidden; clear: both;">
  319. <div id="maingrid4" style="margin: 0; padding: 0"></div>
  320. </div>
  321. </div>
  322. </div>
  323. </body>
  324. </html>