📄 powereasy.orderflow.asp
字号:
Case 3, 5
If rsCart("ProductType") = 3 Then
If Date < rsCart("BeginDate") Or Date > rsCart("EndDate") Then
strProductType = "正常销售"
strDiscount = "─"
dblTempPrice = dblPrice
Else
strProductType = "特价商品"
strDiscount = rsCart("Discount") & "折"
dblTempPrice = rsCart("Price")
End If
Else
strProductType = "降价商品"
strDiscount = rsCart("Discount") & "折"
dblTempPrice = rsCart("Price")
End If
If rsCart("Price_Member") > 0 Then '如果指定了会员价
If rsCart("Price_Member") <= dblTempPrice Then
dblTruePrice = rsCart("Price_Member")
Else
dblTruePrice = dblTempPrice
End If
Else
If PE_CLng(UserSetting(12)) = 1 Then '如可以享受折上折优惠
dblTruePrice = dblTempPrice * Discount_Member / 100
Else
If dblPrice * Discount_Member / 100 >= dblTempPrice Then
dblTruePrice = dblTempPrice
Else
dblTruePrice = dblPrice * Discount_Member / 100
End If
End If
End If
End Select
Case 4 '代理商
Select Case rsCart("ProductType")
Case 1
strProductType = "正常销售"
strDiscount = "─"
Case 2
strProductType = "涨价商品"
strDiscount = "─"
Case 3
If Date < rsCart("BeginDate") Or Date > rsCart("EndDate") Then
strProductType = "正常销售"
Else
strProductType = "特价商品"
strDiscount = rsCart("Discount") & "折"
End If
Case 5
strProductType = "降价商品"
strDiscount = rsCart("Discount") & "折"
End Select
dblTempPrice = rsCart("Price")
If rsCart("Price_Agent") > 0 Then '如果指定了代理价
dblTruePrice = rsCart("Price_Agent")
strDiscount = "─"
Else
If Discount_Member = 100 Then
dblTruePrice = dblTempPrice
Else
If PE_CLng(UserSetting(12)) = 1 Then '如可以享受折上折优惠
dblTruePrice = dblTempPrice * Discount_Member / 100
Else
If rsCart("Price_Original") * Discount_Member / 100 <= dblTempPrice Then
dblTruePrice = rsCart("Price_Original") * Discount_Member / 100
strDiscount = Round(Discount_Member / 10, 1) & "折"
Else
dblTruePrice = dblTempPrice
End If
End If
End If
End If
End Select
strSaleType = "零售"
End If
dblSubtotal = dblTruePrice * dblAmount
dblTotal = dblTotal + dblSubtotal
TotalExp = TotalExp + rsCart("PresentExp") * dblAmount
TotalPoint = TotalPoint + rsCart("PresentPoint") * dblAmount
TotalMoney = TotalMoney + rsCart("PresentMoney") * dblAmount
strCart = strCart & " <tr valign='middle' class='tdbg3' height='20'>" & vbCrLf
strCart = strCart & " <td align='left'>" & rsCart("ProductName") & "</td>" & vbCrLf
strCart = strCart & " <td width='44' align='center'>" & rsCart("Unit") & "</td>" & vbCrLf
strCart = strCart & " <td width='54' align='center'>" & dblAmount & "</td>" & vbCrLf
strCart = strCart & " <td width='64' align='center'>" & strProductType & "</td>" & vbCrLf
strCart = strCart & " <td width='64' align='center'>" & strSaleType & "</td>" & vbCrLf
strCart = strCart & " <td width='64' align='right'>" & FormatNumber(dblPrice, 2, vbTrue, vbFalse, vbTrue) & "</td>" & vbCrLf
strCart = strCart & " <td width='44' align=center>" & strDiscount & "</td>" & vbCrLf
strCart = strCart & " <td width='64' align='right'>" & FormatNumber(dblTruePrice, 2, vbTrue, vbFalse, vbTrue) & "</td>" & vbCrLf
strCart = strCart & " <td width='84' align='right'>" & FormatNumber(dblSubtotal, 2, vbTrue, vbFalse, vbTrue) & "</td>" & vbCrLf
strCart = strCart & " </tr>" & vbCrLf
If rsCart("SalePromotionType") > 0 And dblAmount >= rsCart("MinNumber") Then
Dim PresentNumber
If rsCart("SalePromotionType") = 3 Or rsCart("SalePromotionType") = 4 Then
PresentNumber = rsCart("PresentNumber")
Else
PresentNumber = Fix(dblAmount / rsCart("MinNumber")) * rsCart("PresentNumber")
End If
If rsCart("SalePromotionType") = 1 Or rsCart("SalePromotionType") = 3 Then
If FoundInArr(PresentList, rsCart("ProductID"), ",") = True Then
strCart = strCart & " <tr valign='middle' class='tdbg3' height='20'>" & vbCrLf
strCart = strCart & " <td align='left'>" & rsCart("ProductName") & " <font color='red'>(赠送)</font></td>" & vbCrLf
strCart = strCart & " <td width='44' align='center'>" & rsCart("Unit") & "</td>" & vbCrLf
strCart = strCart & " <td width='54' align='center'>" & PresentNumber & "</td>" & vbCrLf
strCart = strCart & " <td width='64' align='center'><font color='red'>赠送礼品</font></td>" & vbCrLf
strCart = strCart & " <td width='64' align='center'><font color='red'>赠送</font></td>" & vbCrLf
strCart = strCart & " <td width='64' align='right'>" & FormatNumber(dblPrice, 2, vbTrue, vbFalse, vbTrue) & "</td>" & vbCrLf
strCart = strCart & " <td width='44' align='center'>─</td>" & vbCrLf
strCart = strCart & " <td width='64' align='right'>0.00</td>" & vbCrLf
strCart = strCart & " <td width='84' align='right'>0.00</td>" & vbCrLf
strCart = strCart & " </tr>" & vbCrLf
TotalWeight = TotalWeight + PE_CDbl(rsCart("Weight")) * PresentNumber
End If
Else
Dim rsPresent, strPresentType
Set rsPresent = Conn.Execute("select * from PE_Product where ProductNum='" & rsCart("PresentID") & "' and ProductType=4")
If Not (rsPresent.BOF And rsPresent.EOF) Then
If FoundInArr(PresentList, rsPresent("ProductID"), ",") = True Then
If rsPresent("Price") > 0 Then
strPresentType = "换购"
Else
strPresentType = "赠送"
End If
strCart = strCart & " <tr valign='middle' class='tdbg3' height='20'>" & vbCrLf
strCart = strCart & " <td align='left'>" & rsPresent("ProductName") & " <font color='red'>(" & strPresentType & ")</font></td>" & vbCrLf
strCart = strCart & " <td width='44' align='center'>" & rsPresent("Unit") & "</td>" & vbCrLf
strCart = strCart & " <td width='54' align='center'>" & PresentNumber & "</td>" & vbCrLf
strCart = strCart & " <td width='64' align='center'><font color='red'>促销礼品</font></td>" & vbCrLf
strCart = strCart & " <td width='64' align='center'><font color='red'>" & strPresentType & "</font></td>" & vbCrLf
strCart = strCart & " <td width='64' align='right'>" & FormatNumber(rsPresent("Price_Original"), 2, vbTrue, vbFalse, vbTrue) & "</td>" & vbCrLf
strCart = strCart & " <td width='44' align=center>─</td>" & vbCrLf
strCart = strCart & " <td width='64' align='right'>" & FormatNumber(rsPresent("Price"), 2, vbTrue, vbFalse, vbTrue) & "</td>" & vbCrLf
strCart = strCart & " <td width='84' align='right'>" & FormatNumber(rsPresent("Price") * PresentNumber, 2, vbTrue, vbFalse, vbTrue) & "</td>" & vbCrLf
strCart = strCart & " </tr>" & vbCrLf
dblTotal = dblTotal + rsPresent("Price") * PresentNumber
TotalWeight = TotalWeight + PE_CDbl(rsPresent("Weight")) * PresentNumber
End If
End If
Set rsPresent = Nothing
End If
End If
rsCart.MoveNext
Loop
rsCart.Close
Set rsCart = Nothing
If IsPreview = True Then
strCart = strCart & ShowPresent2()
End If
strCart = strCart & " <tr class='tdbg3'>" & vbCrLf
strCart = strCart & " <td colspan='8' align='right'><b>合计:</b></td>" & vbCrLf
strCart = strCart & " <td width='80' align=right><b> ¥" & FormatNumber(dblTotal, 2, vbTrue, vbFalse, vbTrue) & "</b></td>" & vbCrLf
strCart = strCart & " </tr>" & vbCrLf
If IsPreview = True Then
strCart = strCart & ShowPresent3()
Else
strCart = strCart & ShowPresent()
End If
strCart = strCart & " </table>" & vbCrLf
ShowCart2 = strCart
End Function
Function ShowPresent()
Dim strPresent, rsPresent
Set rsPresent = Conn.Execute("select * from PE_PresentProject where MinMoney<=" & dblTotal & " and MaxMoney>" & dblTotal & " and BeginDate<=" & PE_Now & " and EndDate>=" & PE_Now & "")
If Not (rsPresent.BOF And rsPresent.EOF) Then
If FoundInArr(rsPresent("PresentContent"), "1", ",") Then
strPresent = strPresent & " <tr class='tdbg3' height='25'>" & vbCrLf
strPresent = strPresent & " <td colspan='20'><b>你可以用 <font color='red'>" & rsPresent("Price") & "</font> 元超值换购以下商品中的任一款:</b></td>" & vbCrLf
strPresent = strPresent & " </tr>" & vbCrLf
Set rsCart = Conn.Execute("select * from PE_Product where ProductID in (" & rsPresent("PresentID") & ") and ProductType=4")
Do While Not rsCart.EOF
strPresent = strPresent & " <tr valign='middle' class='tdbg3'>"
strPresent = strPresent & " <td height='20'><input type='radio' name='PresentID2' value='" & rsCart("ProductID") & "'"
If FoundInArr(PresentList, rsCart("ProductID"), ",") = True Or rsPresent("Price") <= 0 Then strPresent = strPresent & " checked"
strPresent = strPresent & ">" & rsCart("ProductName") & " <font color='red'>(超值换购)</font></td>"
strPresent = strPresent & " <td width='44' align='center'>" & rsCart("Unit") & "</td>"
strPresent = strPresent & " <td width='54' align='center'>1</td>"
strPresent = strPresent & " <td width='64' align='center'><font color='red'>促销礼品</font></td>"
strPresent = strPresent & " <td width='64' align='center'><font color='red'>超值换购</font></td>"
strPresent = strPresent & " <td width='64' align='right'>" & FormatNumber(rsCart("Price_Original"), 2, vbTrue, vbFalse, vbTrue) & "</td>"
strPresent = strPresent & " <td width='44' align=center>─</td>"
strPresent = strPresent & " <td width='64' align='right'>" & FormatNumber(rsPresent("Price"), 2, vbTrue, vbFalse, vbTrue) & "</td>"
strPresent = strPresent & " <td width='84' align='right'>" & FormatNumber(rsPresent("Price"), 2, vbTrue, vbFalse, vbTrue) & "</td>"
strPresent = strPresent & " </tr>"
rsCart.MoveNext
Loop
Set rsCart = Nothing
End If
Cash = rsPresent("Cash")
PresentPoint = rsPresent("PresentPoint")
PresentExp = rsPresent("PresentExp")
Dim Present2, Present3, Present4
Present2 = FoundInArr(rsPresent("PresentContent"), "2", ",")
Present3 = FoundInArr(rsPresent("PresentContent"), "3", ",")
Present4 = FoundInArr(rsPresent("PresentContent"), "4", ",")
End If
If (Present2 = True Or Present3 = True Or Present4 = True Or TotalExp > 0 Or TotalMoney > 0 Or TotalPoint > 0) And CheckUserLogined = True Then
strPresent = strPresent & "<tr class='tdbg3'><td colspan='20'><b>另外,你还可以得到 "
If Present2 = True Or TotalMoney > 0 Then
strPresent = strPresent & "<font color='red'>" & Cash + TotalMoney & "</font> 元现金券"
End If
If Present3 = True Or TotalExp > 0 Then
If Present2 = True Or TotalMoney > 0 Then
strPresent = strPresent & " 和 "
End If
strPresent = strPresent & "<font color='red'>" & PresentPoint + TotalExp & "</font> 点积分"
End If
If Present4 = True Or TotalPoint > 0 Then
If Present2 = True Or Present3 = True Or TotalMoney > 0 Or TotalExp > 0 Then
strPresent = strPresent & " 和 "
End If
strPresent = strPresent & "<font color='red'>" & PresentExp + TotalPoint & "</font> " & PointUnit & PointName
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -