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

📄 frmprodatacard.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{D252F124-F62C-11D1-9ABD-444553540000}#1.0#0"; "GADATE.DLL"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F42BDC2B-FC9B-11D1-9ABD-444553540000}#3.4#0"; "ATLEDIT1.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Object = "{81110CCB-022B-11D3-A348-0080C89152FF}#1.3#0"; "ORAGLIST.OCX"
Begin VB.Form frmProDataCard 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "开票资料"
   ClientHeight    =   4710
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8400
   Icon            =   "frmProDataCard.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4710
   ScaleWidth      =   8400
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin AtlEdit.TEdit txtPaste 
      Height          =   375
      Left            =   1920
      TabIndex        =   5
      TabStop         =   0   'False
      Top             =   1440
      Visible         =   0   'False
      Width           =   1245
      _ExtentX        =   2196
      _ExtentY        =   661
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Text            =   ""
      Appearance      =   0
   End
   Begin ListRefer.ListText lstPaste 
      Height          =   345
      Index           =   1
      Left            =   1800
      TabIndex        =   7
      TabStop         =   0   'False
      Top             =   3900
      Visible         =   0   'False
      Width           =   1665
      _ExtentX        =   2937
      _ExtentY        =   609
      CodeSort        =   -1  'True
      BackColor       =   -2147483643
      MaxLenth        =   12
      Appearance      =   0
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin ListRefer.ListText lstPaste 
      Height          =   345
      Index           =   0
      Left            =   3720
      TabIndex        =   6
      TabStop         =   0   'False
      Top             =   2490
      Visible         =   0   'False
      Width           =   1275
      _ExtentX        =   2249
      _ExtentY        =   609
      CodeSort        =   -1  'True
      SeekCol         =   "1,2"
      BackColor       =   -2147483643
      MaxLenth        =   30
      Appearance      =   0
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin GACALENDARLibCtl.Calendar dtePaste 
      Height          =   345
      Left            =   450
      OleObjectBlob   =   "frmProDataCard.frx":000C
      TabIndex        =   4
      TabStop         =   0   'False
      Top             =   2700
      Visible         =   0   'False
      Width           =   1185
   End
   Begin VB.CommandButton cmdOK 
      Height          =   350
      Index           =   1
      Left            =   7080
      Style           =   1  'Graphical
      TabIndex        =   2
      Tag             =   "1002"
      Top             =   780
      Width           =   1215
   End
   Begin VB.CommandButton cmdOK 
      Height          =   350
      Index           =   0
      Left            =   7080
      Style           =   1  'Graphical
      TabIndex        =   1
      Tag             =   "1001"
      Top             =   390
      Width           =   1215
   End
   Begin MSFlexGridLib.MSFlexGrid msgData 
      Bindings        =   "frmProDataCard.frx":0095
      Height          =   4185
      Left            =   120
      TabIndex        =   0
      Top             =   390
      Width           =   6795
      _ExtentX        =   11986
      _ExtentY        =   7382
      _Version        =   393216
      Cols            =   7
      FixedCols       =   0
      RowHeightMin    =   300
      AllowUserResizing=   1
      FormatString    =   "||日期     |合同号|单位     |内容       |>金额 "
   End
   Begin MSRDC.MSRDC Data1 
      Height          =   375
      Left            =   6990
      Top             =   720
      Visible         =   0   'False
      Width           =   1275
      _ExtentX        =   2249
      _ExtentY        =   661
      _Version        =   393216
      Options         =   0
      CursorDriver    =   0
      BOFAction       =   0
      EOFAction       =   0
      RecordsetType   =   1
      LockType        =   3
      QueryType       =   0
      Prompt          =   3
      Appearance      =   1
      QueryTimeout    =   30
      RowsetSize      =   100
      LoginTimeout    =   15
      KeysetSize      =   0
      MaxRows         =   0
      ErrorThreshold  =   -1
      BatchSize       =   15
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Enabled         =   -1  'True
      ReadOnly        =   0   'False
      Appearance      =   -1  'True
      DataSourceName  =   ""
      RecordSource    =   ""
      UserName        =   ""
      Password        =   ""
      Connect         =   ""
      LogMessages     =   ""
      Caption         =   "MSRDC1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   3600
      TabIndex        =   8
      Top             =   210
      Width           =   90
   End
   Begin VB.Label lblData 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   120
      TabIndex        =   3
      Top             =   150
      Width           =   90
   End
   Begin VB.Menu mnuEdit 
      Caption         =   "Edit"
      Visible         =   0   'False
      Begin VB.Menu mnuAdd 
         Caption         =   "新增开票资料(&A)"
      End
      Begin VB.Menu mnuDel 
         Caption         =   "删除开票资料(&D)"
      End
   End
End
Attribute VB_Name = "frmProDataCard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private mblnIsChanged As Boolean
Private mblnIsInit As Boolean
Private WithEvents mclsGrid As Grid
Attribute mclsGrid.VB_VarHelpID = -1
Private mlngProjID As Long
Private mlngRow As Long
Private mlngCol As Long
Private mstrTitle As String

Public Sub ShowCard(ByVal lngProjID As Long, ByVal strProj As String)
    #If conVersionType = 1 Then
        mstrTitle = "在建工程"
    #Else
        mstrTitle = "工程项目"
    #End If
    
    mblnIsInit = True
    mlngProjID = lngProjID
    lblData.Caption = mstrTitle & ":" & strProj
    InitGrid
    mnuAdd_Click
    Show vbModal
End Sub

Private Sub InitGrid()
    Dim i As Integer, strSql As String
    
    msgData.Cols = 0
    strSql = "SELECT lngInvoiceDetailID,'',ProjectInvoice.lngOrderID,ProjectInvoice." _
        & "lngCustomerID,ProjectInvoice.strDate 日期,ProjectOrder.strOrderCode 合同号,Customer.strCustomerCode " _
        & "|| ' ' || Customer.strCustomerName 单位,ProjectInvoice.strNote 内容,TO_CHAR(dblAmount,'999,999,999,990.KK') 金额 " _
        & "FROM ProjectInvoice,ProjectOrder,Customer WHERE ProjectInvoice.lngOrderID=" _
        & "ProjectOrder.lngOrderID(+) AND ProjectInvoice.lngCustomerID=Customer.lngCustomerID " _
        & "AND ProjectInvoice.lngProjectID=" & mlngProjID
    strSql = Replace(strSql, "KK", String(gclsBase.NaturalCurDec, "0"))
    Set Data1.Resultset = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
    If Not Data1.Resultset.EOF Then
        Data1.Resultset.MoveLast
    End If
    mclsGrid.SetupStyle
    
    For i = 1 To msgData.Cols - 1
        msgData.FixedAlignment(i) = flexAlignCenterCenter
    Next i
    msgData.ColAlignment(8) = flexAlignRightCenter
    msgData.ColWidth(0) = 0
    msgData.ColWidth(1) = 0
    msgData.ColWidth(2) = 0
    msgData.ColWidth(3) = 0
    msgData.ColWidth(4) = 1200
    msgData.ColWidth(5) = 1400
    msgData.ColWidth(6) = 1400
    msgData.ColWidth(7) = 1300
    msgData.ColWidth(8) = 1430
    Data1.Resultset.Close
    WriteTotal
End Sub

Private Sub WriteTotal()
    Dim l As Long, dblV As Double
    
    For l = 1 To msgData.Rows - 1
        dblV = dblV + TxtToDouble(msgData.TextMatrix(l, 8))
    Next l
    Label1.Caption = "金额合计: " & FormatShow(dblV, gclsBase.NaturalCurDec)
    Label1.Left = lblData.Left + lblData.width + 100
    Label1.top = lblData.top
End Sub

Private Sub cmdOK_Click(Index As Integer)
    If Index = 0 Then
        If mblnIsChanged Then
            If Not SaveCard Then Exit Sub
        End If
    End If
    Unload Me
End Sub

Private Sub dtePaste_Change()
    msgData.Text = dtePaste.Text
    msgData.TextMatrix(msgData.Row, 1) = "3"
    If Not mblnIsInit Then mblnIsChanged = True
End Sub

Private Sub dtePaste_GotFocus()
    mlngRow = msgData.Row
    mlngCol = msgData.col
End Sub

Private Sub dtePaste_KeyPress(KeyAscii As Integer, bCancel As Long)
    If KeyAscii = vbKeyReturn Then
        BKKEY msgData.hwnd, vbKeyRight
    End If
End Sub

Private Sub dtePaste_LostFocus()
    On Error Resume Next
    If msgData.col = 4 And Me.ActiveControl.Name = "msgData" Then
        dtePaste.SetFocus
    Else
        dtePaste.Visible = False
    End If
End Sub

Private Sub InitLst()
    Dim strSql As String, lngCustomerID As Long
    
    strSql = "SELECT lngOrderID,strOrderCode,Rtrim(strCustomerName),ProjectOrder.lngCustomerID " _
        & "FROM ProjectOrder,Customer WHERE lngProjectID=" & mlngProjID & " AND ProjectOrder" _
        & ".lngCustomerID=Customer.lngCustomerID"
    Set lstPaste(0).Recordset = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
    lstPaste(0).ColWidth(3) = 1800
    lngCustomerID = TxtToDouble(lstPaste(0).TextMatrix(lstPaste(0).ReferRow, 4))
    setlistbox lstPaste(1), 1, lngCustomerID, True
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyReturn Then

⌨️ 快捷键说明

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