📄 bjform.frm
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Object = "{4F29B06F-16D9-4A0C-9C8A-2F0C02F625FE}#1.7#0"; "FlexCell.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form bjform
BorderStyle = 1 'Fixed Single
Caption = "报价打印处理中心"
ClientHeight = 4815
ClientLeft = 45
ClientTop = 435
ClientWidth = 7335
Icon = "bjform.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4815
ScaleWidth = 7335
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin MSComDlg.CommonDialog opendialog
Left = 6360
Top = 600
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin FlexCell.Grid Grid1
Height = 4575
Left = 120
TabIndex = 0
Top = 120
Width = 5775
_ExtentX = 10186
_ExtentY = 8070
Cols = 9
ExtendLastCol = -1 'True
Rows = 1
End
Begin ACTIVESKINLibCtl.Skin Skn1
Left = 0
OleObjectBlob = "bjform.frx":000C
Top = 0
End
Begin VB.Menu Menu
Caption = "Menu"
Visible = 0 'False
Begin VB.Menu PrintZ
Caption = "打印预览"
End
Begin VB.Menu BJPrintset
Caption = "打印设置"
End
Begin VB.Menu SaveXML
Caption = "保存报价文件"
End
Begin VB.Menu EditSB
Caption = "修改商标"
End
Begin VB.Menu LoadXML
Caption = "载入报价文件"
End
Begin VB.Menu SAVEBJ
Caption = "保存为模板文件"
End
Begin VB.Menu deldj
Caption = "删除模板文件"
End
End
End
Attribute VB_Name = "bjform"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetKeyState Lib "user32" _
(ByVal nVirtKey As Long) As Integer
Private Sub BJPrintset_Click()
PrintS = "BJ"
Printset.Caption = "报价打印设置"
Printset.Show 1
End Sub
Private Sub deldj_Click()
If Dir(App.Path & "\BJBAK.BJ", vbNormal) <> "" Then
Kill App.Path & "\BJBAK.BJ"
MsgBox "模板文件已清除,请重新载入本窗体!", vbInformation, "提示"
Else
MsgBox "模板文件已清除,请重新载入本窗体!", vbInformation, "提示"
End If
End Sub
Private Sub EditSB_Click()
On Error GoTo finish:
If UKeyStr <> KeyStr Then
MsgBox "只有注册用户才可使用!", vbInformation, "提示"
Exit Sub
End If
opendialog.Filter = "商标文件(*.jpg,*.gif,*.bmp)|*.jpg"
opendialog.ShowOpen
If opendialog.FileName <> "" And opendialog.CancelError = False Then
FileCopy opendialog.FileName, App.Path & "\coimage.jpg"
Grid1.Images.Add App.Path & IIf(Right(App.Path, 1) = "\", "", "\") & "coimage.jpg", "coimage"
Grid1.Cell(1, 2).Alignment = cellCenterCenter
Grid1.Cell(1, 2).SetImage "coimage"
End If
Exit Sub
finish:
End Sub
Private Sub Form_Load()
Grid1.SetRegisterInformation "CNwinndy", "W]vyY-nonvk-u\nty-Zbl_e-`hms^" '进行注册
Skn1.LoadSkin App.Path & sknPname
Skn1.ApplySkinByName hWnd, "窗体"
Skn1.ApplySkin hWnd
With Grid1
.AllowUserResizing = True
.DisplayFocusRect = False
.ExtendLastCol = True
.Appearance = Flat
.FixedRowColStyle = Flat
.ScrollBarStyle = Flat
.DefaultFont.Name = "Tahoma"
.DefaultFont.Size = 10
End With
If Dir(App.Path & "\BJBAK.BJ", vbNormal) <> "" Then
Grid1.LoadFromXML (App.Path & "\BJBAK.BJ")
Else
ShowGrid
Grid1.Cell(3, 7).CellType = cellCalendar
Grid1.Cell(8, 7).CellType = cellCalendar
Grid1.Cell(20, 4).CellType = cellComboBox
Grid1.Column(5).Mask = cellValue
Grid1.Column(6).Mask = cellNumeric
Grid1.Column(7).Mask = cellValue
Grid1.Column(5).DecimalLength = 2
Grid1.Column(7).DecimalLength = 2
For i = 23 To 33
Grid1.Cell(i, 5).Mask = cellValue
Grid1.Cell(i, 6).Mask = cellNumeric
Grid1.Cell(i, 7).Mask = cellValue
Next
End If
If SendDH <> "" Then
SGrid
End If
End Sub
Private Sub SGrid() '获取表格参数
With Grid1
.Cell(3, 7).Text = Date
.Cell(4, 7).Text = SendDH
Set Qy1 = cnn.Execute("select c_message.* from xs_dj,c_message where xs_dj.id='" & SendDH & "' and xs_dj.coname=c_message.coname")
If Qy1.EOF = False Then
.Cell(5, 7).Text = Qy1.Fields(0)
.Cell(9, 3).Text = Qy1.Fields(3)
.Cell(10, 3).Text = Qy1.Fields(1)
.Cell(11, 3).Text = Qy1.Fields(5)
.Cell(12, 3).Text = Qy1.Fields(11)
.Cell(13, 3).Text = Qy1.Fields(7)
End If
Set Qy1 = cnn.Execute("select pname,pgg,num,money,cmoney from xs_note where pid='" & SendDH & "'")
i = 1
Do While Not Qy1.EOF
.Cell(i + 23, 2).Text = Qy1.Fields(0)
.Cell(i + 23, 3).Text = Qy1.Fields(1)
.Cell(i + 23, 5).Text = Qy1.Fields(3)
.Cell(i + 23, 6).Text = Qy1.Fields(2)
.Cell(i + 23, 7).Text = Qy1.Fields(4)
i = i + 1
Qy1.MoveNext
Loop
Set Qy1 = cnn.Execute("select cmoney from xs_dj where id='" & SendDH & "'")
.Cell(34, 7).Text = Qy1.Fields(0)
.Cell(36, 7).Text = Qy1.Fields(0)
End With
End Sub
Private Sub Form_Resize()
If Me.WindowState <> 1 Then
Grid1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
bjform.Show
End If
End Sub
Private Sub ShowGrid()
With Grid1
Dim StrBC As String
.AutoRedraw = False
StrBC = &HE0E0E0
.Column(1).Width = 10
.Column(2).Width = 105
' .Column(3).Width = 130
.Column(4).Width = 144
' .Column(5).Width = 85
.Column(6).Width = 95
.Rows = .Rows + 1
.RowHeight(.Rows - 1) = 60
.Images.Add App.Path & IIf(Right(App.Path, 1) = "\", "", "\") & "coimage.jpg", "coimage"
.Cell(.Rows - 1, 2).Alignment = cellCenterCenter
.Cell(.Rows - 1, 2).SetImage "coimage"
.Cell(.Rows - 1, 6).Text = "报价单"
.Cell(.Rows - 1, 6).Font.Size = 25
.Cell(.Rows - 1, 6).Font.Bold = True
.Cell(.Rows - 1, 6).Alignment = cellCenterCenter
.Range(.Rows - 1, 6, .Rows - 1, 7).Merge
.Rows = .Rows + 1
.RowHeight(.Rows - 1) = 28
.Cell(.Rows - 1, 2).Text = "请在这里填写公司名称"
.Cell(.Rows - 1, 2).Font.Size = 15
.Cell(.Rows - 1, 2).Font.Bold = True
.Range(.Rows - 1, 2, .Rows - 1, 4).Merge
.Cell(.Rows - 1, 2).Font.Underline = True
.Cell(.Rows - 1, 2).Font.Weight = 1
' .Range(.Rows - 1, 2, .Rows - 1, 4).Borders(cellEdgeBottom) = cellThin
.Rows = .Rows + 1
.Cell(.Rows - 1, 6).Text = "日期:"
.Cell(.Rows - 1, 6).Alignment = cellRightCenter
.Cell(.Rows - 1, 7).CellType = cellCalendar
.Cell(.Rows - 1, 7).Border(cellEdgeBottom) = cellThin
.Rows = .Rows + 1
.Cell(.Rows - 1, 2).Text = "公司地址:"
.Cell(.Rows - 1, 2).Alignment = cellRightCenter
.Cell(.Rows - 1, 3).Text = "请在这里填写公司地址"
.Range(.Rows - 1, 3, .Rows - 1, 4).Merge
.Cell(.Rows - 1, 3).Font.Underline = True
.Cell(.Rows - 1, 3).Font.Weight = 1
.Cell(.Rows - 1, 6).Text = "报价单号:"
.Cell(.Rows - 1, 6).Alignment = cellRightCenter
.Cell(.Rows - 1, 7).Border(cellEdgeBottom) = cellThin
.Rows = .Rows + 1
.Cell(.Rows - 1, 2).Text = "省/市: (请填写省市) 邮编: (请添加邮编)"
.Range(.Rows - 1, 2, .Rows - 1, 4).Merge
.Cell(.Rows - 1, 2).Font.Underline = True
.Cell(.Rows - 1, 2).Font.Weight = 1
.Range(.Rows - 1, 2, .Rows - 1, 4).Alignment = cellRightCenter
.Cell(.Rows - 1, 6).Text = "客户号:"
.Cell(.Rows - 1, 6).Alignment = cellRightCenter
.Cell(.Rows - 1, 7).Border(cellEdgeBottom) = cellThin
.Rows = .Rows + 1
.Cell(.Rows - 1, 2).Text = "电话: 传真:(请填写电话与传真)"
.Range(.Rows - 1, 2, .Rows - 1, 4).Merge
.Cell(.Rows - 1, 2).Font.Underline = True
.Cell(.Rows - 1, 2).Font.Weight = 1
.Range(.Rows - 1, 2, .Rows - 1, 4).Alignment = cellRightCenter
.Rows = .Rows + 1
.Rows = .Rows + 1
.Cell(.Rows - 1, 2).Text = "特为下面客户报价"
.Range(.Rows - 1, 2, .Rows - 1, 4).Merge
.Cell(.Rows - 1, 6).Text = "报价有限期至"
.Cell(.Rows - 1, 7).CellType = cellCalendar
.Cell(.Rows - 1, 7).Border(cellEdgeBottom) = cellThin
.Rows = .Rows + 1
.Cell(.Rows - 1, 2).Text = "姓 名: "
.Cell(.Rows - 1, 2).Alignment = cellRightCenter
.Cell(.Rows - 1, 3).Border(cellEdgeBottom) = cellThin
.Rows = .Rows + 1
.Cell(.Rows - 1, 2).Text = "公司名称: "
.Cell(.Rows - 1, 2).Alignment = cellRightCenter
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -