📄 producelistform.frm
字号:
EndProperty
BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":4808
Key = "xz"
EndProperty
BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":4BA2
Key = "sc"
EndProperty
BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":4F3C
Key = "sx"
EndProperty
BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":52D6
Key = "cx"
EndProperty
BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":5670
Key = "zd"
EndProperty
BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":5A0A
Key = "dz"
EndProperty
BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":5DA4
Key = "ph"
EndProperty
BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":613E
Key = "fz"
EndProperty
BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":64D8
Key = "Locate"
EndProperty
BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":6872
Key = "hf"
EndProperty
BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":6C0C
Key = "pz"
EndProperty
BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":6FA6
Key = "check"
EndProperty
BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":7340
Key = "Sum"
EndProperty
BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":76DA
Key = "Total"
EndProperty
BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.frx":7A74
Key = "Detail"
EndProperty
BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "ProduceListForm.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_cooperateFinish
Caption = "入库单"
End
Begin VB.Menu m_cooperateRedo
Caption = "返工单"
Visible = 0 'False
End
Begin VB.Menu m_produce
Caption = "领料列表"
End
Begin VB.Menu m_cooperateFinishList
Caption = "入库列表"
End
Begin VB.Menu m_cooperateRedoList
Caption = "返工列表"
Visible = 0 'False
End
Begin VB.Menu m_setFinishNum
Caption = "设置完工"
End
End
End
Attribute VB_Name = "ProduceListForm"
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 - 显示一个生产计划单中一个物料的所有外协单
Public m_productSchemeId As String ' 生产计划单
Public m_materialNum As Double ' 生产的物料数量
Public psMaterialId As String '生产单的编号
Public m_psbomId As String ' 生产计划单BOM编号
Private m_dao As ProduceDAO ' 生产外协单数据库操作类
Private m_recordset As ADODB.Recordset ' 数据操作数据集对象
Private q As Integer
Private m_idList As String ' 在执行查询时查询到的ID列表字符串
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.SetProduceFinishNum(m_recordset, _
Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)), _
CDbl(T_setToNum.text), CK_state)
If ret Then
FindAllProduce
End If
End If
End Sub
Private Sub Form_Load()
Set m_recordset = New ADODB.Recordset
Set m_dao = New ProduceDAO
' m_productSchemeId = "" ' 生产计划单
' m_psbomId = "" ' 生产计划单BOM编号
Me.caption = "生产单列表管理"
Me.Height = 6180
Me.Width = 10695
F_alartSet.Visible = False
F_setFinishNum.Visible = True
If m_operateType = "2" Then
SzToolbar.Buttons(3).Visible = True
Else
SzToolbar.Buttons(3).Visible = False
End If
T_alartDays = "10"
SetToCenter Me
FindAllProduce
HFG_cooperateList_SelChange
If Trim(m_productSchemeId) = "" Then
SzToolbar.Buttons(4).Visible = False
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) = "produceId" ' 生产单
HFG_cooperateList.TextMatrix(0, 12) = "完成数量" ' 生产单
HFG_cooperateList.TextMatrix(0, 13) = "初检合格率"
'设置列对齐方式 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.ColAlignment(13) = 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) = 1
HFG_cooperateList.ColWidth(11) = 1
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(PRODUCE_MODIFY_P))) ' 权限判断
If Not ret Then
MainForm.g_msgText = "该功能您无权操作!"
HMsgBox MainForm.g_msgText, 0, 1
Exit Sub
End If
' 调用修改外协单窗体
ProduceSingleForm.m_produceId = Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11))
ProduceSingleForm.m_operatorType = 2
ProduceSingleForm.show 1
' 刷新列表
If q = 1 Then
RefreshQueryList
Else
Call FindAllProduce
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()
If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
ProduceFinish.m_cooperateId = _
HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)
ProduceFinish.m_cooperateType = 0
ProduceFinish.show 1
End If
End Sub
Private Sub m_cooperateFinishList_Click()
If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
ProduceFinishlist.m_operateType = 1
ProduceFinishlist.m_cooperateId = Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11))
ProduceFinishlist.show
ProduceFinishlist.RefreshFinishList
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -