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

📄 frmchecksale.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 3 页
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Object = "{9C4B12C2-D5CE-11D1-9ABC-444553540000}#1.0#0"; "GATLCTRL.DLL"
Object = "{E0B099CD-729C-11D2-840D-444553540000}#2.0#0"; "LISTTEXT.OCX"
Begin VB.Form frmCheckSale 
   Caption         =   "选择开票销售单"
   ClientHeight    =   4740
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   8385
   LinkTopic       =   "Form1"
   ScaleHeight     =   4740
   ScaleWidth      =   8385
   StartUpPosition =   3  '窗口缺省
   Begin GATLCTRLLibCtl.CalEdit txtEdit 
      Height          =   285
      Left            =   3420
      OleObjectBlob   =   "frmCheckSale.frx":0000
      TabIndex        =   12
      Top             =   120
      Width           =   975
   End
   Begin MSRDC.MSRDC datItemData 
      Height          =   330
      Left            =   7140
      Top             =   3750
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      _Version        =   327681
      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 ListRefer.ListText litEdit 
      Height          =   315
      Left            =   840
      TabIndex        =   10
      Top             =   90
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   556
      Comparts        =   0
      SeekCol         =   ""
      BackColor       =   16777215
      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.CommandButton cmdItemData 
      Caption         =   "全部取消"
      Height          =   375
      Index           =   6
      Left            =   7080
      TabIndex        =   6
      Top             =   2670
      Width           =   1215
   End
   Begin VB.CommandButton cmdItemData 
      Caption         =   "全部选择"
      Height          =   375
      Index           =   5
      Left            =   7080
      TabIndex        =   5
      Top             =   2250
      Width           =   1215
   End
   Begin VB.CommandButton cmdItemData 
      Height          =   375
      Index           =   4
      Left            =   7170
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   3150
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.CommandButton cmdItemData 
      Caption         =   "栏目设置"
      Height          =   375
      Index           =   3
      Left            =   7080
      TabIndex        =   3
      Top             =   1740
      Width           =   1215
   End
   Begin VB.CommandButton cmdItemData 
      Caption         =   "筛选"
      Height          =   375
      Index           =   2
      Left            =   7080
      TabIndex        =   2
      Top             =   1335
      Width           =   1215
   End
   Begin VB.CommandButton cmdItemData 
      Height          =   375
      Index           =   1
      Left            =   7080
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   855
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin VB.CommandButton cmdItemData 
      Height          =   375
      Index           =   7
      Left            =   7080
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   450
      UseMaskColor    =   -1  'True
      Width           =   1215
   End
   Begin MSFlexGridLib.MSFlexGrid msgGrid 
      Bindings        =   "frmCheckSale.frx":0081
      Height          =   3855
      Left            =   105
      TabIndex        =   7
      Top             =   450
      Width           =   6855
      _ExtentX        =   12091
      _ExtentY        =   6800
      _Version        =   65541
      Cols            =   30
      FixedCols       =   7
      BackColor       =   16777215
   End
   Begin VB.Label hlb 
      BackColor       =   &H8000000E&
      Height          =   255
      Index           =   0
      Left            =   7200
      TabIndex        =   11
      Top             =   4200
      Width           =   1215
   End
   Begin VB.Label lblProjectCost 
      Caption         =   "单位:"
      Height          =   255
      Index           =   0
      Left            =   195
      TabIndex        =   9
      Top             =   135
      Width           =   615
   End
   Begin VB.Label lblProjectCost 
      Caption         =   "币种:"
      Height          =   255
      Index           =   1
      Left            =   4875
      TabIndex        =   8
      Top             =   135
      Width           =   1575
   End
End
Attribute VB_Name = "frmCheckSale"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'销售开票
'作者:   唐吉禹
'1998-7-20
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Private WithEvents mclsGrid1 As NewGrid     '声明GRID类模块
Attribute mclsGrid1.VB_VarHelpID = -1
Private mlhls As rdoResultset                  '声明数据表类型
Private mlngID As String                    'ID字符串
Private ytextRow As Integer                 '记录当前FLEXGRID单元的行号
Private ytextCol As Integer                 '记录当前FLEXGRID单元的列号
Private mlngCustomerID As Long              '单位ID
Private mlngCurrencyID As Long              '币种ID
Private mintCloseCol As Integer             '关闭列
Private blnIsCancel As Boolean              '按钮退出吗
Private ToFormName As Object                '输出窗体的名称
Private mlngCol As Long                     '修改列
Private Const intfixl = 7                   '偏移数量
Private Sub RefreshGrid(ByVal blnWhere As Boolean)
'入参:blnWhere;blnWhere=True,则为筛选中调用,需把筛选条件加上;否则为常规调用
'功能:从对应视图取SQL语句并打开、初始化之
    Dim strSelect As String
    Dim strFrom As String
    Dim Strsql As String
    Dim recresultset As rdoResultset
    Dim strWhere As String
    Dim qrf As rdoQuery
    
    '//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    '//    取本次结算金额、本次结算数量算法(连接对照表的方法):                                                                                     //
    '//       '首先:因为本次结算金额、本次结算数量是针对本次单据业务ID的;所以,可通过ItemActivity表的lngItemActivityID字段                          //
    '//   '和ItemActivityDetail表的lngItemActivityID字段将此二表连接起来;再通过ItemActivityDetail表的lngItemActivityDetailID字段                     //
    '//   '和InvoiceToSale表的lngInvoiceActivityDetailID字段将此二表连接起来;这样一来表ItemActivity、ItemActivityDetail和InvoiceToSale就被有机连接起来了。     //
    '//   '再用ItemActivity中的lngItemActivityID作为取本次结算金额、本次结算数量记录的条件。把单据中取过来的单据业务ID作为参数传给lngItemActivityID   //
    '//   '就得到了所有取本次结算金额、本次结算数量的记录(取InvoiceToSale表的全部字段)。                                                            //
    '//       '然后:将上面生成的查询作为一个查询表(取别名InvoiceToSale)再同表ItemActivityDetail连接回去就得到了我们需要的结果。连接方法是          //
    '//   '通过ItemActivityDetail表的lngItemActivityDetailID字段和InvoiceToSale表的lngSaleActivityDetailID字段将二表连接起来。                        //
    '//   '结束                                                                                                                                       //
    '//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
    With msgGrid
        .Redraw = False
        .FixedCols = 0
    End With
    With mclsGrid1.ListSet
        '商品业务明细ID,单价,未开票金额,计算因子,开票数量,未开票数量,选择
        strSelect = "SELECT ID,Price,Format(未开票金额,'#.00') AS dblValue,dblFactor,'' AS dblNowNumber,dblNumber,选择," & .SelectOfSql
        strFrom = .FromOfSql
        strWhere = .WhereOfSql
    End With
    Strsql = strSelect & strFrom
    If Len(strWhere) > 0 And blnWhere Then
        Strsql = Strsql & " WHERE " & strWhere
    End If
'    Strsql = Strsql & " ORDER BY lngItemID"
    Set qrf = gclsBase.BaseDB.CreateQuery("", Strsql)
    qrf.Parameters("mlngCustomerID") = mlngCustomerID
    qrf.Parameters("mlngCurrencyID") = mlngCurrencyID
    qrf.Parameters("DetailID") = mlngID
'    Set recresultset = qrf.OpenResultset
'    If Not recresultset.EOF Then
'        recresultset.MoveLast
'        recresultset.MoveFirst
'        Set mlhls = recresultset
'        inittext
'    End If
    Set datItemData.Resultset = recresultset
    With msgGrid
        .SelectionMode = flexSelectionFree
        .FocusRect = flexFocusLight
        .Redraw = True
    End With
    recresultset.Close
    Set recresultset = Nothing
    mclsGrid1.ListSetToGrid
    mclsGrid1.SetupStyle
    msgGrid.FixedCols = intfixl
    msgGrid.ColWidth(1) = 0
    msgGrid.ColWidth(2) = 0
    msgGrid.ColWidth(3) = 0
    msgGrid.ColWidth(4) = 0
    msgGrid.ColWidth(5) = 0
    msgGrid.ColWidth(6) = 420
End Sub
'响应窗体按钮动作
Private Sub cmdItemData_Click(Index As Integer)
    Select Case Index
    Case 7                                    '确定存盘
        blnIsCancel = True
        If msgGrid.Rows > 1 Then
           Call FinishGrid(True)
        Else
           Unload Me
        End If
    Case 1                                    '取消
        blnIsCancel = True
        Unload Me
    Case 2                                    '筛选

⌨️ 快捷键说明

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