| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 | 
							- <%@ page language="java" contentType="text/html; charset=UTF-8"
 
-     pageEncoding="UTF-8"%>
 
- <script type="text/javascript">
 
- function checkedAllck(){ 
 
- 	 if($('#checkAllck').prop("checked")){
 
- 		 $("input[name='ckid']").each(function() { 
 
- 				$(this).prop("checked", true); 
 
- 			});
 
- 	 }else{
 
- 		 $("input[name='ckid']").each(function() { 
 
- 				$(this).prop("checked", false); 
 
- 			});
 
- 	 }
 
- 	 clickck();
 
- } 	
 
- function clickck(){
 
- 	var objName= document.getElementsByName("ckid");
 
- 	var ckids = [];
 
-     for (i=0; i<objName.length; i++){  
 
-         if (objName[i].type=="checkbox" && objName[i].checked){      
 
-         ckids.push(objName[i].value)
 
-         }  
 
-     }
 
- 	$('#ckids').val(ckids);
 
- 	if(isEmpty($('#ckids').val())){
 
- 		 $('#ckids').val(1);
 
- 	}
 
- }
 
- 	function ckxxadd(){
 
- 		var path="/xkzsq/editmain?path=6:id="+$('#id').val()+":jyrid="+$('#jyrid').val()+"";
 
- 		location.href=$.app+'/ck/add?path='+path;
 
- 	}
 
- 	function ckxxview(ckid){
 
- 		var path="/xkzsq/editmain?path=6:id="+$('#id').val()+":jyrid="+$('#jyrid').val()+"";
 
- 		location.href=$.app+'/ck/view?id='+ckid+'&path='+path;
 
- 	}
 
- 	function ckxxedit(ckid){
 
- 		var path="/xkzsq/editmain?path=6:id="+$('#id').val()+":jyrid="+$('#jyrid').val()+"";
 
- 		location.href=$.app+'/ck/edit?id='+ckid+'&path='+path;
 
- 	}
 
- 	function ckxxdelete(ckid){
 
- 		$.confirm({
 
- 		    title: '确认框',
 
- 		    content: '确认删除吗',
 
- 		    confirm: function(){
 
- 		    	 $.post($.app + "/ck/delete", {
 
- 	                 id : ckid,
 
- 	                 czid:$('#id').val()
 
- 	             }, function(data) {
 
- 	                 if (data.success) {
 
- 	                	 $.alert({
 
- 	                		    title: '提示',
 
- 	                		    content: '操作成功',
 
- 	                		    confirm: function(){
 
- 	                		    	$('#ckids').val('');
 
- 	                		    	initckxx();
 
- 	                		    }
 
- 	                	 });
 
- 	                 } else {
 
- 	                	 $.alert({
 
- 	             		    title: '提示',
 
- 	             		    content: data.message,
 
- 	             		    confirm: function(){
 
- 	             		        
 
- 	             		    }
 
- 	             	 });
 
- 	                 }
 
- 	             }, "json");
 
- 		    },
 
- 		    cancel: function(){
 
- 		        
 
- 		    }
 
- 		});
 
- 	}
 
- 	function initckxx(){
 
- 		$.post($.app + "/gkjyr/ckxx", {
 
- 			id : $('#jyrid').val(),
 
- 			czid:$('#id').val()
 
- 		}, function(data) {
 
- 			if (data) {
 
- 				var str =""
 
- 				for(var i=0;i<data.length;i++){
 
- 					var ck = data[i];
 
- 					str+="<tr class='tr_bg'>";
 
- 					var ckids = $('#ckids').val();
 
- 					if(isEmpty(ckids)){
 
- 						if(ck.isTrue){
 
- 							str+="<td><input type='checkbox' checked name='ckid' onclick='clickck()'  value='"+ck.id+"'/></td>";
 
- 						}else{
 
- 							str+="<td><input type='checkbox' name='ckid' onclick='clickck()'   value='"+ck.id+"'/></td>";
 
- 						}
 
- 					}else{
 
- 						if(ckids == 1){
 
- 							str+="<td><input type='checkbox' name='ckid' onclick='clickck()'  value='"+ck.id+"'/></td>";
 
- 						}else{
 
- 							var ckid = ckids.spilt(",");
 
- 							var flag = 1;
 
- 							for(var i = 0;i<ckid.length;i++){
 
- 								if(ck.id == ckid){
 
- 									flag = 0 ;
 
- 									break;
 
- 								}
 
- 							}
 
- 							if(flag == 0){
 
- 								str+="<td><input type='checkbox' checked onclick='clickck()' name='ckid'  value='"+ck.id+"'/></td>";
 
- 							}else{
 
- 								str+="<td><input type='checkbox' name='ckid' onclick='clickck()'  value='"+ck.id+"'/></td>";
 
- 							}
 
- 						}
 
- 						
 
- 					}
 
- 					str+="<td>"+ck.ckmc+"</td>";
 
- 					str+="<td>"+ck.ssjyrzw+"</td>";
 
- 					str+="<td>"+ck.ssmtzw+"</td>";
 
- 					str+="<td>"+ck.szgkzw+"</td>";
 
- 					str+="<td>"+ck.szgqzw+"</td>";
 
- 					str+="<td>"+ck.wxpckzw+"</td>";
 
- 					str+="<td>";
 
- 					str+="<a class='btn btn-default btn-xs' href='#' onclick=\"ckxxview('"+ck.id+"')\" title='查看'> <i class='glyphicon glyphicon-search'></i></a>";
 
- 					str+="<a class='btn btn-default btn-xs' href='#' onclick=\"ckxxedit('"+ck.id+"')\" title='编辑'> <i class='glyphicon glyphicon-pencil'></i></a>";
 
- 					str+="<a class='btn btn-default btn-xs' href='#' onclick=\"ckxxdelete('"+ck.id+"')\" title='删除'> <i class='glyphicon glyphicon-trash'></i></a>";
 
- 					str+="</td>";
 
- 					str+="</tr>";
 
- 				}
 
- 				$('#ckxxdiv').empty();
 
- 				$('#ckxxdiv').append(str);
 
- 			} else {
 
- 				
 
- 			}
 
- 		}, "json");
 
- 	}
 
- </script>
 
- 	<a class="btn btn-default btn-sm" href="#"
 
- 		onclick="ckxxadd()" style="float:right;"> <i class="glyphicon glyphicon-plus"></i> 新增
 
- 	</a>
 
- 	<table class="main_table"  cellpadding="0" cellspacing="0">
 
- 		<tr>
 
- 			<th width="5%"><input id="checkAllck" name="checkAllck" type="checkbox" onclick='checkedAllck()' /></th>
 
-       		<th width="10%">仓库名称</th>
 
-        		<th width="15%">港口经营人</th>
 
- 			<th width="15%">前沿码头名称</th>
 
- 			<th width="15%">所在港口</th>
 
- 			<th width="10%">所在港区</th>
 
-        		<th width="10%">是否危险品仓库</th>
 
- 	        <th width="20%">操作</th>
 
- 		</tr>
 
- 		<tbody id="ckxxdiv"></tbody>
 
- 	</table>
 
 
  |