📄 frmmakeorder.frm
字号:
VERSION 5.00
Object = "{D252F124-F62C-11D1-9ABD-444553540000}#1.0#0"; "GADATE.DLL"
Object = "{9C4B12C2-D5CE-11D1-9ABC-444553540000}#1.0#0"; "GACEDIT.DLL"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Begin VB.Form frmMakeOrder
BorderStyle = 1 'Fixed Single
Caption = "自动生成采购订单"
ClientHeight = 5460
ClientLeft = 45
ClientTop = 330
ClientWidth = 8775
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5460
ScaleWidth = 8775
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdOkCancel
Caption = "条件选择(&S)"
Height = 350
Index = 4
Left = 7500
TabIndex = 11
Top = 1950
UseMaskColor = -1 'True
Width = 1210
End
Begin VB.CommandButton cmdOkCancel
Caption = "全部取消(&C)"
Height = 350
Index = 5
Left = 7500
TabIndex = 12
Top = 2340
UseMaskColor = -1 'True
Width = 1210
End
Begin VB.Frame Frame1
Caption = "说明"
Height = 735
Left = 60
TabIndex = 14
Top = 4650
Width = 7365
Begin VB.Label Label1
Caption = "建议本次采购量 = 建议每周采购量 - 当前现有库存量 - 预计本周到货量"
Height = 180
Index = 1
Left = 330
TabIndex = 16
Top = 450
Width = 6720
End
Begin VB.Label Label1
Caption = "建议每周采购量 = 最小库存量 + 周平均销售量"
Height = 180
Index = 0
Left = 330
TabIndex = 15
Top = 240
Width = 5310
End
End
Begin GACALENDARLibCtl.SpinEdit SpinInput
Height = 255
Left = 6330
OleObjectBlob = "frmMakeOrder.frx":0000
TabIndex = 5
Top = 60
Width = 825
End
Begin VB.ComboBox CboInput
Height = 300
Left = 3360
Style = 2 'Dropdown List
TabIndex = 3
Top = 30
Width = 945
End
Begin GACALENDARLibCtl.Calendar dtmInput
Height = 255
Left = 810
OleObjectBlob = "frmMakeOrder.frx":009D
TabIndex = 1
Top = 60
Width = 1185
End
Begin GATLCTRLLibCtl.CalEdit curInput
Height = 345
Left = 7560
OleObjectBlob = "frmMakeOrder.frx":0126
TabIndex = 13
Top = 3750
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton cmdOkCancel
Caption = "全部选择(&A)"
Height = 350
Index = 3
Left = 7500
TabIndex = 10
Top = 1560
UseMaskColor = -1 'True
Width = 1210
End
Begin VB.CommandButton cmdOkCancel
Caption = "计算(&Q)"
Height = 350
Index = 2
Left = 7500
TabIndex = 9
Top = 1170
UseMaskColor = -1 'True
Width = 1210
End
Begin VB.CommandButton cmdOkCancel
Height = 350
Index = 1
Left = 7500
Style = 1 'Graphical
TabIndex = 8
Tag = "1002"
Top = 780
UseMaskColor = -1 'True
Width = 1210
End
Begin VB.CommandButton cmdOkCancel
Height = 350
Index = 0
Left = 7500
Style = 1 'Graphical
TabIndex = 7
Tag = "1001"
Top = 390
UseMaskColor = -1 'True
Width = 1210
End
Begin MSFlexGridLib.MSFlexGrid GrdCol
Bindings = "frmMakeOrder.frx":01A7
Height = 4155
Left = 60
TabIndex = 6
Top = 390
Width = 7365
_ExtentX = 12991
_ExtentY = 7329
_Version = 393216
Cols = 20
FixedCols = 0
RowHeightMin = 270
BackColorBkg = -2147483643
GridColor = -2147483633
GridColorFixed = -2147483640
AllowBigSelection= 0 'False
FocusRect = 0
GridLinesFixed = 0
AllowUserResizing= 1
End
Begin GACALENDARLibCtl.Calendar dtmPromise
Height = 255
Left = 7560
OleObjectBlob = "frmMakeOrder.frx":01BB
TabIndex = 17
Top = 4230
Visible = 0 'False
Width = 1185
End
Begin MSRDC.MSRDC Data1
Height = 330
Left = 7530
Top = 4830
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
_Version = 393216
Options = 0
CursorDriver = 0
BOFAction = 0
EOFAction = 0
RecordsetType = 1
LockType = 3
QueryType = 0
Prompt = 3
Appearance = 1
QueryTimeout = 30
RowsetSize = 100
LoginTimeout = 15
KeysetSize = 0
MaxRows = 0
ErrorThreshold = -1
BatchSize = 15
BackColor = -2147483643
ForeColor = -2147483640
Enabled = -1 'True
ReadOnly = 0 'False
Appearance = -1 'True
DataSourceName = ""
RecordSource = ""
UserName = ""
Password = ""
Connect = ""
LogMessages = ""
Caption = "MSRDC1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label lblTitle
AutoSize = -1 'True
Caption = "销售数据参考最近(&R) 周"
Height = 180
Index = 2
Left = 4590
TabIndex = 4
Top = 90
Width = 2790
End
Begin VB.Label lblTitle
AutoSize = -1 'True
Caption = "计算周期(&P)"
Height = 180
Index = 1
Left = 2340
TabIndex = 2
Top = 90
Width = 990
End
Begin VB.Label lblTitle
AutoSize = -1 'True
Caption = "日期(&D)"
Height = 180
Index = 0
Left = 120
TabIndex = 0
Top = 90
Width = 630
End
End
Attribute VB_Name = "frmMakeOrder"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private strColName() As String
Private strCurrDec As String
Private strPriceDec As String
Private strSelectItem As String
Private blnSucceed As Boolean
Private WithEvents mclsGrid As Grid
Attribute mclsGrid.VB_VarHelpID = -1
Private xlngColNo() As Long
Private blnCancelOK As Boolean
Private Type RowData
lngItemID As Long
lngCustomerID As Long
lngUnitID As Long
dblFactor As Double
dblPurchasePrice1 As Double
lngTaxID As Long
dblTaxRate As Double
lngCustomID0 As Long
lngCustomID1 As Long
lngCustomID2 As Long
lngCustomID3 As Long
lngCustomID4 As Long
lngCustomID5 As Long
End Type
Dim RowDatas() As RowData
Dim mintYear As Integer
Dim mbytPeriod As Byte
Dim mlngTemplateID As Long
Dim mstrReceiptNO As String
Dim mlngFirstID As Long
Dim mblnFirstIN As Boolean
Public Function ShowMe() As Long
On Error Resume Next
blnSucceed = False
mlngFirstID = 0
Me.Show vbModal
ShowMe = mlngFirstID
End Function
Private Sub CboInput_Click()
Dim strTmp As String
strTmp = CboInput.Text
Select Case strTmp
Case "年", "季"
SpinInput.Max = 999
SpinInput.MaxLength = 3
If C2Dbl(SpinInput.Text) > 999 Then
SpinInput.Text = "999"
End If
Case "天"
SpinInput.Max = 99999
SpinInput.MaxLength = 5
If C2Dbl(SpinInput.Text) > 99999 Then
SpinInput.Text = "99999"
End If
Case Else
SpinInput.Max = 9999
SpinInput.MaxLength = 4
If C2Dbl(SpinInput.Text) > 9999 Then
SpinInput.Text = "9999"
End If
End Select
lblTitle(2).Caption = "销售数据参考最近(&R) " & strTmp
Label1(0).Caption = "建议每" & strTmp & "采购量 = 最小库存量 + " & strTmp & "平均销售量"
Label1(1).Caption = "建议本次采购量 = 建议每" & strTmp & "采购量 - 当前现有库存量 - 预计本" & strTmp & "到货量"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -