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

📄 frmdinprint.frm

📁 此为我2001年为东莞建发楦头开发的企业管理软件他们使用至今,望斑竹指教! 其他会员最好不要随意下载,需经斑竹同意或我本人同意,谢谢!
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         ForeColor       =   &H00000080&
         Height          =   255
         Left            =   3240
         TabIndex        =   10
         Top             =   1800
         Visible         =   0   'False
         Width           =   855
      End
      Begin VB.Label lbl4 
         Caption         =   "显示日期:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Left            =   120
         TabIndex        =   8
         Top             =   1800
         Width           =   1215
      End
      Begin VB.Label lbl1 
         Caption         =   "交货日期:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   2
         Left            =   120
         TabIndex        =   2
         Top             =   1320
         Width           =   1215
      End
      Begin VB.Label lbl1 
         Caption         =   "所属业务员:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   3
         Left            =   120
         TabIndex        =   1
         Top             =   840
         Width           =   1335
      End
   End
End
Attribute VB_Name = "frmDinprint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As Recordset
Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdok_Click()
Me.MousePointer = 11
   Select Case PCheck
        Case "small"
            db.Execute "delete  from totaltemp "
            If Cmbtype.Text = "不限定" Then
                db.Execute " INSERT INTO Totaltemp (opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno, torder,times,finish_date,sname,Din_date, model, model_shape, unit, qty,clino ) SELECT opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno,torder,times,finish_date,s_name,din_date, model, model_shape, unit, total_qty,clino FROM din_view where grflag=0 and finish_date>=" & "'" & DTP1.value & "'" & " and finish_date<=" & "'" & DTP2.value & "'" & " and (type='样品' OR type='重做') and type<>'作废'"
            Else
                db.Execute " INSERT INTO Totaltemp (opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno, torder,times,finish_date,sname,Din_date, model, model_shape, unit, qty,clino ) SELECT opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno,torder,times,finish_date,s_name,din_date, model, model_shape, unit, total_qty,clino FROM din_view where grflag=0  and finish_date>=" & "'" & DTP1.value & "'" & " and finish_date<=" & "'" & DTP2.value & "'" & " and opertion=" & "'" & Cmbtype.Text & "'" & " and (type='样品'OR type='重做') and type<>'作废'"
            End If
            
            db.Execute " update totaltemp set torder='A' where times='早上'"
            db.Execute " update totaltemp set torder='B' where times='上午'"
            db.Execute " update totaltemp set torder='C' where times='中午'"
            db.Execute " update totaltemp set torder='D' where times='下午'"
            db.Execute " update totaltemp set torder='E' where times='晚上'"
            db.Execute " update totaltemp set torder='F' where times='交货'"
            db.Execute " update totaltemp set torder='G' where times='暂停'"
            
            
            If ChkType.value = 1 Then
               sqlcc2 = "select * from totaltemp order by finish_date,torder,opertion,dtime,sname"
            Else
               sqlcc2 = "select * from totaltemp "
                
                If Len(Trim(Txtclient.Text)) <> 0 Then
                       sqlcc2 = sqlcc2 & " where clino=" & "'" & Trim(Txtclient.Text) & "'"
                End If
                
                sqlcc2 = sqlcc2 & " order by finish_date,torder,dtime,sname"
                               
               'ARallprint.Show 1 '2002-08-24

                    Set rs = New Recordset
                    rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
                    If rs.RecordCount > 0 Then
                         rs.Close
                         Set rs = Nothing
                         ARallprint.Show 1
                    Else
                         rs.Close
                         Set rs = Nothing
                         MsgBox "不能找到相应的记录!!!", vbCritical + vbOKOnly, MSG2
                         Me.MousePointer = 0
                         Exit Sub
                    End If
            End If
        Case "big"
            db.Execute "delete  from totaltemp "
            If Cmbtype.Text = "不限定" Then
                db.Execute " INSERT INTO Totaltemp (opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno, torder,times,finish_date,sname,Din_date, model, model_shape, unit, qty ) SELECT opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno,torder,times,finish_date,s_name,din_date, model, model_shape, unit, total_qty FROM din_view where grflag=0  and finish_date>=" & "'" & DTP1.value & "'" & " and finish_date<=" & "'" & DTP2.value & "'" & " and (type='大货'OR type='重做') and type<>'作废'"
            Else
                db.Execute " INSERT INTO Totaltemp (opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno, torder,times,finish_date,sname,Din_date, model, model_shape, unit, qty ) SELECT opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno,torder,times,finish_date,s_name,din_date, model, model_shape, unit, total_qty FROM din_view where grflag=0 and finish_date>=" & "'" & DTP1.value & "'" & " and finish_date<=" & "'" & DTP2.value & "'" & " and opertion=" & "'" & Cmbtype.Text & "'" & " and (type='大货'OR type='重做') and type<>'作废'"
            End If
              
                        
            db.Execute " update totaltemp set torder='A' where times='早上'"
            db.Execute " update totaltemp set torder='B' where times='上午'"
            db.Execute " update totaltemp set torder='C' where times='中午'"
            db.Execute " update totaltemp set torder='D' where times='下午'"
            db.Execute " update totaltemp set torder='E' where times='晚上'"
            db.Execute " update totaltemp set torder='F' where times='交货'"
            db.Execute " update totaltemp set torder='G' where times='暂停'"
            If ChkType.value = 1 Then
               sqlcc2 = "select * from totaltemp order by opertion,finish_date,torder,dtime,sname"
            Else
               sqlcc2 = "select * from totaltemp order by finish_date,torder,dtime,sname"
               'ARbigprint.Show 1  '2002-08-24
                    Set rs = New Recordset
                    rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
                    If rs.RecordCount > 0 Then
                         rs.Close
                         Set rs = Nothing
                         ARbigprint.Show 1
                    Else
                         rs.Close
                         Set rs = Nothing
                         MsgBox "不能找到相应的记录!!!", vbCritical + vbOKOnly, MSG2
                         Me.MousePointer = 0
                         Exit Sub
                    End If
            End If
        Case "no"
            db.Execute "delete  from totaltemp "
            If Cmbtype.Text = "不限定" Then
                db.Execute " INSERT INTO Totaltemp (opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno, torder,times,finish_date,sname,Din_date, model, model_shape, unit, qty ) SELECT opertion, shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno,torder,times,finish_date,s_name,din_date, model, model_shape, unit, total_qty FROM din_view where grflag=0  and finish_date>=" & "'" & DTP1.value & "'" & " and finish_date<=" & "'" & DTP2.value & "'" & " and type='开发' "
            Else
                db.Execute " INSERT INTO Totaltemp (opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno, torder,times,finish_date,sname,Din_date, model, model_shape, unit, qty ) SELECT opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno,torder,times,finish_date,s_name,din_date, model, model_shape, unit, total_qty FROM din_view where grflag=0  and finish_date>=" & "'" & DTP1.value & "'" & " and finish_date<=" & "'" & DTP2.value & "'" & " and opertion=" & "'" & Cmbtype.Text & "'" & " and type='开发' "
            End If

            If ChkType.value = 1 Then
               sqlcc2 = "select * from totaltemp order by opertion,finish_date,torder,dtime,sname"
               'Arbigbprint.Show 1
            Else
               sqlcc2 = "select * from totaltemp order by finish_date,torder,dtime,sname"
               'ARbigprint.Show 1'2002-08-24
                    Set rs = New Recordset
                    rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
                    If rs.RecordCount > 0 Then
                         rs.Close
                         Set rs = Nothing
                         ARbigprint.Show 1
                    Else
                         rs.Close
                         Set rs = Nothing
                         MsgBox "不能找到相应的记录!!!", vbCritical + vbOKOnly, MSG2
                         Me.MousePointer = 0
                         Exit Sub
                    End If
            End If
            
        Case "ca"
            db.Execute "delete  from totaltemp "
            If Cmbtype.Text = "不限定" Then
                db.Execute "INSERT INTO Totaltemp (opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno, torder,times,finish_date,sname,Din_date, model, model_shape, unit, qty,time1 ) SELECT opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno,torder,times,finish_date,s_name,din_date, model, model_shape, unit, total_qty,time1 FROM din_view where grflag=0  and finish_date>=" & "'" & DTP1.value & "'" & " and finish_date<=" & "'" & DTP2.value & "'" & " and ( type='急单') " & " and time1=" & "'" & Cmbtime.Text & "'" & " and type<>'作废'"
                'db.Execute "INSERT INTO Totaltemp (opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno, torder,times,finish_date,sname,Din_date, model, model_shape, unit, qty,time1 ) SELECT opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno,torder,times,finish_date,s_name,din_date, model, model_shape, unit, total_qty,time1 FROM din_view where finish_date>=" & "'" & DTP1.value & "'" & " and finish_date<=" & "'" & DTP2.value & "'" & " and ( type='急单') " & " and time1=" & "'" & Cmbtime.Text & "'" & " and type<>'作废'"
            Else
                db.Execute "INSERT INTO Totaltemp (opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno, torder,times,finish_date,sname,Din_date, model, model_shape, unit, qty,time1 ) SELECT opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno,torder,times,finish_date,s_name,din_date, model, model_shape, unit, total_qty,time1 FROM din_view where grflag=0 and finish_date>=" & "'" & DTP1.value & "'" & " and finish_date<=" & "'" & DTP2.value & "'" & " and opertion=" & "'" & Cmbtype.Text & "'" & " and (type='急单') " & " and time1=" & "'" & Cmbtime.Text & "'" & " and type<>'作废'"
                'db.Execute "INSERT INTO Totaltemp (opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno, torder,times,finish_date,sname,Din_date, model, model_shape, unit, qty,time1 ) SELECT opertion,shenflag,grflag,jiflag,moflag,zouflag,tanflag,tieflag,miflag,dtime,reada,dinno,torder,times,finish_date,s_name,din_date, model, model_shape, unit, total_qty,time1 FROM din_view where finish_date>=" & "'" & DTP1.value & "'" & " and finish_date<=" & "'" & DTP2.value & "'" & " and opertion=" & "'" & Cmbtype.Text & "'" & " and (type='急单') " & " and time1=" & "'" & Cmbtime.Text & "'" & " and type<>'作废'"
            End If

            If ChkType.value = 1 Then
               sqlcc2 = "select * from totaltemp order by opertion,finish_date,torder,dtime,sname"
               'ArCabprint.Show 1
            Else
               sqlcc2 = "select * from totaltemp order by finish_date,torder,dtime,sname"
               'ARcaprint.Show 1    '2002-08-24
                    Set rs = New Recordset
                    rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
                    If rs.RecordCount > 0 Then
                         rs.Close
                         Set rs = Nothing
                         ARcaprint.Show 1
                    Else
                         rs.Close
                         Set rs = Nothing
                         MsgBox "不能找到相应的记录!!!", vbCritical + vbOKOnly, MSG2
                         Me.MousePointer = 0
                         Exit Sub
                    End If
            End If
       
    End Select
Me.MousePointer = 0
End Sub

Private Sub cmdsolocate_Click()
    Set pubfindtb = New Recordset
    pubfindtb.Open "select clino,s_name,post,tele from client order by clino", db, adOpenStatic, adLockOptimistic
    Call GenBrowse(Txtclient.Text, "客户", "dina")
    Call clientdisplay("client", Txtclient.Text, lblclient)
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyEscape Then Unload Me
End Sub

Private Sub Form_Load()
    DTP1.value = Date
    DTP2.value = Date
    DTP3.value = Date
    
    Select Case PCheck
        Case "small"
            Me.Caption = "样品排单明细报告"
        Case "big"
            Me.Caption = "大货排单明细报告"
        Case "no"
            Me.Caption = "开发指令单排单明细报告"
        Case "ca"
            Me.Caption = "急单明细报告"
            lbl5.Visible = True
            Cmbtime.Visible = True
            DTP3.value = Date
            Cmbtime.ListIndex = 0
     End Select
     
     Dim clitb As Recordset
     Set clitb = New Recordset
     clitb.Open "select distinct opertion from client", db, adOpenStatic, adLockOptimistic
     If clitb.RecordCount <> 0 Then
       For i = 1 To clitb.RecordCount
          If IsNull(clitb!opertion) = False Then Cmbtype.AddItem clitb!opertion
          clitb.MoveNext
       Next
     End If
     Cmbtype.AddItem "不限定"
     Cmbtype.Text = "不限定"
End Sub

Private Sub Label1_Click()

End Sub

Private Sub Form_Resize()
'On Error Resume Next
'Me.Top = 0
'Me.Left = 50
End Sub

⌨️ 快捷键说明

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