📄 frm_gsz_device.asp
字号:
<!--#include virtual="/include/DBCon.inc"-->
<html>
<head>
<%
tarea=request.form("area")
tzsz=request.form("zsz")
dvType=request.form("dvtype")
if tarea="" then
tarea=request("area")
end if
if tzsz="" then
tzsz=request("zsz")
end if
if dvType="" then
dvType=request("dvtype")
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 dvType="" then
dvType=0
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
if dvType=0 then
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select * from oil.oil_zsz,oil.oil_gsdv where gsdv_zsz_id='" &zszId& "' and gsdv_zsz_id=zsz_id order by gsdv_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("gsdv_id")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("zsz_name")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_name")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_no")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_model")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_count")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_bs_edyl")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_bs_edpl")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_tysj")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_gssz")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_sjpl")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_wt")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gsdv_memo")
rs.movenext
loop
rs.close
elseif dvType=1 then
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select * from oil.oil_zsz,oil.oil_gscsdv where gscsdv_zsz_id='" &zszId& "' and gscsdv_zsz_id=zsz_id order by gscsdv_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("gscsdv_id")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("zsz_name")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gscsdv_csg_tysj")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gscsdv_csg_gg")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gscsdv_csg_count")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gscsdv_csg_dgff")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gscsdv_csg_dgzt")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gscsdv_gymb_fs")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gscsdv_gymb_tysj")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gscsdv_gymb_wt")
device(deviceCount-1)=device(deviceCount-1)& "@" & rs("gscsdv_memo")
rs.movenext
loop
rs.close
end if
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_gsz_device_remove.asp";
else if (act==1)
form1.action="frm_gsz_device_modify.asp";
form1.submit();
}
-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
<span class="subject">
<%
if dvType=0 then
response.write "供水站供水设备"
elseif dvType=1 then
response.write "供水站储水设备"
end if
%>
</span>
<hr size="1" class=hr width="98%" align="center">
<br>
<form action="" method=post name=form1>
<table border=0 width=90%>
<tr>
<td>
作业区:
<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>
注水站站:
<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>
<td>
设备种类:
<select name=dvtype Onchange="submit()">
<option value=0 <%if dvType=0 then response.write " selected" end if%>>供水设备</option>
<option value=1 <%if dvType=1 then response.write " selected" end if%>>储水设备</option>
</select>
</td>
</tr>
</table>
<hr size="1" class=hr width="98%" align="center">
<table border=0 width=90%>
<tr>
<td>
目前区块:<%=areaName%>  目前注水站:<%=zszName%>
</td>
</tr>
</table>
<%if dvType=0 then%>
<table border="1" cellpadding="1" cellspacing="0" align="center" class="table2"
bordercolor="#000000" bordercolordark="#F8EDEB" width=1100>
<tr height="20">
<td class="title" align=center width=20 rowspan=2> </td>
<td class="title" align=center width=90 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>供水水质</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> <input type=checkbox name=chdevice value=<%=split(device(i),"@")(1)%>></td>
<td> <%=split(device(i),"@")(2)%></td>
<td> <%=split(device(i),"@")(3)%></td>
<td> <%=split(device(i),"@")(4)%></td>
<td> <%=split(device(i),"@")(5)%></td>
<td> <%=split(device(i),"@")(6)%></td>
<td> <%=split(device(i),"@")(7)%></td>
<td> <%=split(device(i),"@")(8)%></td>
<td> <%=split(device(i),"@")(9)%></td>
<td> <%=split(device(i),"@")(10)%></td>
<td> <%=split(device(i),"@")(11)%></td>
<td> <textarea rows=2 cols=25 class=text><%=split(device(i),"@")(12)%></textarea></td>
<td> <textarea rows=2 cols=25 class=text><%=split(device(i),"@")(13)%></textarea></td>
</tr>
<%next%>
</table>
<%elseif dvType=1 then%>
<table border="1" cellpadding="1" cellspacing="0" align="center" class="table2"
bordercolor="#000000" bordercolordark="#F8EDEB" width=1000>
<tr height="20">
<td class="title" align=center width=20 rowspan=2> </td>
<td class="title" align=center width=90 rowspan=2>注水站</td>
<td class="title" align=center colspan=5>储水罐</td>
<td class="title" align=center colspan=3>隔氧密闭</td>
<td class="title" align=center width=180 rowspan=2>备注</td>
</tr>
<tr height="20">
<td class="title" align=center width=60>投运时间</td>
<td class="title" align=center width=60>规格</td>
<td class="title" align=center width=60>数量</td>
<td class="title" align=center width=60>大罐防腐</td>
<td class="title" align=center width=180>大罐运行状况</td>
<td class="title" align=center width=60>密闭方式</td>
<td class="title" align=center width=60>投运时间</td>
<td class="title" align=center width=180>目前存在问题及整改方案</td>
</tr>
<%for i=0 to deviceCount-1%>
<tr height="20" align=center>
<td> <input type=checkbox name=chdevice value=<%=split(device(i),"@")(1)%>></td>
<td> <%=split(device(i),"@")(2)%></td>
<td> <%=split(device(i),"@")(3)%></td>
<td> <%=split(device(i),"@")(4)%></td>
<td> <%=split(device(i),"@")(5)%></td>
<td> <%=split(device(i),"@")(6)%></td>
<td> <textarea rows=2 cols=25 class=text><%=split(device(i),"@")(7)%></textarea></td>
<td> <%=split(device(i),"@")(8)%></td>
<td> <%=split(device(i),"@")(9)%></td>
<td> <textarea rows=2 cols=25 class=text><%=split(device(i),"@")(10)%></textarea></td>
<td> <textarea rows=2 cols=25 class=text><%=split(device(i),"@")(11)%></textarea></td>
</tr>
<%next%>
</table>
<%end if%>
<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_gsz_device_add.asp?area=<%=tarea%>&zsz=<%=tzsz%>&dvtype=<%=dvType%>");'>
<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_stsrc.asp");'>
</td>
</tr>
</table>
</form>
</body>
</html>
<!--#include virtual="/include/DBClose.inc"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -