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

📄 stockorder.frm

📁 即时通讯
💻 FRM
📖 第 1 页 / 共 5 页
字号:
         BeginProperty Button21 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Caption         =   "引用"
            Key             =   "yy"
            ImageKey        =   "yy"
         EndProperty
         BeginProperty Button22 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Key             =   "fg6"
            Style           =   3
         EndProperty
         BeginProperty Button23 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Caption         =   "首张"
            Key             =   "first"
            ImageKey        =   "first"
         EndProperty
         BeginProperty Button24 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Caption         =   "上张"
            Key             =   "prev"
            ImageKey        =   "prev"
         EndProperty
         BeginProperty Button25 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Caption         =   "下张"
            Key             =   "next"
            ImageKey        =   "next"
         EndProperty
         BeginProperty Button26 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Caption         =   "末张"
            Key             =   "last"
            ImageKey        =   "last"
         EndProperty
         BeginProperty Button27 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Key             =   "fgh5"
            Style           =   3
         EndProperty
         BeginProperty Button28 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Object.Visible         =   0   'False
            Caption         =   "帮助"
            Key             =   "bz"
            ImageKey        =   "bz"
         EndProperty
         BeginProperty Button29 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出"
            Key             =   "tc"
            ImageKey        =   "tc"
         EndProperty
      EndProperty
      BorderStyle     =   1
   End
   Begin VB.Menu mnufile 
      Caption         =   "PopupMenu"
      Visible         =   0   'False
      Begin VB.Menu deletegood 
         Caption         =   "删除商品"
      End
   End
End
Attribute VB_Name = "StockOrder"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************
'*    模 块 名 称 :采购系统维护与管理
'*    功 能 描 述 :采购系统的基本信息
'*    程序员姓名  :黄朝和
'*    最后修改人  :
'*    最后修改时间:2005/08/27
'*    备        注:
'*******************************************************
Option Explicit
Private m_stockorderDAO As stockorderDAO    ' 数据库操作类--所对应类模块的窗体名字
Private m_recordset As ADODB.Recordset      ' 数据操作数据集对象
Private m_supplierDAO As supplierDAO        ' 供应商数据库操作类
Private i As Integer                        ' 判断商品有几条要修改
Private id As String
Private suppliername_s As String            ' 供应商名称
Private g_recordset As ADODB.Recordset
Private m_goodsDAO As GoodsDAO
Private s_recordset As ADODB.Recordset
Private s_stockorderid As String               ' 采购编号
Private h_recordset As ADODB.Recordset
Private e_recordset As ADODB.Recordset
Private m_EmployeeDAO As employeeDAO
Public stockorderid_d As String
Private m_row As Integer
Private m_col As Integer
Private k_ret As String
Private m_BomSupplierRelationDAO As BomSupplierRelationDAO
Public type_m As Integer
Private goods_id_s() As String
Private currentrow As Integer
Public order_suppliername As String     '供应商名称
Public shhename As String               '是否审核
Public zhtai As String                  '状态
Private jls As Integer                  ' 商品的总记录数
Dim finishNum() As Double                 '商品的完成数量

Private Sub showform()                      ' 初始化MSHFlexGrid1控件
    MSHFlexGrid1.TextMatrix(0, 0) = "明细订单编号"
    MSHFlexGrid1.TextMatrix(0, 1) = "商品名称"
    MSHFlexGrid1.TextMatrix(0, 2) = "单位"
    MSHFlexGrid1.TextMatrix(0, 3) = "数量"
    MSHFlexGrid1.TextMatrix(0, 4) = "单价"
    MSHFlexGrid1.TextMatrix(0, 5) = "金额"
    MSHFlexGrid1.TextMatrix(0, 6) = "完成数量"
    MSHFlexGrid1.TextMatrix(0, 7) = "备注"
    MSHFlexGrid1.TextMatrix(0, 8) = "商品编号"
    
                                                                                     '设置列对齐方式  7-右对齐 5-居中对齐 2-左对齐
    MSHFlexGrid1.ColAlignment(0) = 2
    MSHFlexGrid1.ColAlignment(1) = 2
    MSHFlexGrid1.ColAlignment(2) = 2
    MSHFlexGrid1.ColAlignment(3) = 8
    MSHFlexGrid1.ColAlignment(4) = 8
    MSHFlexGrid1.ColAlignment(5) = 8
    MSHFlexGrid1.ColAlignment(6) = 8
    MSHFlexGrid1.ColAlignment(7) = 2
    MSHFlexGrid1.ColAlignment(8) = 2
    
    MSHFlexGrid1.ColWidth(8) = 1
    MSHFlexGrid1.ColWidth(0) = 1
    MSHFlexGrid1.ColWidth(7) = 2000
    If stockorderlistsupplier.type_g = 0 Then
        MSHFlexGrid1.AddItem ""
    ElseIf stockorderlistsupplier.type_g = 1 Then
    End If
End Sub

Private Sub Command1_Click()
    If stockorderlistsupplier.type_g = 1 Then
        new_goods
    ElseIf stockorderlistsupplier.type_g = 0 Then
        modify_goods
    End If
End Sub

Private Sub Command2_Click()
    QueryFom.m_currentQuery = QUERY_SUPPLIER
    QueryFom.show 1
    m_supplierDAO.S_DanTiao s_recordset, MainForm.g_application.m_queryResultId
    With s_recordset
        If Not .EOF Then
            suppliername.text = Trim(.Fields("supplierid"))
            Text1.text = Trim(.Fields("supplier"))
            Text1.Tag = Trim(.Fields("supplier"))
            superinrtendent.text = Trim(.Fields("superinrtendent"))
            phone.text = Trim(.Fields("phone"))
        End If
    End With
    notenum.text = GetBillNo(2)
    notenum.Tag = GetBillNo(2)
    inputdate.text = CDate(Trim(Date + Time()))
    deliverydate.text = Format(Date, "yyyy-mm-dd")
    memo.text = ""
    counterman.text = Trim(MainForm.g_application.m_userName)
    inputman.text = Trim(MainForm.g_application.m_userName)
    shhe.text = ""
    MSHFlexGrid1.clear
    MSHFlexGrid1.Rows = 2
    Text2.text = ""
    Call showform
    s_recordset.Close
End Sub

Private Sub Command3_Click()
    Call Drbmhelp(1, Trim(deliverydate.text))                                   ' 根据设置选择显示编码和名称,并进行存储
    If Len(XT_calendar.Xtfhcs) <> 0 Then
            deliverydate.text = XT_calendar.Xtfhcs                              ' 将日历窗体里取得的值传给建档日期的文本框
    End If
    'deliverydate.SetFocus
End Sub

Private Sub Command4_Click()
    Dim ret As Boolean
    QueryFom.m_currentQuery = QUERY_EMPLOYEE
    QueryFom.show vbModal
    ' 如果此原料已有BOM记录,则调出些条BOM的信息
    ret = m_EmployeeDAO.FindEmployee(e_recordset, _
                                  MainForm.g_application.m_queryResultId)
    If ret Then
            With e_recordset                          '将查询到的记录传到列表显示
                counterman.Tag = Trim(.Fields("员工编号"))
                counterman.text = Trim(.Fields("员工姓名"))
            End With
                e_recordset.Close
    End If
End Sub

Private Sub Command5_Click()
           Dim ret As Boolean
            QueryFom.m_currentQuery = QUERY_EMPLOYEE
            QueryFom.show vbModal
            ' 如果此原料已有BOM记录,则调出些条BOM的信息
            ret = m_EmployeeDAO.FindEmployee(e_recordset, _
                                          MainForm.g_application.m_queryResultId)
            If ret Then
                    With e_recordset                          '将查询到的记录传到列表显示
                        inputman.Tag = Trim(.Fields("员工编号"))
                        inputman.text = Trim(.Fields("员工姓名"))
                    End With
                        e_recordset.Close
            End If
End Sub


Private Sub deletegood_Click()                      ' 删除选中的一条记录
    If stockorderlistsupplier.type_g = 1 Then
        If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 1)) = "" Then
            MainForm.g_msgText = "请选择一条记录!!"
            Call HMsgBox(MainForm.g_msgText, 0, 1)
            Exit Sub
        End If
        If MSHFlexGrid1.Rows <= 2 Then
            MainForm.g_msgText = "请先添加一条记录!!"
            Call HMsgBox(MainForm.g_msgText, 0, 1)
        Else
            MSHFlexGrid1.RemoveItem MSHFlexGrid1.row
'            MSHFlexGrid1.Rows = MSHFlexGrid1.Rows - 1
        End If
    ElseIf stockorderlistsupplier.type_g = 0 Then
        If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 1)) = "" Then
            MainForm.g_msgText = "请选择一条记录!!"
            Call HMsgBox(MainForm.g_msgText, 0, 1)
            Exit Sub
        End If
        If MSHFlexGrid1.Rows <= 2 Then
            MainForm.g_msgText = "请先添加一条记录!!"
            Call HMsgBox(MainForm.g_msgText, 0, 1)
        Else
            If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
                goods_id_s(Trim(MSHFlexGrid1.row)) = Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0))
                MSHFlexGrid1.RemoveItem MSHFlexGrid1.row
'                    m_stockorderDAO.Deletedetail1 m_recordset, Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0))
            ElseIf Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) = "" Then
                    MSHFlexGrid1.RemoveItem MSHFlexGrid1.row
            End If
            i = i - 1
'            Call goodsshow
       End If
    End If
End Sub


Private Sub Form_Load()
        SetToCenter Me
        Set m_EmployeeDAO = New employeeDAO
        Set e_recordset = New ADODB.Recordset
        Set m_recordset = New ADODB.Recordset
        Set m_stockorderDAO = New stockorderDAO
        Set m_supplierDAO = New supplierDAO
        Set g_recordset = New ADODB.Recordset
        Set m_goodsDAO = New GoodsDAO
        Set s_recordset = New ADODB.Recordset
        Set h_recordset = New ADODB.Recordset
        ReDim goods_id_s(1000) As String
        Set m_BomSupplierRelationDAO = New BomSupplierRelationDAO
        If stockorderlistsupplier.type_g = 0 Then                               '判断该页是否是从stockorderlistsupplier传过来的   0--表示是,1--表示否                                                  ' 关闭数据集
            Tlb_Action.Buttons("xz").Enabled = False
            Text1.Enabled = False
            Label2.Enabled = False
            Call suppliershow
            Call goodsshow
            If Trim(shhename) = "已审核" Then
                If Trim(zhtai) = "已完成" Then
                    Call form_enabled
                    Tlb_Action.Buttons("shsh").Enabled = False
                    Tlb_Action.Buttons("shqs").Enabled = False
                Else
                    Call form_enabled
                    Tlb_Action.Buttons("shsh").Enabled = False
                End If
                Dim p As Integer
                For p = 1 To jls
                    If finishNum(p) <> 0 Then
                        Tlb_Action.Buttons("shsh").Enabled = False
                        Tlb_Action.Buttons("shqs").Enabled = False
                        Exit For
                    End If
                Next p
            End If
            If Trim(shhename) = "未审核" Then
                Tlb_Action.Buttons("shqs").Enabled = False
            End If
        ElseIf stockorderlistsupplier.type_g = 1 Then
            stockorderid.Visible = False
            Tlb_Action.Buttons("shsh").Enabled = False
            Tlb_Action.Buttons("shqs").Enabled = False
            Call clear
        End If
End Sub

Public Sub Drbmhelp(bzlx As Integer, Scdwnr As String)                          '调入编码参照窗体
    
    '函数参数:帮助类型(0-通用型 1-日期型 2-特殊型),帮助编码,首次定位内容
    On Error GoTo ErrHandle
    XT_calendar.Xtfhcs = ""
    Select Case bzlx
        Case 1
            XT_calendar.xtcdcs = Date
            XT_calendar.show 1      '显示日历窗体
           
    End Select

⌨️ 快捷键说明

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