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

📄 cooperatelistform.frm

📁 即时通讯
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Picture         =   "CooperateListForm.frx":613E
            Key             =   "fz"
         EndProperty
         BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "CooperateListForm.frx":64D8
            Key             =   "Locate"
         EndProperty
         BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "CooperateListForm.frx":6872
            Key             =   "hf"
         EndProperty
         BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "CooperateListForm.frx":6C0C
            Key             =   "pz"
         EndProperty
         BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "CooperateListForm.frx":6FA6
            Key             =   "check"
         EndProperty
         BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "CooperateListForm.frx":7340
            Key             =   "Sum"
         EndProperty
         BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "CooperateListForm.frx":76DA
            Key             =   "Total"
         EndProperty
         BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "CooperateListForm.frx":7A74
            Key             =   "Detail"
         EndProperty
         BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "CooperateListForm.frx":7E0E
            Key             =   "Order"
         EndProperty
      EndProperty
   End
   Begin VB.Menu PM_menu 
      Caption         =   "PM_menu"
      Visible         =   0   'False
      Begin VB.Menu m_getMaterial 
         Caption         =   "发料"
      End
      Begin VB.Menu m_fllb 
         Caption         =   "发料列表"
      End
      Begin VB.Menu m_cooperateFinish 
         Caption         =   "收工检验"
      End
      Begin VB.Menu m_cooperateFinishList 
         Caption         =   "核检入库"
      End
      Begin VB.Menu m_cooperateRedo 
         Caption         =   "返工单"
         Visible         =   0   'False
      End
      Begin VB.Menu m_cooperateRedoList 
         Caption         =   "返工列表"
      End
      Begin VB.Menu splb 
         Caption         =   "索赔列表"
      End
      Begin VB.Menu bslb 
         Caption         =   "报损列表"
      End
      Begin VB.Menu m_setFinishNum 
         Caption         =   "完工信息"
      End
   End
End
Attribute VB_Name = "CooperateListForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************
'*    模 块 名 称 :应用程序启动窗体
'*    功 能 描 述 :应用程序启动窗体
'*    程序员姓名  : 陈齐国
'*    最后修改人  : 陈齐国
'*    最后修改时间:2005/09/09
'**************************************
Option Explicit
Public m_operateType As String         ' 操作类型  0 - 菜单调用,显示所有生产单
                                       '           1 - 显示一个生产计划单的所有生产单
                                       '           2 - 显示一个生产计划单中一个物料的所有外协单
                                       '           3 - 显示一个供货商所有的外协单(参数 外协商的ID m_supplierId)
Public m_productSchemeId As String     ' 生产计划单
Public m_materialNum As Double         ' 生产的物料数量
Public m_psbomId As String             ' 生产计划单BOM编号
Public m_supplierid As String          ' 供应商ID
Public m_state As String               ' 外协单的状态

Private m_dao As CooperateDAO          ' 生产外协单数据库操作类
Private m_recordset As ADODB.Recordset ' 数据操作数据集对象
Private q As Integer
Private m_idList As String                      ' 在执行查询时查询到的ID列表字符串



Private Sub bslb_Click()
    Dim ret As Boolean
    ret = yhqxpd(MainForm.g_application.m_userId, COOPERATELOSS_L)
    
    If Not ret Then
        MainForm.g_msgText = "该功能您无权操作!"
        HMsgBox MainForm.g_msgText, 0, 1
        Exit Sub
    End If
        If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
        CooperateLoss_list.m_cooperateId = _
            HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)
        CooperateLoss_list.show 1
        CooperateLoss_list.m_cooperateId = ""
    End If
End Sub

Private Sub C_condition_Click()
    If F_alartSet.Visible Then
        F_alartSet.Visible = False
    Else
        F_alartSet.Visible = True
    End If
End Sub
'**************************************
'*    功 能 描 述 :设置生产单的完成数量
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub C_set_Click()
    Dim ret As Boolean
    
    If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" And _
            Trim(T_setToNum.text) <> "" Then
        ret = m_dao.SetCooperateFinishNum(m_recordset, _
              Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)), _
              CDbl(T_setToNum.text), CK_state)
        If ret Then
            HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 12) = T_setToNum.text
            
            If CK_state.value Then
                HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 10) = "1"
            Else
                HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 10) = "0"
            End If
        End If
    End If
End Sub


Private Sub Form_Load()
    Set m_recordset = New ADODB.Recordset
    Set m_dao = New CooperateDAO
    
'    m_productSchemeId = ""     ' 生产计划单
'    m_psbomId = ""          ' 生产计划单BOM编号
    
    Me.caption = "外协生产单列表管理"
    Me.Height = 6180
    Me.Width = 10695
    SetToCenter Me
    
    m_state = "0"
    
    F_alartSet.Visible = False
    F_setFinishNum.Visible = False
    If m_operateType = "2" Then
        m_state = ""
        SzToolbar.Buttons(3).Visible = True
    Else
        m_state = "0"
        SzToolbar.Buttons(3).Visible = False
    End If
    
    If m_operateType = "3" Then
        m_state = ""
    End If
    
    T_alartDays = "10"
    
    SetToCenter Me
    
    If m_operateType = "0" Or _
       m_operateType = "1" Or _
       m_operateType = "2" Or _
       m_operateType = "3" Then
        FindAllCooperate
        HFG_cooperateList_SelChange
        F_setFinishNum.Visible = True
    End If
End Sub
'**************************************
'*    功 能 描 述 :刷新列表的标题栏
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub RefreshListTitle()
    HFG_cooperateList.TextMatrix(0, 0) = "生产计划单"
    HFG_cooperateList.TextMatrix(0, 1) = "物料名称"
    HFG_cooperateList.TextMatrix(0, 2) = "外协商"
    HFG_cooperateList.TextMatrix(0, 3) = "总数量"
    HFG_cooperateList.TextMatrix(0, 4) = "成本单价"
    HFG_cooperateList.TextMatrix(0, 5) = "总金额"
    HFG_cooperateList.TextMatrix(0, 6) = "开始日期"
    HFG_cooperateList.TextMatrix(0, 7) = "计划完成日期"
    HFG_cooperateList.TextMatrix(0, 8) = "完工日期"
    HFG_cooperateList.TextMatrix(0, 9) = "跟单人"
    HFG_cooperateList.TextMatrix(0, 10) = "state"
    HFG_cooperateList.TextMatrix(0, 11) = "cooperateId"         ' 外协生产单
    HFG_cooperateList.TextMatrix(0, 12) = "完成数量"         ' 外协生产单
    
    
                                                '设置列对齐方式  7-右对齐 5-居中对齐 2-左对齐
    HFG_cooperateList.ColAlignment(0) = 2
    HFG_cooperateList.ColAlignment(1) = 2
    HFG_cooperateList.ColAlignment(2) = 2
    HFG_cooperateList.ColAlignment(3) = 8
    HFG_cooperateList.ColAlignment(4) = 8
    HFG_cooperateList.ColAlignment(5) = 8
    HFG_cooperateList.ColAlignment(6) = 2
    HFG_cooperateList.ColAlignment(7) = 2
    HFG_cooperateList.ColAlignment(8) = 2
    HFG_cooperateList.ColAlignment(9) = 2
    HFG_cooperateList.ColAlignment(10) = 8
    HFG_cooperateList.ColAlignment(11) = 2
    HFG_cooperateList.ColAlignment(12) = 8

    
    HFG_cooperateList.ColWidth(0) = 2000
    HFG_cooperateList.ColWidth(1) = 2000
    HFG_cooperateList.ColWidth(2) = 1000
    HFG_cooperateList.ColWidth(3) = 1000
    HFG_cooperateList.ColWidth(4) = 1000
    HFG_cooperateList.ColWidth(5) = 1000
    HFG_cooperateList.ColWidth(6) = 1000
    HFG_cooperateList.ColWidth(7) = 1000
    HFG_cooperateList.ColWidth(8) = 1000
    HFG_cooperateList.ColWidth(9) = 1000
    HFG_cooperateList.ColWidth(10) = 0
    HFG_cooperateList.ColWidth(11) = 0
    HFG_cooperateList.ColWidth(12) = 1000
    
End Sub

Private Sub Form_Resize()
        HFG_cooperateList.Height = Me.Height - 1400
    HFG_cooperateList.Width = Me.Width - 350
    
'    Image1.Stretch = False
    
    If (HFG_cooperateList.Height > HFG_cooperateList.Height - 300) Or (HFG_cooperateList.Width > HFG_cooperateList.Width - 200) Then
        HFG_cooperateList.Height = HFG_cooperateList.Height + 400
        HFG_cooperateList.Width = HFG_cooperateList.Width + 200
'
'        Image1.Stretch = True
    End If
End Sub

Private Sub HFG_cooperateList_DblClick()
    Dim ret As Boolean
    ' 修改
    If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
        ' 操作权限判断
        ret = yhqxpd(MainForm.g_application.m_userId, Trim(str(COOPERATE_MODIFY_P)))       ' 权限判断
        
        If Not ret Then
            MainForm.g_msgText = "该功能您无权操作!"
            HMsgBox MainForm.g_msgText, 0, 1
            Exit Sub
        End If
        ' 调用修改外协单窗体
        CooperateSingleForm.m_cooperateId = Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11))
        CooperateSingleForm.m_operatorType = 2
        CooperateSingleForm.show 1
        ' 刷新数据
        If q = 1 Then
            RefreshQueryList
        Else
            Call FindAllCooperate
        End If
        HFG_cooperateList_SelChange
    End If
End Sub

Private Sub HFG_cooperateList_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button And vbRightButton Then       ' 用户点击右键,调出快捷菜单
        PopupMenu PM_menu
    ElseIf Button And vbLeftButton Then
        HFG_cooperateList_SelChange
    End If
End Sub
'**************************************
'*    功 能 描 述 :用户选择生产单改变时间处理函数
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub HFG_cooperateList_SelChange()
    '
    If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
        T_billNum.text = Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 3))
        T_hadFinish.text = Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 12))
        T_setToNum.text = Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 12))
        
        If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 10)) = "0" Then
            CK_state.value = 0
        Else
            CK_state.value = 1
        End If
    End If
End Sub

Private Sub m_cooperateFinish_Click()
    Dim ret As Boolean
    ret = yhqxpd(MainForm.g_application.m_userId, COOPERATE_FINISH_LIST)
    If Not ret Then
        MainForm.g_msgText = "该功能您无权操作!"
        HMsgBox MainForm.g_msgText, 0, 1
        Exit Sub
    End If
    If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
        CooperateFinish.m_cooperateId = _
            HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)
        CooperateFinish.m_cooperateType = 0
        CooperateFinish.show 1
    End If
End Sub

Private Sub m_cooperateFinishList_Click()
    Dim ret As Boolean
    ret = yhqxpd(MainForm.g_application.m_userId, COOPERATE_FINISH_LIST)
    If Not ret Then
        MainForm.g_msgText = "该功能您无权操作!"
        HMsgBox MainForm.g_msgText, 0, 1
        Exit Sub
    End If
    If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
        CooperateFinishlist.m_operateType = 1
        CooperateFinishlist.m_cooperateId = Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11))
        CooperateFinishlist.show
        CooperateFinishlist.RefreshFinishList
    End If
End Sub

Private Sub m_cooperateRedo_Click()
    Dim ret As Boolean
    ret = yhqxpd(MainForm.g_application.m_userId, COOPERATE_REDO_LIST)
    
    If Not ret Then
        MainForm.g_msgText = "该功能您无权操作!"
        HMsgBox MainForm.g_msgText, 0, 1
        Exit Sub
    End If
    If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then

⌨️ 快捷键说明

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