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

📄 frm_boxsign.frm

📁 一个公司的客户财产管理系统vb源码
💻 FRM
📖 第 1 页 / 共 4 页
字号:
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   270
         Index           =   2
         Left            =   7800
         Locked          =   -1  'True
         TabIndex        =   21
         Text            =   "Text1"
         Top             =   360
         Width           =   4095
      End
      Begin VB.TextBox txt_Fields 
         BackColor       =   &H00FFFFC0&
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   270
         Index           =   1
         Left            =   5280
         Locked          =   -1  'True
         TabIndex        =   20
         Text            =   "Text1"
         Top             =   360
         Width           =   1335
      End
      Begin VB.TextBox txt_Fields 
         BackColor       =   &H00FFFFC0&
         BorderStyle     =   0  'None
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   270
         Index           =   0
         Left            =   1200
         Locked          =   -1  'True
         TabIndex        =   13
         Text            =   "Text1"
         Top             =   360
         Width           =   3375
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         Caption         =   "箱面标识"
         Height          =   180
         Left            =   5760
         TabIndex        =   31
         Top             =   765
         Width           =   720
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "订货数量"
         Height          =   180
         Left            =   6960
         TabIndex        =   7
         Top             =   405
         Width           =   720
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "节目名称"
         Height          =   180
         Left            =   360
         TabIndex        =   6
         Top             =   1845
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "采购单号"
         Height          =   180
         Left            =   360
         TabIndex        =   5
         Top             =   1485
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "料    号"
         Height          =   180
         Left            =   360
         TabIndex        =   4
         Top             =   1125
         Width           =   720
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "客户名称"
         Height          =   180
         Left            =   360
         TabIndex        =   3
         Top             =   765
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "小号"
         Height          =   180
         Left            =   4800
         TabIndex        =   2
         Top             =   405
         Width           =   360
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "规格单号"
         Height          =   180
         Left            =   360
         TabIndex        =   1
         Top             =   405
         Width           =   720
      End
   End
End
Attribute VB_Name = "Frm_BoxSign"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public intTotalDustproofBoxNumbers As Integer  '定义了防尘垫箱数
Public intTotalDustproofLastBoxNumbers As Integer  '定义了末箱防尘垫数量

Private Sub Clear_BoxSignTemp()
      '将箱唛临时表清空
      Set Cn = New ADODB.Connection
      Set Rs = New ADODB.Recordset
      Cn.Open Cs
      Str_SQL = "delete from BoxSignTemp"
      Set Rs = Cn.Execute(Str_SQL)
      If Rs.State = 1 Then Rs.Close
      Cn.Close

End Sub

Private Sub SetBoxSignTempDataSource()
      Set Cn_BoxSignTemp = New ADODB.Connection
      Set Rs_BoxSignTemp = New ADODB.Recordset
      Cn_BoxSignTemp.Open Cs
      Rs_BoxSignTemp.Open "select * from BoxSignTemp", Cn_BoxSignTemp, adOpenKeyset, adLockOptimistic, adCmdText
      Me.tdbg_BoxSignTemp.DataSource = Rs_BoxSignTemp
End Sub

Private Sub Total_DustproofNumbers()
On Error Resume Next
  Dim i As Long
  i = 0
  If (Val(Trim(Me.txt_Fields(2).text)) * Val(Trim(Me.Cob_Fields(0).text))) Mod 1000 <> 0 Then i = i + 1
  i = i + Int((Val(Trim(Me.txt_Fields(2).text)) * Val(Trim(Me.Cob_Fields(0).text)) / 1000))
  If i > 3 Then Me.txt_Fields(7).text = i Else Me.txt_Fields(7).text = 3
End Sub

Private Sub Total_BoxNumbers()
On Error Resume Next
  Dim intBoxNumbers As Integer
  Dim intDustproofBoxNumbers As Integer
  Dim intDustproofLastBoxNumbers As Integer
  intBoxNumbers = 0
  intDustproofBoxNumbers = 0
  intDustproofLastBoxNumbers = 0
  '1、求成品箱数
  If Val(Trim(Me.txt_Fields(2).text)) Mod Val(Trim(Me.Cob_Fields(1).text)) > MaxNumbers Then
    intBoxNumbers = intBoxNumbers + 1
    Me.txt_Fields(8).text = Val(Trim(Me.txt_Fields(2).text)) Mod Val(Trim(Me.Cob_Fields(1).text))
  Else
    Me.txt_Fields(8).text = Val(Trim(Me.txt_Fields(2).text)) Mod Val(Trim(Me.Cob_Fields(1).text)) + Val(Trim(Me.Cob_Fields(1).text))
  End If
  intBoxNumbers = intBoxNumbers + Int(Val(Trim(Me.txt_Fields(2).text)) / Val(Trim(Me.Cob_Fields(1).text)))
  Me.txt_Fields(9).text = CStr(intBoxNumbers)
  '2、求防尘垫箱数
  If Val(Trim(Me.txt_Fields(7).text)) Mod Val(Trim(Me.Cob_Fields(1).text)) > MaxNumbers Then
    intDustproofBoxNumbers = intDustproofBoxNumbers + 1
    intDustproofLastBoxNumbers = Val(Trim(Me.txt_Fields(7).text)) Mod Val(Trim(Me.Cob_Fields(1).text))
  Else
    intDustproofLastBoxNumbers = Val(Trim(Me.txt_Fields(7).text)) Mod Val(Trim(Me.Cob_Fields(1).text)) + Val(Trim(Me.Cob_Fields(1).text))
  End If
  intDustproofBoxNumbers = intDustproofBoxNumbers + Int(Val(Trim(Me.txt_Fields(7).text)) / Val(Trim(Me.Cob_Fields(1).text)))
  intTotalDustproofBoxNumbers = intDustproofBoxNumbers
  intTotalDustproofLastBoxNumbers = intDustproofLastBoxNumbers
End Sub

Private Sub Dustproof_BoxNumbers()
'On Error GoTo err
    '获取防尘垫要求比例
    Set Cn_Common = New ADODB.Connection
    Cn_Common.Open Cs
    Set Rs_Common = New ADODB.Recordset
    Rs_Common.Open "select * from Area_Customer where 客户名称 ='" & Rs_SpecBill!客户名称 & "'order by 地区编码,客户编码", Cn_Common, adOpenKeyset, adLockOptimistic, adCmdText
    If Rs_Common.RecordCount <> 0 Then
      If IsNull(Rs_Common!防尘垫要求) = False Then
         Me.Cob_Fields(0).text = Rs_Common!防尘垫要求
      Else
         Me.Cob_Fields(0).text = ""
      End If
    End If
    Rs_Common.Close
    Cn_Common.Close
    '获取每箱数量
    Set Cn_Common = New ADODB.Connection
    Cn_Common.Open Cs
    Set Rs_Common = New ADODB.Recordset
    Rs_Common.Open "select * from Pack_Type where 包装方式 ='" & Rs_SpecBill!包装方式 & "'order by 包装方式", Cn_Common, adOpenKeyset, adLockOptimistic, adCmdText
    If Rs_Common.RecordCount <> 0 Then
      If IsNull(Rs_Common!每箱数量) = False Then
        Me.Cob_Fields(1).text = Rs_Common!每箱数量
      Else
        Me.Cob_Fields(1).text = ""
      End If
    Else
      Me.Cob_Fields(1).text = ""
      MsgBox "找不到此包装方式," + Chr(13) + "请手工选择每箱数量!" + Chr(13) + Chr(13) + "产生此情况的原因可能是" + Chr(13) + "你修改过此包装方式!", vbCritical, "提示信息"
    End If
    Rs_Common.Close
    Cn_Common.Close
Exit Sub
err:
   MsgBox err.Description, vbCritical
End Sub

Private Sub SpecBill_Info()
'On Error GoTo err
    '节目下单时其他要求
    If IsNull(Rs_SpecBill!规格单号) = False Then Me.txt_Fields(0).text = Rs_SpecBill!规格单号
    If IsNull(Rs_SpecBill!小号) = False Then Me.txt_Fields(1).text = Rs_SpecBill!小号
    If IsNull(Rs_SpecBill!客户名称) = False Then Me.txt_Fields(3).text = Rs_SpecBill!客户名称
    If IsNull(Rs_SpecBill!箱面标识) = False Then Me.txt_Fields(11).text = Rs_SpecBill!箱面标识 Else Me.txt_Fields(11).text = ""
    If IsNull(Rs_SpecBill!料号) = False Then Me.txt_Fields(4).text = Rs_SpecBill!料号 Else Me.txt_Fields(4).text = ""
    If IsNull(Rs_SpecBill!合同号) = False Then Me.txt_Fields(5).text = Rs_SpecBill!合同号 Else Me.txt_Fields(5).text = ""
    If IsNull(Rs_SpecBill!节目名称) = False Then Me.txt_Fields(6).text = Rs_SpecBill!节目名称 Else Me.txt_Fields(6).text = ""
    If IsNull(Rs_SpecBill!订货数量) = False Then Me.txt_Fields(2).text = Rs_SpecBill!订货数量
   

⌨️ 快捷键说明

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