📄 ps_materialcooperatelistform.frm
字号:
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
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()
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()
If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
CooperateRedo.m_cooperateRedoID = _
HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)
CooperateRedolist.m_cooperateredoType = 0
CooperateRedo.show 1
End If
End Sub
Private Sub splb_Click()
If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
cooperatecounterclaimlb.m_cooperateId = _
HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)
cooperatecounterclaimlb.show 1
cooperatecounterclaimlb.m_cooperateId = ""
End If
End Sub
Private Sub m_cooperateRedoList_Click()
If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
CooperateRedolist.m_cooperateId = _
HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)
CooperateRedolist.show 1
CooperateRedolist.m_cooperateId = ""
End If
End Sub
Private Sub m_fllb_Click()
If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
cooperatedrowmaterqdform.cooperateId = _
HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)
cooperatedrowmaterqdform.show 1
cooperatedrowmaterqdform.cooperateId = ""
End If
End Sub
Private Sub m_getMaterial_Click()
If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
cooperatedrowmaterForm.cooperateId = _
HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)
cooperatedrowmaterForm.f = 0
cooperatedrowmaterForm.show 1
End If
End Sub
Private Sub m_setFinishNum_Click()
If F_setFinishNum.Visible Then
F_setFinishNum.Visible = False
Else
F_setFinishNum.Visible = True
End If
End Sub
'**************************************
'* 功 能 描 述 :工具栏按钮的单击操作按钮
'* 输 入 参 数 :无
'* 输 出 能 数 :无
'**************************************
Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "cx" ' 查询
QueryCooperate
Case "sx" '刷 新
Call FindAllCooperate
Case "bj" '报警
Call AlartCooperate
Case "print" '报警
PrintData
Case "xz" '新增一条记录
If Trim(m_productSchemeId) <> "" Then
CooperateSingleForm.m_operatorType = 0
CooperateSingleForm.m_productSchemeId = m_productSchemeId
CooperateSingleForm.m_materialNum = m_materialNum
CooperateSingleForm.m_psbomId = m_psbomId
CooperateSingleForm.show 1
End If
Case "ck" '查看
If Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11)) <> "" Then
CooperateSingleForm.m_cooperateId = Trim(HFG_cooperateList.TextMatrix(HFG_cooperateList.row, 11))
CooperateSingleForm.m_operatorType = 1
CooperateSingleForm.show
End If
Case "tc" '退 出
Unload Me
End Select
End Sub
'**************************************
'* 功 能 描 述 :查找到所有的外协生产单,并显示
'* 输 入 参 数 :无
'* 输 出 能 数 :无
'**************************************
Public Function FindAllCooperate() As Boolean
Dim ret As Boolean
Dim currentrow As Integer ' 当前插入的行
ret = m_dao.FindAllCooperate(m_recordset, -1, m_productSchemeId, m_psbomId, m_supplierid, m_state)
HFG_cooperateList.clear
HFG_cooperateList.Rows = 2
RefreshListTitle
If ret Then
With m_recordset
currentrow = 1
Do While Not .EOF
If currentrow > HFG_cooperateList.Rows - 1 Then
HFG_cooperateList.AddItem ""
End If
'[>>自定义填充内容
HFG_cooperateList.TextMatrix(currentrow, 0) = Trim(.Fields("psName"))
HFG_cooperateList.TextMatrix(currentrow, 1) = Trim(.Fields("bomName"))
HFG_cooperateList.TextMatrix(currentrow, 2) = Trim(.Fields("Supplier") & " ")
HFG_cooperateList.TextMatrix(currentrow, 3) = Trim(.Fields("quantity"))
HFG_cooperateList.TextMatrix(currentrow, 4) = "¥" & Trim(.Fields("quote"))
HFG_cooperateList.TextMatrix(currentrow, 5) = "¥" & Trim(.Fields("totalMoney"))
HFG_cooperateList.TextMatrix(currentrow, 6) = Trim(.Fields("planBeginDate"))
HFG_cooperateList.TextMatrix(currentrow, 7) = Trim(.Fields("planFinishDate"))
HFG_cooperateList.TextMatrix(currentrow, 8) = Trim(.Fields("finishDate"))
HFG_cooperateList.TextMatrix(currentrow, 9) = Trim(.Fields("employeeName"))
HFG_cooperateList.TextMatrix(currentrow, 10) = Trim(.Fields("state"))
HFG_cooperateList.TextMatrix(currentrow, 11) = Trim(.Fields("cooperateId"))
HFG_cooperateList.TextMatrix(currentrow, 12) = Trim(.Fields("finishNum"))
'<<]
'设置数据行高度(Fixed)
HFG_cooperateList.RowHeight(currentrow) = 200
'动态集指针加1,同时将计数器加1(Fixed)
.MoveNext
currentrow = currentrow + 1
Loop
End With
End If
Text1.text = Trim(m_recordset.RecordCount)
m_recordset.Close
End Function
'**************************************
'* 功 能 描 述 :生产外协单报警处理
'* 输 入 参 数 :无
'* 输 出 能 数 :无
'**************************************
Private Function AlartCooperate() As Boolean
Dim ret As Boolean
Dim currentrow As Integer ' 当前插入的行
If Trim(T_alartDays.text) = "" Then
MainForm.g_msgText = "报警天数不能为空!请设置!"
HMsgBox MainForm.g_msgText, 0, 1
Exit Function
End If
ret = m_dao.FindAllCooperate(m_recordset, CInt(T_alartDays.text), m_productSchemeId, m_psbomId, m_supplierid, m_state)
HFG_cooperateList.clear
HFG_cooperateList.Rows = 2
RefreshListTitle
If ret Then
With m_recordset
currentrow = 1
Do While Not .EOF
If currentrow > HFG_cooperateList.Rows - 1 Then
HFG_cooperateList.AddItem ""
End If
'[>>自定义填充内容
HFG_cooperateList.TextMatrix(currentrow, 0) = Trim(.Fields("psName"))
HFG_cooperateList.TextMatrix(currentrow, 1) = Trim(.Fields("bomName"))
HFG_cooperateList.TextMatrix(currentrow, 2) = Trim(.Fields("Supplier") & " ")
HFG_cooperateList.TextMatrix(currentrow, 3) = Trim(.Fields("quantity"))
HFG_cooperateList.TextMatrix(currentrow, 4) = "¥" & Trim(.Fields("quote"))
HFG_cooperateList.TextMatrix(currentrow, 5) = "¥" & Trim(.Fields("totalMoney"))
HFG_cooperateList.TextMatrix(currentrow, 6) = Trim(.Fields("planBeginDate"))
HFG_cooperateList.TextMatrix(currentrow, 7) = Trim(.Fields("planFinishDate"))
HFG_cooperateList.TextMatrix(currentrow, 8) = Trim(.Fields("finishDate"))
HFG_cooperateList.TextMatrix(currentrow, 9) = Trim(.Fields("employeeName"))
HFG_cooperateList.TextMatrix(currentrow, 10) = Trim(.Fields("state"))
HFG_cooperateList.TextMatrix(currentrow, 11) = Trim(.Fields("cooperateId"))
HFG_cooperateList.TextMatrix(currentrow, 12) = Trim(.Fields("finishNum"))
'<<]
'设置数据行高度(Fixed)
HFG_cooperateList.RowHeight(currentrow) = 200
'动态集指针加1,同时将计数器加1(Fixed)
.MoveNext
currentrow = currentrow + 1
Loop
End With
End If
Text1.text = Trim(m_recordset.RecordCount)
m_recordset.Close
End Function
Private Sub T_alartDays_KeyPress(KeyAscii As Integer)
InputFieldLimit T_alartDays, 4, KeyAscii
End Sub
'**************************************
'* 功 能 描 述 :查找生产外协单
'* 输 入 参 数 :无
'* 输 出 能 数 :无
'**************************************
Private Function QueryCooperate()
Dim ret As Boolean
Dim currentrow As Integer ' 当前插入的行
QueryFom.m_currentQuery = QUERY_COOPERATE
QueryFom.m_operateType = 1
QueryFom.show vbModal
ret = m_dao.FindCooperateById(m_recordset, MainForm.g_application.m_queryResultId)
HFG_cooperateList.clear
HFG_cooperateList.Rows = 2
RefreshListTitle
If ret Then
With m_recordset
currentrow = 1
Do While Not .EOF
If currentrow > HFG_cooperateList.Rows - 1 Then
HFG_cooperateList.AddItem ""
End If
'[>>自定义填充内容
HFG_cooperateList.TextMatrix(currentrow, 0) = Trim(.Fields("psName"))
HFG_cooperateList.TextMatrix(currentrow, 1) = Trim(.Fields("bomName"))
HFG_cooperateList.TextMatrix(currentrow, 2) = Trim(.Fields("Supplier") & " ")
HFG_cooperateList.TextMatrix(currentrow, 3) = Trim(.Fields("quantity"))
HFG_cooperateList.TextMatrix(currentrow, 4) = "¥" & Trim(.Fields("quote"))
HFG_cooperateList.TextMatrix(currentrow, 5) = "¥" & Trim(.Fields("totalMoney"))
HFG_cooperateList.TextMatrix(currentrow, 6) = Trim(.Fields("planBeginDate"))
HFG_cooperateList.TextMatrix(currentrow, 7) = Trim(.Fields("planFinishDate"))
HFG_cooperateList.TextMatrix(currentrow, 8) = Trim(.Fields("finishDate"))
HFG_cooperateList.TextMatrix(currentrow, 9) = Trim(.Fields("employeeName"))
HFG_cooperateList.TextMatrix(currentrow, 10) = Trim(.Fields("state"))
HFG_cooperateList.TextMatrix(currentrow, 11) = Trim(.Fields("cooperateId"))
HFG_cooperateList.TextMatrix(currentrow, 12) = Trim(.Fields("finishNum"))
'<<]
'设置数据行高度(Fixed)
HFG_cooperateList.RowHeight(currentrow) = 200
'动态集指针加1,同时将计数器加1(Fixed)
.MoveNext
currentrow = currentrow + 1
Loop
End With
End If
m_recordset.Close
End Function
Private Sub T_setToNum_KeyPress(KeyAscii As Integer)
InputFieldLimit T_setToNum, 5, KeyAscii
End Sub
Private Function PrintData()
Dim Report As DataReportDemo
Set Report = New DataReportDemo
Report.PrintData 1
Report.show 1
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -