📄 usercar_view_driver.asp
字号:
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<!--#include file="../inc/ronger.asp"-->
<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(Session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
'------------------------------------------------
'------------------------------------------------添加/修改记录
ID = ChkInt(Request("ID"))
currentpage=request("page") '当前页码
If Request.Form("addedit_subed") = "true" Then
CarNumber = Request.Form("CarNumber")
Manager_ID = LoginID
Driver_OK = 0
Stau_IsOK = 2
field1=array("CarNumber","Manager_ID","Driver_OK","Stau_IsOK")
value1=array( CarNumber , Manager_ID , Driver_OK , Stau_IsOK )
sql="UPDATE tbioa_UserCar SET "
for i=0 to ubound(field1)
sql = sql & field1(i) & "='" & replace(value1(i),"'","''") & "'"
if i <> ubound(field1) then sql=sql & "," else sql=sql & " where id=" & ID
next
oConn.Execute sql
Response.Write ShowSubmit("","驾驶员确认完毕!点击确定返回列表!",1,"UserCar_Driver.asp?Page="¤tpage)
End If
set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT tbioa_UserCar.*, tbioaUser.Name AS User_Name, tbioaDepartment.Name AS Department_Name FROM tbioa_UserCar INNER JOIN tbioaUser ON tbioa_UserCar.User_ID = tbioaUser.ID INNER JOIN tbioaDepartment ON tbioa_UserCar.Use_Depar_ID = tbioaDepartment.ID Where tbioa_UserCar.ID = "&ID&" And tbioa_UserCar.PartMan_ID="&LoginID
rs.open sql,oConn,1,1
If Rs.Eof And Rs.Bof Then
Rs.Close
Set Rs = NoThing
Response.Write ShowSubmit("","未找到匹配的数据!",1,"UserCar_List.asp")
End If
Function ChkInt(Str)
If Not(IsNumeric(Str))Then
ChkInt = 0
Else
If Int(Str) < 0 Or Int(Str) > 999999999 Then
ChkInt = 0
Else
ChkInt = Int(Str)
End If
End If
End Function
Function ShowSubmit(VarContent,Msg,Close,Page)
If VarContent = "" Then
If Close = 1 Then
oConn.Close
Set oConn = NoThing
End If
Response.Write CHR(10) & "<SCRIPT LANGUAGE=""JavaScript"">" & CHR(10)
Response.Write "<!--" & CHR(10)
If Page = "" Then
Response.Write "alert('"&Msg&"');history.back();" & CHR(10)
Else
Response.Write "alert('"&Msg&"');location.href='"&Page&"';" & CHR(10)
End If
Response.Write "-->" & CHR(10)
Response.Write "</SCRIPT>" & CHR(10)
Response.End
End If
End Function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
<script src="../js/Popup.js"></script>
<script src="../js/front_chec.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
//function selectmanager(form)
//{
// form.manager.value = showModalDialog("job_selectmanager.asp", "", "dialogWidth:14em; dialogHeight:8em; center: Yes; scroll:No; resizable: No; status: No; help: No;")
//}
//-->
</SCRIPT>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="UserCar_menu.html"-->
<hr width="100%" size=1 color="#000000">
<br>
<div align="center">
<table width="710" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td width="100%" class="tdTop">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="tdTop">
<p align="left"><img border="0" src="../images/icon_title.gif" align="left">拟制用车申请</p>
</td>
<td width="90" class="tdTop">
<p align="left"><img border="0" src="../images/icon_return.gif" align="left">
<a href="javascript:history.back()" class="linkTop">返回列表</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="25%" class="td1" align="center">
<br>
<strong>用车申请表</strong>
<br><br>
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="tab">
<tr class="td1">
<td width="27%">申 请 人: <%=HtmlOut(rs("User_Name"))%></td>
<td width="27%">申请时间:<%=HtmlOut(rs("GetFr_Date"))%></td>
<td width="46%">用车部门:<%=GetTableValue("tbioaDepartment","Name","ID",Rs("Use_Depar_ID"))%></td>
</tr>
<tr class="td1">
<td width="50%" colspan="2">用车时间: <input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="Use_Date" class="input" readonly value="<%=HtmlOut(rs("Use_Date"))%>"></td>
<td width="50%" rowspan="4">事由:<br>
<Textarea Name="User_What" Rows="10" Cols="50" readonly><%=Rs("User_What")%></Textarea>
</td>
</tr>
<tr class="td1">
<td width="50%" colspan="2">用车联系人:<input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="Use_Man" class="input" readonly value="<%=Rs("Use_Man")%>"></td>
</tr>
<tr class="td1">
<td width="50%" colspan="2">部门审批人:<SELECT NAME="PartMan_ID">
<option value=""><%=GetTableValue("tbioaUser","Name","ID",Rs("PartMan_ID"))%></option>
</SELECT>
</td>
</tr>
<tr class="td1">
<td width="50%" colspan="2">使用线路:<br>
<Textarea Name="Use_Line" Rows="5" Cols="50" readonly><%=Rs("Use_Line")%></Textarea>
</td>
<tr class="td1">
<td width="50%" colspan="3">
<fieldset style="width:100%" align="center"> <legend>批复意见:</legend>
<%If Not(IsNull(Rs("PartManSay"))) Then Response.Write Replace(Rs("PartManSay"),vbcrlf,"<br>")%><br>
<div align="right">批复结果:<B><%If Rs("PartMan_OK") = 0 Then Response.Write "<font color=green>同意用车</font>" Else Response.Write "<font color=red>不同意用车</font>"%></B> <br><B><%=GetTableValue("tbioaUser","Name","ID",Rs("PartMan_ID"))%></B> </div>
</fieldset>
</td>
</tr>
<tr class="td1">
<form name="eventfrm" method="POST" action="?ID=<%=ID%>&Page=<%=currentpage%>">
<input type=hidden name="addedit_subed" value="true">
<td width="50%" colspan="3">选定用车:
<SELECT NAME="CarNumber">
<%
set rs_a=Server.CreateObject("ADODB.RecordSet")
sql="select * from tbioaCarBase order by ID desc"
rs_a.open sql,oConn,1,1
For i = 1 To Rs_a.RecordCount
Response.Write "<option value="""&rs_a("bh")&""">"&rs_a("clpp")&" | "&rs_a("bh")&"</option>"
rs_a.MoveNext
Next
rs_a.Close
Set rs_a = NoThing
%>
</SELECT>
派车人:<%=Session("RealName")%>
<INPUT TYPE="submit" value="确 认" class="button0" onmouseout=className="button0" onmouseover=className="button1">
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<%'释放对象变量
Rs.Close
Set Rs = NoThing
oConn.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -