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

📄 frmfre_rom.frm

📁 智能仓库管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         Caption         =   "天"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3840
         TabIndex        =   45
         Top             =   2280
         Width           =   375
      End
      Begin VB.Label Label3 
         Alignment       =   2  'Center
         Caption         =   "元"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   7080
         TabIndex        =   44
         Top             =   2280
         Width           =   375
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   4
         Left            =   5880
         TabIndex        =   41
         Top             =   2160
         Width           =   1335
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   3
         Left            =   2640
         TabIndex        =   40
         Top             =   2160
         Width           =   1215
      End
      Begin VB.Label Label4 
         Caption         =   "该项收费金额:"
         Height          =   375
         Index           =   11
         Left            =   4560
         TabIndex        =   37
         Top             =   2280
         Width           =   1335
      End
      Begin VB.Label Label4 
         Caption         =   "该项存放天数:"
         Height          =   375
         Index           =   10
         Left            =   1080
         TabIndex        =   36
         Top             =   2280
         Width           =   1335
      End
      Begin VB.Label Label4 
         Caption         =   "总 收 费:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Index           =   6
         Left            =   5280
         TabIndex        =   32
         Top             =   1560
         Width           =   1335
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         BackStyle       =   0  'Transparent
         Caption         =   "物品代码:"
         Height          =   255
         Index           =   0
         Left            =   5640
         TabIndex        =   31
         Top             =   480
         Width           =   1020
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         BackStyle       =   0  'Transparent
         Caption         =   "合同编号:"
         Height          =   255
         Index           =   2
         Left            =   2880
         TabIndex        =   30
         Top             =   480
         Width           =   1020
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         BackStyle       =   0  'Transparent
         Caption         =   "记录编号:"
         Height          =   255
         Index           =   3
         Left            =   0
         TabIndex        =   29
         Top             =   480
         Width           =   1020
      End
      Begin VB.Label Label4 
         Caption         =   "出库日期:"
         Height          =   375
         Index           =   5
         Left            =   120
         TabIndex        =   25
         Top             =   1440
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "入库日期:"
         Height          =   375
         Index           =   4
         Left            =   120
         TabIndex        =   23
         Top             =   960
         Width           =   1020
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         BackStyle       =   0  'Transparent
         Caption         =   "收费单价:"
         Height          =   255
         Index           =   1
         Left            =   5640
         TabIndex        =   20
         Top             =   960
         Width           =   1020
      End
      Begin VB.Label Label4 
         Alignment       =   1  'Right Justify
         BackStyle       =   0  'Transparent
         Caption         =   "物品数量:"
         Height          =   255
         Index           =   9
         Left            =   2880
         TabIndex        =   5
         Top             =   960
         Width           =   1020
      End
   End
   Begin VB.Label Label1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Index           =   2
      Left            =   7080
      TabIndex        =   39
      Top             =   5040
      Width           =   1695
   End
   Begin VB.Label Label4 
      Caption         =   "出库记录总数"
      Height          =   375
      Index           =   8
      Left            =   5760
      TabIndex        =   38
      Top             =   5040
      Width           =   1455
   End
   Begin MSForms.CommandButton CmdCount 
      Height          =   585
      Left            =   3240
      TabIndex        =   35
      Top             =   4920
      Width           =   2265
      VariousPropertyBits=   19
      Caption         =   "出库结算"
      PicturePosition =   524294
      Size            =   "3995;1032"
      Picture         =   "frmFre_rom.frx":3E70
      FontName        =   "宋体"
      FontEffects     =   1073741825
      FontHeight      =   300
      FontCharSet     =   134
      FontPitchAndFamily=   34
      ParagraphAlign  =   3
      FontWeight      =   700
   End
   Begin VB.Label Label1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Index           =   1
      Left            =   1440
      TabIndex        =   22
      Top             =   5040
      Width           =   1575
   End
   Begin VB.Label Label4 
      Caption         =   "合 同 编 号:"
      Height          =   375
      Index           =   7
      Left            =   120
      TabIndex        =   21
      Top             =   5040
      Width           =   1215
   End
End
Attribute VB_Name = "frmFre_rom"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private cnDB As New ADODB.Connection
Private rs As New ADODB.Recordset
Private cn_DB As New ADODB.Connection
Private rs_DB As New ADODB.Recordset
Private ButtonStatus As String
Private Money As Currency

Private Sub Chk1_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
    Chk1.Value = 1
    cmdSave.SetFocus
  End If
End Sub
Private Sub Chk1_LostFocus()
  If Chk1.Value = 1 Then
  cmdSave.SetFocus
End If
End Sub
Private Sub cmdCount_Click()
Dim Space As Long
Dim I, K   As Integer
Dim I_Date, O_Date As Date
Dim T_Mon As Currency
If Trim(MfgZY.TextMatrix(1, 1)) = "" Then
      MsgBox "出库结算的记录已为空!", vbExclamation + vbOKOnly, "提示"
      Exit Sub
End If
Money = 0
 For I = 1 To MfgZY.Rows - 1
    T_Mon = 0
        If MfgZY.TextMatrix(I, 8) <> "" Then
            If MfgZY.TextMatrix(I, 7) <> "" And MfgZY.TextMatrix(I, 6) <> "" And MfgZY.TextMatrix(I, 8) = 1 Then
                K = K + 1
                I_Date = MfgZY.TextMatrix(I, 6)
                O_Date = MfgZY.TextMatrix(I, 7)
                'Space = DateDiff("d", CDate(MfgZY.TextMatrix(I, 6)), CDate(MfgZY.TextMatrix(I, 6)))
                Space = DateDiff("d", I_Date, O_Date)
                  If Space > 0 Then
                      T_Mon = Val(MfgZY.TextMatrix(I, 4)) * Val(MfgZY.TextMatrix(I, 5)) * Space
                  Else
                      MsgBox "第" & I & "行记录出入库日期错误", vbExclamation + vbOKOnly, "提示"
                      txtZY(7).SetFocus
                      Exit Sub
                  End If
            End If
        End If
    Money = Money + T_Mon
 Next
I_Mon = 0
txtZY(8).Text = Money
Label1(2).Caption = K

mStrSQL = "update Freight set PRICES=" & CCur(Money) & _
          " Where CONTACT_ID=" & StrToSQL(txtZY(2).Text)
If StrToSQL(txtZY(2).Text) <> "" Then
  rs_DB.Open mStrSQL, cn_DB, adOpenStatic, adLockReadOnly
  cn_DB.Execute mStrSQL
  'rs_DB.Close
   
  Exit Sub
End If

End Sub

Private Sub Form_Load()
   txtzy2 = con_id
  gQuerySQL = "where contact_id=" & txtzy2 & " and STate_I=2"
   DBConnection
   SetFormData (SetSQL("", ""))
   Label1(1).Caption = txtzy2
   'txtZY(2).Enabled = True
   'txtZY(2) = txtzy2
   'txtZY(2).Enabled = False
   gDSN = "DSN=Warehouse"
 Dim gRow, gcount
 Dim I As Integer
 gRow = MfgZY.row
 gcount = MfgZY.Cols
 Me.txtRow.Text = gRow
 If MfgZY.Rows > 1 Then
    For I = 1 To gcount - 2
      txtZY(I).Text = MfgZY.TextMatrix(gRow, I)
      If I = 6 Then
       txtZY(I).Text = Format(MfgZY.TextMatrix(gRow, I), "YYYY年MM月DD日")
      End If
      If I = 7 Then
       txtZY(I).Text = Format(MfgZY.TextMatrix(gRow, I), "YYYY年MM月DD日")
      End If
        If I = 8 And MfgZY.TextMatrix(gRow, I) <> "" Then
          Chk1.Value = MfgZY.TextMatrix(gRow, I)
          txtZY(I) = "¥0.00"

⌨️ 快捷键说明

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