📄 frm_ydcsfy_modify.asp
字号:
<!--#include virtual="/include/DBCon.inc"-->
<html>
<head>
<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" src="/include/calender.js"></SCRIPT>
<SCRIPT LANGUAGE=javascript>
<!--
function subcheck() {
form1.submit();
}
-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
<%
wellId=request("wellId")
syear=request("year")
smonth=request("month")
ydcsfyId=request.form("chydcsfy")
if ydcsfyId="" then
response.redirect "/profile/errorpage.asp?title=修改措施费用结算数据&msg=您没有选择任何数据!"
else
ydcsfyId=split(ydcsfyId,",")(0)
end if
isSub=request.form("isSub")
if isSub="" then
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select csc_finish_date, csc_date,csc_id,well_type,cszl_value,dict_value,csc_csnr,csc_fee_zcsg,csc_fee_jt,csc_fee_total,csc_memo from oil.oil_csc c,oil.oil_well w,oil.oil_dict d,oil.oil_cszl z where csc_type=cszl_code and csc_well_id=well_id and well_area=dict_code and dict_type='area' and csc_id='" &ydcsfyId& "'"
rs.open SQL,conn,1,1
dim ydcsfy(10)
ydcsfy(0)=rs("csc_id")
ydcsfy(1)=rs("well_type")
ydcsfy(2)=rs("dict_value")
ydcsfy(3)=rs("cszl_value")
ydcsfy(4)=rs("csc_finish_date")
ydcsfy(5)=rs("csc_csnr")
ydcsfy(6)=rs("csc_fee_zcsg")
ydcsfy(7)=rs("csc_fee_jt")
ydcsfy(8)=rs("csc_fee_total")
ydcsfy(9)=rs("csc_memo")
rs.close
if ydcsfy(1)=0 then
SQL="select * from oil.oil_cszl where cszl_code like '0%'"
else
SQL="select * from oil.oil_cszl where cszl_code like '1%'"
end if
rs.open SQL,conn
dim cszl(),cszlCount
cszlCount=0
do while not rs.eof
cszlCount=cszlCount+1
redim preserve cszl(cszlCount)
cszl(cszlCount-1)=rs("cszl_code") &"@"& rs("cszl_value")
rs.movenext
loop
rs.close
%>
<span class="subject">
修改<%=syear%>年<%=smonth%>月井<%=wellId%>的措施费用结算数据<font color=cc0000><%=ydcsfyId%></font>
</span>
<hr size="1" class=hr width="98%" align="center">
<br>
<form action="" method=post name=form1>
<table border="1" cellpadding="1" cellspacing="0" align="center" class="table2"
bordercolor="#000000" bordercolordark="#F8EDEB" width="90%">
<tr height="20">
<td class="title" align=center width=30% colspan=2> </td>
<td class="title" align=center width=30%>原数据</td>
<td class="title" align=center width=40%>修改后(数据不变化则不填写!)</td>
</tr>
<tr height="20">
<td class="title" align=center width=30% colspan=2>措施种类</td>
<td align=left width=30%>  <%=ydcsfy(3)%></td>
<td align=left width=40%>  
<select name=text1>
<option value="">请选择...</option>
<%for i=0 to cszlCount-1%>
<option value=<%=cszl(i)%>><%=split(cszl(i),"@")(1)%></option>
<%next%>
</select>
</td>
</tr>
<tr height="20">
<td class="title" align=center width=30% colspan=2>措施完井日期</td>
<td align=left width=30%>  <%=ydcsfy(4)%></td>
<td align=left width=40%>  <input type=text name=text2 size=20 class=text> <input type=button value=".." name=datebt class=button onclick="fPopCalendar(text2,text2); return false" alt="按此选时">
</td>
</tr>
<tr height="20">
<td class="title" align=center width=30% colspan=2>措施内容</td>
<td align=left width=30%>  <textarea cols=30 rows=3 class=text><%=ydcsfy(5)%></textarea></td>
<td align=left width=40%>  <textarea name=text3 cols=30 rows=3 class=text></textarea></td>
</tr>
<tr height="20">
<td class="title" align=center width=15% rowspan=2>费用结算</td>
<td class="title" align=center width=15%>正常施工费用</td>
<td align=left width=30%>  <%=ydcsfy(6)%></td>
<td align=left width=40%>  <input type=text name=text4 size=20 class=text></td>
</tr>
<tr height="20">
<td class="title" align=center width=15%>井筒处理费用</td>
<td align=left width=30%>  <%=ydcsfy(7)%></td>
<td align=left width=40%>  <input type=text name=text5 size=20 class=text></td>
</tr>
<tr height="20">
<td class="title" align=center width=30% colspan=2>备注</td>
<td align=left width=30%>  <textarea cols=30 rows=3 class=text><%=ydcsfy(9)%></textarea></td>
<td align=left width=40%>  <textarea name=text6 cols=30 rows=3 class=text></textarea></td>
</tr>
</table>
<br>
<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=hidden name=chydcsfy value=<%=ydcsfyId%>>
<input type=hidden name=wellId value=<%=wellId%>>
<input type=hidden name=year value=<%=syear%>>
<input type=hidden name=month value=<%=smonth%>>
<input type=hidden name=isSub value=true>
<input type="button" name="Submit32" value=" 更新 " class=button onclick=subcheck()>
<input type="button" name="Submit32" value=" 返回 " class=button LANGUAGE=javascript onclick='javascript:location.replace("frm_ydcsfy.asp?well_id=<%=wellId%>&year=<%=syear%>&month=<%=smonth%>");'>
</td>
</tr>
</table>
</form>
<%
else
text1=request.form("text1")
text2=request.form("text2")
text3=request.form("text3")
text4=request.form("text4")
text5=request.form("text5")
text6=request.form("text6")
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select * from oil.oil_csc where csc_id='" &ydcsfyId& "'"
rs.open SQL,conn,1,1
redim ydcsfy(5)
ydcsfy(0)=rs("csc_type")
ydcsfy(1)=rs("csc_finish_date")
ydcsfy(2)=rs("csc_csnr")
ydcsfy(3)=rs("csc_fee_zcsg")
ydcsfy(4)=rs("csc_fee_jt")
ydcsfy(5)=rs("csc_memo")
rs.close
if text1="" then
text1=ydcsfy(0)
else
text1=split(text1,"@")(0)
end if
if text2="" then
text2=ydcsfy(1)
end if
if text3="" then
text3=ydcsfy(2)
end if
if text4="" then
text4=ydcsfy(3)
end if
if text5="" then
text5=ydcsfy(4)
end if
if text6="" then
text6=ydcsfy(5)
end if
SQL="select * from oil.oil_csc where csc_id='" &ydcsfyId& "'"
rs.open SQL,conn,1,3
rs("csc_type")=text1
rs("csc_finish_date")=text2
rs("csc_csnr")=text3
rs("csc_fee_zcsg")=text4
rs("csc_fee_jt")=text5
rs("csc_fee_total")=cint(text4)+cint(text5)
rs("csc_memo")=text6
rs.update
rs.close
response.redirect "frm_ydcsfy.asp?year=" &syear& "&month=" &smonth& "&well_id=" &wellId
end if
%>
</body>
</html>
<!--#include virtual="/include/DBClose.inc"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -