| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 | 
							- <%@ page language="java" contentType="text/html; charset=UTF-8"
 
- 	pageEncoding="UTF-8"%>
 
- <script type="text/javascript">
 
- function checkedAlldc(){ 
 
- 	 if($('#checkAlldc').prop("checked")){
 
- 		 $("input[name='dcid']").each(function() { 
 
- 				$(this).prop("checked", true); 
 
- 			});
 
- 	 }else{
 
- 		 $("input[name='dcid']").each(function() { 
 
- 				$(this).prop("checked", false); 
 
- 			});
 
- 	 }
 
- 	 clickdc();
 
- } 	
 
- function clickdc(){
 
- 	var objName= document.getElementsByName("dcid");
 
- 	var dcids = [];
 
-     for (i=0; i<objName.length; i++){  
 
-         if (objName[i].type=="checkbox" && objName[i].checked){      
 
-         dcids.push(objName[i].value)
 
-         }  
 
-     }
 
- 	$('#dcids').val(dcids);
 
- 	if(isEmpty($('#dcids').val())){
 
- 		 $('#dcids').val(1);
 
- 	}
 
- }
 
- 	function dcxxadd(){
 
- 		var path="/xkzbg/editmain?path=7:id="+$('#id').val()+":jyrid="+$('#jyrid').val()+"";
 
- 		location.href=$.app+'/dc/add?path='+path;
 
- 	}
 
- 	function dcxxview(dcid){
 
- 		var path="/xkzbg/editmain?path=7:id="+$('#id').val()+":jyrid="+$('#jyrid').val()+"";
 
- 		location.href=$.app+'/dc/view?id='+dcid+'&path='+path;
 
- 	}
 
- 	function dcxxedit(dcid){
 
- 		var path="/xkzbg/editmain?path=7:id="+$('#id').val()+":jyrid="+$('#jyrid').val()+"";
 
- 		location.href=$.app+'/dc/edit?id='+dcid+'&path='+path;
 
- 	}
 
- 	function dcxxdelete(dcid){
 
- 		$.confirm({
 
- 		    title: '确认框',
 
- 		    content: '确认删除吗',
 
- 		    confirm: function(){
 
- 		    	 $.post($.app + "/dc/delete", {
 
- 	                 id : dcid,
 
- 	                 czid:$('#id').val()
 
- 	             }, function(data) {
 
- 	                 if (data.success) {
 
- 	                	 $.alert({
 
- 	                		    title: '提示',
 
- 	                		    content: '操作成功',
 
- 	                		    confirm: function(){
 
- 	                		    	$('#dcids').val('');
 
- 	                		    	initdcxx();
 
- 	                		    }
 
- 	                	 });
 
- 	                 } else {
 
- 	                	 $.alert({
 
- 	             		    title: '提示',
 
- 	             		    content: data.message,
 
- 	             		    confirm: function(){
 
- 	             		        
 
- 	             		    }
 
- 	             	 });
 
- 	                 }
 
- 	             }, "json");
 
- 		    },
 
- 		    cancel: function(){
 
- 		        
 
- 		    }
 
- 		});
 
- 	}	
 
- 	function initdcxx(){
 
- 		$.post($.app + "/gkjyr/dcxx", {
 
- 			id : $('#jyrid').val(),
 
- 			czid:$('#id').val(),
 
- 			recordStatus:10
 
- 		}, function(data) {
 
- 			if (data) {
 
- 				var str =""
 
- 				for(var i=0;i<data.length;i++){
 
- 					var dc = data[i];
 
- 					str+="<tr class='tr_bg'>";
 
- 					var dcids = $('#dcids').val();
 
- 					if(isEmpty(dcids)){
 
- 						if(dc.isTrue){
 
- 							str+="<td><input type='checkbox' checked name='dcid' onclick='clickdc()'  value='"+dc.id+"'/></td>";
 
- 						}else{
 
- 							str+="<td><input type='checkbox' name='dcid' onclick='clickdc()'   value='"+dc.id+"'/></td>";
 
- 						}
 
- 					}else{
 
- 						if(dcids == 1){
 
- 							str+="<td><input type='checkbox' name='dcid' onclick='clickdc()'  value='"+dc.id+"'/></td>";
 
- 						}else{
 
- 							var dcid = dcids.spilt(",");
 
- 							var flag = 1;
 
- 							for(var i = 0;i<dcid.length;i++){
 
- 								if(dc.id == dcid){
 
- 									flag = 0 ;
 
- 									break;
 
- 								}
 
- 							}
 
- 							if(flag == 0){
 
- 								str+="<td><input type='checkbox' checked onclick='clickdc()' name='dcid'  value='"+dc.id+"'/></td>";
 
- 							}else{
 
- 								str+="<td><input type='checkbox' name='dcid' onclick='clickdc()'  value='"+dc.id+"'/></td>";
 
- 							}
 
- 						}
 
- 						
 
- 					}
 
- 					str+="<td>"+dc.dcmc+"</td>";
 
- 					str+="<td>"+dc.ssjyrzw+"</td>";
 
- 					str+="<td>"+dc.szgkzw+"</td>";
 
- 					str+="<td>"+dc.szgqzw+"</td>";
 
- 					str+="<td>"+dc.zwdcyt+"</td>";
 
- 					str+="<td>"+dc.dczmj+"</td>";
 
- 					str+="<td>"+(dc.dczrl==null ? "":dc.dczrl)+"</td>";
 
- 					str+="<td>";
 
- 					str+="<a class='btn btn-default btn-xs' href='#' onclick=\"dcxxview('"+dc.id+"')\" title='查看'> <i class='glyphicon glyphicon-search'></i> </a>";
 
- 					str+="<a class='btn btn-default btn-xs' href='#' onclick=\"dcxxedit('"+dc.id+"')\" title='编辑'> <i class='glyphicon glyphicon-pencil'></i> </a>";
 
- 					str+="<a class='btn btn-default btn-xs' href='#' onclick=\"dcxxdelete('"+dc.id+"')\" title='删除'> <i class='glyphicon glyphicon-trash'></i> </a>";
 
- 					str+="</td>";
 
- 					str+="</tr>";
 
- 				}
 
- 				$('#dcxxdiv').empty();
 
- 				$('#dcxxdiv').append(str);
 
- 			} else {
 
- 				
 
- 			}
 
- 		}, "json");
 
- 	}
 
- </script>
 
- 	
 
- 	<a class="btn btn-default btn-sm" href="#"
 
- 		onclick="dcxxadd()" style="float:right;"> <i class="glyphicon glyphicon-plus"></i> 新增
 
- 	</a>
 
- 	<table class="main_table"  cellpadding="0" cellspacing="0">
 
- 		<tr>
 
- 			<th width="5%"><input id="checkAlldc" name="checkAlldc" type="checkbox" onclick='checkedAlldc()' /> </th>	
 
- 			<th width="10%">堆场名称</th>
 
- 			<th width="15%">港口经营人</th>
 
- 			<th width="5%">所在<br>港口</th>
 
- 			<th width="5%">所在<br>港区</th>
 
- 			<th width="10%">堆场用途</th>
 
- 			<th width="10%">堆场总面积<br>(平方米)</th>
 
- 			<th width="10%">堆场总容量<br>(吨)</th>
 
- 			<th width="20%">操作</th>
 
- 		</tr>
 
- 		<tbody id="dcxxdiv"></tbody>
 
- 	</table>
 
 
  |