operation_add.asp

来自「适用于网络/信息企业」· ASP 代码 · 共 263 行

ASP
263
字号
<!--#include file="../INC/Conn.asp"-->
<!--#include file="inc/Check.asp"-->
<!--#include file="inc/public.asp"-->
<!--#include File="Procedure.asp"-->
<%
dim Makking
Makking = Trim(Request.QueryString("Makking"))    
'---------------------------------
select case Makking
case "save"

Affix_To_Time			= Request.Form("year1")&"-"&Request.Form("month1")&"-"&Request.Form("day1")
End_Time				= Request.Form("year2")&"-"&Request.Form("month2")&"-"&Request.Form("day2")
Pact_ID					= Request.Form("Pact_ID")	
Pact_Name				= Request.Form("Pact_Name")
Operation_Type			= Request.Form("Operation_Type")
Pact_Money				= Request.Form("Pact_Money") 
Operation_State			= Request.Form("Operation_State")
Operation_Content		= Request.Form("Operation_Content")

IF Affix_To_Time = "" or End_Time = "" or Pact_ID = "" or Pact_Name = "" or Operation_Type = "" or Pact_Money = "" or Operation_State = "" or Operation_Content = ""  Then

	Save_title="·对不起,带*号的为必填项"   
	call Save_err()

End if

IF Request.QueryString("Pact_ID") = "" Then

Set Rs = Conn.Execute("Select * From Operation where Pact_ID = '"& Pact_ID &"'")

	IF Not(Rs.eof and Rs.bof) Then
	
	Save_title="·对不起,合同编号重复"   
	call Save_err()
	
	End IF
	
	Rs.Close

Set Rs = Nothing

	Conn.Execute("Insert Into Operation (Buyer_ID,Pact_ID,Employee_ID,Pact_Name,Operation_Type,Pact_Money,Operation_State,Operation_Content,Affix_To_Time,End_Time,DateTime) Values ('"& Request.QueryString("ID") &"','"& Pact_ID &"','"& Session("Eboer_CRM_Employee_ID") &"','"& Pact_Name &"','"& Operation_Type &"',"& Pact_Money &",'等待','"& Operation_Content &"','"& cdate(Affix_To_Time) &"','"& Cdate(End_Time) &"','"& now() &"')")

	Response.Write "<script>window.opener.location.reload()</script>"

	Save_title="·添加成功"   
	call Save_ok()

Else

	Conn.Execute("upDate Operation Set Pact_Name = '"& Pact_Name &"',Operation_Type = '"& Operation_Type &"',Pact_Money = "& Pact_Money &",Operation_State = '"& Operation_State &"',Operation_Content = '"& Operation_Content &"',Affix_To_Time = '"& cdate(Affix_To_Time) &"',End_Time = '"& End_Time &"',DateTime = '"& Now() &"' Where Buyer_ID='"& Request.QueryString("ID") &"' and Pact_ID = '"& Request.QueryString("Pact_ID") &"' AND Employee_ID = '"& Session("Eboer_CRM_Employee_ID") &"'")

	Save_title="·修改成功"   
	call Save_ok()

End IF

case ""

Set Rs = Conn.Execute("Select * From Operation Where Buyer_ID='"& Request.QueryString("ID") &"' and Pact_ID = '"& Request.QueryString("Pact_ID") &"'")

IF Not(Rs.Bof AND Rs.eof) Then

	Affix_To_Time			= Rs("Affix_To_Time")
	End_Time				= Rs("End_Time")
	Pact_ID					= Rs("Pact_ID")	
	Pact_Name				= Rs("Pact_Name")
	Operation_Type			= Rs("Operation_Type")
	Pact_Money				= Rs("Pact_Money")
	Operation_State			= Rs("Operation_State")
	Operation_Content		= Rs("Operation_Content")

End if

Rs.Close
Set Rs = Nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>亿博尔-客户关系管理系统</title>
</head>
<link href="Images/Admin.css" rel="stylesheet" type="text/css">
<body>
<table width="98%" height="40"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%"  border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#D8D8D8">
      <tr>
        <td height="30" align="left" bgcolor="ffffff"><table width="100%" height="100%"  border="0" cellpadding="3" cellspacing="0">
            <tr bgcolor="eeeeee">
              <td width="5%" align="center"><img src="Images/1.gif" width="13" height="12"></td>
                <td width="85%"><span class="style2">管理中心 &gt;&gt;&gt; 添加/修改业务记录</span></td>
                <td width="10%" align="right">&nbsp;</td>
            </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="98%" height="85%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#D8D8D8">
  <tr>
    <td valign="top" bgcolor="ffffff"><table width="95%"  border="0" align="center" cellpadding="5" cellspacing="0">
        <tr>
          <td align="center" valign="top" bgcolor="ffffff"> 
            <form method='POST' name="form" action="Operation_Add.asp?Makking=save&ID=<%=Request.QueryString("ID")%>&Pact_ID=<%=Request.QueryString("Pact_ID")%>">
              <br>
              <table width=100% border=0 align='center' cellpadding=2 
      cellspacing=1 bordercolordark=#ffffff bgcolor="#EBEBEB" class='size09'>
                <tr> 
                  <td width="25%" height="22" align="right" bgcolor="ffffff">合同编号:</td>
                  <td height="22" bgcolor="ffffff">
<input name="Pact_ID" type="text" id="Pact_ID" value="<%=Pact_ID%>" size="30" maxlength="50">
                    <font color="#FF0000">*</font> </td>
                </tr>
                <tr> 
                  <td height="22" align="right" bgcolor="ffffff">合同名称:</td>
                  <td height="22" bgcolor="ffffff">
<input name="Pact_Name" type="text" id="Pact_Name" value="<%=Pact_Name%>" size="30" maxlength="50">
                    <font color="#FF0000">*</font></td>
                </tr>
                <tr> 
                  <td height="22" align="right" bgcolor="ffffff">业务类型:</td>
                  <td height="22" bgcolor="ffffff"> <select name="Operation_Type" id="Operation_Type">
                      <option value="ECMS建站" <%IF Operation_Type = "ECMS建站" Then%>selected<%End IF%>>ECMS建站</option>
                      <option value="普通建站" <%IF Operation_Type = "普通建站" Then%>selected<%End IF%>>普通建站</option>
                      <option value="维护服务" <%IF Operation_Type = "维护服务" Then%>selected<%End IF%>>维护服务</option>
                      <option value="EIP建设" <%IF Operation_Type = "EIP建设" Then%>selected<%End IF%>>EIP建设</option>
                      <option value="应用软件" <%IF Operation_Type = "应用软件" Then%>selected<%End IF%>>应用软件</option>
                      <option value="网络推广" <%IF Operation_Type = "网络推广" Then%>selected<%End IF%>>网络推广</option>
                      <option value="域名注册" <%IF Operation_Type = "域名注册" Then%>selected<%End IF%>>域名注册</option>
                      <option value="空间租用" <%IF Operation_Type = "空间租用" Then%>selected<%End IF%>>空间租用</option>
                      <option value="企业邮局" <%IF Operation_Type = "企业邮局" Then%>selected<%End IF%>>企业邮局</option>
                      <option value="页面设计" <%IF Operation_Type = "页面设计" Then%>selected<%End IF%>>页面设计</option>
                    </select>
                    <font color="#FF0000">*</font></td>
                </tr>
                <tr> 
                  <td height="22" align="right" bgcolor="ffffff">合同金额:</td>
                  <td height="22" bgcolor="ffffff">
<input name="Pact_Money" type="text" id="Pact_Money" value="<%=Pact_Money%>" size="18" maxlength="50" onKeyPress	= "return regInput(this,	/^\d*\.?\d{0,2}$/,		String.fromCharCode(event.keyCode))" 
		onpaste		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		window.clipboardData.getData('Text'))"
		ondrop		= "return regInput(this,	/^\d*\.?\d{0,2}$/,		event.dataTransfer.getData('Text'))">
                    <font color="#FF0000">*</font></td>
                </tr>
                <tr> 
                  <td width="25%" height="22" align="right" bgcolor="ffffff">签署时间:</td>
                  <td height="22" bgcolor="ffffff"> 
                    <select name="year1" class="all_box1">
            <%
			if Affix_To_Time = "" then
			Affix_To_Time = Now()
			end if
			%>
                      <%for i=2005 to 2010%>
                      <option value="<%=i%>"  <%if year(Affix_To_Time)=i then %>selected<% end if %>><%=i%> 
                      </option>
                      <%next%>
                    </select>
                    <select name="month1" class="all_box1">
                      <%for i=1 to 12%>
                      <option value="<%=i%>"<%if month(Affix_To_Time)=i then %>selected<% end if %> ><%=i%> 
                      </option>
                      <%next%>
                    </select>
                    <select name="day1" class="all_box1">
                      <%for i=1 to 31%>
                      <option value="<%=i%>"<%if day(Affix_To_Time)=i then %>selected<% end if %>><%=i%> 
                      </option>
                      <%next%>
                    </select>
                    日<font color="#FF0000"> *</font></td>
                </tr>
                <tr> 
                  <td width="25%" height="22" align="right" bgcolor="ffffff">截止日期:</td>
                  <td height="22" bgcolor="ffffff">
<select name="year2" class="all_box1">
                      <%
			if End_Time = "" then
			End_Time = DateAdd("yyyy",+1,date)
			end if
			%>
                      <%for i=2005 to 2010%>
                      <option value="<%=i%>"  <%if year(End_Time)=i then %>selected<% end if %>><%=i%> 
                      </option>
                      <%next%>
                    </select>
                    <select name="month2" class="all_box1">
                      <%for i=1 to 12%>
                      <option value="<%=i%>"<%if month(End_Time)=i then %>selected<% end if %> ><%=i%> 
                      </option>
                      <%next%>
                    </select>
                    <select name="day2" class="all_box1">
                      <%for i=1 to 31%>
                      <option value="<%=i%>"<%if day(End_Time)=i then %>selected<% end if %>><%=i%> 
                      </option>
                      <%next%>
                    </select>
                    日<font color="#FF0000"> *</font></td>
                </tr>
                <tr> 
                  <td width="25%" height="22" align="right" bgcolor="ffffff">业务内容:</td>
                  <td height="22" bgcolor="ffffff"> 
                    <textarea name="Operation_Content" cols="40" rows="5" id="Operation_Content"><%=Operation_Content%></textarea> 
                    <font color="#FF0000">*</font></td>
                </tr>
                <tr>
                  <td width="25%" height="22" align="right" bgcolor="ffffff">业务状态:</td>
                  <td height="22" bgcolor="ffffff"> <select name="Operation_State">
                      <option value="等待" <%IF Operation_State = "等待" Then%>selected<%End IF%>>等待</option>
                      <option value="制作" <%IF Operation_State = "制作" Then%>selected<%End IF%>>制作</option>
                      <option value="完成" <%IF Operation_State = "完成" Then%>selected<%End IF%>>完成</option>
                    </select>
                    <font color="#FF0000">*</font></td>
                </tr>
              </table>
              <p> 
                <input name="B1" type="image" src="Images/refer.gif" width="36" height="21" border="0">
                &nbsp;<%IF request.ServerVariables("http_referer")="" Then%><a href=""><img src="Images/back.gif" width="36" height="21" border="0" onClick="javascript:window.close()"></a><%Else%><a href="<%=request.ServerVariables("http_referer")%>"><img src="Images/back.gif" width="36" height="21" border="0"></a><%End IF%></p>
            </form></td>
        </tr>
      </table>      
      
    </td>
  </tr>
</table>
<%end select
Conn.Close
Set Conn = Nothing

%>
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="6"></td>
  </tr>
</table>
</body>
</html>
<script language="javascript">
<!--
    function LinkMan_Add(id){
        window.open("LinkMan_Add.asp?id="+id+"","","width=500,height=380");
    }
//-->
</script>
<script>
	function regInput(obj, reg, inputStr)
	{
		var docSel	= document.selection.createRange()
		if (docSel.parentElement().tagName != "INPUT")	return false
		oSel = docSel.duplicate()
		oSel.text = ""
		var srcRange	= obj.createTextRange()
		oSel.setEndPoint("StartToStart", srcRange)
		var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
		return reg.test(str)
	}
</script>

⌨️ 快捷键说明

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