资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:7k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form CL_BillChalkPrice
- BorderStyle = 1 'Fixed Single
- Caption = "输入单价"
- ClientHeight = 2700
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 3660
- Icon = "处理_单据记帐手工输入单价.frx":0000
- KeyPreview = -1 'True
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2700
- ScaleWidth = 3660
- StartUpPosition = 2 '屏幕中心
- Begin VB.TextBox LrText
- Alignment = 1 'Right Justify
- BackColor = &H8000000E&
- Height = 315
- Left = 1080
- TabIndex = 0
- Top = 450
- Width = 2175
- End
- Begin VB.Frame Frame1
- Caption = "参考单价"
- Height = 1335
- Left = 90
- TabIndex = 3
- Top = 930
- Width = 3495
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "Label2"
- Height = 180
- Index = 4
- Left = 1590
- TabIndex = 11
- Top = 990
- Width = 540
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "Label2"
- Height = 180
- Index = 3
- Left = 1590
- TabIndex = 10
- Top = 660
- Width = 540
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "Label2"
- Height = 180
- Index = 0
- Left = 1230
- TabIndex = 8
- Top = 330
- Width = 540
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "最新出库成本:"
- Height = 180
- Index = 4
- Left = 300
- TabIndex = 6
- Top = 990
- Width = 1170
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "最新入库成本:"
- Height = 180
- Index = 3
- Left = 300
- TabIndex = 5
- Top = 660
- Width = 1170
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "参考成本:"
- Height = 180
- Index = 0
- Left = 300
- TabIndex = 4
- Top = 330
- Width = 810
- End
- End
- Begin VB.CommandButton QdCommand
- Caption = "确定(&O)"
- Height = 300
- Left = 1620
- TabIndex = 2
- Top = 2340
- Width = 945
- End
- Begin VB.CommandButton QxCommand
- Caption = "取消(&C)"
- Height = 300
- Left = 2640
- TabIndex = 1
- Top = 2340
- Width = 945
- End
- Begin VB.Timer Timer1
- Enabled = 0 'False
- Left = 3780
- Top = -60
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "出库单价:"
- Height = 180
- Left = 150
- TabIndex = 9
- Top = 510
- Width = 780
- End
- Begin VB.Label LabTitle
- AutoSize = -1 'True
- Caption = "Label6"
- Height = 180
- Left = 150
- TabIndex = 7
- Top = 150
- Width = 510
- End
- End
- Attribute VB_Name = "CL_BillChalkPrice"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim Tsxx As String
- Dim Quan As Double '单据数量
- Dim CancelFlag As Boolean '取消标志
- Dim QySecond As Integer '起用时间
- Private Sub Form_Load()
- Call Sub_Query(Xtcdcsfz)
- Quan = Val(Xtcdcs)
- CancelFlag = True
- Timer1.Enabled = True
- If Second(Now) = 1 Then
- QySecond = 59
- Else
- QySecond = Second(Now) - 1
- End If
- Timer1.Interval = 1
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- If CancelFlag Then Xtcdcs = "0"
- End Sub
- Private Sub Frame_DragDrop(Source As Control, x As Single, y As Single)
- End Sub
- Private Sub LrText_Change()
- Call Sjgskz(LrText, Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
- End Sub
- Private Sub LrText_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then
- QdCommand.SetFocus
- End If
- End Sub
- Private Sub LrText_KeyPress(KeyAscii As Integer)
- Call InputFieldLimit(LrText, 10, KeyAscii)
- End Sub
- Private Sub QdCommand_Click()
- Dim Money As Double
- CancelFlag = False
- Money = Quan * Val(LrText.Text)
- If Trim(LrText.Text) <> "" Then
- If Len(Money) > Xtjezws Then
- Tsxx = "输入单价太大,以至出库金额超出系统允许范围!"
- Call Xtxxts(Tsxx, 0, 1)
- LrText.SetFocus
- Exit Sub
- ElseIf Val(LrText.Text) <= 0 Then
- Tsxx = "单价必须大于零!"
- Call Xtxxts(Tsxx, 0, 1)
- LrText.SetFocus
- Exit Sub
- End If
- Xtcdcs = Trim(LrText.Text)
- Else
- Xtcdcs = "0"
- End If
- Unload Me
- Xt_Wait.Refresh
- End Sub
- Private Sub QxCommand_Click()
- CancelFlag = True
- Unload Me
- Xt_Wait.Refresh
- End Sub
- Private Sub Timer1_Timer()
- If Second(Now) - QySecond = 0 Then
- Timer1.Enabled = False
- Unload Me
- Xt_Wait.Refresh
- End If
- End Sub
- Private Sub Sub_Query(mMnumber As String)
- Dim Rectemp As Recordset
- Set Rectemp = Cw_DataEnvi.DataConnect.Execute("select mnumber,mname,model,consultcost,consultprice,lowprice,newincost,newoutcost from Gy_material where mnumber='" & mMnumber & "'")
- If Not Rectemp.EOF Then
- LabTitle = "存货:" + Trim(Rectemp.Fields("mname") & "") + "(" + Trim(Rectemp.Fields("mnumber") & "") + ") 规格型号:" + Trim(Rectemp.Fields("model") & "")
- Label2(0) = Format(Rectemp.Fields("consultcost"), "##0." + String(Xtdjxsws, "0"))
- Label2(3) = Format(Rectemp.Fields("newincost"), "##0." + String(Xtdjxsws, "0"))
- Label2(4) = Format(Rectemp.Fields("newoutcost"), "##0." + String(Xtdjxsws, "0"))
- End If
- End Sub