📄 oderdetails3.asp
字号:
<% Option Explicit %>
<%
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
' 功能:订单确认和删除处理功能页
' OriAuthor: 邓健
' @Language=VBscript
' Create: 2002-10-10
' Modify:
'-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
%>
<!--#include file="_ccwlib/orderform_lib.asp" -->
<%
Dim RS,Sql,sAdminid,sunGrade,ssubok,i
Dim sOrderid,sReceiverId,sReceiverIdA,sReceiverIdANum,sendnum1,sendnum2,sOrderSendState,sProSendNum
Dim sDelReId,sDelReIdA,sDelReIdANum
Dim sFailId,sFailIdA,sFailIdANum,sFailIdATem
DB_Connect(strconn)
sAdminid=Session("admid")
Call IsValidUser(sAdminid,3,1,"../error.htm",oConn) '验证管理员用户
sunGrade=OrderPowerGrade(sAdminid,sOrder_Level,oConn) '获得管理员在订单管理子系统中的权限
sOrderid=getForm("odrid")
sReceiverId=getForm("hdnifsend")
sDelReId=getForm("ckddelete")
sFailId=getForm("hdnsus")
ssubok=getForm("subok")
if ssubok="发送状态设置" then
if sReceiverId="" then
response.redirect("orderdetail.asp?orderid="&sOrderid)
end if
sReceiverId=sReceiverId&","
sReceiverIdA=split(sReceiverId,",")
sReceiverIdANum=uBound(sReceiverIdA)
oConn.beginTrans
For i=0 to sReceiverIdANum-1
oConn.Execute("update orderreceiverDetail set odrR_ifsend='y',odrR_senddate=getdate(),odrR_sused='y' where odrRid="&sReceiverIdA(i))
oConn.Execute("Execute StoreMinusAfterOrdersend "&sOrderid)
next
'确定此订单发送状态
set rs=oConn.Execute("select count(*) from orderreceiverDetail where odr_id="&sOrderid)
sendnum1=RS(0)
rs.close
set rs=oConn.Execute("select count(*) from orderreceiverDetail where odrR_ifsend='y' and odr_id="&sOrderid)
sendnum2=RS(0)
rs.close
if sendnum1>sendnum2 and sendnum2>0 then
sOrderSendState=2 '部分发送
Elseif sendnum1=sendnum2 then
sOrderSendState=1 '全部发送
Elseif sendnum2=0 then
sOrderSendState=3 '没有发送
End if
oConn.execute("update orderdetail set odr_sendState="&sOrderSendState&" where odr_id="&sOrderid)
oConn.Committrans
response.redirect("orderdetail.asp?orderid="&sOrderid)
elseif ssubok="成功状态设置" then
if sFailId="" then
response.redirect("orderdetail.asp?orderid="&sOrderid)
end if
sFailId=sFailId&","
sFailIdA=split(sFailId,",")
sFailIdANum=uBound(sFailIdA)
oConn.beginTrans
For i=0 to sFailIdANum-1
sFailIdATem=split(sFailIdA(i),"/")
if sFailIdATem(1)="n" then
oConn.Execute("update orderreceiverDetail set odrR_sused='"&sFailIdATem(1)&"' where odrRid="&sFailIdATem(0))
oConn.Execute("Execute StoreAddAfterOrderNoSend "&sOrderid)
elseif sFailIdATem(1)="y" then
oConn.Execute("update orderreceiverDetail set odrR_sused='"&sFailIdATem(1)&"' where odrRid="&sFailIdATem(0))
oConn.Execute("Execute StoreMinusAfterOrdersend "&sOrderid)
end if
next
oConn.Committrans
response.redirect("orderdetail.asp?orderid="&sOrderid)
elseif ssubok="删除接收者" then
if sDelReId="" then
response.redirect("orderdetail.asp?orderid="&sOrderid)
end if
sDelReId=sDelReId&","
sDelReIdA=split(sDelReId,",")
sDelReIdANum=uBound(sDelReIdA)
oConn.beginTrans
For i=0 to sDelReIdANum-1
oConn.Execute("delete from orderreceiverDetail where odrRid="&sDelReIdA(i))
next
'确定此订单发送状态
set rs=oConn.Execute("select count(*) from orderreceiverDetail where odr_id="&sOrderid)
sendnum1=RS(0)
rs.close
set rs=oConn.Execute("select count(*) from orderreceiverDetail where odrR_ifsend='y' and odr_id="&sOrderid)
sendnum2=RS(0)
rs.close
if sendnum1>sendnum2 and sendnum2>0 then
sOrderSendState=2 '部分发送
Elseif sendnum1=sendnum2 then
sOrderSendState=1 '全部发送
Elseif sendnum2=0 then
sOrderSendState=3 '没有发送
End if
oConn.execute("update orderdetail set odr_sendState="&sOrderSendState&" where odr_id="&sOrderid)
oConn.Committrans
response.redirect("orderdetail.asp?orderid="&sOrderid)
Else
response.redirect("orderdetail.asp?orderid="&sOrderid)
End if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -