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

📄 frmorderprint.frm

📁 此为我2001年为东莞建发楦头开发的企业管理软件他们使用至今,望斑竹指教! 其他会员最好不要随意下载,需经斑竹同意或我本人同意,谢谢!
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         ForeColor       =   &H00C00000&
         Height          =   255
         Index           =   1
         Left            =   7200
         TabIndex        =   16
         Top             =   120
         Visible         =   0   'False
         Width           =   135
      End
      Begin VB.Label lblLabels 
         Caption         =   "客户方向:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   255
         Index           =   26
         Left            =   360
         TabIndex        =   14
         Top             =   1200
         Width           =   975
      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       =   &H00C00000&
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   12
         Top             =   720
         Visible         =   0   'False
         Width           =   1215
      End
      Begin VB.Label lblclient 
         ForeColor       =   &H000000C0&
         Height          =   255
         Left            =   3000
         TabIndex        =   10
         Top             =   360
         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            =   1200
         TabIndex        =   3
         Top             =   2520
         Width           =   1095
      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            =   240
         TabIndex        =   2
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label lbl 
         Caption         =   "到:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   255
         Index           =   0
         Left            =   4080
         TabIndex        =   1
         Top             =   2520
         Width           =   375
      End
   End
End
Attribute VB_Name = "frmOrderprint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmbfang_Click()
    If cmbfang <> "全部" Then
        Set clitb = New Recordset
        
        cmbTown.Clear
        cmbTown.AddItem "全部"
        clitb.Open "select distinct town from client where fangxiang='" & cmbfang.Text & "'", db, adOpenStatic, adLockOptimistic
        For i = 1 To clitb.RecordCount
            If Not IsNull(clitb!town) Then cmbTown.AddItem clitb!town
            clitb.MoveNext
        Next
        cmbTown.ListIndex = 0
        clitb.Close
        
        Set clitb = Nothing
    End If
End Sub

Private Sub cmdcancel_Click()
    Unload Me
End Sub

Private Sub cmdok_Click()
Me.MousePointer = 11
   Txtclient.Text = Trim(Txtclient.Text)
   
   If Len(Trim(Txtclient.Text)) <> 0 Then
      Set clitb = New Recordset
      clitb.Open "select * from client where clino=" & "'" & Txtclient.Text & "'", db, adOpenStatic, adLockOptimistic
      If clitb.RecordCount = 0 Then
         MsgBox " 客户资料出错!!!,请重新输入", vbCritical, MSG2
         Exit Sub
      End If
    End If
   
    If Len(Trim(Txtclient.Text)) = 0 Then
          If Cmbtype.Text = "全部" Then
             'sqlcc2 = "SELECT * from din_view where type<>'作废'and  type<>'重做'and  din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'"
             sqlcc2 = "SELECT * from din_view where type<>'作废'and din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'"
          Else
             'sqlcc2 = "SELECT * from din_view where type<>'作废' and type=" & "'" & Cmbtype.Text & "'" & " and din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'"
             sqlcc2 = "SELECT * from din_view where type=" & "'" & Cmbtype.Text & "'" & " and din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'"
          End If
    Else
          If Cmbtype.Text = "全部" Then
             'sqlcc2 = "SELECT * from din_view where type<>'作废' and type<>'重做'and din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & " and clino=" & "'" & Txtclient.Text & "'"
             sqlcc2 = "SELECT * from din_view where type<>'作废'and din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & " and clino=" & "'" & Txtclient.Text & "'"
          Else
             'sqlcc2 = "SELECT * from din_view where type<>'作废' and type=" & "'" & Cmbtype.Text & "'" & " and din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & " and clino=" & "'" & Txtclient.Text & "'"
             sqlcc2 = "SELECT * from din_view where type=" & "'" & Cmbtype.Text & "'" & " and din_date>=" & "'" & DTP1.value & "'" & " and din_date<=" & "'" & DTP2.value & "'" & " and clino=" & "'" & Txtclient.Text & "'"
          End If
    End If
    
    If cmbOpertion.Text <> "全部" Then
       sqlcc2 = sqlcc2 & " and  opertion= '" & cmbOpertion.Text & "'"
    End If
    
    If cmbfang.Text <> "全部" Then
       sqlcc2 = sqlcc2 & " and  fang= '" & cmbfang.Text & "'"
    End If
    
    If cmbTown.Text <> "全部" Then
       sqlcc2 = sqlcc2 & " and  fw= '" & cmbTown.Text & "'"
    End If
    
    If cmbType1.Text <> "全部" Then
       sqlcc2 = sqlcc2 & " and  type1= '" & cmbType1.Text & "'"
    End If
    
    If cmbType2.Text <> "全部" Then
       sqlcc2 = sqlcc2 & " and  type2= '" & cmbType2.Text & "'"
    End If
    
    If cmbType3.Text <> "全部" Then
       sqlcc2 = sqlcc2 & " and  type3= '" & cmbType3.Text & "'"
    End If
    
    If cmbmodel.Text <> "全部" Then
       sqlcc2 = sqlcc2 & " and  modelshape= '" & cmbmodel.Text & "'"
    End If
    
    sqlcc2 = sqlcc2 & " order by s_name,din_date"
   Dim rs As Recordset
   Set rs = New Recordset
   rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
   If rs.RecordCount > 0 Then
        rs.Close
        Set rs = Nothing
        ARdinprint.Show 1
   Else
        rs.Close
        Set rs = Nothing
        MsgBox "不能找到相应的记录!!!", vbCritical + vbOKOnly, MSG2
        Me.MousePointer = 0
        Exit Sub
   End If
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, "客户", "ordera")
    Call clientdisplay("client", Txtclient.Text, lblclient)
End Sub

Private Sub Form_Activate()
    Txtclient.SetFocus
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 = #1/1/2002#
    DTP2.value = Date
    
    Me.Caption = "订单指令汇总报告"
    lbl1(0).Visible = True
    Cmbtype.Visible = True
    'Cmbtype.AddItem "全部"
    'Cmbtype.Text = "全部"
    
    'cmbfang.AddItem "全部"
    'cmbfang.Text = "全部"
'Define Recordset
    Dim clitb As Recordset
    Set clitb = New Recordset
'Init Client FangXiang
    Cmbtype.Clear
    Cmbtype.AddItem "全部"
    clitb.Open "select distinct type from din", db, adOpenStatic, adLockOptimistic
    For i = 1 To clitb.RecordCount
        If Not IsNull(clitb!Type) And Not IsEmpty(clitb!Type) Then Cmbtype.AddItem clitb!Type
        clitb.MoveNext
    Next
    Cmbtype.ListIndex = 0
    clitb.Close
'Init Client FangXiang
    cmbfang.Clear
    cmbfang.AddItem "全部"
    clitb.Open "select distinct fangxiang from fangxiang", db, adOpenStatic, adLockOptimistic
    For i = 1 To clitb.RecordCount
        cmbfang.AddItem clitb!fangxiang
        clitb.MoveNext
    Next
    cmbfang.ListIndex = 0
    clitb.Close
'Init Client Opertion
    cmbOpertion.Clear
    cmbOpertion.AddItem "全部"
    clitb.Open "select distinct opertion from client", db, adOpenStatic, adLockOptimistic
    For i = 1 To clitb.RecordCount
        cmbOpertion.AddItem clitb!opertion
        clitb.MoveNext
    Next
    cmbOpertion.ListIndex = 0
    clitb.Close
'Init Client Town
    cmbTown.Clear
    cmbTown.AddItem "全部"
    clitb.Open "select distinct town from scope", db, adOpenStatic, adLockOptimistic
    For i = 1 To clitb.RecordCount
        cmbTown.AddItem clitb!town
        clitb.MoveNext
    Next
    cmbTown.ListIndex = 0
    clitb.Close
'Init Client Type1
    cmbType1.Clear
    cmbType1.AddItem "全部"
    clitb.Open "select distinct type1 from type1", db, adOpenStatic, adLockOptimistic
    For i = 1 To clitb.RecordCount
        cmbType1.AddItem clitb!Type1
        clitb.MoveNext
    Next
    cmbType1.ListIndex = 0
    clitb.Close
'Init Client Type2
    cmbType2.Clear
    cmbType2.AddItem "全部"
    clitb.Open "select distinct type2 from type2", db, adOpenStatic, adLockOptimistic
    For i = 1 To clitb.RecordCount
        cmbType2.AddItem clitb!Type2
        clitb.MoveNext
    Next
    cmbType2.ListIndex = 0
    clitb.Close
'Init Client Type3
    cmbType3.Clear
    cmbType3.AddItem "全部"
    clitb.Open "select distinct type3 from type3", db, adOpenStatic, adLockOptimistic
    For i = 1 To clitb.RecordCount
        cmbType3.AddItem clitb!Type3
        clitb.MoveNext
    Next
    cmbType3.ListIndex = 0
    clitb.Close
'Set recordset free
    Set clitb = Nothing
        
    
     Set clitb = New Recordset
     clitb.Open "select * from model", db, adOpenStatic, adLockOptimistic
     If clitb.RecordCount <> 0 Then
       For i = 1 To clitb.RecordCount
          cmbmodel.AddItem clitb!model_shape
          clitb.MoveNext
       Next
     End If
     
    cmbmodel.AddItem "全部"
    cmbmodel.Text = "全部"
    
  
    
End Sub

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

Private Sub Txtclient_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = 13 Then
     Set clitb = New Recordset
     clitb.Open "select * from client where clino=" & "'" & Txtclient.Text & "'", db, adOpenStatic, adLockOptimistic
     If clitb.RecordCount = 0 Then
         If Txtclient.Text <> "" Then cmdsolocate_Click
     End If
     Call clientdisplay("client", Txtclient.Text, lblclient)
  End If
End Sub

⌨️ 快捷键说明

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