⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_psjlc.asp

📁 一套石油公司内部的运营管理系统
💻 ASP
字号:
<!--#include virtual="/include/DBCon.inc"-->
<html>
<head>
	<%
	tarea=request.form("area")
	tzsz=request.form("zsz")
	if tarea="" then
		tarea=request("area")
	end if
	if tzsz="" then
		tzsz=request("zsz")
	end if
	if tarea<>"" then
		areaId=split(tarea,"-")(1)
		areaName=split(tarea,"-")(0)
	else
		areaid=""
		areaname=""
	end if
	if tzsz<>"" then
		zszId=split(tzsz,"-")(0)
		zszName=split(tzsz,"-")(1)
	else
		zszId=""
		zszName=""
	end if

	if zszId="" then
		'以下从数据库取出作业区
		dim area(),areaCount
		Set Rs = Server.CreateObject("ADODB.RecordSet")
		SQL="select * from oil.oil_dict where dict_type='area'"
		rs.open SQL,conn,1,1
		if rs.eof and rs.bof then
			response.redirect "/profile/errorpage.asp?title=查询作业区数据&msg=数据库里没有作业区信息" 
		else
			areaCount=0
			do while not rs.eof
				areaCount=areaCount+1
				redim preserve area(areaCount)
				area(UBound(area)-1)=rs("dict_value") & "-" & rs("dict_code")
				rs.movenext
			loop
		end if
		session("area")=area
		'以下从数据库取出注水站
		dim zsz(),zszCount
		Set Rs = Server.CreateObject("ADODB.RecordSet")
		SQL="select * from oil.oil_zsz order by zsz_id"
		rs.open SQL,conn,1,1
		if rs.eof and rs.bof then
			response.redirect "/profile/errorpage.asp?title=查询油水井数据&msg=数据库里没有注水站信息" 
		else
			zszCount=0
			do while not rs.eof
				zszCount=zszCount+1
				redim preserve zsz(zszCount)
				zsz(UBound(zsz)-1)=rs("zsz_id") & "-" & rs("zsz_name") & "-" & rs("zsz_area_id")
				rs.movenext
			loop
		end if
		session("zsz")=zsz
	else
		area=session("area")
		areaCount=UBound(area)
		zsz=session("zsz")
		zszCount=UBound(zsz)
	end if

	if zszId="" then
		psjlcCount=0
	else
		Set Rs = Server.CreateObject("ADODB.RecordSet")
		SQL="select file_obj_date,file_id,psj_name,file_name,file_create_date,file_memo from oil.oil_file,oil.oil_psj,oil.oil_zsz where file_type='psjlc' and file_well_id=psj_id and psj_gs_zsz_id=zsz_id and zsz_id='" &zszId& "' order by file_id DESC"
		rs.open SQL,conn,1,1
		dim psjlc(),psjlcCount
		psjlcCount=0
		do while not rs.eof
			psjlcCount=psjlcCount+1
			redim preserve psjlc(psjlcCount)
			psjlc(psjlcCount-1)=""
			psjlc(psjlcCount-1)=psjlc(psjlcCount-1)& "@" & rs("file_id") 
			psjlc(psjlcCount-1)=psjlc(psjlcCount-1)& "@" & rs("psj_name") 
			psjlc(psjlcCount-1)=psjlc(psjlcCount-1)& "@" & rs("file_name") 
			psjlc(psjlcCount-1)=psjlc(psjlcCount-1)& "@" & rs("file_create_date")
			psjlc(psjlcCount-1)=psjlc(psjlcCount-1)& "@" & rs("file_memo")
			rs.movenext
		loop
		rs.close
	end if
	%>
<title>油田采油工艺综合管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/css/oil.css" type="text/css">
<SCRIPT LANGUAGE=javascript>
<!--
function areaCh() {
	vbarea=document.form1.area.value.split("-")[1];
	var vbzsz=new Array(<%=UBound(zsz)%>);
	var vbzsz_name=new Array(<%=Ubound(zsz)%>);
	
	<%
	for i=0 to Ubound(zsz)-1
	%>
	vbzsz[<%=i%>]="<%=zsz(i)%>";
	vbzsz_name[<%=i%>]="<%=split(zsz(i),"-")(1)%>";
	<%
	next
	%>
	var tzsz_id="";
	var tzsz_name="";
	for (var i=0;i<vbzsz.length;i++) {
		tazsz=vbzsz[i].split("-");
		tarea=tazsz[2];
		if (tarea==vbarea) {
			if (tzsz_id=="") {
				tzsz_id=tazsz[0];
			} else {
				tzsz_id=tzsz_id+"*"+tazsz[0];
			}
			if (tzsz_name=="") {
				tzsz_name=vbzsz_name[i];
			} else {
				tzsz_name=tzsz_name+"*"+vbzsz_name[i];
			}
		} 
	}
	var curzsz_id=tzsz_id.split("*");
	var curzsz_name=tzsz_name.split("*");
	if (curzsz_id!="") {
		form1.zsz.length=curzsz_id.length+1;
	} else {
		form1.zsz.length=1;
	}
	form1.zsz.options[0].value="";
	form1.zsz.options[0].text="请选择......";
	for (var i=0;i<form1.zsz.length-1;i++) {
		form1.zsz.options[i+1].value=curzsz_id[i]+"-"+curzsz_name[i];
		form1.zsz.options[i+1].text=curzsz_name[i];
	}
}

function OpenBut(url)
{
	window.open(url, "OpenClose");
}

function	subcheck(act) {
	if (act==0)
		form1.action="frm_psjlc_remove.asp";
	else if (act==1) 
		form1.action="frm_psjlc_modify.asp";
	form1.submit();
}
-->
</SCRIPT>

</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
	<span class="subject">
		配水间流程示意图
	</span> 
	<hr size="1" class=hr width="98%" align="center">
	<br>
	<form action="" method=post name=form1>
	<table border=0 width=90%>
		<tr>
			<td width=20%>
				作业区:
				<select name=area onchange="areaCh()">
					<option value="">请选择......</option>
					<%for i=0 to areaCount-1%>
					<option value=<%=area(i)%> <%if areaId=split(area(i),"-")(1) then response.write " selected" end if%>><%=split(area(i),"-")(0)%></option>
					<%next%>
				</select>
			</td>
			<td width=30%>
				注水站:
				<select name=zsz Onchange="submit()">
				<%if areaId<>"" then%>
				<SCRIPT LANGUAGE=javascript>
				<!--
					vbarea="<%=areaId%>";
					var vbzsz=new Array(<%=UBound(zsz)%>);
					var vbzsz_name=new Array(<%=Ubound(zsz)%>);
					
					<%
					for i=0 to Ubound(zsz)-1
					%>
					vbzsz[<%=i%>]="<%=zsz(i)%>";
					vbzsz_name[<%=i%>]="<%=split(zsz(i),"-")(1)%>";
					<%
					next
					%>
					var tzsz_id="";
					var tzsz_name="";
					for (var i=0;i<vbzsz.length;i++) {
						tazsz=vbzsz[i].split("-");
						tarea=tazsz[2];
						if (tarea==vbarea) {
							if (tzsz_id=="") {
								tzsz_id=tazsz[0];
							} else {
								tzsz_id=tzsz_id+"*"+tazsz[0];
							}
							if (tzsz_name=="") {
								tzsz_name=vbzsz_name[i];
							} else {
								tzsz_name=tzsz_name+"*"+vbzsz_name[i];
							}
						} 
					}
					var curzsz_id=tzsz_id.split("*");
					var curzsz_name=tzsz_name.split("*");
					if (curzsz_id!="") {
						form1.zsz.length=curzsz_id.length+1;
					} else {
						form1.zsz.length=1;
					}
					form1.zsz.options[0].value="";
					form1.zsz.options[0].text="请选择......";
					for (var i=0;i<form1.zsz.length-1;i++) {
						form1.zsz.options[i+1].value=curzsz_id[i]+"-"+curzsz_name[i];
						form1.zsz.options[i+1].text=curzsz_name[i];
						if (curzsz_id[i]==<%if zszId<>"" then response.write zszId else response.write "'#$#'" end if%>)
							form1.zsz.options.selectedIndex=i+1;
					}
				-->
				</script>
				<%end if%>
				</select>
			</td>
		</tr>
	</table>
	<table border="1" cellpadding="1" cellspacing="0" align="center" class="table2" 
	  bordercolor="#000000" bordercolordark="#F8EDEB" width=600>
	  <tr height="20">
	   <td class="title" align=center width=20>&nbsp</td>
	   <td class="title" align=center width=60>配水间</td>
	   <td class="title" align=center width=200>查看示意图</td>
	   <td class="title" align=center width=80>上传日期</td>
	   <td class="title" align=center width=200>文件备注</td>
	  </tr> 
	  <%for i=0 to psjlcCount-1%>
	  <tr height="20" align=center>
	   <td>&nbsp<input type=checkbox name=chpsjlc value=<%=split(psjlc(i),"@")(1)%>></td>
	   <td>&nbsp<%=split(psjlc(i),"@")(2)%></td>
	   <td>&nbsp<a href="javascript:OpenBut('/function/openblob.asp?id=<%=split(psjlc(i),"@")(1)%>')"><%=split(psjlc(i),"@")(3)%></a></td>
	   <td>&nbsp<%=split(psjlc(i),"@")(4)%></td>
	   <td>&nbsp<textarea rows=2 cols=25 class=text><%=split(psjlc(i),"@")(5)%></textarea></td>
	  </tr> 
	  <%next%>
	</table>
	<br>
    <table width="98%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr>
			<td align=center>
				<input type="button" name="bt1" value="添加新数据" class=button LANGUAGE=javascript onclick='javascript:location.replace("frm_psjlc_add.asp");'> 
				<input type="button" name="bt1" value="修改选中的数据" class=button LANGUAGE=javascript onclick=subcheck(1)> 
				<input type="button" name="bt1" value="删除选中的数据" class=button LANGUAGE=javascript onclick=subcheck(0)> 
			</td>
		</tr>
	</table>
	<hr size="1" class=hr width="98%" align="center">
	  <br>
	  <table width="98%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr align="center"> 
		  <td>
			<input type="button" name="Submit32" value=" 返回 " class=button LANGUAGE=javascript onclick='javascript:location.replace("frm_psj_detail.asp");'>
		  </td>
		</tr>
	  </table>
	</form>

</body>
</html>
<!--#include virtual="/include/DBClose.inc"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -