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

📄 frmlistconsignee.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 3 页
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Begin VB.Form frmListConsignee 
   BackColor       =   &H80000004&
   Caption         =   "受托代销调价单列表"
   ClientHeight    =   3750
   ClientLeft      =   2580
   ClientTop       =   2595
   ClientWidth     =   6885
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MDIChild        =   -1  'True
   ScaleHeight     =   3750
   ScaleWidth      =   6885
   Tag             =   "ctPayMethod////101"
   WhatsThisButton =   -1  'True
   WhatsThisHelp   =   -1  'True
   Begin VB.CheckBox chkShowAll 
      Caption         =   "全部显示"
      Height          =   350
      Left            =   4080
      TabIndex        =   8
      Top             =   3180
      Width           =   1095
   End
   Begin VB.TextBox txtFind 
      Height          =   300
      Left            =   3195
      TabIndex        =   2
      Top             =   75
      Width           =   3015
   End
   Begin VB.CommandButton cmdAgain 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   6240
      Style           =   1  'Graphical
      TabIndex        =   3
      Tag             =   "1017"
      ToolTipText     =   "再找"
      Top             =   90
      UseMaskColor    =   -1  'True
      Width           =   300
   End
   Begin VB.ComboBox cboFindKind 
      Height          =   300
      Left            =   720
      Style           =   2  'Dropdown List
      TabIndex        =   1
      Top             =   90
      Width           =   1515
   End
   Begin VB.Data datGrid 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  'DefaultCursor
      DefaultType     =   2  'UseODBC
      Exclusive       =   0   'False
      Height          =   375
      Left            =   5250
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   3150
      Visible         =   0   'False
      Width           =   1245
   End
   Begin MSFlexGridLib.MSFlexGrid grdList 
      Bindings        =   "frmListConsignee.frx":0000
      Height          =   2655
      Left            =   0
      TabIndex        =   4
      Tag             =   "ctPayMethod////101"
      Top             =   480
      Width           =   6495
      _ExtentX        =   11456
      _ExtentY        =   4683
      _Version        =   65541
      Rows            =   20
      Cols            =   3
      FixedCols       =   0
      BackColorFixed  =   -2147483644
      BackColorSel    =   -2147483646
      BackColorBkg    =   16777215
      Redraw          =   -1  'True
      AllowBigSelection=   0   'False
      FocusRect       =   0
      SelectionMode   =   1
      AllowUserResizing=   1
   End
   Begin MSForms.CommandButton cmdReport 
      Height          =   345
      Left            =   1260
      TabIndex        =   6
      Tag             =   "1018"
      Top             =   3240
      WhatsThisHelpID =   5010
      Width           =   1215
      Caption         =   "报表"
      PicturePosition =   196613
      Size            =   "2143;609"
      TakeFocusOnClick=   0   'False
      FontName        =   "宋体"
      FontHeight      =   180
      FontCharSet     =   134
      FontPitchAndFamily=   34
      ParagraphAlign  =   3
   End
   Begin MSForms.CommandButton cmdEdit 
      Height          =   350
      Left            =   50
      TabIndex        =   5
      Tag             =   "1018"
      Top             =   3240
      WhatsThisHelpID =   5010
      Width           =   1215
      Caption         =   "编辑"
      PicturePosition =   196613
      Size            =   "2143;609"
      FontName        =   "宋体"
      FontHeight      =   180
      FontCharSet     =   134
      FontPitchAndFamily=   34
      ParagraphAlign  =   3
   End
   Begin VB.Label lblFind 
      AutoSize        =   -1  'True
      Caption         =   "内容(&C)"
      Height          =   180
      Left            =   2460
      TabIndex        =   7
      Top             =   150
      Width           =   630
   End
   Begin VB.Label lblFindKind 
      AutoSize        =   -1  'True
      Caption         =   "查找(&F)"
      Height          =   180
      Left            =   50
      TabIndex        =   0
      Top             =   150
      Width           =   630
   End
End
Attribute VB_Name = "frmListConsignee"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'王成

Option Explicit
Private Strsql  As String
Private lngOldOperatorID As Long

Private WithEvents mclsMainControl As MainControl               '主控对象
Attribute mclsMainControl.VB_VarHelpID = -1
Private WithEvents mclsSubClass As SubClass32.SubClass          '钩子对象
Attribute mclsSubClass.VB_VarHelpID = -1
Private WithEvents mclsSubClassform As SubClass32.SubClass
Attribute mclsSubClassform.VB_VarHelpID = -1
Private mclsList As list                                        '列表对象
Attribute mclsList.VB_VarHelpID = -1
Private mclsAdjust As clsAdjust

'////////////////////////////////////////////////
'/////                赋值
'////////////////////////////////////////////////
Private Const intAdjustIn = 27  ' 受托代销调价单(入)
Private Const intAdjustOut = 28 ' 受托代销调价单(出)
Private Const intViewID = 79                                   '受托调价:不同的列表窗口,其值不同

Private blnMenuBuilded As Boolean
Private strOldMenuCaption As String

Private theEditForm As Form
Private mIsShowEdit As Boolean                                 '编辑窗口是否已调出标志
Private theEditRow As Long                                     '弹出编辑窗口时本列表的当前行,编辑窗口的记录移动操作影响此值

Private BeginDate As Date
Private EndDate As Date
Private bDblClick As Boolean

Private blnIsVoid As Boolean
Private blnIsVouchered As Boolean '是否已生成凭证
Private blnEdit As Boolean '编辑权限
Private blnChange As Boolean '只能编辑和删除自己制作的单据
Private mblnIsSaveListset As Boolean                            'Whether or not save lngViewID in list

Private Sub cMsgBox(strMsg As String, Optional strTitle As String)
    If Trim(strTitle) = "" Then
        strTitle = "提示信息"
    End If

    ShowMsg Me.hwnd, strMsg, MB_OK + MB_ICONEXCLAMATION + MB_SYSTEMMODAL, strTitle
End Sub

Private Sub GotoRow(lngRow As Long)
    With grdList
        .Row = lngRow
        .ColSel = .Cols - 1
    End With
End Sub

'获得当前行的lngActivityID
Private Function GetlngActivityID()
    With grdList
        GetlngActivityID = CLng(.TextMatrix(.Row, 0))
    End With
End Function

'返回本张受托代销调价单的各种状态
Private Function GetItemStatus(lngActivityID As Long) As Boolean
    Dim recTemp As rdoResultset
    
    Strsql = "SELECT ItemActivity.lngVoucherID, ItemActivity.lngOperatorID, ItemActivity.blnIsVoid From ItemActivity  WHERE (ItemActivity.lngActivityID)=" & lngActivityID
    Set recTemp = gclsBase.BaseDB.OpenRecordset(Strsql, dbOpenSnapshot)
    If recTemp.BOF And recTemp.EOF Then
        cMsgBox "列表的数据已被修改,请重新刷新后再进行操作!"
        Exit Function
    End If
        
    If recTemp(0) > 0 Then
        blnIsVouchered = True
    Else
        blnIsVouchered = False
    End If
    If gclsBase.OperatorID = recTemp(1) Then
        blnChange = True
    Else
        blnChange = False
    End If
    blnIsVoid = recTemp(2)
    
    Set recTemp = Nothing
    GetItemStatus = True
End Function


Public Function GetList() As rdoResultset
    Dim recTemp As rdoResultset
    Dim strSelect As String
    Dim strFrom   As String
    Dim strWhere  As String
    Dim strGroup As String
    Dim strHaving As String
    Dim arrHaving() As String
    
On Error Resume Next
    strSelect = mclsList.ListSet.SelectOfSql
    strSelect = strSelect & ",First(Currencys.bytCurrencyDec) AS 原币小数位数,First(Currencys.bytRateDec) AS 汇率小数位数 "
    strFrom = mclsList.ListSet.FromOfSql
    strWhere = mclsList.ListSet.WhereOfSql
   
    If Trim(strSelect) = "" Or Trim(strFrom) = "" Then
        Set GetList = Nothing
        Exit Function
    End If
    
    strWhere = Filter.ModifyCond(strWhere, arrHaving(), strHaving)
    If Trim(strHaving) <> "" Then
        strHaving = " AND " & strHaving
    End If
    If Trim(strWhere) <> "" Then
        strWhere = " WHERE " & strWhere & " AND "
    Else
        strWhere = " WHERE "
    End If
    
    strSelect = "SELECT ItemActivity.lngActivityID , First(IIf([ItemActivity]![blnIsVoid],'√','')) AS 作废," & strSelect
    strWhere = strWhere & "(((ItemActivity.lngActivityTypeID)=23))"
    strGroup = " GROUP BY  ItemActivity.lngActivityID"
    'strHaving = " HAVING (((First(CDate([ItemActivity]![strDate])))>=#" & BeginDate & "# And (First(CDate([ItemActivity]![strDate])))<=#" & EndDate & "#))" & strHaving
    If mclsList.ListSet.ListID < 1 Then
        strHaving = " HAVING (First(CDate([ItemActivity]![strDate]))>=#" & BeginDate & "# )" & strHaving
    Else
        strHaving = " HAVING  " & strHaving
    End If
    Strsql = strSelect & strFrom & strWhere & strGroup & strHaving
    
    Set recTemp = gclsBase.BaseDB.OpenRecordset(Strsql, dbOpenSnapshot)
    '列表是否为空
    If recTemp.RowCount = 0 Then
        grdList.HighLight = flexHighlightNever      '光标亮条消失
        cmdAgain.Enabled = False
    Else
        grdList.HighLight = flexHighlightAlways     '光标亮条显示
        cmdAgain.Enabled = True
    End If
    
'    recTemp ''' .FindFirst "作废 = '√'"
    If recTemp.EOF Then
        chkShowAll.Enabled = False '《全部显示》置灰
        frmMain.mnuEditShowAll.Enabled = False
    Else
        chkShowAll.Enabled = True
        frmMain.mnuEditShowAll.Enabled = True
    End If
    
    mclsList.ShowAll = True
    Set GetList = recTemp
    
End Function

'根据列表中记录数,设置菜单可用属性
Private Sub UpdateMenuStatus()
    Dim blnIsnotEmpty As Boolean
    Dim blnFindNoChange As Boolean
    
    If grdList.Rows > 1 And grdList.ColSel <> 0 Then
        blnIsnotEmpty = True
    Else
        blnIsnotEmpty = False
    End If
    
    If Not blnMenuBuilded Then
        MakeListEditMenu
    End If
    
    With frmMain
        .mnuEditEdit.Caption = "修改(&N)"

⌨️ 快捷键说明

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