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

📄

📁 VB开发的ERP系统
💻
📖 第 1 页 / 共 5 页
字号:
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      MousePointer    =   0
      BackColor       =   16777215
      ForeColor       =   -2147483640
      BackColorFixed  =   12632256
      ForeColorFixed  =   -2147483630
      BackColorSel    =   -2147483635
      ForeColorSel    =   -2147483634
      BackColorBkg    =   -2147483636
      BackColorAlternate=   16777215
      GridColor       =   -2147483633
      GridColorFixed  =   -2147483632
      TreeColor       =   -2147483632
      FloodColor      =   192
      SheetBorder     =   -2147483642
      FocusRect       =   1
      HighLight       =   1
      AllowSelection  =   -1  'True
      AllowBigSelection=   -1  'True
      AllowUserResizing=   0
      SelectionMode   =   0
      GridLines       =   1
      GridLinesFixed  =   2
      GridLineWidth   =   1
      Rows            =   2
      Cols            =   10
      FixedRows       =   1
      FixedCols       =   1
      RowHeightMin    =   0
      RowHeightMax    =   0
      ColWidthMin     =   0
      ColWidthMax     =   0
      ExtendLastCol   =   0   'False
      FormatString    =   ""
      ScrollTrack     =   0   'False
      ScrollBars      =   3
      ScrollTips      =   0   'False
      MergeCells      =   0
      MergeCompare    =   0
      AutoResize      =   -1  'True
      AutoSizeMode    =   0
      AutoSearch      =   0
      AutoSearchDelay =   2
      MultiTotals     =   -1  'True
      SubtotalPosition=   1
      OutlineBar      =   0
      OutlineCol      =   0
      Ellipsis        =   0
      ExplorerBar     =   0
      PicturesOver    =   0   'False
      FillStyle       =   0
      RightToLeft     =   0   'False
      PictureType     =   0
      TabBehavior     =   0
      OwnerDraw       =   0
      Editable        =   0
      ShowComboButton =   1
      WordWrap        =   0   'False
      TextStyle       =   0
      TextStyleFixed  =   0
      OleDragMode     =   0
      OleDropMode     =   0
      DataMode        =   0
      VirtualData     =   -1  'True
      DataMember      =   ""
      ComboSearch     =   3
      AutoSizeMouse   =   -1  'True
      FrozenRows      =   0
      FrozenCols      =   0
      AllowUserFreezing=   0
      BackColorFrozen =   0
      ForeColorFrozen =   0
      WallPaperAlignment=   9
      AccessibleName  =   ""
      AccessibleDescription=   ""
      AccessibleValue =   ""
      AccessibleRole  =   24
   End
   Begin VB.Label Lab_Color 
      Appearance      =   0  'Flat
      BackColor       =   &H00E0E0E0&
      BorderStyle     =   1  'Fixed Single
      ForeColor       =   &H80000008&
      Height          =   255
      Index           =   3
      Left            =   7980
      TabIndex        =   20
      Top             =   5430
      Visible         =   0   'False
      Width           =   255
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "客户名称:"
      Height          =   195
      Left            =   210
      TabIndex        =   16
      Top             =   120
      Width           =   765
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "日期:"
      Height          =   195
      Left            =   4920
      TabIndex        =   15
      Top             =   120
      Width           =   585
   End
   Begin VB.Label Lab_OperStatus 
      BackColor       =   &H000080FF&
      Caption         =   "1"
      Height          =   345
      Left            =   9240
      TabIndex        =   13
      Top             =   840
      Visible         =   0   'False
      Width           =   345
   End
End
Attribute VB_Name = "Xs_I_ChoiceConsign"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*********************************************************************************************

'*    备        注:程序中所有依实际情况自定义部分均用[>> <<]括起
'*
'*    1.每次调入外部功能窗体,均要加锁ChangeLock=True,窗体关闭后解锁ChangeLock=false
'*
'*    2.网格列存储内容注解
'*
'*    3.Lab_OperStatus 用此标签来标识单据录入状态(默认值为1) 1-浏览 2-修改
'*
'*********************************************************************************************
 '以下为自定义变量
    
 '以下为固定使用变量(网格)
    Dim Cxnrrec As New ADODB.Recordset              '显示查询内容动态集
    Dim Dyymctbl As New DY_Dyymsz                   '打印页面窗体变量
    Dim GridCode As String                          '显示网格网格代码
    Dim GridInf() As Variant                        '整个网格设置信息
    Dim ReportTitle As String                       '报表主标题
    Dim Tsxx As String                              '系统提示信息
    Dim Pmbcsjhs As Long                            '屏幕网格保持数据行数(大于等于1)
    Dim Fzxwghs As Integer                          '辅助项网格行数(包括合计行)
    Dim Sfxshjwg As Boolean                         '是否显示合计网格
    Dim Qslz As Long                                '网格隐藏(非操作显示)列数
    Dim Sjhgd As Double                             '网格数据行高度
    Dim GridBoolean() As Boolean                    '网格列信息(布尔型)
    Dim GridStr()  As String                        '网格列信息(字符型)
    Dim GridInt() As Integer                        '网格列信息(整型)
    Dim Sfblbzkd As Boolean                         '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
    Dim Dqlrwgh As Long                             '当前录入数据网格行
    Dim Dqlrwgl As Long                             '当前录入数据网格列
    Dim Dqlkwgh As Long                             '刚刚离开网格行(不一定为录入行)
    Dim Dqlkwgl As Long                             '刚刚离开网格列
    Dim Dqtoprow As Long                            '当前录入状态时最上端可视行
    Dim Dqleftcol As Long                           '当前录入状态时最左端可视列
    Dim Zdlrqnr As String                           '字段录入修改前内容(用来判断内容是否修改)
    Dim Wbkbhlock As Boolean                        '文本框改变值锁
    Dim Changelock As Boolean                       '网格行列改变控制锁(用来区别用户改变.程序改变)
    Dim Gdtlock As Boolean                          '滚动条滚动控制(用来区别用户改变.程序改变)
    Dim Yxxpdlock As Boolean                        '字段有效性判断锁(内容不修改不需进行字段有效性判断)
    Dim Hyxxpdlock As Boolean                       '行有效性判断锁(字段内容不修改不需进行行有效性判断)
    Dim Valilock As Boolean                         '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
    Dim Shsfts As Boolean                           '删除记录行是否提示
    Dim Szzls As Integer                            '网格信息数组最大下标值(网格列数-1)
    
    '以下为固定使用变量(文本框)
Dim Textvar() As Variant                 '存储变体型文本框信息
Dim Textboolean() As Boolean             '存储布尔型文本框信息
Dim Textint() As Integer                 '存储整型文本框信息
Dim Textstr() As String                  '存储字符型文本框信息
Dim Max_Text_Index As Integer            '最大录入文本框索引值
Dim TextGroupCode As String              '文本框录入分组编码
Dim TextValiLock As Boolean              '文本框失去焦点是否进行有效性控制判断
Dim TextValiJudgeLock() As Boolean       '文本框录入有效性判断控制锁
Dim CurTextIndex As Integer              '当前文本框索引值
Dim TextChangeLock As Boolean            '文本框内容变换控制锁
Dim Bln_Cancel As Boolean                '取消按钮信息传递

Dim BlChoice As Boolean     '发货单或退货单
Dim TempForm As Object

Private Sub Command1_Click()
    Dim Jsq As Integer
    Dim Rows_int As Integer
    
    With WglrGrid
        For Jsq = 1 To .Rows - 1
            If Trim(.TextMatrix(Jsq, Sydz("001", GridStr(), Szzls))) = "*" Then
                Rows_int = Rows_int + 1
            End If
            If BlChoice Then
                If Trim(.TextMatrix(Jsq, 1)) = "*" And .Cell(flexcpBackColor, Jsq, 0) = Lab_Color(3).BackColor And Val(.TextMatrix(Jsq, Sydz("010", GridStr(), Szzls))) <= 0 Then
                    Tsxx = "货物 ' " & Trim(.TextMatrix(Jsq - 1, Sydz("005", GridStr(), Szzls))) & " ' 的开票数量必须大于零!"
                    Call Xtxxts(Tsxx, 0, 4)
                    Exit Sub
                End If
            Else
                If Trim(.TextMatrix(Jsq, 1)) = "*" And .Cell(flexcpBackColor, Jsq, 0) = Lab_Color(3).BackColor And Val(.TextMatrix(Jsq, Sydz("010", GridStr(), Szzls))) >= 0 Then
                    Tsxx = "货物 ' " & Trim(.TextMatrix(Jsq - 1, Sydz("005", GridStr(), Szzls))) & " ' 的开票数量必须小于零!"
                    Call Xtxxts(Tsxx, 0, 4)
                    Exit Sub
                End If
            End If
        Next
        If Rows_int = 0 Then
            Tsxx = "请选定一个货物!"
            Call Xtxxts(Tsxx, 0, 4)
            Exit Sub
        End If
    End With
    
    '发票
    TempForm.Command1.Tag = "0"
    If Option1.Value = True Then
        TempForm.Option1 = True
    Else
        TempForm.Option2 = True
    End If
    With TempForm.vsFlexGrid1
        .Rows = .FixedRows
        For Jsq = .FixedRows To WglrGrid.Rows - 1
            If Trim(WglrGrid.TextMatrix(Jsq, 1)) = "*" Then
                .Rows = .Rows + 1
                .TextMatrix(.Rows - 1, 0) = WglrGrid.TextMatrix(Jsq, 1)
                .TextMatrix(.Rows - 1, 1) = WglrGrid.TextMatrix(Jsq, Sydz("001", GridStr(), Szzls))     '是否被选中
                .TextMatrix(.Rows - 1, 2) = WglrGrid.TextMatrix(Jsq, Sydz("002", GridStr(), Szzls))     '发货单号
                .TextMatrix(.Rows - 1, 12) = WglrGrid.TextMatrix(Jsq, Sydz("012", GridStr(), Szzls))    '发货ID
                .TextMatrix(.Rows - 1, 3) = WglrGrid.TextMatrix(Jsq, Sydz("003", GridStr(), Szzls))     '仓库
                .TextMatrix(.Rows - 1, 4) = WglrGrid.TextMatrix(Jsq, Sydz("004", GridStr(), Szzls))     '货物编码
                .TextMatrix(.Rows - 1, 5) = WglrGrid.TextMatrix(Jsq, Sydz("005", GridStr(), Szzls))     '货物名称
                .TextMatrix(.Rows - 1, 6) = WglrGrid.TextMatrix(Jsq, Sydz("006", GridStr(), Szzls))     '规格
                .TextMatrix(.Rows - 1, 7) = WglrGrid.TextMatrix(Jsq, Sydz("007", GridStr(), Szzls))     '单位
                .TextMatrix(.Rows - 1, 8) = WglrGrid.TextMatrix(Jsq, Sydz("008", GridStr(), Szzls))     '实收数量
                .TextMatrix(.Rows - 1, 9) = WglrGrid.TextMatrix(Jsq, Sydz("009", GridStr(), Szzls))     '已开票数量
                .TextMatrix(.Rows - 1, 10) = WglrGrid.TextMatrix(Jsq, Sydz("010", GridStr(), Szzls))    '开票数量
                .TextMatrix(.Rows - 1, 11) = WglrGrid.TextMatrix(Jsq, Sydz("011", GridStr(), Szzls))    '单价
                TempForm.Command1.Tag = "1"
            End If
        Next Jsq
    End With
    GtempInvoiceHB = ChkTotal.Value
    Unload Me
End Sub

Private Sub Command2_Click()
    TempForm.Command1.Tag = "0"
    Unload Me
End Sub

Private Sub Command3_Click()
    Dim Jsq As Integer
    
    With WglrGrid
        Changelock = True
        For Jsq = .FixedRows To .Rows - 1
            If .TextMatrix(Jsq, 0) = "*" Then
                .TextMatrix(Jsq, Sydz("001", GridStr(), Szzls)) = ""
                .Row = Jsq
                Call WglrGrid_DblClick
            End If
        Next
        Changelock = False
    End With
End Sub

Private Sub Command4_Click()
    Dim Jsq As Integer
    
    With WglrGrid
        For Jsq = .FixedRows To .Rows - 1
            .TextMatrix(Jsq, 1) = ""
            If .TextMatrix(Jsq, 0) = "*" Then .TextMatrix(Jsq, Sydz("001", GridStr(), Szzls)) = ""
            .TextMatrix(Jsq, Sydz("010", GridStr(), Szzls)) = ""
        Next
    End With
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)      '控制焦点转移和限制录入字符"'"
    Dim jdzygs As Integer
    jdzygs = 2                                      '在单据录入中,此焦点转移控制值一定小于等于文本框个数,否则网格回车键将不支持.
    Select Case KeyAscii
        Case vbKeyReturn
            If Kjjdzy(jdzygs) Then
                KeyAscii = 0
            End If
        Case 39           '屏蔽字符"'"
            KeyAscii = 0
    End Select
End Sub
Private Sub Form_Load()                              '窗 体 装 入
    '初始化各种锁值
    Changelock = False             '网格行列改变控制锁
    Gdtlock = False                '滚动条滚动控制
    Yxxpdlock = True               '字段有效性判断锁
    Hyxxpdlock = True              '行有效性判断锁
    Wbkbhlock = False              '文本框内容改变锁
    Select Case GtempInvoiceType
        Case "Xs_I_InvoiceBill"
            BlChoice = True
            Cw_DataEnvi.DataConnect.Execute ("update Xt_tyhelp set sql_string='SELECT distinct cuscode,cusname FROM Xs_V_ConsignBill where checker<>'''' and abs(recquantity)-abs(invquantity)>0 order by cusname ' WHERE help_code = 'Xs_Cz_Choice'")
            Set TempForm = Xs_I_InvoiceBill
            Xs_I_ChoiceConsign.Caption = "选择发货单"
        Case "Xs_I_UseInvoice"
            BlChoice = True
            Cw_DataEnvi.DataConnect.Execute ("update Xt_tyhelp set sql_string='SELECT distinct cuscode,cusname FROM Xs_V_ConsignBill where checker<>'''' and abs(recquantity)-abs(invquantity)>0 order by cusname ' WHERE help_code = 'Xs_Cz_Choice'")
            Set TempForm = Xs_I_UseInvoice
            Xs_I_ChoiceConsign.Caption = "选择发货单"
        Case "Xs_I_UseRedInvoice"
            BlChoice = False
            Cw_DataEnvi.DataConnect.Execute ("update Xt_tyhelp set sql_string='SELECT distinct cuscode,cusname FROM Xs_V_ConsignBill where checker<>'''' and abs(recquantity)-abs(invquantity)>0 and BillType=''1'' order by cusname ' WHERE help_code = 'Xs_Cz_Choice'")
            Set TempForm = Xs_I_UseRedInvoice
            Xs_I_ChoiceConsign.Caption = "选择退货单"
        Case "Xs_I_RedInvoice"
            BlChoice = False
            Cw_DataEnvi.DataConnect.Execute ("update Xt_tyhelp set sql_string='SELECT distinct cuscode,cusname FROM Xs_V_ConsignBill where checker<>'''' and abs(recquantity)-abs(invquantity)>0 and BillType=''1'' order by cusname ' WHERE help_code = 'Xs_Cz_Choice'")
            Set TempForm = Xs_I_RedInvoice
            Xs_I_ChoiceConsign.Caption = "选择退货单"
    End Select
        
    
    
    TextGroupCode = "Xs_I_ChoiceConsign"
 
    Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())  '读入文本框录入信息
    Call Wbkcsh
    
    '调 入 网 格
    GridCode = "Xs_I_ChoiceConsign"      '网格属性编码
    Call BzWgcsh(WglrGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  
    Qslz = GridInf(1)
    Sjhgd = GridInf(2)
    Pmbcsjhs = GridInf(3)
    Fzxwghs = GridInf(4)
    Sfblbzkd = GridInf(5)
    Shsfts = GridInf(6)
    Sfxshjwg = GridInf(7)
    Szzls = WglrGrid.Cols - 1
    
    '生成查询结果

⌨️ 快捷键说明

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