📄 yyw_comindex_change备份.htm
字号:
<SCRIPT LANGUAGE="JavaScript">
//<!--
//function fnname()
//{
// alert("联系人已经存在,请重试!");
//}
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function fnproductname()
{
alert("产品已经存在,请重试!");
}
//-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
</td>
<td valign="top" align="right">
<table width="90%" border="0" cellspacing="0" cellpadding="0" background="../images/image--banyuan--cccccc--2.gif" align="center">
</table>
<br>
<%
'连接数据库
'Set ocon=Server.CreateObject("ADODB.Connection")
'Set ors = Server.CreateObject("ADODB.RecordSet")
'ocon.Open "driver={SQL Server};server=eppade;uid=sa;pwd=;database=test"
%>
<form name="clintmessage" method=post action="yyw_company_changesave.asp" onsubmit="return fnSubmitBlank()">
<p align="left">
公 司 名 称:
<select name="compname" onchange="popwin(this,1);" style="width:145">
<option value="-2" selected>--请选择公司名称--</option>
<%
'----------------
company_id=request.querystring("id")
if company_id="" or not isnumeric(company_id) then '为空和不是数字型
company_id=0
else
company_id=cint(company_id)
end if
'在公司选择下拉列表中输出产品内容
Set ors_compname = Server.CreateObject("ADODB.RecordSet")
Sqlcompname="SELECT DISTINCT company_name,id FROM contact_company WHERE NOT company_name='' ORDER BY company_name"
ors_compname.Open Sqlcompname,ocon,1,1
if not ors_compname.eof then
ors_compname.MoveFirst
end if
Do While not ors_compname.EOF
'trim(ors_dept(0))
If company_id=ors_compname("id") Then
Response.Write"<option value=" & ors_compname("id") & " selected>" & ors_compname("company_name") & "</option>" & chr(13)
Else
Response.Write"<option value=" & ors_compname("id") & ">" & ors_compname("company_name") & "</option>" & chr(13)
End If
ors_compname.MoveNext
Loop
response.write " <option value=""-1""> --新建公司-- </select>"
ors_compname.Close
Set ors = Server.CreateObject("ADODB.RecordSet")
'response.write" select * from contact_company where id="&company_id
'response.end
ors.open "select * from contact_company where id="&company_id,ocon
if not oRS.eof then
sCompanyAddress=oRS("company_address")
sCompanyArea=oRS("area")
sCompanyType=ors("type")
sCompanycode=ors("postalcode")
sCompanybank=ors("company_bank")
sCompanybaccount=ors("bank_account")
sCompanytaccount=ors("tax_account")
sCompanycredit=ors("credit")
sCompanypre=ors("preferential")
sCompanyfax=ors("fax")
end if
oRS.close
%>
<%
'sqlstr1="select * from yw_table where clintid="&company_id
'ors.open sqlstr1,ocon,1,1
%>
<INPUT TYPE="hidden" name="company_id" value="<%=company_id%>">
地 区:<input type="text" name="T2" size="20" class="textstyle" readonly
value="<%=sCompanyArea%>"><p align="left"> 业 务 类 别:<input type="text" name="T3" size="15" class="textstyle" readonly value="<%=sCompanyType%>"> 地 址:<input type="text" name="T4" size="40" readonly class="textstyle" value="<%=sCompanyAddress%>"><p align="left"> 邮 编:<input type="text" name="T5" size="15" class="textstyle" readonly value="<%=sCompanycode%>">
开 户 行:<input type="text" name="T6" size="20" class="textstyle" readonly value="<%=sCompanybank%>"><p align="left"> 帐 号:<input type="text" name="T7" size="20" class="textstyle" readonly value="<%=sCompanybaccount%>"> 税 号:
<input type="text" name="T8" size="20" class="textstyle" readonly value="<%=sCompanytaccount%>">
<p align="left"> 资 信 额 度:<input type="text" name="T9" size="15" class="textstyle" readonly value="<%=sCompanycredit%>"> 优 惠 条 件:<input type="text" name="T10" size="15" class="textstyle" readonly value="<%=sCompanypre%>"><p align="left"> 传 真:<input type="text" name="T11" size="15" class="textstyle" readonly value="<%=sCompanyfax%>">
联 系 人:
<select name="username" onchange="popwin1(this,0);">
<option value="联系人" selected style="width:145">--联系人列表--</option>
<%
'在人士选择下拉列表中输出人员内容
Set ors_user = Server.CreateObject("ADODB.RecordSet")
SqlUser="SELECT DISTINCT name,id FROM userinfo WHERE company_id="&company_id
ors_user.Open SqlUser,ocon
'ors_user.MoveFirst
userid=request.querystring("id1")
if userid="" or not isnumeric(userid) then '为空和不是数字型
productid=0
else
userid=cint(userid)
end if
Do While not ors_user.EOF
If userid=ors_user("id") Then
'trimeywyid=ors_user("id")
Response.Write"<option value=" & ors_user("id") & " selected>" & ors_user("name") & "</option>" & chr(13)
Else
Response.Write"<option value=" & ors_user("id") & ">" & ors_user("name") & "</option>" & chr(13)
End If
ors_user.MoveNext
Loop
response.write " <option value=""-1""> --新建联系人-- </select>"
ors_user.Close
%>
</select>
<%
userid=session("userid")
'response.write userid
'response.end
'Sqlproduct="select distinct productname,productid from yw_product where not productname='' and company_id in (select company_id from userinfo where userinfo.id="&userid&")"
'response.write sqlproduct
'response.end
%>
<p align="left"> 产 品:
<select name="product" onchange="popwin2(this,1);" style="width:145">
<option value="产品" selected> --产品列表--</option>
<%
'在产品选择下拉列表中输出产品内容
Set ors_product = Server.CreateObject("ADODB.RecordSet")
Sqlproduct="select distinct productname,productid from yw_product where not productname='' "
'response.write sqlproduct
'response.end
ors_product.Open Sqlproduct,ocon
'ors_product.MoveFiorst
productid=request.querystring("id2")
if productid="" or not isnumeric(productid) then '为空和不是数字型
productid=0
else
productid=cint(productid)
end if
Do While not ors_product.EOF
'productid=trim(ors_product(0))
If productid=ors_product("productid") Then
Response.Write"<option value=" & ors_product("productid") & " selected>" & ors_product("productname") & "</option>" & chr(13)
Else
Response.Write"<option value=" & ors_product("productid") & ">" & ors_product("productname") & "</option>" & chr(13)
End If
ors_product.MoveNext
Loop
response.write " <option value=""-1""> --新建产品-- </select>"
ors_product.Close
Set ors = Server.CreateObject("ADODB.RecordSet")
ors.open "select price,yw_danwei.name as dname from yw_product,yw_danwei where yw_danwei.id=yw_product.danweiid and productid="&productid,ocon
if not oRS.eof then
sprice=oRS("price")
sdanwei=ors("dname")
'response.write sprice
'response.end
end if
oRS.close
%>
</select>
<%
sqlstr4="select sum(productsl) as sumproductsl from yw_access where productid="&productid&" group by productid"
'response.write sqlstr4
'response.end
oRs.open sqlstr4,ocon,3,3 '既读又写
if not ors.eof then
sumproductsl=ors("sumproductsl")
else
sumproductsl="no access!"
end if
%>
库 存 数 量:<input type="text" name="sumproductsl" size="10" readonly value="<%=sumproductsl%>" class="textstyle" >
<p align="left"> ( 请 您 输 入 ): - > 数 量:<input type="text" name="sl" size="10" onchange="return fnValidate(this,4,0)" >
单 位:(<input type="text" name="danwei" readonly size="8" class="textstyle" value="<%=sdanwei%>">)
成交单价:<input type="text" name="price" size="15" onchange="return fnValidate(this,4,0)" value=<%=sprice%>> <p align="left"> <input type=button value=总计 onclick=" javascript:zongji();"><input type=text name=textzongji size=15 class="textstyle">
<div align=right>
<p><input type="submit" name=submit value=确定 ></p>
</div>
</form>
</table>
</body>
</html>
<html><script language="JavaScript"> </script></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -