审计记录

WebContent/WEB-INF/jsp/pc/report/posterrecord.jsp 4.5 KB
zxt@theyeasy.com committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title>海报记录</title>
		<link rel="stylesheet" href="/zzhnc/res/plugins/layui/css/layui.css">
		<link rel="stylesheet" href="/zzhnc/res/css/basic.css">
	</head>

	<body class="wrap">
		<form class="layui-form">
			<div class="layui-form-item searchbox" style="margin-bottom: 0px;">
				
				<!-- <div class="layui-input-inline producttype" style="width: 140px;">
					<select name="producttype" >
						<option value="">海报类别</option>
					</select>
				</div>
				<div class="layui-input-inline productid" style="width: 140px;">
					<select name="productid">
						<option value="">人员名称</option>
					</select>
				</div>
				<div class="layui-input-inline productid" style="width: 140px;">
					<select name="productid">
						<option value="">海报名称</option>
					</select>
				</div> -->
				<div class="layui-input-inline" style="width: 140px;">
					<input type="text" class="layui-input" name="keyword" placeholder="关键字" />
				</div>
				<button class="layui-btn" lay-submit lay-filter="querybtn">查询</button>
				<button class="layui-btn layui-btn-primary" lay-submit lay-filter="resetbtn" type="reset">重置</button>
			</div>
		</form>
		<table class="layui-table">
			<thead>
				<tr>
					<th style="width:30px;">No</th>
					<th style="min-width: 80px;">海报类别</th>
					<th style="min-width: 60px;">人员名称</th>
					<th style="min-width: 60px;">海报图片 </th>
					<th style="min-width: 80px;">更新时间</th>
				</tr>
			</thead>
				
			<tbody id="tablelist">
				<!-- <tr>
					<td>No</td>
					<td style="min-widtd: 56px;">海报类别</td>
					<td style="min-widtd: 84px;">人员名称</td>
					<td style="min-widtd: 56px;">海报地址 </td>
					<td style="min-widtd: 56px;">更新时间 </td>
				</tr> -->
			</tbody>
		</table>
		<div id="page"></div>
		
	</body>
	<script src='/zzhnc/res/js/jquery.min.js'></script>
	<script src="/zzhnc/res/plugins/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/zzhnc/res/js/me.js"></script>
	<script>
		layui.use(['form', 'element', 'laydate', 'layer', 'laypage'], function() {
			var form = layui.form(),
				element = layui.element(),
				laydate = layui.laydate,
				layer = layui.layer,
				laypage = layui.laypage;

			var queryObj = {
					page: 1,
					keyword:null
					
				} //查询条件
			//查询
			  form.on('submit(querybtn)', function(data){
				 queryObj=data.field;
				 queryObj.page=1;
			      initdata(queryObj);
			      form.render();
			      return false;
			  });
			 $(".resetBtn").on("click",function(){
				$("input[name=keyword]").val("");
				$("select[name=projectid]").val("");
				form.render();
				initdata(queryObjd)
				return false;
			})  
			//初始化数据
			initdata(queryObj);
			function initdata(queryObj){
				
				$.post("/zzhnc/report/getPosterLog",queryObj,function(data){
					data=data.data;
					console.log(data)
					  laypage({
						cont: 'page',
						pages: data.totalPages, //总页数
						curr: queryObj.page,
						skip: true,
						jump: function(obj, first) {
							if(!first) {
								queryObj.page = obj.curr
								initdata(queryObj);
							}

						}
					});  
					var str="";
					if(data.rows.length<1){
						$(".nulldata").show();
					}else{
						$(".nulldata").hide();
						for(var i=0;i<data.rows.length;i++){
							str+='<tr data-id='+ data.rows[i].id +'>'
								+'<td>'+ ((data.page - 1) * data.pageSize + i + 1) +'</td>'
								+'<td>'+ postertype(data.rows[i].postertype)+'</td>'
								+'<td>'+ data.rows[i].name+'</td>'
								+'<td><div style="background:url('+ data.rows[i].imgurl +') no-repeat center;-webkit-background-size:contain;background-size:contain;width:40px;height:40px;margin:0 auto;"></div></td>'
								+'<td>'+ toTime_G(data.rows[i].updatedtime) +'</td>'
								+'</tr>';
						}
					}
					
					$("#tablelist").html(str);
					toNull_G();
				})
			}

		})
		function postertype(v){
			if(v!==null&&v!==""){
				switch(v){
					case 1:
					 return "项目海报";
					  break;
					case 2:
						 return "销售助手首页";
					  break;
					case 3:
						 return "万小二首页";
					  break;
				}
			}else{
				return "";
			}
		}
	</script>

</html>