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

📄 frm_psj_device.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
		deviceCount=0
	else
		dim device(),deviceCount
		Set Rs = Server.CreateObject("ADODB.RecordSet")
		SQL="select * from oil.oil_psj,oil.oil_psjdv where psjdv_psj_id=psj_id and psj_gs_zsz_id='" &zszId& "' order by psjdv_id"
		rs.open SQL,conn,1,1
		deviceCount=0
		do while not rs.eof
			deviceCount=deviceCount+1
			redim preserve device(deviceCount)
			device(deviceCount-1)=""
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_id")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psj_name")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_name")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_dvid")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_model")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_count")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_bs_edyl")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_edpl")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_tysj")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_sjpl")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_zk")
			device(deviceCount-1)=device(deviceCount-1)& "@" & rs("psjdv_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	subcheck(act) {
	if (act==0)
		form1.action="frm_psj_device_remove.asp";
	else if (act==1) 
		form1.action="frm_psj_device_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>
	<hr size="1" class=hr width="98%" align="center">
	<table border=0 width=90%>
		<tr>
			<td>
			目前区块:<%=areaName%>&nbsp&nbsp目前注水站:<%=zszName%>
			</td>
		</tr>
	</table>
	<table border="1" cellpadding="1" cellspacing="0" align="center" class="table2" 
	  bordercolor="#000000" bordercolordark="#F8EDEB" width=1020>
	  <tr height="20">
	   <td class="title" align=center width=20 rowspan=2>&nbsp</td>
	   <td class="title" align=center width=60 rowspan=2>配水间名称</td>
	   <td class="title" align=center width=60 rowspan=2>设备名称</td>
	   <td class="title" align=center width=60 rowspan=2>设备编号</td>
	   <td class="title" align=center width=60 rowspan=2>设备型号</td>
	   <td class="title" align=center width=60 rowspan=2>数量</td>
	   <td class="title" align=center colspan=2>基本参数</td>
	   <td class="title" align=center width=60 rowspan=2>投运时间</td>
	   <td class="title" align=center width=60 rowspan=2>实际徘量(m3)</td>
	   <td class="title" align=center width=180 rowspan=2>目前运行状况及问题</td>
	   <td class="title" align=center width=180 rowspan=2>备注</td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=90>额定压力(MPa)</td>
	   <td class="title" align=center width=90>额定排量(m3)</td>
	  </tr> 
	  <%for i=0 to deviceCount-1%>
	  <tr height="20" align=center>
	   <td>&nbsp<input type=checkbox name=chdevice value=<%=split(device(i),"@")(1)%>></td>
	   <td>&nbsp<%=split(device(i),"@")(2)%></td>
	   <td>&nbsp<%=split(device(i),"@")(3)%></td>
	   <td>&nbsp<%=split(device(i),"@")(4)%></td>
	   <td>&nbsp<%=split(device(i),"@")(5)%></td>
	   <td>&nbsp<%=split(device(i),"@")(6)%></td>
	   <td>&nbsp<%=split(device(i),"@")(7)%></td>
	   <td>&nbsp<%=split(device(i),"@")(8)%></td>
	   <td>&nbsp<%=split(device(i),"@")(9)%></td>
	   <td>&nbsp<%=split(device(i),"@")(10)%></td>
	   <td>&nbsp<textarea rows=2 cols=25 class=text><%=split(device(i),"@")(11)%></textarea></td>
	   <td>&nbsp<textarea rows=2 cols=25 class=text><%=split(device(i),"@")(12)%></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_psj_device_add.asp?area=<%=tarea%>&zsz=<%=tzsz%>");'> 
				<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 + -