📄
字号:
TabBehavior = 0
OwnerDraw = 0
Editable = 0
ShowComboButton = 1
WordWrap = 0 'False
TextStyle = 0
TextStyleFixed = 0
OleDragMode = 0
OleDropMode = 0
DataMode = 0
VirtualData = -1 'True
DataMember = ""
ComboSearch = 3
AutoSizeMouse = -1 'True
FrozenRows = 0
FrozenCols = 0
AllowUserFreezing= 0
BackColorFrozen = 0
ForeColorFrozen = 0
WallPaperAlignment= 9
AccessibleName = ""
AccessibleDescription= ""
AccessibleValue = ""
AccessibleRole = 24
End
End
Begin MSComctlLib.ImageList ImageList1
Left = 5430
Top = 630
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 14
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":1805
Key = "sz"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":1B9F
Key = "dy"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":1F39
Key = "yl"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":22D3
Key = "xz"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":266D
Key = "xg"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":2A07
Key = "sc"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":2DA1
Key = "sx"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":313B
Key = "bz"
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":34D5
Key = "tc"
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":386F
Key = "bcgs"
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":3C09
Key = "mrlk"
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":3FA3
Key = "xsxm"
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":433D
Key = "cx"
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "公用_仓库档案设置.frx":46D7
Key = "qx"
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar SzToolbar
Align = 1 'Align Top
Height = 555
Left = 0
TabIndex = 29
Top = 0
Width = 9375
_ExtentX = 16536
_ExtentY = 979
ButtonWidth = 820
ButtonHeight = 926
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 14
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "设置"
Key = "ymsz"
ImageKey = "sz"
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "打印"
Key = "dy"
ImageKey = "dy"
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "预览"
Key = "yl"
ImageKey = "yl"
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "增加"
Key = "zj"
ImageKey = "xz"
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "修改"
Key = "xg"
ImageKey = "xg"
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "删除"
Key = "sc"
ImageKey = "sc"
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "权限"
Key = "Limit"
ImageKey = "qx"
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "权限"
Key = "PersonLimit"
ImageIndex = 1
EndProperty
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "刷新"
Key = "sx"
ImageKey = "sx"
EndProperty
BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "帮助"
Key = "bz"
ImageKey = "bz"
EndProperty
BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "fh"
ImageKey = "tc"
EndProperty
EndProperty
BorderStyle = 1
Begin MSComctlLib.Toolbar GsToolbar
Height = 525
Left = 6750
TabIndex = 30
Top = 0
Width = 2595
_ExtentX = 4577
_ExtentY = 926
ButtonWidth = 1455
ButtonHeight = 926
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 3
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "保存格式"
Key = "bcgs"
ImageKey = "bcgs"
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "默认列宽"
Key = "hfmrgs"
ImageKey = "mrlk"
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "显示项目"
Key = "szxsxm"
ImageKey = "xsxm"
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "Gy_Warehouse"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************
'* 模 块 名 称 :仓库档案设置
'* 功 能 描 述 :设置往来仓库档案
'* 程序员姓名 :徐强
'* 最后修改人 :徐强
'* 最后修改时间:2001/11/27
'* 备 注:
'*******************************************************
Dim Rec_CodeSet As New ADODB.Recordset '编码设置表
Dim jdzygs As Integer '控件焦点转移个数
Dim Lrzt As Integer '录入状态标志(0-非录入状态 1-增加 2-修改)
Dim ReportTitle As String '报表主标题
Dim Str_RightEdit As String '编辑(新增、修改、删除)权限索引
'以下为固定使用变量(网格)
Dim Cxnrrec As New ADODB.Recordset '显示查询内容动态集
Dim Dyymctbl As New DY_Dyymsz '打印页面窗体变量
Dim GridCode As String '显示网格网格代码
Dim GridInf() As Variant '整个网格设置信息
Dim Tsxx As String '系统提示信息
Dim Qslz As Long '网格隐藏(非操作显示)列数
Dim Sjhgd As Double '网格数据行高度
Dim GridBoolean() As Boolean '网格列信息(布尔型)
Dim GridStr() As String '网格列信息(字符型)
Dim GridInt() As Integer '网格列信息(整型)
Dim Szzls As Integer '数组总列数(网格列数-1)
'以下为固定使用变量(文本框)
Dim Textvar() As Variant '存储变体型文本框信息
Dim Textboolean() As Boolean '存储布尔型文本框信息
Dim Textint() As Integer '存储整型文本框信息
Dim Textstr() As String '存储字符型文本框信息
Dim Max_Text_Index As Integer '最大录入文本框索引值
Dim TextGroupCode As String '文本框录入分组编码
Dim TextValiLock As Boolean '文本框失去焦点是否进行有效性控制判断
Dim TextValiJudgeLock() As Boolean '文本框录入有效性判断控制锁
Dim CurTextIndex As Integer '当前文本框索引值
Dim TextChangeLock As Boolean '文本框内容变换控制锁
Dim Bln_Cancel As Boolean '取消按钮信息传递
Public RZ As Long
Public LZ As Long
Private Sub Form_KeyPress(KeyAscii As Integer) '控 制 焦 点 转 移
jdzygs = 15
Select Case KeyAscii
Case vbKeyReturn
If Kjjdzy(jdzygs) Then
KeyAscii = 0
End If
Case 39 '屏蔽"'"
KeyAscii = 0
End Select
End Sub
Private Sub Form_Load()
'打印报表标题信息
ReportTitle = "仓 库 档 案 设 置"
'调入打印页面设置窗体
XtReportCode = "Gy_Warehouse"
Load Dyymctbl
'以下为文本框处理程序(读入文本框录入信息)
TextGroupCode = "Gy_Warehouse"
Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())
Call Wbkcsh
'调入网格设置信息
GridCode = "Gy_Warehouse"
Call BzWgcsh(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
Qslz = GridInf(1)
Sjhgd = GridInf(2)
Szzls = CzxsGrid.Cols - 1
'填 充 网 格
Call Cxnrtcwg
'初始化toolbar,tab卡状态
StTab.Tab = 0
StTab.TabEnabled(1) = False
Frame1.Enabled = False
'设置为非录入状态
Lrzt = 0
'编辑(新增、修改、删除)权限索引
Str_RightEdit = "KF_Warehouse_Edit"
End Sub
Private Sub Cxnrtcwg() '查询内容填充网格
Dim Sqlstr As String '查询连接串
Dim jsqte As Long '查询临时使用变量
'为加快显示速度,将网格刷新动作冻结
CzxsGrid.Redraw = False
'[>>查询连接串
Sqlstr = "SELECT * FROM Gy_V_Warehouse order by WhCode"
'<<]
Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
With Cxnrrec
CzxsGrid.Rows = CzxsGrid.FixedRows
If .EOF And .BOF Then
CzxsGrid.Redraw = True
Exit Sub
End If
jsqte = CzxsGrid.FixedRows
Do While Not .EOF
CzxsGrid.AddItem ""
Call Jltcwg(Cxnrrec, jsqte) '调入填充网格子过程
CzxsGrid.RowHeight(jsqte) = Sjhgd '设置网格高度
.MoveNext
jsqte = jsqte + 1
Loop
End With
'将网格刷新动作解冻
CzxsGrid.Redraw = True
End Sub
Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long) '记录内容填充网格
'[>>以下为自定义部分
With Jlbrec
CzxsGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("WhCode") & "") '仓库编码
CzxsGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("WhName") & "") '仓库名称
CzxsGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("Whprofix") & "") '仓库前缀
CzxsGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("Deptname") & "") '所属部门
CzxsGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("WhAddress") & "") '仓库地址
CzxsGrid.TextMatrix(Rowjsq, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("pricemode") & "") '记价方式
CzxsGrid.TextMatrix(Rowjsq, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("warehouseattribute") & "") '属性
CzxsGrid.TextMatrix(Rowjsq, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("telephone") & "") '电话
CzxsGrid.TextMatrix(Rowjsq, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("manageman") & "") '负责人
CzxsGrid.TextMatrix(Rowjsq, Sydz("010", GridStr(), Szzls)) = IIf(.Fields("moneyration") = 0, "", .Fields("moneyration") & "") '资金定额
CzxsGrid.TextMatrix(Rowjsq, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("ishqgl") & "") '是否货区管理
End With
'以上为自定义部分<<]
End Sub
Private Sub Form_Unload(Cancel As Integer) '窗体卸载
Set Cxnrrec = Nothing
Set Rec_CodeSet = Nothing
Unload Dyymctbl
End Sub
Private Function Bclrsj() As Boolean '判断录入数据有效性,并保存数据
Dim jsqte As Integer
'对文本框录入内容进行为零和为空判断(固定不变)
With Rec_CodeSet
For jsqte = 0 To Max_Text_Index
If Textint(jsqte, 8) = 1 Then '字段不能为空
If Len(Trim(LrText(jsqte).Text)) = 0 Then
If LrText(jsqte).Enabled Then
Tsxx = Textstr(jsqte, 7) & "不能为空!"
Call Xtxxts(Tsxx, 0, 1)
LrText(jsqte).SetFocus
Bclrsj = False
Exit Function
End If
End If
Else
If Textint(jsqte, 8) = 2 Then '字段不能为零
If Val(Trim(LrText(jsqte).Text)) = 0 Then
Tsxx = Textstr(jsqte, 7) & "不能为零!"
Call Xtxxts(Tsxx, 0, 1)
LrText(jsqte).SetFocus
Bclrsj = False
Exit Function
End If
End If
End If
Next jsqte
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -