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

📄 pgkaipiao.frm

📁 这是一个啤酒行业的软件,用VB6开发的
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         TabIndex        =   2
         Top             =   360
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   661
         _Version        =   393216
         Enabled         =   0   'False
         MaxLength       =   11
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Mask            =   "9999年99月99日"
         PromptChar      =   "_"
      End
      Begin VB.Label Label11 
         Caption         =   "是否作废:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3120
         TabIndex        =   38
         Top             =   3750
         Width           =   1095
      End
      Begin VB.Label Label10 
         Caption         =   "制表人:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   33
         Top             =   3720
         Width           =   1095
      End
      Begin VB.Label Label9 
         Caption         =   "验收人:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3150
         TabIndex        =   31
         Top             =   3300
         Width           =   1215
      End
      Begin VB.Label Label8 
         Caption         =   "验收车间:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   29
         Top             =   3270
         Width           =   1335
      End
      Begin VB.Label Label7 
         Caption         =   "包装物名称:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3120
         TabIndex        =   27
         Top             =   2820
         Width           =   1335
      End
      Begin VB.Label Label6 
         Caption         =   "单据标志:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   25
         Top             =   2790
         Width           =   1065
      End
      Begin VB.Label Label4 
         Caption         =   "单位名称:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   0
         Left            =   3120
         TabIndex        =   7
         Top             =   900
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "所属区域:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   0
         Left            =   240
         TabIndex        =   5
         Top             =   900
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "单据号:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Index           =   0
         Left            =   3240
         TabIndex        =   3
         Top             =   480
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "开票日期:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   480
         Width           =   1215
      End
   End
End
Attribute VB_Name = "pgkaipiao"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim en As rdoEnvironment
Dim xshcn, cn As rdoConnection
Dim result As rdoResultset
Dim SQL As String

Private Sub Combo1_Click()
    Combo2.Text = ""
    Combo2.Clear
End Sub

Private Sub Combo2_Click()
       SQL = "select  max(单据号)  from  pgdanjuhao where 开票日期='" & Trim(Mask.Text) & "' "
       Set result = cn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
           If IsNull(result(0)) = True Then
                Text1.Text = Format(Date, "yyyymmdd") & "0001"
           Else
                Text1.Text = Val(Trim(result(0))) + 1
           End If
           result.Close
         ''''''''''''清空内容
'         Text2.Text = ""
'         Text3.Text = ""
'         Text4.Text = ""
'         Text5.Text = ""
'         Combo3.Text = ""
'         Combo4.Text = ""
'         Combo5.Text = ""
'         Combo6.Text = ""
'         Combo7.Text = ""
         
End Sub

Private Sub Combo2_GotFocus()
    If Combo1.Text = "" Then
        MsgBox "填写所属区域"
        Exit Sub
    End If
     Combo2.Clear
     SQL = "select  tradename  from  trader where tradecode like '" & Trim(Combo1.Text) & "%'"
  '   MsgBox sql
     Set result = xshcn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
       If result.RowCount <> 0 Then
            result.MoveFirst
            Do While Not result.EOF
                Combo2.AddItem Trim(result("tradename"))
                result.MoveNext
            Loop
       End If
       result.Close
       
        SQL = "select distinct 地区 from  pgdanweimingcheng  "
        Set result = cn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
             If result.RowCount <> 0 Then
                 If Trim(Combo1.Text) = Trim(result("地区")) Then
                       result.Close
                       SQL = "select * from  pgdanweimingcheng order by 序号 "
                       Set result = cn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
                            If result.RowCount <> 0 Then
                                result.MoveFirst
                                Do While Not result.EOF
                                    Combo2.AddItem Trim(result("单位名称"))
                                    result.MoveNext
                                Loop
                             End If
                          
                 End If
             End If
            result.Close
End Sub

Private Sub Combo5_Click()
    Combo6.Text = ""
End Sub

Private Sub Combo6_GotFocus()
      If Combo5.Text = "" Then
          MsgBox "填写验收车间"
          Exit Sub
      End If
          Combo6.Clear
          SQL = "select   验收人 from  pgyanshouchejian  where 验收车间='" & Trim(Combo5.Text) & "' order by 序号 "
          Set result = cn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
           If result.RowCount <> 0 Then
                result.MoveFirst
                  Do While Not result.EOF
                       Combo6.AddItem Trim(result("验收人"))
                       result.MoveNext
                  Loop
           End If
           result.Close
End Sub

Private Sub Combo8_Click()
      If Trim(Combo8.Text) = "是" Then
           Combo3.Text = "验"
      End If
End Sub

Private Sub Command2_Click()
      pgbaozhuangwutongji.Show 1
End Sub

Private Sub Command3_Click()
     pgyajinpiao.Show 1
End Sub

Private Sub Command4_Click()
   
    If Trim(Combo1.Text) = "" Or Trim(Combo2.Text) = "" Or Trim(Combo3.Text) = "" Or Trim(Combo4.Text) = "" Or Trim(Combo5.Text) = "" Or Trim(Combo6.Text) = "" Or Trim(Combo7.Text) = "" Or Trim(Combo8.Text) = "" Then
              MsgBox "核对一下,开票选项是否有空的"
              Exit Sub
    End If
    If Text2.Text = "" And Text3.Text = "" And Text4.Text = "" And Text5.Text = "" Then
              MsgBox "核对一下,开票选项是否有空的"
              Exit Sub
    End If
    pgbaozhuangwuprint.Show 1
End Sub

Private Sub Command1_Click()
     pgchaxun.Show 1
End Sub

Private Sub Command8_Click()
      cn.Close
      en.Close
      Unload Me
End Sub

Private Sub Form_Load()
    t = False     ''''''''用来判断是开票还是调票
    Move Screen.Width / 2 - pgkaipiao.Width / 2, Screen.Height / 2 - pgkaipiao.Height / 2 - 500
    Set en = rdoEnvironments(0)
    Set xshcn = en.OpenConnection(dsname:="odbc_api_demo", Prompt:="rdodriverprompt", ReadOnly:=False, Connect:="uid=sa;pwd=;driver={SQL SERVER};SERVER=ntserver;database=newsale;")
    Set cn = en.OpenConnection(dsname:="odbc_api_demo", Prompt:="rdodriverprompt", ReadOnly:=False, Connect:="uid=sa;pwd=;driver={SQL SERVER};SERVER=ntserver;database=rongpin2004;")
    SQL = "select  distinct tradecode  from  trader "
    Set result = xshcn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
       Dim str As String
       If result.RowCount <> 0 Then
            result.MoveFirst
            Do While Not result.EOF
               If str = "" Or str <> Mid(Trim(result("tradecode")), 1, 1) Then
                     Combo1.AddItem Mid(Trim(result("tradecode")), 1, 1)
               End If
               str = Mid(Trim(result("tradecode")), 1, 1)
               result.MoveNext
            Loop
       End If
       result.Close
       
       SQL = "select distinct 地区 from  pgdanweimingcheng  "
       Set result = cn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
             If result.RowCount <> 0 Then
                Combo1.AddItem Trim(result("地区"))
             End If
             result.Close
       
       Mask.Text = Format(Date, "yyyy年mm月dd日")
     '  MsgBox "提示,核对开票日期是否正确"
     
      '''''''自动计算单据号'''''''''''''''''''''''
       SQL = "select  max(单据号)  from  pgdanjuhao where 开票日期='" & Trim(Mask.Text) & "' "
       Set result = cn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
           If IsNull(result(0)) = True Then
                Text1.Text = Format(Date, "yyyymmdd") & "0001"
           Else
                Text1.Text = Val(Trim(result(0))) + 1
           End If
           result.Close
      '''''''2006.01.17日更改''''''''''''''
      
      ''''''''''''''''''''''''''''''''''''''''''''''''''
           
           Combo3.AddItem "验"
           Combo3.AddItem "换"
           Combo3.AddItem "借"
           
        SQL = "select  包装物名称  from  pgbaozhuangwu  order by 序号 "
        Set result = cn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
           If result.RowCount <> 0 Then
                result.MoveFirst
                  Do While Not result.EOF
                       Combo4.AddItem Trim(result("包装物名称"))
                       result.MoveNext
                  Loop
           End If
           result.Close
           
          SQL = "select  distinct 验收车间  from  pgyanshouchejian   "
          Set result = cn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
           If result.RowCount <> 0 Then
                result.MoveFirst
                  Do While Not result.EOF
                       Combo5.AddItem Trim(result("验收车间"))
                       result.MoveNext
                  Loop
           End If
           result.Close
           
          SQL = "select  制表人  from  pgzhibiaoren order by 序号   "
          Set result = cn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
           If result.RowCount <> 0 Then
                result.MoveFirst
                  Do While Not result.EOF
                       Combo7.AddItem Trim(result("制表人"))
                       result.MoveNext
                  Loop
           End If
           result.Close
           
           Combo8.AddItem "是"
           Combo8.AddItem "否"
           Combo8.Text = "否"
End Sub

Private Sub Mask_Change()
     If IsDate(Mask.Text) = True Then
         SQL = "select  max(单据号)  from  pgdanjuhao where 开票日期='" & Trim(Mask.Text) & "' "
         Set result = cn.OpenResultset(SQL, rdOpenDynamic, rdConcurRowVer)
           If IsNull(result(0)) = True Then
                Text1.Text = Format(Mask, "yyyymmdd") & "0001"
           Else
                Text1.Text = Val(Trim(result(0))) + 1
           End If
           result.Close
      Else
            Text1.Text = ""
      End If
End Sub

⌨️ 快捷键说明

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