📄 frmenterpricecard.frm
字号:
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 frmEnterPriceCard
BorderStyle = 3 'Fixed Dialog
Caption = "拨入资金"
ClientHeight = 4710
ClientLeft = 45
ClientTop = 330
ClientWidth = 8385
Icon = "frmEnterPriceCard.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4710
ScaleWidth = 8385
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin AtlEdit.TEdit txtPaste
Height = 300
Left = 4080
TabIndex = 2
TabStop = 0 'False
Top = 1440
Visible = 0 'False
Width = 1275
_ExtentX = 2249
_ExtentY = 529
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 = 300
Left = 3180
TabIndex = 3
TabStop = 0 'False
Top = 2310
Visible = 0 'False
Width = 1365
_ExtentX = 2408
_ExtentY = 529
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 = 300
Left = 900
OleObjectBlob = "frmEnterPriceCard.frx":000C
TabIndex = 0
TabStop = 0 'False
Top = 2400
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton cmdOK
Height = 350
Index = 1
Left = 7080
Style = 1 'Graphical
TabIndex = 6
Tag = "1002"
Top = 780
Width = 1215
End
Begin VB.CommandButton cmdOK
Height = 350
Index = 0
Left = 7080
Style = 1 'Graphical
TabIndex = 5
Tag = "1001"
Top = 390
Width = 1215
End
Begin MSRDC.MSRDC Data1
Height = 375
Left = 7020
Top = 870
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 MSFlexGridLib.MSFlexGrid msgEnter
Bindings = "frmEnterPriceCard.frx":0095
Height = 4215
Left = 120
TabIndex = 4
Top = 390
Width = 6825
_ExtentX = 12039
_ExtentY = 7435
_Version = 393216
Cols = 5
FixedCols = 0
RowHeightMin = 300
AllowUserResizing= 1
FormatString = "日期 |列帐通知书编号|内容 |金额 |合同号"
End
Begin VB.Label Label1
AutoSize = -1 'True
Height = 180
Left = 4080
TabIndex = 7
Top = 210
Width = 90
End
Begin VB.Label lblEnter
AutoSize = -1 'True
Height = 180
Left = 120
TabIndex = 1
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 = "frmEnterPriceCard"
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
Public Sub ShowCard(ByVal lngProjID As Long, ByVal strProj As String)
mblnIsInit = True
mlngProjID = lngProjID
#If conVersionType = 1 Then
lblEnter.Caption = "在建工程:" & strProj
#Else
lblEnter.Caption = "工程项目:" & strProj
#End If
InitGrid
mnuAdd_Click
mblnIsInit = False
Show vbModal
End Sub
Private Sub WriteTotal()
Dim l As Long, dblV As Double
For l = 1 To msgEnter.Rows - 1
dblV = dblV + TxtToDouble(msgEnter.TextMatrix(l, 6))
Next l
Label1.Caption = "金额合计: " & FormatShow(dblV, gclsBase.NaturalCurDec)
Label1.Left = lblEnter.Left + lblEnter.width + 100
Label1.top = lblEnter.top
End Sub
Private Sub InitGrid()
Dim i As Integer, strSql As String
msgEnter.Cols = 0
strSql = "SELECT lngDetailID,'',ProjectFundIn.lngOrderID,ProjectFundIn.strDate 日期,strBookNo 入帐通知书编号," _
& "strRemark 内容,TO_CHAR(dblAmount,'999,999,999,990.KK') 金额,ProjectOrder.strOrderCode 合同号 " _
& "FROM ProjectFundIn,ProjectOrder WHERE ProjectFundIn.lngOrderID=" _
& "ProjectOrder.lngOrderID(+) AND ProjectFundIn.lngProjectID=" & mlngProjID
strSql = Replace(strSql, "KK", String(gclsBase.NaturalCurDec, "0"))
strSql = strSql & " ORDER BY ProjectFundIn.strDate "
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 msgEnter.Cols - 1
msgEnter.FixedAlignment(i) = flexAlignCenterCenter
Next i
msgEnter.ColAlignment(6) = flexAlignRightCenter
msgEnter.ColWidth(0) = 0
msgEnter.ColWidth(1) = 0
msgEnter.ColWidth(2) = 0
msgEnter.ColWidth(3) = 1200
msgEnter.ColWidth(4) = 1400
msgEnter.ColWidth(5) = 1370
msgEnter.ColWidth(6) = 1400
msgEnter.ColWidth(7) = 1400
Data1.Resultset.Close
WriteTotal
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()
msgEnter.Text = dtePaste.Text
msgEnter.TextMatrix(msgEnter.Row, 1) = "3"
If Not mblnIsInit Then mblnIsChanged = True
End Sub
Private Sub dtePaste_GotFocus()
mlngRow = msgEnter.Row
mlngCol = msgEnter.col
End Sub
Private Sub dtePaste_KeyPress(KeyAscii As Integer, bCancel As Long)
If KeyAscii = vbKeyReturn Then
BKKEY msgEnter.hwnd, vbKeyRight
End If
End Sub
Private Sub dtePaste_LostFocus()
On Error Resume Next
If msgEnter.col = 3 And Me.ActiveControl.Name = "msgEnter" Then
dtePaste.SetFocus
Else
dtePaste.Visible = False
End If
End Sub
Private Sub InitLst()
Dim strSql As String
strSql = "SELECT lngOrderID,strOrderCode,Rtrim(strCustomerName) " _
& "FROM ProjectOrder,Customer WHERE lngProjectID=" & mlngProjID & " AND ProjectOrder" _
& ".lngCustomerID=Customer.lngCustomerID"
Set lstPaste.Recordset = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
lstPaste.ColWidth(2) = 900 '30 * Me.TextWidth("A")
lstPaste.ColWidth(3) = 2000
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
On Error Resume Next
Select Case Me.ActiveControl.Name
Case "msgEnter" ', "lstPaste" ', "txtPaste", "dtePaste"
Exit Sub
End Select
If KeyAscii = vbKeyReturn Then
BKKEY Me.ActiveControl.hwnd, vbKeyTab
End If
End Sub
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
If Shift <> 2 Then Exit Sub
If KeyCode = vbKeyReturn Then
cmdOK(0).Value = True
ElseIf KeyCode = vbKeyA Then
mnuAdd_Click
ElseIf KeyCode = vbKeyD And mnuDel.Enabled Then
mnuDel_Click
End If
End Sub
Private Sub Form_Load()
Dim edtErrReturn As ErrDealType
On Error GoTo ErrHandle
Utility.LoadFormResPicture Me
Set mclsGrid = New Grid
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -