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

📄 frm

📁 注释:用VB开发的进销存系统源码
💻
📖 第 1 页 / 共 5 页
字号:
         Height          =   180
         Left            =   7845
         TabIndex        =   15
         Top             =   4275
         Width           =   540
      End
      Begin VB.Label Label22 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "连锁店"
         Height          =   180
         Left            =   7665
         TabIndex        =   14
         Top             =   1005
         Width           =   540
      End
      Begin VB.Label Label16 
         AutoSize        =   -1  'True
         BackColor       =   &H80000018&
         BackStyle       =   0  'Transparent
         Caption         =   "金额"
         Height          =   180
         Left            =   7590
         TabIndex        =   13
         Top             =   3945
         Width           =   360
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackColor       =   &H80000018&
         BackStyle       =   0  'Transparent
         Caption         =   "合计"
         Height          =   180
         Left            =   5070
         TabIndex        =   12
         Top             =   3975
         Width           =   360
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackColor       =   &H80000018&
         BackStyle       =   0  'Transparent
         Caption         =   "数量"
         Height          =   180
         Left            =   5820
         TabIndex        =   11
         Top             =   3975
         Width           =   360
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "备注"
         Height          =   180
         Left            =   735
         TabIndex        =   10
         Top             =   4485
         Width           =   360
      End
   End
   Begin MSComctlLib.StatusBar sb1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   20
      Top             =   5925
      Width           =   11550
      _ExtentX        =   20373
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   15187
            Key             =   "状态信息"
            Object.Tag             =   "IDmsg"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            TextSave        =   "2002-8-17"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            TextSave        =   "18:33"
         EndProperty
      EndProperty
   End
   Begin Threed.SSPanel SSPanel1 
      Align           =   1  'Align Top
      Height          =   555
      Left            =   0
      TabIndex        =   21
      Top             =   0
      Width           =   11550
      _ExtentX        =   20373
      _ExtentY        =   979
      _Version        =   131073
      BorderWidth     =   0
      BevelInner      =   1
      Begin Threed.SSCommand cmdExit 
         CausesValidation=   0   'False
         Height          =   465
         Left            =   8445
         TabIndex        =   31
         Tag             =   "退出"
         ToolTipText     =   "退出"
         Top             =   30
         Width           =   930
         _ExtentX        =   1640
         _ExtentY        =   820
         _Version        =   131073
         ForeColor       =   0
         Caption         =   "退出[&X]"
         ButtonStyle     =   3
         BevelWidth      =   0
      End
      Begin Threed.SSCommand cmdNext 
         CausesValidation=   0   'False
         Height          =   465
         Left            =   5655
         TabIndex        =   30
         Tag             =   "下一条"
         ToolTipText     =   "翻至下一页"
         Top             =   45
         Width           =   930
         _ExtentX        =   1640
         _ExtentY        =   820
         _Version        =   131073
         ForeColor       =   0
         Caption         =   "下一条[&M]"
         ButtonStyle     =   3
         BevelWidth      =   0
      End
      Begin Threed.SSCommand cmdPrev 
         CausesValidation=   0   'False
         Height          =   465
         Left            =   4725
         TabIndex        =   29
         Tag             =   "上一条"
         ToolTipText     =   "翻至上一页"
         Top             =   45
         Width           =   930
         _ExtentX        =   1640
         _ExtentY        =   820
         _Version        =   131073
         ForeColor       =   0
         Caption         =   "上一条[&U]"
         ButtonStyle     =   3
         BevelWidth      =   0
      End
      Begin Threed.SSCommand cmdQuery 
         CausesValidation=   0   'False
         Height          =   465
         Left            =   3795
         TabIndex        =   28
         Tag             =   "查询"
         ToolTipText     =   "查询单据内容"
         Top             =   45
         Width           =   930
         _ExtentX        =   1640
         _ExtentY        =   820
         _Version        =   131073
         ForeColor       =   0
         Caption         =   "查询[&Q]"
         ButtonStyle     =   3
         BevelWidth      =   0
      End
      Begin Threed.SSCommand cmdDelete 
         CausesValidation=   0   'False
         Height          =   465
         Left            =   2865
         TabIndex        =   27
         Tag             =   "删除"
         ToolTipText     =   "删除当前单据"
         Top             =   45
         Width           =   930
         _ExtentX        =   1640
         _ExtentY        =   820
         _Version        =   131073
         ForeColor       =   0
         Caption         =   "删除[&D]"
         ButtonStyle     =   3
         BevelWidth      =   0
      End
      Begin Threed.SSCommand cmdSave 
         Height          =   465
         Left            =   1935
         TabIndex        =   26
         Tag             =   "保存"
         ToolTipText     =   "保存单据"
         Top             =   45
         Width           =   930
         _ExtentX        =   1640
         _ExtentY        =   820
         _Version        =   131073
         ForeColor       =   0
         Caption         =   "保存[&S]"
         ButtonStyle     =   3
         BevelWidth      =   0
      End
      Begin Threed.SSCommand cmdToolCommit 
         Height          =   465
         Left            =   990
         TabIndex        =   25
         Tag             =   "确认"
         ToolTipText     =   "确认单据,使之生效"
         Top             =   45
         Width           =   930
         _ExtentX        =   1640
         _ExtentY        =   820
         _Version        =   131073
         ForeColor       =   0
         Caption         =   "审核[&O]"
         ButtonStyle     =   3
         BevelWidth      =   0
      End
      Begin Threed.SSCommand cmdNew 
         CausesValidation=   0   'False
         Height          =   465
         Left            =   36
         TabIndex        =   24
         Tag             =   "新建"
         ToolTipText     =   "新建单据"
         Top             =   36
         Width           =   930
         _ExtentX        =   1640
         _ExtentY        =   820
         _Version        =   131073
         ForeColor       =   0
         Caption         =   "新建[&N]"
         ButtonStyle     =   3
         BevelWidth      =   0
      End
      Begin Threed.SSCommand cmdPrintBill 
         CausesValidation=   0   'False
         Height          =   465
         Left            =   6555
         TabIndex        =   23
         Tag             =   "下一条"
         ToolTipText     =   "打印单据"
         Top             =   30
         Width           =   930
         _ExtentX        =   1640
         _ExtentY        =   820
         _Version        =   131073
         ForeColor       =   0
         Caption         =   "打印[&P]"
         ButtonStyle     =   3
         BevelWidth      =   0
      End
      Begin Threed.SSCommand cmdToolSelect 
         CausesValidation=   0   'False
         Height          =   465
         Left            =   7515
         TabIndex        =   22
         Tag             =   "退出"
         ToolTipText     =   "退出"
         Top             =   30
         Width           =   930
         _ExtentX        =   1640
         _ExtentY        =   820
         _Version        =   131073
         ForeColor       =   0
         Caption         =   "选择[&R]"
         ButtonStyle     =   3
         BevelWidth      =   0
      End
   End
   Begin VB.Label Label6 
      BackColor       =   &H80000007&
      Caption         =   "Label6"
      Height          =   5190
      Left            =   180
      TabIndex        =   32
      Top             =   645
      Width           =   11085
   End
End
Attribute VB_Name = "frm分店销售单"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
':::::::::::::::::::::商品配送管理::::::::::::::::::::::::
'::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Option Explicit

Private Const TableName As String = "LSChainXSD"
Private QueryFlag As Boolean                    '记录查询状态
Private TableState As String                    '当前状态
Private Temp As String
Private QueryRs As New ADODB.Recordset

Private JD As Single


Private Sub PrintSJ()
    On Error Resume Next
    Dim N, j, Qty, sum As Single, CurPage
    Dim strControl As String, strValue As String
    Dim RP As New ADODB.Recordset
    Dim RR As New ADODB.Recordset
    Dim PRECOLOR, ColorAndSize
    
    sSQL = "select 商品编码,品名,单位,sum(配送数量) as 数量,零售价 as 单价,sum(售价金额)/1.17 as 金额,(sum(售价金额)-sum(售价金额)/1.17) as 税金,sum(售价金额) as S金额 from lschainxsd  where 表单号='" & Trim(txtPurcode.Text) & "' group by 商品编码,品名,单位,零售价 order by 商品编码"
    Set RsTemp = Nothing
    RsTemp.CursorLocation = adUseClient
    RsTemp.Open sSQL, Conn, adOpenStatic, adLockPessimistic

    ColorAndSize = ""
    While Not RsTemp.EOF
        Load rptSJBill
        sum = 0
        Qty = 0
        ColorAndSize = ""
        For N = 0 To 5
            If RsTemp.EOF Then Exit For
            
            For j = 0 To 5
                strControl = "lblc" & (j + 1) & "r" & N + 1
                If j = 3 Or j = 4 Or j = 5 Then
                    If j = 3 Then
                        strValue = Format(RsTemp(j), "#")
                    Else
                        strValue = Format(RsTemp(j), DecNum)
                    End If
                ElseIf j = 0 Or j = 1 Or j = 2 Then
                    strValue = RsTemp(j)
                End If
                rptSJBill.Sections("Indent").Controls(strControl).Caption = strValue
            Next j
            
            rptSJBill.Sections("Indent").Controls("lblLSJ" & CStr(N + 1)).Caption = Format(RsTemp("税金"), DecNum)
        
            sSQL = "select 商品编码,品名,单位,颜色,尺寸,配送数量 as 数量 from lschainxsd where 表单号='" & Trim(txtPurcode.Text) & "' and 商品编码='" & Trim(RsTemp("商品编码")) & "' and 零售价=" & RsTemp("单价") & " order by 商品编码,颜色,尺寸"
            Set RP = Nothing
            RP.CursorLocation = adUseClient
            RP.Open sSQL, Conn, adOpenStatic, adLockPessimistic
            strControl = "lblR" & Trim(Str(N + 1))

            
            ColorAndSize = ColorAndSize & Trim(RP("商品编码"))

⌨️ 快捷键说明

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