| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>广告审核列表</title>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/file.js"></script>
- <script type="text/javascript" src="/shares/datePicker/WdatePicker.js"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
- <script type="text/javascript">
- var grid = null;
- $(function() {
- searchByKword();
- });
- function initTargetGrid(params) {
- var columns = [
- {
- display : '广告图片',
- name : 'photo_doc_id',
- width : 210,
- render : function(row) {
- var html = '';
- if(null==row.path){
- html += '<img src="'+row.path+'" width="200px;" height="150px;" alt="图片不存在"></img>';
- }else{
- html += '<img src="'+row.path+'" width="200px;" height="150px;" onclick="view_img('+row.photo_doc_id+');"></img>';
- }
- return html;
- }
- }, {
- display : '广告投放位置',
- name : 'position_name',
- width : 100,
- render : function(row) {
- var html = '';
- html += '<span style="text-align:center;line-height:150px;">'+row.position_name+'</span>';
- return html;
- }
-
- }, {
- display : '发布范围',
- name : 'scope_name',
- width : 100,
- render : function(row) {
- var html = '';
- html += '<span style="text-align:center;line-height:150px;">'+row.scope_name+'</span>';
- return html;
- }
- },{
- display : '开始日期',
- name : 'start_date',
- width : 100,
- render : function(row) {
- var start_date = row.start_date;
- if(null!=start_date){
- start_date = start_date.substring(0,10);
- }else{
- start_date="";
- }
- var html = '';
- html += '<span style="text-align:center;line-height:150px;">'+start_date+'</span>';
- return html;
- }
- },{
- display : '截止日期',
- name : 'end_date',
- width : 100,
- render : function(row) {
- var end_date = row.end_date;
- if(null!=end_date){
- end_date = end_date.substring(0,10);
- }else{
- end_date="";
- }
- var html = '';
- html += '<span style="text-align:center;line-height:150px;">'+end_date+'</span>';
- return html;
- }
- },{
- display : '发布人',
- name : 'create_user_name',
- width : 80,
- render : function(row) {
- var html = '';
- html += '<span style="text-align:center;line-height:150px;">'+row.create_user_name+'</span>';
- return html;
- }
- },{
- display : '发布时间',
- name : 'create_time',
- width : 150,
- render : function(row) {
- var create_time = row.create_time;
- /* create_time = create_time.substring(0,10); */
- var html = '';
- html += '<span style="text-align:center;line-height:150px;">'+create_time+'</span>';
- return html;
- }
-
- }
- ];
- columns.push({
- display : '审核状态',
- name : 'au_state_name',
- width : 80,
- render : function(row) {
- var au_note = row.au_note ;
- var au_user_name = row.au_user_name;
- var au_time = row.au_time;
- if(null==au_user_name){
- au_user_name = "";
- }
- if(null==au_time){
- au_time = "";
- }
- if(null==au_note){
- au_note = "";
- }
- var html = '';
- if("0"==row.au_state){
- html += ''+'<span style="text-align:center;line-height:150px;">'+row.au_state_name+'</span>';
- }else{
- html += '<a style="color:blue;line-height:150px;" title="'
- +'审核人:'+au_user_name+' '
- +'审核时间:'+au_time+' '
- +'审核意见:'+au_note
- +'">'+row.au_state_name+'</a>';
- }
- return html;
- }
-
- });
- columns
- .push({
- display : '操作',
- width : 130,
- isAllowHide : false,
- render : function(row) {
- var html = '';
- if('0'==row.au_state){
- html += '<a style="line-height:150px;" href=\"#\" onclick=\"auditPass('+ row.universalid + ')\"><font color=blue>同意</font></a> ';
- html += '<a style="line-height:150px;" href=\"#\" onclick=\"auditReject('+ row.universalid + ')\"><font color=blue>不同意</font></a> ';
- }
- return html;
- }
- });
- grid = $("#maingrid4")
- .ligerGrid(
- {
- columns : columns,
- pageSize : getPageSize(grid),
- url : 'opAdCheckAction.do?task=checkPageList&time=' + new Date().getTime() + params,
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- width : '99.9%',
- height : '99%',
- rowHeight : 150
- });
- $("#pageloading").hide();
- $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
- }
- function getPageSize(grid){
- if(grid){
- return grid.get("pageSize");
- }else{
- return 20;
- }
- }
- //查询
- function searchByKword() {
- var s = "";
- var position_id = $("#position_id").val(); //广告投放位置
- if (position_id != "" && typeof (position_id) != "undefined") {
- s += "&position_id=" + encodeURI(encodeURI(position_id));
- }
- var auState = $("#auState").val();//广告审核状态
- if (auState != "" && typeof (auState != "undefined")) {
- s += "&auState=" + encodeURI(encodeURI(auState));
- }
- var create_time_start = $("#create_time_start").val();//发布日期开始
- if (create_time_start != "" && typeof (create_time_start) != "undefined") {
- s += "&create_time_start=" + create_time_start ;
- }
- var create_time_end = $("#create_time_end").val();//发布日期结束
- if (create_time_end != "" && typeof (create_time_end) != "undefined") {
- s += "&create_time_end=" + create_time_end;
- }
- if(null!=grid){
- grid.set("newPage","1");
- }
- initTargetGrid(s);
- }
- /**
- * 预览图片
- */
- function view_img(fileId){
- viewFile(fileId, null)
- }
- /**
- * 不同意
- */
- function auditReject(universalid){
- $.ligerDialog.prompt('驳回原因','',true, function (yes,value)
- {
- var au_note = encodeURI(value);
- if(yes){
- $.ajax({
- type:"POST",
- url:"opAdCheckAction.do?task=auditReject&toAuditDate=${toAuditDate}",
- data : {"universalid":universalid,"au_note":au_note},
- timeout:10000,
- cache:false,
- dataType:"json",
- success:function(data){
- var success = data.success;
- var update = data.update;
- if("update"==update){
- window.top.$.ligerDialog.error("信息有变更,请刷新列表,重新审核!");
- }else{
- if(success){
- window.top.$.ligerDialog.success(success);
- searchByKword();
- }else{
- showAjaxError(null, data.error);
- }
- }
- },
- error:showAjaxError
- });
- }
- });
- }
- /**
- * 同意
- */
- function auditPass(universalid){
- $.ligerDialog.confirm('确定要通过审核吗?', function (yes)
- {
- if(yes){
- $.ajax({
- type:"POST",
- url:"opAdCheckAction.do?task=auditPass&toAuditDate=${toAuditDate}",
- data : {"universalid":universalid},
- timeout:10000,
- cache:false,
- dataType:"json",
- success:function(data){
- var success = data.success;
- var update = data.update;
- if("update"==update){
- window.top.$.ligerDialog.error("信息有变更,请刷新列表,重新审核!");
- }else{
- if(success){
- window.top.$.ligerDialog.success(success);
- searchByKword();
- }else{
- showAjaxError(null, data.error);
- }
- }
- },
- error:showAjaxError
- });
- }
- });
- }
- </script>
- </head>
- <body>
- <%@ include file="/include/message.jsp"%>
- <div class="container">
- <div class="default_search" >
- <ul class="list_search" >
- <li class="title" style="width:100px;">广告投放位置:</li>
- <li class="text">
- <select id="position_id" name="position_id">
- <option value="">--请选择--</option>
- <c:forEach items="${positionList }" var="pos">
- <option value="${pos.universalid }">${pos.position_name }</option>
- </c:forEach>
- </select>
- </li>
- </ul>
- <ul class="list_search">
- <li class="title">状态:</li>
- <li class="text">
- <select id="auState" name="auState">
- <option value="">--请选择--</option>
- <c:forEach items="${auStateList }" var="auState">
- <option value="${auState.dvalue }"
- <c:if test="${auState.dvalue==0 }">
- selected="selected"
- </c:if>
- >${auState.dname }</option>
- </c:forEach>
- </select>
- </li>
- </ul>
- <ul class="list_search" >
- <li class="title"> 发布日期:</li>
- <li class="text" >
- <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})}'})">
- 至
- <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})}'})">
- </li>
- </ul>
- <ul >
- <li class="search-button">
- <input type="button" class='l-button'
- name="search" onclick="searchByKword()" value="查询" /></li>
- </ul>
- </div>
- <div style="clear:both;"></div>
- <div id="searchbar">
- <div style="overflow: hidden; clear: both;">
- <div id="maingrid4" style="margin: 0; padding: 0"></div>
- </div>
- </div>
- </div>
- </body>
- </html>
|