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

📄 powereasy.orderflow.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 4 页
字号:
                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
        TotalMoney = TotalMoney + rsCart("PresentMoney") * dblAmount
        TotalPoint = TotalPoint + rsCart("PresentPoint") * dblAmount

        strCart = strCart & "                <tr valign='middle' class='tdbg3' height='20'>" & vbCrLf
        strCart = strCart & "                  <td width='32' align='center'><input type='CheckBox' name='ProductID' value='" & rsCart("ProductID") & "' Checked></td>" & 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'><input name='Amount_" & rsCart("ProductID") & "' type='Text' value='" & dblAmount & "' size='5' maxlength='10' style='text-align: center;'></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
                strCart = strCart & "                <tr valign='middle' class='tdbg3' height='20'>" & vbCrLf
                strCart = strCart & "                  <td width='32' align='center'><input type='CheckBox' name='PresentID' value='" & rsCart("ProductID") & "'"
                If FoundInArr(PresentList, rsCart("ProductID"), ",") = True Then strCart = strCart & " checked"
                strCart = strCart & "></td>" & 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
            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 rsPresent("Price") > 0 Then
                        strPresentType = "换购"
                    Else
                        strPresentType = "赠送"
                    End If
                    strCart = strCart & "                <tr valign='middle' class='tdbg3' height='20'>" & vbCrLf
                    strCart = strCart & "                  <td width='32' align='center'><input type='CheckBox' name='PresentID' value='" & rsPresent("ProductID") & "'"
                    If FoundInArr(PresentList, rsPresent("ProductID"), ",") = True Then strCart = strCart & " checked"
                    strCart = strCart & "></td>" & 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
                    If FoundInArr(PresentList, rsPresent("ProductID"), ",") = False Then
                        PresentNumber = 0
                    End If
                    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
                End If
                Set rsPresent = Nothing
            End If
        End If
        rsCart.MoveNext
    Loop
    rsCart.Close
    Set rsCart = Nothing

    strCart = strCart & "                <tr class='tdbg3'>" & vbCrLf
    strCart = strCart & "                  <td colspan='9' 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
    strCart = strCart & "              </table>" & vbCrLf
    If strJS <> "" Then
        strCart = strCart & "<script language='javascript'>alert('" & strJS & "');</script>"
    End If
    ShowCart = strCart
End Function

Function ShowCart2(IsPreview)
    If IsNull(ProductList) Or ProductList = "" Then
        ShowCart2 = ""
        Exit Function
    End If
    Dim strCart
    strCart = strCart & "              <table width='100%' border='0' align='center' cellpadding='2' cellspacing='1' class='border3'>" & vbCrLf
    strCart = strCart & "                <tr align='center' class='tdbg2' height='25'>" & vbCrLf
    strCart = strCart & "                  <td><b>商 品 名 称</b></td>" & vbCrLf
    strCart = strCart & "                  <td width='44'><b>单 位</b></td>" & vbCrLf
    strCart = strCart & "                  <td width='54'><b>数 量</b></td>" & vbCrLf
    strCart = strCart & "                  <td width='64'><b>商品类别</b></td>" & vbCrLf
    strCart = strCart & "                  <td width='64'><b>销售类型</b></td>" & vbCrLf
    strCart = strCart & "                  <td width='64'><b>原价</b></td>" & vbCrLf
    strCart = strCart & "                  <td width='44'><b>折扣</b></td>" & vbCrLf
    strCart = strCart & "                  <td width='64'><b>实价</b></td>" & vbCrLf
    strCart = strCart & "                  <td width='84'><b>金 额</b></td>" & vbCrLf
    strCart = strCart & "                </tr>" & vbCrLf
    
    dblSubtotal = 0
    dblTotal = 0
    TotalExp = 0
    TotalWeight = 0
    
    Set rsCart = Conn.Execute("select P.*,C.Quantity,C.CartItemID from PE_Product P inner join PE_ShoppingCarts C on C.ProductID=P.ProductID where C.CartID='" & CartID & "' and C.PresentID=0 and P.ProductType<>4 order by C.CartItemID desc")
    Do While Not rsCart.EOF
        dblAmount = rsCart("Quantity")
        If dblAmount <= 0 Then dblAmount = 1
        If rsCart("ProductType") = 3 And rsCart("LimitNum") > 0 And dblAmount > rsCart("LimitNum") Then
            dblAmount = rsCart("LimitNum")
        End If

        If dblAmount <> rsCart("Quantity") Then
            Call UpdateAmount(rsCart("CartItemID"), dblAmount)
        End If
        
        dblPrice = rsCart("Price_Original")
        TotalWeight = TotalWeight + PE_CDbl(rsCart("Weight")) * dblAmount
    
        If PE_CLng(UserSetting(30)) = 1 And rsCart("EnableWholesale") = True And dblAmount >= rsCart("Number_Wholesale1") Then
            strProductType = "批发"
            strSaleType = "批发"
            strDiscount = "─"
            If dblAmount < rsCart("Number_Wholesale2") Then
                dblTruePrice = rsCart("Price_Wholesale1")
            Else
                If dblAmount < rsCart("Number_Wholesale3") Then
                    dblTruePrice = rsCart("Price_Wholesale2")
                Else
                    dblTruePrice = rsCart("Price_Wholesale3")
                End If
            End If
        Else
            Select Case GroupType
            Case 0, 1 '未登录
                Select Case rsCart("ProductType")
                Case 1
                    dblTruePrice = rsCart("Price")
                    strProductType = "正常销售"
                    strDiscount = "─"
                Case 2
                    strProductType = "涨价商品"
                    dblTruePrice = rsCart("Price")
                    strDiscount = "─"
                Case 3
                    If Date < rsCart("BeginDate") Or Date > rsCart("EndDate") Then
                        dblTruePrice = dblPrice
                        strProductType = "正常销售"
                        strDiscount = "─"
                    Else
                        dblTruePrice = rsCart("Price")
                        strProductType = "特价商品"
                        strDiscount = rsCart("Discount") & "折"
                    End If
                Case 5
                    strProductType = "降价商品"
                    dblTruePrice = rsCart("Price")
                    strDiscount = rsCart("Discount") & "折"
                End Select
            Case 2, 3   '注册会员
                Select Case rsCart("ProductType")
                Case 1
                    strProductType = "正常销售"
                    strDiscount = "─"
                    If rsCart("Price_Member") > 0 Then '如果指定了会员价
                        dblTruePrice = rsCart("Price_Member")
                    Else
                        dblTruePrice = rsCart("Price") * Discount_Member / 100
                    End If
                Case 2
                    strProductType = "涨价商品"
                    strDiscount = "─"
                    If rsCart("Price_Member") > 0 Then '如果指定了会员价
                        dblTruePrice = rsCart("Price_Member")
                    Else
                        dblTruePrice = rsCart("Price") * Discount_Member / 100
                    End If

⌨️ 快捷键说明

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