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

📄 bjform.frm

📁 一套商品管理
💻 FRM
📖 第 1 页 / 共 2 页
字号:
 .Range(.Rows - 1, 3, .Rows - 1, 5).Merge
 .Cell(.Rows - 1, 3).Border(cellEdgeBottom) = cellThin
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 2).Text = "公司地址: "
 .Cell(.Rows - 1, 2).Alignment = cellRightCenter
 .Range(.Rows - 1, 3, .Rows - 1, 5).Merge
 .Cell(.Rows - 1, 3).Border(cellEdgeBottom) = cellThin
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 2).Text = "省/市 邮编: "
 .Cell(.Rows - 1, 2).Alignment = cellRightCenter
 .Range(.Rows - 1, 3, .Rows - 1, 5).Merge
 .Cell(.Rows - 1, 3).Border(cellEdgeBottom) = cellThin
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 2).Text = "电    话: "
 .Cell(.Rows - 1, 2).Alignment = cellRightCenter
 .Range(.Rows - 1, 3, .Rows - 1, 5).Merge
 .Cell(.Rows - 1, 3).Border(cellEdgeBottom) = cellThin
 .Rows = .Rows + 2
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 2).Text = "特别注意事项: "
 .Range(.Rows - 1, 3, .Rows - 1, 7).Merge
 .Cell(.Rows - 1, 3).Border(cellEdgeBottom) = cellThin
 .Rows = .Rows + 2
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 2).Text = "业务员"
 .Cell(.Rows - 1, 3).Text = "发货日期"
 .Cell(.Rows - 1, 4).Text = "发货方式"
 .Cell(.Rows - 1, 6).Text = "付款方式"
 .Range(.Rows - 1, 2, .Rows - 1, 7).Alignment = cellCenterCenter
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeTop) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellInsideVertical) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeRight) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeLeft) = cellThin
 .Range(.Rows - 1, 4, .Rows - 1, 5).Merge
 .Range(.Rows - 1, 6, .Rows - 1, 7).Merge
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 4).CellType = cellComboBox
 .Cell(.Rows - 1, 6).CellType = cellComboBox
 .Range(.Rows - 1, 2, .Rows - 1, 7).Alignment = cellCenterCenter
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeTop) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellInsideVertical) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeRight) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeLeft) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeBottom) = cellThin
 .Range(.Rows - 1, 4, .Rows - 1, 5).Merge
 .Range(.Rows - 1, 6, .Rows - 1, 7).Merge
 .Rows = .Rows + 2
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 2).Text = "产品名称"
 .Cell(.Rows - 1, 3).Text = "说明"
 .Cell(.Rows - 1, 5).Text = "单价(含税)"
 .Cell(.Rows - 1, 6).Text = "数量(个)"
 .Cell(.Rows - 1, 7).Text = "金额(元)"
 .Range(.Rows - 1, 2, .Rows - 1, 7).Alignment = cellCenterCenter
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeTop) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellInsideVertical) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeRight) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeLeft) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeBottom) = cellThin
 .Range(.Rows - 1, 3, .Rows - 1, 4).Merge
 .Column(5).DecimalLength = 2
 .Column(7).DecimalLength = 2
 For i = 1 To 10
 .Rows = .Rows + 1
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellInsideVertical) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeRight) = cellThin
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeLeft) = cellThin
 .Range(.Rows - 1, 3, .Rows - 1, 4).Merge
 .Cell(.Rows - 1, 5).Mask = cellValue
 .Cell(.Rows - 1, 6).Mask = cellNumeric
 .Cell(.Rows - 1, 7).Mask = cellValue
 Next
 .Range(.Rows - 1, 2, .Rows - 1, .Cols - 2).Borders(cellEdgeBottom) = cellThin
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 6).Text = "合计 "
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellInsideVertical) = cellThin
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellEdgeRight) = cellThin
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellEdgeLeft) = cellThin
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellEdgeBottom) = cellThin
 .Cell(.Rows - 1, 7).Mask = cellValue
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 6).Text = "其它费用 "
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellInsideVertical) = cellThin
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellEdgeRight) = cellThin
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellEdgeLeft) = cellThin
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellEdgeBottom) = cellThin
 .Cell(.Rows - 1, 7).Mask = cellValue
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 6).Text = "总计 "
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellInsideVertical) = cellThin
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellEdgeRight) = cellThin
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellEdgeLeft) = cellThin
 .Range(.Rows - 1, 7, .Rows - 1, .Cols - 2).Borders(cellEdgeBottom) = cellThin
 .Cell(.Rows - 1, 7).Mask = cellValue
 .Rows = .Rows + 1
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 2).Text = "请在这里填写其它信息,如备注"
 .Range(.Rows - 1, 2, .Rows - 1, 7).Merge
 .Rows = .Rows + 1
 .Rows = .Rows + 1
 .Cell(.Rows - 1, 2).Text = "请在这里填写下次光临或祝福语!"
 .Range(.Rows - 1, 2, .Rows - 1, 7).Merge
 .Range(1, 1, .Rows - 1, 7).WrapText = True
 For i = 3 To .Rows - 1
 .RowHeight(i) = 20
 Next
 .AutoRedraw = True
 .Refresh
End With
End Sub
Private Sub DHNote()

End Sub

Private Sub Grid1_CellChange(ByVal Row As Long, ByVal Col As Long)
If Row = 35 Then
 If Grid1.Cell(35, 7).Text <> "" Then
  Grid1.Cell(36, 7).Text = Grid1.Cell(34, 7).DoubleValue + Grid1.Cell(35, 7).DoubleValue
 End If
End If
End Sub

Private Sub Grid1_ComboDropDown(ByVal Row As Long, ByVal Col As Long)
If Row = 20 And Col = 4 Then
 Set Qy1 = cnn.Execute("select ly from unit where numberid='5'")
 Do While Not Qy1.EOF
 Grid1.ComboBox(0).AddItem Qy1.Fields(0)
 Qy1.MoveNext
 Loop
End If
If Row = 20 And Col = 6 Then
 Set Qy1 = cnn.Execute("select ly from unit where numberid='6'")
 Do While Not Qy1.EOF
 Grid1.ComboBox(0).AddItem Qy1.Fields(0)
 Qy1.MoveNext
 Loop
End If
End Sub

Private Sub Grid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then
 PopupMenu Menu
End If
End Sub

Private Sub LoadXML_Click()
On Error GoTo finish:
If UKeyStr <> KeyStr Then
MsgBox "只有注册用户才可使用!", vbInformation, "提示"
Exit Sub
End If
opendialog.Filter = "报价文件(*.BJ)|*.BJ"
opendialog.ShowOpen
If opendialog.FileName <> "" And opendialog.CancelError = False Then
Grid1.LoadFromXML (opendialog.FileName)
MsgBox "文件(" & opendialog.FileName & ")已成功导入!", vbInformation, "提示"
End If
Exit Sub
finish:
End Sub

Private Sub PrintZ_Click()
On Error GoTo finish
If UKeyStr <> KeyStr Then
MsgBox "只有注册用户才可使用!", vbInformation, "提示"
Exit Sub
End If
   With Grid1
    '设置打印区域
    .PageSetup.PrintFixedRow = False '设定是否允许打印第0行
    .PageSetup.PrintFixedColumn = False '是否打印第0列
    .PageSetup.PrintRows = .Rows - 2 '需要打印的总行数
    .PageSetup.PrintColumns = .Cols - 3 '需要打印的总列数
    .PageSetup.PrintGridlines = False '是否显示中间的分隔线,即表格线
    'Grid1.AutoRedraw = True
    .PageSetup.Orientation = cellPortrait '采用横幅打印还是竖行打印
    End With
    
    Set Qy3 = cnn.Execute("select * from pset where ss='BJ'")
    If Qy3.EOF = False Then
    With Grid1.PageSetup
      '设置页眉
       If Qy3.Fields(0) = "1" Then
        .Header = Qy3.Fields(2)
        Select Case Qy3.Fields(7)
         Case "左侧"
           .HeaderAlignment = cellLeft
         Case "居中"
           .HeaderAlignment = cellCenter
         Case "右侧"
           .HeaderAlignment = cellRight
        End Select
        .HeaderFont.Name = "Times New Roman"
        .HeaderFont.Size = Qy3.Fields(3)
        .HeaderFont.Bold = Qy3.Fields(4)
        .HeaderFont.Italic = Qy3.Fields(5)
        .HeaderFont.Underline = Qy3.Fields(6)
       End If
       
       If Qy3.Fields(1) = "1" Then
        '设置页脚
        .Footer = Qy3.Fields(8)
        Select Case Qy3.Fields(10)
         Case "左侧"
           .FooterAlignment = cellLeft
         Case "居中"
           .FooterAlignment = cellCenter
         Case "右侧"
           .FooterAlignment = cellRight
        End Select
        .FooterFont.Name = "Verdana"
        .FooterFont.Size = Qy3.Fields(9)
       End If
       
       
        '设置页边距
        .LeftMargin = Qy3.Fields(11)
        .RightMargin = Qy3.Fields(12)
        .TopMargin = Qy3.Fields(13)
        .BottomMargin = Qy3.Fields(14)
        .HeaderMargin = Qy3.Fields(15)
        .FooterMargin = Qy3.Fields(16)
    End With
    End If
    Grid1.PrintPreview (Zoom) '打印预览
    Grid1.Refresh
    
    Exit Sub
finish:
    MsgBox Err.Description
End Sub

Private Sub SAVEBJ_Click()
On Error GoTo finish:
If UKeyStr <> KeyStr Then
MsgBox "只有注册用户才可使用!", vbInformation, "提示"
Exit Sub
End If
Grid1.ExportToXML (App.Path & "\BJBAK.BJ")
MsgBox "保存成功!路径(" & App.Path & "\BJBAK.BJ" & ")", vbInformation, "提示"
Exit Sub
finish:
End Sub

Private Sub SaveXML_Click()
On Error Resume Next
If UKeyStr <> KeyStr Then
MsgBox "只有注册用户才可使用!", vbInformation, "提示"
Exit Sub
End If
  opendialog.CancelError = True
  opendialog.DialogTitle = "导出文件"
  opendialog.FileName = ""
  opendialog.Filter = "导出报价文件(*.BJ)|*.BJ"
  opendialog.flags = cdlOFNCreatePrompt + cdlOFNHideReadOnly
  opendialog.ShowSave
  If Err = cdlCancel Then Exit Sub
  Grid1.ExportToXML (opendialog.FileName)
  MsgBox "保存成功!路径(" & opendialog.FileName & ")", vbInformation, "提示"
End Sub

⌨️ 快捷键说明

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