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

📄 newcollection.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")

if request("id")<>"" then
	objcheck.CheckUserFunction "payment","edit"
else
	objcheck.CheckUserFunction "payment","add"
end if
set objcheck=nothing

if request("id")<>"" then
	dim connq
	dim rsq
	dim strpaymentno
	set connq=server.CreateObject("adodb.connection")
	set rsq=server.CreateObject("adodb.recordset")
	connq.Open connstring
	rsq.Open "select * from v_collection where collectionid="&request("id"),connq,2,3,1
	stramount=rsq("amount")
	straccountid=rsq("accountid")
	if rsq("orderid")<>"" then strorderid=rsq("orderid") else strorderid=-1
	strordernum=rsq("ordernum")
	straccount=getfieldvalue("[account]","accountid",rsq("accountid"),"account")
	strcollectiontype=rsq("collectiontype")
	strreceiveddate=rsq("receiveddate")
	strdescription=rsq("description")
	strpaymentno=rsq("paymentno")
	if rsq("paymentid")<>"" then strpaymentid=rsq("paymentid") else strpaymentid=-1
	rsq.Close
	set rsq=nothing
	connq.Close
	set connq=nothing
else
	straccountid=-1
	strpaymentid=-1
	strorderid=-1
	stramount=request("paymentamount")
	if request("straccount")<>"" then straccount=request("straccount")
	if request("straccountid")<>"" then straccountid=request("straccountid")
	if request("paymentno")<>"" then strpaymentno=request("paymentno")
	if request("paymentid")<>"" then strpaymentid=request("paymentid")
	if request("stramount")<>"" then stramount=request("stramount")
	if request("strorderid")<>"" then strorderid=cint(request("strorderid"))
	if request("strordernum")<>"" then strordernum=request("strordernum")
	strreceiveddate=date()
end if

if request("amount")<>"" then
	Dim objcollection
	Set objcollection=Server.CreateObject("SmartSales.Collection")
	objcollection.SaveCollection
	set objcollection=nothing
%>
<script language=javascript>
	window.opener.location.reload();
	window.close();
</script>
<%
end if
%>

<HTML><HEAD><TITLE>收款</TITLE>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function save(){
	if (form1.payment.value==-1&&form1.account.value==-1){
		alert('请选择应收帐或者客户');
		form1.payment.focus();
		return;
	}
	if (form1.amount.value==''){
		alert('请输入金额');
		form1.amount.focus();
		return;
	}
	if (isNaN(form1.amount.value)){
		alert('请输入数字');
		form1.amount.focus();
		return;
	}

form1.submit();
}
</script>
<script language=javascript src="../tools/calendar.js"></script>
<script language=javascript src="../tools/newcalendar.js"></script>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
 <form name=form1  method="post"  id=form1>
       <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
   <tr> 
    <td height="25"><strong><font size="2" class=title><b><%if request("id")="" then%>新建收款<%else%>编辑收款<%end if%></b></font></strong></td>
      <td>&nbsp;</td>
    </tr>
    <tr > 
      <td height="16" colspan="2" background="../images/title.gif">&nbsp;</td>
    </tr>
    <tr>
      <td height=4></td>
    </tr>
 </table>
  <table width="100%" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF">
    <tr bgcolor="white"> 
      <td width="10%" bgcolor="DEDFDE"> <div align="center">应收帐</div></td>
      <td width="40%" bgcolor="efefef" ><input name="paymentname" type="text" value="<%=strpaymentno%>" readonly> 
        <input type="button" name="bnpayment" onClick="JavaScript:opensubwin2('form1','payment',form1.order.value)"    value=...  class=black> 
        <input name="payment" type="hidden" size="8" value="<%=strpaymentid%>">
      </td>
      <td width="10%" bgcolor="DEDFDE"> <div align="center">金额</div></td>
      <td width="30%" bgcolor="efefef">
<input name=amount type=text value="<%=stramount%>" size=11>
      </td>
    </tr>
    <tr  bgcolor="white">
      <td bgcolor="DEDFDE" nowrap><div align="center">合同号</div></td>
      <td bgcolor="efefef"><input type="text" name="ordername" value="<%=strordernum%>" readonly> 
        <input type="button" name="bnorder" onClick="JavaScript:opensubwin2('form1','corder')"    value=...  class=black> 
        <input type="hidden" name="order" id=name="order" value="<%=strorderid%>"> </td>
      <td bgcolor="DEDFDE" nowrap><div align="center">收款类型</div></td>
      <td bgcolor="efefef"><select name="collectiontype" id="select">
          <option value="应收款" <%if strcollectiontype="应收款" then response.Write("selected")%>>应收款</option>
          <option value="预收款" <%if strcollectiontype="预收款" then response.Write("selected")%>>预收款</option>
          <option value="其他应收款" <%if strcollectiontype="其他应收款" then response.Write("selected")%>>其他应收款</option>
        </select></td>
    </tr>
    <tr  bgcolor="white"> 
      <td width="10%" bgcolor="DEDFDE" nowrap> <div align="center">客户</div></td>
      <td bgcolor="efefef"><input type="text" name="accountname" value="<%=straccount%>" readonly> 
        <input type="button" name="bnaccount" onClick="JavaScript:opensubwin2('form1','account')"    value=...  class=black> 
        <input type="hidden" name="account" value="<%=straccountid%>"> </td>
      <td width="10%" bgcolor="DEDFDE" nowrap> <div align="center">收款日期</div></td>
      <td bgcolor="efefef"><input type="text" name="receiveddate" size="12" language=javascript id="dupdatetime" value="<%=strreceiveddate%>" readonly> 
        <%
	if request("id")="" then
	call AddImg("date")
	end if
	%>
        <input type = hidden name=clicksource> <input type = hidden name=clickresult > 
      </td>
    </tr>
    <tr  bgcolor="white"> 
      <td width="10%" bgcolor="DEDFDE" > <div align="center">描述</div></td>
      <td colspan="3" bgcolor="efefef"> <textarea name="description" cols="45" rows="4"><%=strdescription%></textarea></td>
    </tr>
  </table>
	<table>
    <tr> 
      <td height=10 colspan="4"></a></td>
    </tr>
    <tr> 
      <td></td>
      <td style="cursor:hand">&nbsp;&nbsp;<a onclick="save();"><img src="../images/button_save.gif"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a onclick="window.close();"><img src="../images/button_cancel.gif"></a> 
      
	
	</td>
      <td style="cursor:hand">&nbsp;</td>
      <td style="cursor:hand">&nbsp;</td>
    </tr>
  </table>
</form>

⌨️ 快捷键说明

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