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

📄 frmphyewu.frm

📁 这是用Visual Basic6开发的大型喷绘业务管理系统,数据库采用Access数据库
💻 FRM
📖 第 1 页 / 共 2 页
字号:
             result.MoveNext
             i = i + 1
         Loop
      End If
      frmPHYeWuIn.Show
   End If
errmsg:
   If Err.Number <> 0 Then
       YWFlagh = 3
      YWPRtableText(0) = "2002年03月10日" 'Trim(result("日期"))
         YWPRtableText(1) = "13151" ' Trim(result("合同号"))
         YWPRtableText(2) = "北京十月软件公司" 'Trim(result("客户名称"))
         YWPRtableText(3) = "12" 'Trim(result("单价"))
         YWPRtableText(4) = "144" 'Trim(result("总面积"))
         YWPRtableText(5) = "1440" 'Trim(result("应收款额"))
         YWPRtableText(6) = "1000" 'Trim(result("已收款额"))
         YWPRtableText(7) = "440" 'Trim(result("未收款额"))
         YWPRtableText(8) = "葛亮亮" 'Trim(result("业务员"))
         YWPRtableText(9) = "徐长华" 'Trim(result("签单人"))
         YWPRtableText(10) = "李玲" 'Trim(result("欠款审核"))
         YWSErows = 2
         For i = 1 To 2
             If i = 1 Then
                YWSEtableText1(i) = "13151a" 'Trim(result("文件序列"))
                YWSEtableText2(i) = "7*8"
             End If
             If i = 2 Then
                YWSEtableText1(i) = "13151b" 'Trim(result("文件序列"))
                YWSEtableText2(i) = "5*6"
             End If
             
         Next i
         frmPHYeWuIn.Show
   End If
End Sub

Private Sub Picture1_Click()
    YWFlagh = 1
    frmPHYeWuIn.Show
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
     Picture2.Cls
    Picture3.Cls
    Picture4.Cls
    Picture5.Cls
    Picture6.Cls
    Picture7.Cls
    jframe.danum = 5
    jframe.rtop = 1
    jframe.rleft = 1
    jframe.rright = 43
    jframe.rbottom = 39
    jframe.ddrawc Picture1
End Sub

Private Sub Picture2_Click()
    On Error GoTo errmsg
    YWFlagh = 2
    Dim YWPRtext As String
    If ListView1.ListItems.Count <> 0 Then
      YWPRtext = ListView1.SelectedItem.SubItems(1)
      sql = "select *  from  YWPRtable  where  合同号='" & Trim(YWPRtext) & "'  and   日期='" & Trim(ListView1.SelectedItem.Text) & "'"
      'MsgBox sql
      Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
      If result.RowCount <> 0 Then
         YWPRtableText(0) = Trim(result("日期"))
         YWPRtableText(1) = Trim(result("合同号"))
         YWPRtableText(2) = Trim(result("客户名称"))
         YWPRtableText(3) = Trim(result("单价"))
         YWPRtableText(4) = Trim(result("总面积"))
         YWPRtableText(5) = Trim(result("应收款额"))
         YWPRtableText(6) = Trim(result("已收款额"))
         YWPRtableText(7) = Trim(result("未收款额"))
         YWPRtableText(8) = Trim(result("业务员"))
         YWPRtableText(9) = Trim(result("签单人"))
         YWPRtableText(10) = Trim(result("欠款审核"))
         
      End If
      sql = "select  *  from  YWSEtable  where  合同号='" & Trim(YWPRtext) & "'  and   日期='" & Trim(ListView1.SelectedItem.Text) & "'"
      Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
      If result.RowCount <> 0 Then
         result.MoveLast
         YWSErows = result.RowCount
         result.MoveFirst
      End If
      i = 1
      If result.RowCount <> 0 Then
         Do While Not result.EOF()
             YWSEtableText1(i) = Trim(result("文件序列"))
             YWSEtableText2(i) = Trim(result("画面规格"))
             result.MoveNext
             i = i + 1
         Loop
      End If
      frmPHYeWuIn.Show
   End If
errmsg:
   If Err.Number <> 0 Then
      YWFlagh = 3
      YWPRtableText(0) = "2002年03月10日" 'Trim(result("日期"))
         YWPRtableText(1) = "13151" ' Trim(result("合同号"))
         YWPRtableText(2) = "北京十月软件公司" 'Trim(result("客户名称"))
         YWPRtableText(3) = "12" 'Trim(result("单价"))
         YWPRtableText(4) = "144" 'Trim(result("总面积"))
         YWPRtableText(5) = "1440" 'Trim(result("应收款额"))
         YWPRtableText(6) = "1000" 'Trim(result("已收款额"))
         YWPRtableText(7) = "440" 'Trim(result("未收款额"))
         YWPRtableText(8) = "葛亮亮" 'Trim(result("业务员"))
         YWPRtableText(9) = "徐长华" 'Trim(result("签单人"))
         YWPRtableText(10) = "李玲" 'Trim(result("欠款审核"))
         YWSErows = 2
         For i = 1 To 2
             If i = 1 Then
                YWSEtableText1(i) = "13151a" 'Trim(result("文件序列"))
                YWSEtableText2(i) = "7*8"
             End If
             If i = 2 Then
                YWSEtableText1(i) = "13151b" 'Trim(result("文件序列"))
                YWSEtableText2(i) = "5*6"
             End If
             
         Next i
         frmPHYeWuIn.Show
   End If
End Sub

Private Sub Picture2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Picture1.Cls
    Picture3.Cls
    Picture4.Cls
    Picture5.Cls
    Picture6.Cls
    Picture7.Cls
    jframe.danum = 5
    jframe.rtop = 1
    jframe.rleft = 1
    jframe.rright = 43
    jframe.rbottom = 39
    jframe.ddrawc Picture2
End Sub

Private Sub Picture3_Click()
     On Error GoTo errmsg
     Dim datel As String
     Dim HT As String
     datel = ListView1.SelectedItem.Text
     HT = ListView1.SelectedItem.SubItems(1)
     If ListView1.ListItems.Count <> 0 Then
        sql = "select *  from JTSEtable  where   substring(文件号,1,5)='" & Trim(ListView1.SelectedItem.SubItems(1)) & "'"
         Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
        If result.RowCount <> 0 Then
           MsgBox "该资料已经在往来业务中使用,不能删除!!"
        Else
            If MsgBox("确定是否删除?", 36, "删除!") = 6 Then
               
              sql = "delete    from  YWPRtable  where  日期='" & Trim(ListView1.SelectedItem.Text) & "' and  合同号='" & Trim(ListView1.SelectedItem.SubItems(1))
              Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
              sql = "delete  from  YWSEtable  where  日期='" & Trim(datel) & "'  and  合同号='" & Trim(HT) & "'"
              Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
            End If
            ''''''''
            'ListView1.Refresh
             ''''''''''显示数据'''''''
            sql = "select *  from  YWPRtable where  合同号='" & Trim(GoodsTree) & "'"
            Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
            ListView1.ListItems.Clear
           If result.RowCount <> 0 Then
              Do While Not result.EOF()
                Set itm = frmPHYeWu.ListView1.ListItems.Add(, , result("日期"))
                itm.SubItems(1) = Trim(result("合同号"))
                itm.SubItems(2) = Trim(result("客户名称"))
                itm.SubItems(3) = Trim(result("应收款额"))
                itm.SubItems(4) = Trim(result("已收款额"))
                itm.SubItems(5) = Trim(result("未收款额"))
                 result.MoveNext
              Loop
           End If
        End If
    End If
errmsg:
    If Err.Number <> 0 Then
       MsgBox "该份合同正在流程业务中使用,不能删除...", vbExclamation
       Exit Sub
    End If
End Sub

Private Sub Picture3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Picture2.Cls
    Picture1.Cls
    Picture4.Cls
    Picture5.Cls
    Picture6.Cls
    Picture7.Cls
    jframe.danum = 5
    jframe.rtop = 1
    jframe.rleft = 1
    jframe.rright = 43
    jframe.rbottom = 39
    jframe.ddrawc Picture3
End Sub

Private Sub Picture4_Click()
    MsgBox "本软件为试用版,无查询功能...", vbExclamation
End Sub

Private Sub Picture4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Picture2.Cls
    Picture3.Cls
    Picture1.Cls
    Picture5.Cls
    Picture6.Cls
    Picture7.Cls
    jframe.danum = 5
    jframe.rtop = 1
    jframe.rleft = 1
    jframe.rright = 43
    jframe.rbottom = 39
    jframe.ddrawc Picture4
End Sub

Private Sub Picture5_Click()
    MsgBox "本软件为试用版,无打印功能...", vbExclamation
End Sub

Private Sub Picture5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
   Picture2.Cls
    Picture3.Cls
    Picture4.Cls
    Picture1.Cls
    Picture6.Cls
    Picture7.Cls
    jframe.danum = 5
    jframe.rtop = 1
    jframe.rleft = 1
    jframe.rright = 43
    jframe.rbottom = 39
    jframe.ddrawc Picture5
End Sub

Private Sub Picture6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Picture2.Cls
    Picture3.Cls
    Picture4.Cls
    Picture5.Cls
    Picture1.Cls
    Picture7.Cls
    jframe.danum = 5
    jframe.rtop = 1
    jframe.rleft = 1
    jframe.rright = 43
    jframe.rbottom = 39
    jframe.ddrawc Picture6
End Sub

Private Sub Picture7_Click()
    Unload Me
End Sub

Private Sub Picture7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Picture2.Cls
    Picture3.Cls
    Picture4.Cls
    Picture5.Cls
    Picture6.Cls
    Picture1.Cls
    jframe.danum = 5
    jframe.rtop = 1
    jframe.rleft = 1
    jframe.rright = 43
    jframe.rbottom = 39
    jframe.ddrawc Picture7
End Sub

Private Sub TreeView1_DblClick()
    On Error GoTo errmsg
    Dim hrecord As Integer
    sql = "select *  from  fileserial where  合同级别='" & Trim(GoodsTree) & "'"
    Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
    Dim itm As ListItem
    If result.RowCount <> 0 Then
       If TreeView1.SelectedItem.Children = 0 Then
            Do While Not result.EOF()
               Set TreeView1.ImageList = ImageList1
               Set TreeSub1 = TreeView1.Nodes.Add(TreeView1.SelectedItem.Index, tvwChild, "fff" & Str(i), result("合同号"))
               TreeSub1.Image = 1
               TreeSub1.EnsureVisible
               result.MoveNext
               i = i + 1
            Loop
        End If
    End If
    ''''''''''显示数据'''''''
     sql = "select *  from  YWPRtable where  合同号='" & Trim(GoodsTree) & "'"
    Set result = cn.OpenResultset(sql, rdOpenDynamic, rdConcurRowVer)
    ListView1.ListItems.Clear
    If result.RowCount <> 0 Then
       Do While Not result.EOF()
           Set itm = frmPHYeWu.ListView1.ListItems.Add(, , result("日期"))
           itm.SubItems(1) = Trim(result("合同号"))
           itm.SubItems(2) = Trim(result("客户名称"))
           itm.SubItems(3) = Trim(result("应收款额"))
           itm.SubItems(4) = Trim(result("已收款额"))
           itm.SubItems(5) = Trim(result("未收款额"))
           
           result.MoveNext
       Loop
    End If
errmsg:
    If Err.Number <> 0 Then
        'Dim itm As ListItem
        Dim alphal As String
        If TreeView1.SelectedItem.Children = 0 Then
           For i = 0 To 1
               If i = 0 Then
                  alphal = "a"
               End If
               If i = 1 Then
                  alphal = "b"
               End If
               Set TreeView1.ImageList = ImageList1
               Set TreeSub1 = TreeView1.Nodes.Add(TreeView1.SelectedItem.Index, tvwChild, "fff" & Str(i), GoodsTree & Trim(alphal))
               TreeSub1.Image = 1
               TreeSub1.EnsureVisible
           Next i
           ''''''''
           ListView1.ListItems.Clear
                      
           Set itm = frmPHYeWu.ListView1.ListItems.Add(, , "2002年03月10日")
           itm.SubItems(1) = "13151"
           itm.SubItems(2) = "北京十月软件公司"
           itm.SubItems(3) = "1000"
           itm.SubItems(4) = "1000" 'Trim(result("已收款额"))
           itm.SubItems(5) = "0" 'Trim(result("未收款额"))
           
        End If
       Exit Sub
    End If
End Sub

Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
      If TreeView1.SelectedItem.Text = "合同号" Then
        If Button = 2 Then
           PopupMenu frmPHmain.mnuHT
        End If
    Else
        If TreeView1.SelectedItem.Children = 0 Then
            frmPHmain.mnuAddHT.Enabled = True
            If Button = 2 Then
               PopupMenu frmPHmain.mnuHT
            End If
        Else
            frmPHmain.mnuAddHT.Enabled = True
            If Button = 2 Then
               PopupMenu frmPHmain.mnuHT
            End If
        End If
    End If
End Sub

Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
    GoodsTree = Node.Text
End Sub

⌨️ 快捷键说明

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