我正在使用仓储管理系统,这入库信息中,我需要对入库的信息进行编辑修改时,入库日期、供应商、单价、数量都可修改,但类别 和 品名|规格|计量单位(三项联在一起) 不能修改,请各位老师帮忙修改一下。
类别:class 品名|规格|计量单位:pinming guige unit
入库修改的部分代码:
sub SaveModify
class1=request.Form("d_position1")
pinming=request.Form("pinming")
names=Split(pinming,"|")
pinming=names(0)
guige=names(1)
unit=names(2)
num=names(3)
num0=request.Form("use_num")
num1=num-num0
set rs1=server.createobject("adodb.recordset")
if guige="" then
sql1="select * from store where pinming='"&pinming&"'"
else
sql1="select * from store where pinming='"&pinming&"' and guige='"&guige&"'"
end if
rs1.open sql1,conn,1,3
if not rs1.eof and not rs1.bof then
rs1("number")=rs1("number")-num1
rs1("price") = request.Form("use_price")
end if
rs1.update
rs1.close
set rs1=nothing
在出库编辑中是可以修改品名的,对照下面出库修改的部分代码,能否帮我一下?
sub SaveModify
old_num=request.Form("old_num")
Loan_num=request.Form("Loan_num")
pinming=trim(request.Form("pinming"))
names=Split(pinming,"|")
id=names(0)
pinming=names(1)
guige=names(2)
unit=names(4)
num= old_num-Loan_num
if id=0 then
response.Write "<script language=javascript>alert('对不起,请重新选择分类与品名!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=out_store.asp"">"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from store where id="&id&""
rs.open sql,conn,1,3
if not rs.eof then
if rs("number")+num<0 then
response.Write "<script language=javascript>alert('对不起,库存不足,请调整您的出库量!');</script>"
response.write "<meta http-equiv=""refresh"" content=""0;url=out_store.asp"">"
response.end
else
rs("number")=rs("number")+num
rs.update
end if
end if
rs.close
set rs=nothing
[此贴子已经被作者于2007-4-25 15:12:26编辑过]