上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:57k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  4. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
  5. Begin VB.Form Gy_Warehouse 
  6.    BorderStyle     =   3  'Fixed Dialog
  7.    Caption         =   "仓库档案设置"
  8.    ClientHeight    =   7110
  9.    ClientLeft      =   45
  10.    ClientTop       =   330
  11.    ClientWidth     =   9375
  12.    HelpContextID   =   1211003
  13.    Icon            =   "公用_仓库档案设置.frx":0000
  14.    KeyPreview      =   -1  'True
  15.    LinkTopic       =   "Form2"
  16.    MaxButton       =   0   'False
  17.    MinButton       =   0   'False
  18.    ScaleHeight     =   7110
  19.    ScaleWidth      =   9375
  20.    ShowInTaskbar   =   0   'False
  21.    StartUpPosition =   2  '屏幕中心
  22.    Begin TabDlg.SSTab StTab 
  23.       Height          =   6435
  24.       Left            =   30
  25.       TabIndex        =   18
  26.       Top             =   660
  27.       Width           =   9330
  28.       _ExtentX        =   16457
  29.       _ExtentY        =   11351
  30.       _Version        =   393216
  31.       Style           =   1
  32.       Tabs            =   2
  33.       TabHeight       =   520
  34.       TabCaption(0)   =   "列表视图"
  35.       TabPicture(0)   =   "公用_仓库档案设置.frx":1042
  36.       Tab(0).ControlEnabled=   -1  'True
  37.       Tab(0).Control(0)=   "CzxsGrid"
  38.       Tab(0).Control(0).Enabled=   0   'False
  39.       Tab(0).ControlCount=   1
  40.       TabCaption(1)   =   "单张视图"
  41.       TabPicture(1)   =   "公用_仓库档案设置.frx":105E
  42.       Tab(1).ControlEnabled=   0   'False
  43.       Tab(1).Control(0)=   "Frame1"
  44.       Tab(1).ControlCount=   1
  45.       Begin VB.Frame Frame1 
  46.          Height          =   6016
  47.          Left            =   -74909
  48.          TabIndex        =   19
  49.          Top             =   316
  50.          Width           =   9135
  51.          Begin VB.TextBox LrText 
  52.             Height          =   301
  53.             Index           =   6
  54.             Left            =   1290
  55.             TabIndex        =   6
  56.             Text            =   "5"
  57.             Top             =   1559
  58.             Width           =   1739
  59.          End
  60.          Begin VB.TextBox LrText 
  61.             Height          =   301
  62.             Index           =   2
  63.             Left            =   1290
  64.             TabIndex        =   2
  65.             Text            =   "2"
  66.             Top             =   781
  67.             Width           =   1739
  68.          End
  69.          Begin VB.TextBox LrText 
  70.             Height          =   301
  71.             Index           =   8
  72.             Left            =   1290
  73.             TabIndex        =   13
  74.             Text            =   "7"
  75.             Top             =   2926
  76.             Width           =   5131
  77.          End
  78.          Begin VB.TextBox LrText 
  79.             Height          =   301
  80.             Index           =   4
  81.             Left            =   1290
  82.             TabIndex        =   4
  83.             Text            =   "3"
  84.             Top             =   1170
  85.             Width           =   1739
  86.          End
  87.          Begin VB.TextBox LrText 
  88.             Height          =   301
  89.             Index           =   0
  90.             Left            =   1290
  91.             TabIndex        =   0
  92.             Text            =   "0"
  93.             Top             =   389
  94.             Width           =   1739
  95.          End
  96.          Begin VB.CheckBox LrCheck 
  97.             Caption         =   "储备预警"
  98.             Height          =   225
  99.             Index           =   2
  100.             Left            =   1290
  101.             TabIndex        =   12
  102.             Top             =   2625
  103.             Width           =   1935
  104.          End
  105.          Begin VB.ComboBox Lrcomb 
  106.             Height          =   300
  107.             Index           =   0
  108.             ItemData        =   "公用_仓库档案设置.frx":107A
  109.             Left            =   1290
  110.             List            =   "公用_仓库档案设置.frx":1084
  111.             Style           =   2  'Dropdown List
  112.             TabIndex        =   8
  113.             Top             =   1950
  114.             Width           =   1739
  115.          End
  116.          Begin VB.CheckBox LrCheck 
  117.             Caption         =   "存货核算系统使用"
  118.             Height          =   225
  119.             Index           =   0
  120.             Left            =   1290
  121.             TabIndex        =   10
  122.             Top             =   2340
  123.             Width           =   1935
  124.          End
  125.          Begin VB.TextBox LrText 
  126.             Height          =   301
  127.             Index           =   7
  128.             Left            =   4665
  129.             TabIndex        =   7
  130.             Text            =   "6"
  131.             Top             =   1559
  132.             Width           =   1739
  133.          End
  134.          Begin VB.CommandButton BcCommand 
  135.             Caption         =   "保存(&S)"
  136.             Height          =   301
  137.             Left            =   4110
  138.             TabIndex        =   14
  139.             Top             =   3510
  140.             Width           =   1119
  141.          End
  142.          Begin VB.CommandButton QxCommand 
  143.             Cancel          =   -1  'True
  144.             Caption         =   "取消(&C)"
  145.             Height          =   301
  146.             Left            =   5300
  147.             TabIndex        =   15
  148.             Top             =   3510
  149.             Width           =   1119
  150.          End
  151.          Begin VB.CheckBox LrCheck 
  152.             Caption         =   "货区管理"
  153.             Height          =   285
  154.             Index           =   1
  155.             Left            =   4665
  156.             TabIndex        =   11
  157.             Top             =   2340
  158.             Width           =   1454
  159.          End
  160.          Begin VB.TextBox LrText 
  161.             Height          =   301
  162.             Index           =   1
  163.             Left            =   4665
  164.             TabIndex        =   1
  165.             Text            =   "1"
  166.             Top             =   389
  167.             Width           =   1739
  168.          End
  169.          Begin VB.TextBox LrText 
  170.             Height          =   301
  171.             Index           =   3
  172.             Left            =   4665
  173.             TabIndex        =   3
  174.             Text            =   "2"
  175.             Top             =   781
  176.             Width           =   1739
  177.          End
  178.          Begin VB.TextBox LrText 
  179.             Height          =   301
  180.             Index           =   5
  181.             Left            =   4665
  182.             TabIndex        =   5
  183.             Text            =   "4"
  184.             Top             =   1170
  185.             Width           =   1739
  186.          End
  187.          Begin VB.ComboBox Lrcomb 
  188.             Height          =   300
  189.             Index           =   1
  190.             ItemData        =   "公用_仓库档案设置.frx":10A0
  191.             Left            =   4665
  192.             List            =   "公用_仓库档案设置.frx":10B3
  193.             Style           =   2  'Dropdown List
  194.             TabIndex        =   9
  195.             Top             =   1950
  196.             Width           =   1739
  197.          End
  198.          Begin VB.CommandButton Ydcommand1 
  199.             Height          =   301
  200.             Index           =   0
  201.             Left            =   3465
  202.             Picture         =   "公用_仓库档案设置.frx":10F1
  203.             Style           =   1  'Graphical
  204.             TabIndex        =   20
  205.             Top             =   106
  206.             Visible         =   0   'False
  207.             Width           =   300
  208.          End
  209.          Begin VB.CommandButton Ydcommand1 
  210.             Height          =   301
  211.             Index           =   3
  212.             Left            =   6376
  213.             Picture         =   "公用_仓库档案设置.frx":147B
  214.             Style           =   1  'Graphical
  215.             TabIndex        =   16
  216.             Top             =   781
  217.             Width           =   300
  218.          End
  219.          Begin VB.Label lblMsg 
  220.             Caption         =   "说明:此仓库已被使用,只能修改部分属性!"
  221.             ForeColor       =   &H00FF0000&
  222.             Height          =   374
  223.             Left            =   451
  224.             TabIndex        =   34
  225.             Top             =   4141
  226.             Visible         =   0   'False
  227.             Width           =   3886
  228.          End
  229.          Begin VB.Label TsLabel 
  230.             Caption         =   "资金定额:"
  231.             Height          =   180
  232.             Index           =   9
  233.             Left            =   3825
  234.             TabIndex        =   33
  235.             Top             =   1605
  236.             Width           =   809
  237.          End
  238.          Begin VB.Label TsLabel 
  239.             AutoSize        =   -1  'True
  240.             Caption         =   "电话:"
  241.             Height          =   180
  242.             Index           =   5
  243.             Left            =   451
  244.             TabIndex        =   32
  245.             Top             =   1605
  246.             Width           =   451
  247.          End
  248.          Begin VB.Label TsLabel 
  249.             AutoSize        =   -1  'True
  250.             Caption         =   "仓库前缀:"
  251.             Height          =   180
  252.             Index           =   10
  253.             Left            =   451
  254.             TabIndex        =   31
  255.             Top             =   826
  256.             Width           =   809
  257.          End
  258.          Begin VB.Label TsLabel 
  259.             AutoSize        =   -1  'True
  260.             Caption         =   "属性:"
  261.             Height          =   180
  262.             Index           =   2
  263.             Left            =   451
  264.             TabIndex        =   28
  265.             Top             =   2039
  266.             Width           =   451
  267.          End
  268.          Begin VB.Label TsLabel 
  269.             AutoSize        =   -1  'True
  270.             Caption         =   "仓库编码:"
  271.             Height          =   180
  272.             Index           =   0
  273.             Left            =   451
  274.             TabIndex        =   27
  275.             Top             =   435
  276.             Width           =   809
  277.          End
  278.          Begin VB.Label TsLabel 
  279.             Caption         =   "仓库名称:"
  280.             Height          =   180
  281.             Index           =   1
  282.             Left            =   3825
  283.             TabIndex        =   26
  284.             Top             =   435
  285.             Width           =   809
  286.          End
  287.          Begin VB.Label TsLabel 
  288.             Caption         =   "所属部门:"
  289.             Height          =   180
  290.             Index           =   3
  291.             Left            =   3825
  292.             TabIndex        =   25
  293.             Top             =   826
  294.             Width           =   809
  295.          End
  296.          Begin VB.Label TsLabel 
  297.             AutoSize        =   -1  'True
  298.             Caption         =   "仓库地址:"
  299.             Height          =   180
  300.             Index           =   4
  301.             Left            =   451
  302.             TabIndex        =   24
  303.             Top             =   1215
  304.             Width           =   809
  305.          End
  306.          Begin VB.Label TsLabel 
  307.             Caption         =   "负责人:"
  308.             Height          =   180
  309.             Index           =   6
  310.             Left            =   3825
  311.             TabIndex        =   23
  312.             Top             =   1215
  313.             Width           =   630
  314.          End
  315.          Begin VB.Label TsLabel 
  316.             Caption         =   "计价方式:"
  317.             Height          =   180
  318.             Index           =   7
  319.             Left            =   3825
  320.             TabIndex        =   22
  321.             Top             =   2039
  322.             Width           =   809
  323.          End
  324.          Begin VB.Label TsLabel 
  325.             AutoSize        =   -1  'True
  326.             Caption         =   "备注:"
  327.             Height          =   180
  328.             Index           =   8
  329.             Left            =   451
  330.             TabIndex        =   21
  331.             Top             =   2969
  332.             Width           =   451
  333.          End
  334.       End
  335.       Begin VSFlex8Ctl.VSFlexGrid CzxsGrid 
  336.          Height          =   5955
  337.          Left            =   91
  338.          TabIndex        =   17
  339.          Top             =   389
  340.          Width           =   9135
  341.          _cx             =   5080
  342.          _cy             =   5080
  343.          Appearance      =   1
  344.          BorderStyle     =   1
  345.          Enabled         =   -1  'True
  346.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  347.             Name            =   "宋体"
  348.             Size            =   9
  349.             Charset         =   134
  350.             Weight          =   400
  351.             Underline       =   0   'False
  352.             Italic          =   0   'False
  353.             Strikethrough   =   0   'False
  354.          EndProperty
  355.          MousePointer    =   0
  356.          BackColor       =   -2147483643
  357.          ForeColor       =   -2147483640
  358.          BackColorFixed  =   -2147483633
  359.          ForeColorFixed  =   -2147483630
  360.          BackColorSel    =   -2147483635
  361.          ForeColorSel    =   -2147483634
  362.          BackColorBkg    =   8421504
  363.          BackColorAlternate=   -2147483643
  364.          GridColor       =   -2147483633
  365.          GridColorFixed  =   -2147483632
  366.          TreeColor       =   -2147483632
  367.          FloodColor      =   192
  368.          SheetBorder     =   -2147483642
  369.          FocusRect       =   1
  370.          HighLight       =   1
  371.          AllowSelection  =   -1  'True
  372.          AllowBigSelection=   -1  'True
  373.          AllowUserResizing=   0
  374.          SelectionMode   =   0
  375.          GridLines       =   1
  376.          GridLinesFixed  =   2
  377.          GridLineWidth   =   1
  378.          Rows            =   5000
  379.          Cols            =   10
  380.          FixedRows       =   1
  381.          FixedCols       =   0
  382.          RowHeightMin    =   0
  383.          RowHeightMax    =   0
  384.          ColWidthMin     =   0
  385.          ColWidthMax     =   0
  386.          ExtendLastCol   =   0   'False
  387.          FormatString    =   ""
  388.          ScrollTrack     =   0   'False
  389.          ScrollBars      =   3
  390.          ScrollTips      =   0   'False
  391.          MergeCells      =   0
  392.          MergeCompare    =   0
  393.          AutoResize      =   -1  'True
  394.          AutoSizeMode    =   0
  395.          AutoSearch      =   0
  396.          AutoSearchDelay =   2
  397.          MultiTotals     =   -1  'True
  398.          SubtotalPosition=   1
  399.          OutlineBar      =   0
  400.          OutlineCol      =   0
  401.          Ellipsis        =   0
  402.          ExplorerBar     =   0
  403.          PicturesOver    =   0   'False
  404.          FillStyle       =   0
  405.          RightToLeft     =   0   'False
  406.          PictureType     =   0
  407.          TabBehavior     =   0
  408.          OwnerDraw       =   0
  409.          Editable        =   0
  410.          ShowComboButton =   1
  411.          WordWrap        =   0   'False
  412.          TextStyle       =   0
  413.          TextStyleFixed  =   0
  414.          OleDragMode     =   0
  415.          OleDropMode     =   0
  416.          DataMode        =   0
  417.          VirtualData     =   -1  'True
  418.          DataMember      =   ""
  419.          ComboSearch     =   3
  420.          AutoSizeMouse   =   -1  'True
  421.          FrozenRows      =   0
  422.          FrozenCols      =   0
  423.          AllowUserFreezing=   0
  424.          BackColorFrozen =   0
  425.          ForeColorFrozen =   0
  426.          WallPaperAlignment=   9
  427.          AccessibleName  =   ""
  428.          AccessibleDescription=   ""
  429.          AccessibleValue =   ""
  430.          AccessibleRole  =   24
  431.       End
  432.    End
  433.    Begin MSComctlLib.ImageList ImageList1 
  434.       Left            =   5430
  435.       Top             =   630
  436.       _ExtentX        =   1005
  437.       _ExtentY        =   1005
  438.       BackColor       =   -2147483643
  439.       ImageWidth      =   16
  440.       ImageHeight     =   16
  441.       MaskColor       =   12632256
  442.       _Version        =   393216
  443.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  444.          NumListImages   =   14
  445.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  446.             Picture         =   "公用_仓库档案设置.frx":1805
  447.             Key             =   "sz"
  448.          EndProperty
  449.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  450.             Picture         =   "公用_仓库档案设置.frx":1B9F
  451.             Key             =   "dy"
  452.          EndProperty
  453.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  454.             Picture         =   "公用_仓库档案设置.frx":1F39
  455.             Key             =   "yl"
  456.          EndProperty
  457.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  458.             Picture         =   "公用_仓库档案设置.frx":22D3
  459.             Key             =   "xz"
  460.          EndProperty
  461.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  462.             Picture         =   "公用_仓库档案设置.frx":266D
  463.             Key             =   "xg"
  464.          EndProperty
  465.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  466.             Picture         =   "公用_仓库档案设置.frx":2A07
  467.             Key             =   "sc"
  468.          EndProperty
  469.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  470.             Picture         =   "公用_仓库档案设置.frx":2DA1
  471.             Key             =   "sx"
  472.          EndProperty
  473.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  474.             Picture         =   "公用_仓库档案设置.frx":313B
  475.             Key             =   "bz"
  476.          EndProperty
  477.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  478.             Picture         =   "公用_仓库档案设置.frx":34D5
  479.             Key             =   "tc"
  480.          EndProperty
  481.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  482.             Picture         =   "公用_仓库档案设置.frx":386F
  483.             Key             =   "bcgs"
  484.          EndProperty
  485.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  486.             Picture         =   "公用_仓库档案设置.frx":3C09
  487.             Key             =   "mrlk"
  488.          EndProperty
  489.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  490.             Picture         =   "公用_仓库档案设置.frx":3FA3
  491.             Key             =   "xsxm"
  492.          EndProperty
  493.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  494.             Picture         =   "公用_仓库档案设置.frx":433D
  495.             Key             =   "cx"
  496.          EndProperty
  497.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  498.             Picture         =   "公用_仓库档案设置.frx":46D7
  499.             Key             =   "qx"
  500.          EndProperty
  501.       EndProperty
  502.    End
  503.    Begin MSComctlLib.Toolbar SzToolbar 
  504.       Align           =   1  'Align Top
  505.       Height          =   555
  506.       Left            =   0
  507.       TabIndex        =   29
  508.       Top             =   0
  509.       Width           =   9375
  510.       _ExtentX        =   16536
  511.       _ExtentY        =   979
  512.       ButtonWidth     =   820
  513.       ButtonHeight    =   926
  514.       Appearance      =   1
  515.       Style           =   1
  516.       ImageList       =   "ImageList1"
  517.       _Version        =   393216
  518.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  519.          NumButtons      =   14
  520.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  521.             Caption         =   "设置"
  522.             Key             =   "ymsz"
  523.             ImageKey        =   "sz"
  524.          EndProperty
  525.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  526.             Caption         =   "打印"
  527.             Key             =   "dy"
  528.             ImageKey        =   "dy"
  529.          EndProperty
  530.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  531.             Caption         =   "预览"
  532.             Key             =   "yl"
  533.             ImageKey        =   "yl"
  534.          EndProperty
  535.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  536.             Style           =   3
  537.          EndProperty
  538.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  539.             Caption         =   "增加"
  540.             Key             =   "zj"
  541.             ImageKey        =   "xz"
  542.          EndProperty
  543.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  544.             Caption         =   "修改"
  545.             Key             =   "xg"
  546.             ImageKey        =   "xg"
  547.          EndProperty
  548.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  549.             Caption         =   "删除"
  550.             Key             =   "sc"
  551.             ImageKey        =   "sc"
  552.          EndProperty
  553.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  554.             Style           =   3
  555.          EndProperty
  556.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  557.             Caption         =   "权限"
  558.             Key             =   "Limit"
  559.             ImageKey        =   "qx"
  560.          EndProperty
  561.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  562.             Caption         =   "权限"
  563.             Key             =   "PersonLimit"
  564.             ImageIndex      =   1
  565.          EndProperty
  566.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  567.             Caption         =   "刷新"
  568.             Key             =   "sx"
  569.             ImageKey        =   "sx"
  570.          EndProperty
  571.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  572.             Style           =   3
  573.          EndProperty
  574.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  575.             Caption         =   "帮助"
  576.             Key             =   "bz"
  577.             ImageKey        =   "bz"
  578.          EndProperty
  579.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  580.             Caption         =   "退出"
  581.             Key             =   "fh"
  582.             ImageKey        =   "tc"
  583.          EndProperty
  584.       EndProperty
  585.       BorderStyle     =   1
  586.       Begin MSComctlLib.Toolbar GsToolbar 
  587.          Height          =   525
  588.          Left            =   6750
  589.          TabIndex        =   30
  590.          Top             =   0
  591.          Width           =   2595
  592.          _ExtentX        =   4577
  593.          _ExtentY        =   926
  594.          ButtonWidth     =   1455
  595.          ButtonHeight    =   926
  596.          Appearance      =   1
  597.          Style           =   1
  598.          ImageList       =   "ImageList1"
  599.          _Version        =   393216
  600.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  601.             NumButtons      =   3
  602.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  603.                Caption         =   "保存格式"
  604.                Key             =   "bcgs"
  605.                ImageKey        =   "bcgs"
  606.             EndProperty
  607.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  608.                Caption         =   "默认列宽"
  609.                Key             =   "hfmrgs"
  610.                ImageKey        =   "mrlk"
  611.             EndProperty
  612.             BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  613.                Caption         =   "显示项目"
  614.                Key             =   "szxsxm"
  615.                ImageKey        =   "xsxm"
  616.             EndProperty
  617.          EndProperty
  618.       End
  619.    End
  620. End
  621. Attribute VB_Name = "Gy_Warehouse"
  622. Attribute VB_GlobalNameSpace = False
  623. Attribute VB_Creatable = False
  624. Attribute VB_PredeclaredId = True
  625. Attribute VB_Exposed = False
  626. '*******************************************************
  627. '*    模 块 名 称 :仓库档案设置
  628. '*    功 能 描 述 :设置往来仓库档案
  629. '*    程序员姓名  :徐强
  630. '*    最后修改人  :徐强
  631. '*    最后修改时间:2001/11/27
  632. '*    备        注:
  633. '*******************************************************
  634. Dim Rec_CodeSet As New ADODB.Recordset   '编码设置表
  635. Dim jdzygs As Integer                    '控件焦点转移个数
  636. Dim Lrzt As Integer                      '录入状态标志(0-非录入状态 1-增加 2-修改)
  637. Dim ReportTitle As String                '报表主标题
  638. Dim Str_RightEdit As String              '编辑(新增、修改、删除)权限索引
  639. '以下为固定使用变量(网格)
  640. Dim Cxnrrec As New ADODB.Recordset       '显示查询内容动态集
  641. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  642. Dim GridCode As String                   '显示网格网格代码
  643. Dim GridInf() As Variant                 '整个网格设置信息
  644. Dim Tsxx As String                       '系统提示信息
  645. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  646. Dim Sjhgd As Double                      '网格数据行高度
  647. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  648. Dim GridStr()  As String                 '网格列信息(字符型)
  649. Dim GridInt() As Integer                 '网格列信息(整型)
  650. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  651. '以下为固定使用变量(文本框)
  652. Dim Textvar() As Variant                 '存储变体型文本框信息
  653. Dim Textboolean() As Boolean             '存储布尔型文本框信息
  654. Dim Textint() As Integer                 '存储整型文本框信息
  655. Dim Textstr() As String                  '存储字符型文本框信息
  656. Dim Max_Text_Index As Integer            '最大录入文本框索引值
  657. Dim TextGroupCode As String              '文本框录入分组编码
  658. Dim TextValiLock As Boolean              '文本框失去焦点是否进行有效性控制判断
  659. Dim TextValiJudgeLock() As Boolean       '文本框录入有效性判断控制锁
  660. Dim CurTextIndex As Integer              '当前文本框索引值
  661. Dim TextChangeLock As Boolean            '文本框内容变换控制锁
  662. Dim Bln_Cancel As Boolean                '取消按钮信息传递
  663. Public RZ As Long
  664. Public LZ As Long
  665. Private Sub Form_KeyPress(KeyAscii As Integer)   '控 制 焦 点 转 移
  666.     jdzygs = 15
  667.     
  668.     Select Case KeyAscii
  669.         Case vbKeyReturn
  670.             If Kjjdzy(jdzygs) Then
  671.                 KeyAscii = 0
  672.             End If
  673.         Case 39           '屏蔽"'"
  674.             KeyAscii = 0
  675.    End Select
  676.    
  677. End Sub
  678. Private Sub Form_Load()
  679.   
  680.     '打印报表标题信息
  681.     ReportTitle = "仓 库 档 案 设 置"
  682.      
  683.     '调入打印页面设置窗体
  684.     XtReportCode = "Gy_Warehouse"
  685.     Load Dyymctbl
  686.     
  687.     '以下为文本框处理程序(读入文本框录入信息)
  688.     TextGroupCode = "Gy_Warehouse"
  689.     Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())
  690.     Call Wbkcsh
  691.     
  692.     '调入网格设置信息
  693.     GridCode = "Gy_Warehouse"
  694.     Call BzWgcsh(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  695.     Qslz = GridInf(1)
  696.     Sjhgd = GridInf(2)
  697.     Szzls = CzxsGrid.Cols - 1
  698.     
  699.     '填 充 网 格
  700.     Call Cxnrtcwg
  701.        
  702.     '初始化toolbar,tab卡状态
  703.     StTab.Tab = 0
  704.     StTab.TabEnabled(1) = False
  705.     Frame1.Enabled = False
  706.      
  707.     '设置为非录入状态
  708.     Lrzt = 0
  709.     
  710.     '编辑(新增、修改、删除)权限索引
  711.     Str_RightEdit = "KF_Warehouse_Edit"
  712. End Sub
  713.  
  714. Private Sub Cxnrtcwg()                               '查询内容填充网格
  715.     Dim Sqlstr As String              '查询连接串
  716.     Dim jsqte As Long                '查询临时使用变量
  717.   
  718.     '为加快显示速度,将网格刷新动作冻结
  719.     CzxsGrid.Redraw = False
  720.   
  721.     '[>>查询连接串
  722.     Sqlstr = "SELECT * FROM Gy_V_Warehouse order by WhCode"
  723.     '<<]
  724.     Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  725.     
  726.     With Cxnrrec
  727.         CzxsGrid.Rows = CzxsGrid.FixedRows
  728.         If .EOF And .BOF Then
  729.             CzxsGrid.Redraw = True
  730.             Exit Sub
  731.         End If
  732.         
  733.         jsqte = CzxsGrid.FixedRows
  734.         
  735.         Do While Not .EOF
  736.             CzxsGrid.AddItem ""
  737.             Call Jltcwg(Cxnrrec, jsqte)                              '调入填充网格子过程
  738.             CzxsGrid.RowHeight(jsqte) = Sjhgd                        '设置网格高度
  739.             .MoveNext
  740.             jsqte = jsqte + 1
  741.         Loop
  742.     End With
  743.   
  744.     '将网格刷新动作解冻
  745.     CzxsGrid.Redraw = True
  746.     
  747. End Sub
  748. Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long)           '记录内容填充网格
  749.     '[>>以下为自定义部分
  750.     With Jlbrec
  751.         CzxsGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("WhCode") & "")              '仓库编码
  752.         CzxsGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("WhName") & "")              '仓库名称
  753.         CzxsGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("Whprofix") & "")            '仓库前缀
  754.         CzxsGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("Deptname") & "")            '所属部门
  755.         CzxsGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("WhAddress") & "")           '仓库地址
  756.         CzxsGrid.TextMatrix(Rowjsq, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("pricemode") & "")           '记价方式
  757.         CzxsGrid.TextMatrix(Rowjsq, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("warehouseattribute") & "")  '属性
  758.         CzxsGrid.TextMatrix(Rowjsq, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("telephone") & "")           '电话
  759.         CzxsGrid.TextMatrix(Rowjsq, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("manageman") & "")           '负责人
  760.         CzxsGrid.TextMatrix(Rowjsq, Sydz("010", GridStr(), Szzls)) = IIf(.Fields("moneyration") = 0, "", .Fields("moneyration") & "")     '资金定额
  761.         CzxsGrid.TextMatrix(Rowjsq, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("ishqgl") & "")              '是否货区管理
  762.     End With
  763.     '以上为自定义部分<<]
  764.     
  765. End Sub
  766. Private Sub Form_Unload(Cancel As Integer)             '窗体卸载
  767.     Set Cxnrrec = Nothing
  768.     Set Rec_CodeSet = Nothing
  769.     Unload Dyymctbl
  770.    
  771. End Sub
  772. Private Function Bclrsj() As Boolean                   '判断录入数据有效性,并保存数据
  773.     Dim jsqte As Integer
  774.   
  775.     '对文本框录入内容进行为零和为空判断(固定不变)
  776.     With Rec_CodeSet
  777.     
  778.         For jsqte = 0 To Max_Text_Index
  779.             If Textint(jsqte, 8) = 1 Then     '字段不能为空
  780.                 If Len(Trim(LrText(jsqte).Text)) = 0 Then
  781.                     If LrText(jsqte).Enabled Then
  782.                         Tsxx = Textstr(jsqte, 7) & "不能为空!"
  783.                         Call Xtxxts(Tsxx, 0, 1)
  784.                         LrText(jsqte).SetFocus
  785.                         Bclrsj = False
  786.                         Exit Function
  787.                     End If
  788.                 End If
  789.             Else
  790.                 If Textint(jsqte, 8) = 2 Then   '字段不能为零
  791.                     If Val(Trim(LrText(jsqte).Text)) = 0 Then
  792.                         Tsxx = Textstr(jsqte, 7) & "不能为零!"
  793.                         Call Xtxxts(Tsxx, 0, 1)
  794.                         LrText(jsqte).SetFocus
  795.                         Bclrsj = False
  796.                         Exit Function
  797.                     End If
  798.                 End If
  799.             End If
  800.         Next jsqte
  801.     
  802.         '对需要进行事后判断的文本框录入内容进行有效性判断 (固定不变)
  803.         For jsqte = 0 To Max_Text_Index
  804.             If Textint(jsqte, 9) = 0 Or Textint(jsqte, 9) = 2 Then
  805.                 If Not TextYxxpd(jsqte) Then
  806.                     Exit Function
  807.                 End If
  808.             End If
  809.         Next jsqte
  810.    
  811.         If Lrzt = 1 Then  '增 加
  812.         
  813.             '[>>判断编码是否重复
  814.             If .State = 1 Then .Close
  815.             .Open "SELECT * FROM Gy_Warehouse WHERE WhCode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  816.     
  817.             If Not .EOF Then
  818.                 Tsxx = "仓库编码重复!"
  819.                 Call Xtxxts(Tsxx, 0, 1)
  820.                 LrText(0).SetFocus
  821.                 Bclrsj = False
  822.                 Exit Function
  823.             End If
  824.     
  825.             '判断名称是否重复
  826.             If .State = 1 Then .Close
  827.             .Open "SELECT * FROM Gy_Warehouse WHERE WhName= '" + Trim(LrText(1).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  828.     
  829.             If Not .EOF Then
  830.                 Tsxx = "仓库名称重复!"
  831.                 Call Xtxxts(Tsxx, 0, 1)
  832.                 LrText(1).SetFocus
  833.                 Bclrsj = False
  834.                 Exit Function
  835.             End If
  836.             '判断记录内容无误后,将记录内容写入数据表
  837.             On Error GoTo Swcwcl
  838.     
  839.             Cw_DataEnvi.DataConnect.BeginTrans
  840.    
  841.             .AddNew
  842.             .Fields("WhCode") = Trim(LrText(0).Text)             '仓库编码
  843.             .Fields("WhName") = Trim(LrText(1).Text)             '仓库名称
  844.             .Fields("Whprofix") = Trim(LrText(2).Text)           '仓库前缀
  845.             If Trim(LrText(3).Tag) <> "" Then
  846.                 .Fields("deptcode") = Trim(LrText(3).Tag)        '所属部门
  847.             Else
  848.                 .Fields("deptcode") = Null
  849.             End If
  850.             .Fields("whaddress") = Trim(LrText(4).Text)          '仓库地址
  851.             .Fields("manageman") = Trim(LrText(5).Text)          '负责人
  852.             .Fields("telephone") = Trim(LrText(6).Text)          '电话
  853.             .Fields("moneyration") = Val(LrText(7).Text)         '资金定额
  854.             .Fields("remark") = Trim(LrText(8).Text)             '备注
  855.             
  856.             .Fields("warehouseattribute") = Trim(Lrcomb(0).Text) '属性
  857.             .Fields("pricemode") = Trim(Lrcomb(1).Text)          '记价方式
  858.             
  859.             .Fields("chhsuseflag") = Lrcheck(0).Value            '存货核算
  860.             .Fields("ishqgl") = Lrcheck(1).Value                 '货区管理
  861.             .Fields("isrepertory") = Lrcheck(2).Value            '储备预警
  862.             
  863.             .Update
  864.             
  865.             Cw_DataEnvi.DataConnect.CommitTrans
  866.             '将记录加入网格
  867.             Sqlstr = "SELECT * FROM Gy_V_Warehouse WHERE WhCode= '" + Trim(LrText(0).Text) + "'"
  868.             Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  869.    
  870.             With CzxsGrid
  871.                 .AddItem ""
  872.                 .RowHeight(.Rows - 1) = Sjhgd
  873.                 .Select .Rows - 1, Qslz
  874.                 Call Jltcwg(Cxnrrec, .Rows - 1)
  875.             End With
  876.             Tsxx = "保存完毕!"
  877.             Call Xtxxts(Tsxx, 0, 4)
  878.             
  879.             Call Cshlrxx(1)
  880.             LrText(0).SetFocus
  881.             '将网格按编码排序
  882.             With CzxsGrid
  883.                 .Col = Sydz("001", GridStr(), Szzls)
  884.                 CzxsGrid.Sort = flexSortStringAscending
  885.             End With
  886.             '<<]
  887.     
  888.         Else  '否则为修改记录
  889.  
  890.             If .State = 1 Then .Close
  891.             .Open "SELECT * FROM Gy_Warehouse WHERE WhName= '" + Trim(LrText(1).Text) + "' and WhCode<>'" & Trim(LrText(0).Text) & "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  892.             If Not .EOF Then
  893.                 Tsxx = "仓库名称重复!"
  894.                 Call Xtxxts(Tsxx, 0, 1)
  895.                 LrText(1).SetFocus
  896.         
  897.                 Bclrsj = False
  898.                 Exit Function
  899.             End If
  900.             On Error GoTo Swcwcl
  901.             Cw_DataEnvi.DataConnect.BeginTrans
  902.             If .State = 1 Then .Close
  903.             .Open "SELECT * FROM Gy_Warehouse WHERE WhCode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  904.      
  905.             If Not .EOF Then
  906.                 .Fields("WhName") = Trim(LrText(1).Text)             '仓库名称
  907.                 .Fields("Whprofix") = Trim(LrText(2).Text)           '仓库前缀
  908.                 If Trim(LrText(3).Tag) <> "" Then
  909.                     .Fields("deptcode") = Trim(LrText(3).Tag)        '所属部门
  910.                 Else
  911.                     .Fields("deptcode") = Null
  912.                 End If
  913.                 .Fields("whaddress") = Trim(LrText(4).Text)          '仓库地址
  914.                 .Fields("manageman") = Trim(LrText(5).Text)          '负责人
  915.                 .Fields("telephone") = Trim(LrText(6).Text)          '电话
  916.                 .Fields("moneyration") = Val(LrText(7).Text)         '资金定额
  917.                 .Fields("remark") = Trim(LrText(8).Text)             '备注
  918.                 
  919.                 .Fields("warehouseattribute") = Trim(Lrcomb(0).Text) '属性
  920.                 .Fields("pricemode") = Trim(Lrcomb(1).Text)          '记价方式
  921.                 
  922.                 .Fields("chhsuseflag") = Lrcheck(0).Value            '存货核算
  923.                 .Fields("ishqgl") = Lrcheck(1).Value                 '货区管理
  924.                 .Fields("isrepertory") = Lrcheck(2).Value            '储备预警
  925.                 .Update
  926.             End If
  927.              Cw_DataEnvi.DataConnect.CommitTrans
  928.    
  929.             '刷新当前网格
  930.             Sqlstr = "SELECT * FROM Gy_V_Warehouse WHERE WhCode= '" + Trim(LrText(0).Text) + "'"
  931.             Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  932.    
  933.             With CzxsGrid
  934.                 Call Jltcwg(Cxnrrec, .Row)
  935.             End With
  936.    
  937.         End If
  938.      
  939.         '保存记录成功,函数返回真值
  940.         Bclrsj = True
  941.         Exit Function
  942.         
  943.     End With
  944.  
  945. Swcwcl:
  946.      Cw_DataEnvi.DataConnect.RollbackTrans
  947.      
  948.      Tsxx = "存盘过程中出现错误,程序自动恢复保存前状态!"
  949.      Call Xtxxts(Tsxx, 0, 1)
  950.      
  951.      Exit Function
  952.      
  953. End Function
  954. Private Function Cshlrxx(lrztxx As Integer) As Boolean              '初始化录入字段信息
  955.     TextChangeLock = True       '关闭文本框Chang事件
  956.     
  957.     LrText(2).Enabled = True
  958.     Lrcomb(0).Enabled = True
  959.     Lrcomb(1).Enabled = True
  960.     Lrcheck(1).Enabled = True
  961.     lblMsg.Visible = False
  962.     
  963.     If lrztxx = 1 Then
  964.     
  965.         '增加新记录时将文本框清空
  966.         For jsqte = 0 To Max_Text_Index
  967.             If Len(Trim(Textstr(jsqte, 1))) <> 0 Then
  968.                 LrText(jsqte).Text = ""
  969.                 LrText(jsqte).Tag = ""
  970.             End If
  971.             TextValiJudgeLock(jsqte) = True
  972.         Next jsqte
  973.        
  974.         '[>>
  975.         Lrcomb(0).ListIndex = 0
  976.         Lrcomb(1).ListIndex = 0
  977.         Lrcheck(0).Value = 0
  978.         Lrcheck(1).Value = 0
  979.         Lrcheck(2).Value = 0
  980.         
  981.         '在此处可添加新增记录时初始化设置
  982.         '<<]
  983.     Else
  984.     
  985.         '修改记录时根据记录关键字(编码)从数据表中读入其他字段内容
  986.         With RecTemp
  987.             Sqlstr = "SELECT * FROM Gy_V_Warehouse Where WhCode='" & Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) & "'"
  988.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  989.        
  990.             '记录如存在则读入其内容,否则提示记录已被其他人删除
  991.             If Not RecTemp.EOF Then
  992.                 LrText(0).Text = Trim(.Fields("WhCode") & "")              '仓库编码
  993.                 LrText(1).Text = Trim(.Fields("WhName") & "")              '仓库名称
  994.                 LrText(2).Text = Trim(.Fields("Whprofix") & "")            '仓库前缀
  995.                 LrText(3).Tag = Trim(.Fields("deptcode") & "")             '所属部门
  996.                 LrText(3).Text = Trim(.Fields("deptname") & "")            '所属部门
  997.                 LrText(4).Text = Trim(.Fields("whaddress") & "")           '仓库地址
  998.                 LrText(5).Text = Trim(.Fields("manageman") & "")           '负责人
  999.                 LrText(6).Text = Trim(.Fields("telephone") & "")           '电话
  1000.                 LrText(7).Text = Trim(.Fields("moneyration") & "")         '资金定额
  1001.                 LrText(8).Text = Trim(.Fields("remark") & "")              '备注
  1002.                 
  1003.                 Lrcomb(0).Text = Trim(.Fields("warehouseattribute") & "")  '仓库属性
  1004.                 Lrcomb(1).Text = Trim(.Fields("pricemode") & "")           '计价方式
  1005.                 
  1006.                 If .Fields("chhsuseflag") Then                             '存货核算
  1007.                     Lrcheck(0).Value = 1
  1008.                 Else
  1009.                     Lrcheck(0).Value = 0
  1010.                 End If
  1011.                 If .Fields("ishqgl") Then                                  '货区管理
  1012.                     Lrcheck(1).Value = 1
  1013.                 Else
  1014.                     Lrcheck(1).Value = 0
  1015.                 End If
  1016.                 If .Fields("isrepertory") Then                             '储备预警
  1017.                     Lrcheck(2).Value = 1
  1018.                 Else
  1019.                     Lrcheck(2).Value = 0
  1020.                 End If
  1021. '****************************************************已使用仓库只能修改部分属性
  1022. '如果删除产生异常,说明记录已被引用
  1023. On Error GoTo ErrMsg
  1024.                 Cw_DataEnvi.DataConnect.BeginTrans
  1025.                 Cw_DataEnvi.DataConnect.Execute "delete Gy_warehouse where whcode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  1026.                 Cw_DataEnvi.DataConnect.RollbackTrans
  1027.                 Cshlrxx = True
  1028.                 TextChangeLock = False
  1029.                 Exit Function
  1030. ErrMsg:
  1031.                 Cw_DataEnvi.DataConnect.RollbackTrans
  1032.                 If Err.Number = -2147217873 Then                '(-2147217873 为SQL Server 2000通过建立外键产生的错误号)
  1033.                     
  1034.                     
  1035.                     LrText(2).Enabled = False
  1036.                     Lrcomb(0).Enabled = False
  1037.                     Lrcomb(1).Enabled = False
  1038.                     Lrcheck(1).Enabled = False
  1039.                     lblMsg.Visible = True
  1040.                     
  1041.                     TextChangeLock = False
  1042.                     Cshlrxx = True
  1043.                     Exit Function
  1044.                 Else
  1045.                     Tsxx = "出现未知情况,请重新进入系统再试!"
  1046.                     Call Xtxxts(Tsxx, 0, 4)
  1047.                     Call Cancel
  1048.                     TextChangeLock = False
  1049.                     Exit Function
  1050.                 End If
  1051. '***************************************************
  1052.             Else
  1053.                 Tsxx = "该记录已经被其他人删除,请刷新当前数据!"
  1054.                 Call Xtxxts(Tsxx, 0, 4)
  1055.                 Call Cancel
  1056.                 TextChangeLock = False
  1057.                 Exit Function
  1058.             End If
  1059.         End With
  1060.     End If
  1061.     
  1062.     Cshlrxx = True
  1063.     TextChangeLock = False
  1064. End Function
  1065. Private Sub Scdqjl()                 '删 除 当 前 记 录
  1066.     Dim Yhanswer As Integer
  1067.     
  1068.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1069.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  1070.         Exit Sub
  1071.     End If
  1072.     
  1073.     '非数据行不能删除
  1074.     If CzxsGrid.Row < CzxsGrid.FixedRows Then
  1075.         Exit Sub
  1076.     End If
  1077.   
  1078.     '用户确认是否删除记录
  1079.     Tsxx = "请确认是否删除当前记录?"
  1080.     Yhanswer = Xtxxts(Tsxx, 2, 2)
  1081.     
  1082.     If Yhanswer = 2 Then
  1083.         Exit Sub
  1084.     End If
  1085.     On Error GoTo Cwcl
  1086.   
  1087.     Cw_DataEnvi.DataConnect.BeginTrans
  1088.     '[>>以下需自定义部分
  1089.     Cw_DataEnvi.DataConnect.Execute "delete Gy_Warehouse where WhCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  1090.     '以上为自定义部分<<]
  1091.   
  1092.     Cw_DataEnvi.DataConnect.CommitTrans
  1093.     CzxsGrid.RemoveItem CzxsGrid.Row
  1094.     Exit Sub
  1095.   
  1096. Cwcl:
  1097.     Cw_DataEnvi.DataConnect.RollbackTrans
  1098.     
  1099.     If Err.Number = -2147217873 Then                '(-2147217873 为SQL Server 2000通过建立外键产生的错误号)
  1100.         Tsxx = "此仓库已经被使用,不能删除!"
  1101.         Call Xtxxts(Tsxx, 0, 1)
  1102.         Exit Sub
  1103.     Else
  1104.         Tsxx = "出现未知情况,此仓库不能被删除!"
  1105.         Call Xtxxts(Tsxx, 0, 1)
  1106.         Exit Sub
  1107.     End If
  1108.     
  1109. End Sub
  1110. '*******************以下区域为编写自定义过程区域**********************
  1111. '*******************以上区域为编写自定义过程区域**********************
  1112. '******************以下为基本处理程序(固定不变)************************'
  1113. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)        '支持热键操作
  1114.     If Shift = 2 Then
  1115.         Select Case UCase(Chr(KeyCode))
  1116.             Case "P"                                                                          'Ctrl+P 打印
  1117.                 If SzToolbar.Buttons("dy").Visible And SzToolbar.Buttons("dy").Enabled Then
  1118.                     Call bbyl(False)
  1119.                 End If
  1120.             Case "A"                                                                          'Ctrl+A 增加
  1121.                 '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1122.                 If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  1123.                     Exit Sub
  1124.                 End If
  1125.                 If SzToolbar.Buttons("zj").Visible And SzToolbar.Buttons("zj").Enabled Then
  1126.                     Call Toolbjzt
  1127.                     Lrzt = 1
  1128.                     Call Cshlrxx(Lrzt)
  1129.                     LrText(0).SetFocus
  1130.                     LrText(0).Enabled = True
  1131.                 End If
  1132.             Case "D"                                                                          'Ctrl+D 删除
  1133.                 If SzToolbar.Buttons("sc").Visible And SzToolbar.Buttons("sc").Enabled Then
  1134.                     Call Scdqjl
  1135.                 End If
  1136.         End Select
  1137.     End If
  1138.     
  1139. End Sub
  1140. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  1141.    
  1142.     Select Case Button.Key
  1143.         Case "ymsz"                                          '页面设置
  1144.             Dyymctbl.Show 1
  1145.         Case "yl"                                            '预 览
  1146.             Call bbyl(True)
  1147.         Case "dy"                                            '打 印
  1148.             Call bbyl(False)
  1149.         Case "zj"                                            '增 加
  1150.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1151.             If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  1152.                 Exit Sub
  1153.             End If
  1154.             Call Toolbjzt
  1155.             Lrzt = 1
  1156.             Call Cshlrxx(Lrzt)
  1157.             
  1158.             LrText(0).Enabled = True
  1159.             LrText(0).SetFocus
  1160.         Case "xg"                                            '修 改
  1161.             Call Xgdqjl
  1162.         Case "sc"                                            '删 除
  1163.             Call Scdqjl
  1164.         Case "Limit"                                         '权限
  1165.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1166.             If Not Security_Log("Gy_Warehouse_Power", Xtczybm, 1, True) Then
  1167.                 Exit Sub
  1168.             End If
  1169.             If CzxsGrid.Rows <= CzxsGrid.FixedRows Then
  1170.                 Tsxx = "没有仓库,不能设置仓库权限!"
  1171.                 Call Xtxxts(Tsxx, 0, 4)
  1172.             Else
  1173.                 RZ = CzxsGrid.Row
  1174.                 LZ = Sydz("001", GridStr(), Szzls)
  1175.                 Gy_WarehousePower.Show 1
  1176.             End If
  1177.         Case "PersonLimit"                                   '操作员权限
  1178.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1179.             If Not Security_Log("Gy_Warehouse_PersonPower", Xtczybm, 1, True) Then
  1180.                 Exit Sub
  1181.             End If
  1182.             Gy_WarehousePersonPower.Show 1
  1183.         Case "sx"                                            '刷 新
  1184.             Call Cxnrtcwg
  1185.         Case "bz"                                            '帮 助
  1186.             Call F1bz
  1187.         Case "fh"                                            '退 出
  1188.             Unload Me
  1189.         End Select
  1190.         
  1191. End Sub
  1192. Private Sub CzxsGrid_DblClick()                            '修改当前编码记录
  1193.     Call Xgdqjl
  1194.   
  1195. End Sub
  1196. Private Sub Xgdqjl()                                       '修改当前编码记录
  1197.     Dim bln_tmp As Boolean
  1198.     
  1199.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1200.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True, False) Then
  1201.         BcCommand.Enabled = False
  1202.     End If
  1203.     
  1204.     If CzxsGrid.Row < CzxsGrid.FixedRows Then
  1205.         Exit Sub
  1206.     End If
  1207.     
  1208.     Lrzt = 2
  1209.     bln_tmp = Cshlrxx(Lrzt)
  1210.     Call Toolbjzt
  1211.     If bln_tmp Then
  1212.         LrText(1).SetFocus
  1213.         LrText(0).Enabled = False
  1214.     End If
  1215. End Sub
  1216. Private Sub Toolbjzt()                                     'Toolbar状态(编辑状态)
  1217.     StTab.TabEnabled(1) = True
  1218.     StTab.Tab = 1
  1219.     Frame1.Enabled = True
  1220.     StTab.TabEnabled(0) = False
  1221.     CzxsGrid.Enabled = False
  1222.   
  1223.     With SzToolbar
  1224.         .Buttons("ymsz").Enabled = False
  1225.         .Buttons("dy").Enabled = False
  1226.         .Buttons("yl").Enabled = False
  1227.         .Buttons("zj").Enabled = False
  1228.         .Buttons("xg").Enabled = False
  1229.         .Buttons("sc").Enabled = False
  1230.         .Buttons("sx").Enabled = False
  1231.         .Buttons("Limit").Enabled = False
  1232.         .Buttons("PersonLimit").Enabled = False
  1233.         
  1234.     End With
  1235.   
  1236. End Sub
  1237. Private Sub Toolfbjzt()                                    'Toolbar状态(非编辑状态)
  1238.     StTab.TabEnabled(0) = True
  1239.     StTab.Tab = 0
  1240.     CzxsGrid.Enabled = True
  1241.     Frame1.Enabled = False
  1242.     StTab.TabEnabled(1) = False
  1243.     Lrzt = 0
  1244.     
  1245.     With SzToolbar
  1246.         .Buttons("ymsz").Enabled = True
  1247.         .Buttons("dy").Enabled = True
  1248.         .Buttons("yl").Enabled = True
  1249.         .Buttons("zj").Enabled = True
  1250.         .Buttons("xg").Enabled = True
  1251.         .Buttons("sc").Enabled = True
  1252.         .Buttons("sx").Enabled = True
  1253.         .Buttons("Limit").Enabled = True
  1254.         .Buttons("PersonLimit").Enabled = True
  1255.     End With
  1256.   
  1257. End Sub
  1258. Private Sub BcCommand_Click()                                           '保 存
  1259.     If Not Bclrsj Then
  1260.         Exit Sub
  1261.     End If
  1262.   
  1263.     If Lrzt = 2 Then
  1264.         Call Toolfbjzt
  1265.     End If
  1266.   
  1267. End Sub
  1268. Private Sub QxCommand_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)       '取消
  1269.   
  1270.     '避免执行Click程序
  1271.     Bln_Cancel = True
  1272.   
  1273.     Call Cancel
  1274.     
  1275. End Sub
  1276. Private Sub QxCommand_Click()                                                                         '取消
  1277.  
  1278.     If Bln_Cancel Then
  1279.         Bln_Cancel = False
  1280.         Exit Sub
  1281.     End If
  1282.  
  1283.     Call Cancel
  1284.     
  1285. End Sub
  1286. Private Sub Cancel()                                                                                  '取消
  1287.   
  1288.     '文本框加锁
  1289.     For jsqte = 0 To Max_Text_Index
  1290.         TextValiJudgeLock(jsqte) = True
  1291.     Next jsqte
  1292.   
  1293.     Call Toolfbjzt
  1294.     
  1295. End Sub
  1296. Private Sub CzxsGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  1297.     
  1298.     FnBln_RefreshArray Col, Position, GridStr(), GridInf()
  1299. End Sub
  1300. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)   '表格格式设置(通用)
  1301.     
  1302.     Select Case Button.Key
  1303.         Case "bcgs"                                       '保存表格格式
  1304.             Call Bcwggs(CzxsGrid, GridCode, GridStr())
  1305.         Case "hfmrgs"                                     '恢复默认格式
  1306.             Call Hfmrgs(CzxsGrid, GridCode, GridStr())
  1307.         Case "szxsxm"                                     '设置显示项目
  1308.             Call Szxsxm(CzxsGrid, GridCode)
  1309.     End Select
  1310.     
  1311. End Sub
  1312. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1313.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1314.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1315.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1316.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1317.     ReDim Bbxbt(1 To Bbxbtgs)
  1318.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1319.     
  1320.     If Bbbwhgs <> 0 Then
  1321.         ReDim Bbbwh(1 To Bbbwhgs)
  1322.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1323.     End If
  1324.     
  1325.     Bbzbt = ReportTitle
  1326.     Bbxbt(1) = " "
  1327.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1328.     
  1329.     Call Scyxsjb(CzxsGrid)                               '生成报表数据
  1330.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1331.   
  1332.     If Not bbylte Then
  1333.         Unload DY_Tybbyldy
  1334.     End If
  1335.     
  1336. End Sub
  1337. '************以下为文本框录入处理程序(固定不变部分)*************'
  1338. Private Sub Wbklrwbcl(Index As Integer)    '文本框录入事后处理程序
  1339.     '以下为依据实际情况自定义部分[
  1340.   
  1341.         '在此填写文本框录入事后处理程序
  1342.    
  1343.     ']以上为依据实际情况自定义部分
  1344.     
  1345. End Sub
  1346. Private Sub LrText_Change(Index As Integer)
  1347.     '屏蔽程序改变控制
  1348.     If TextChangeLock Then
  1349.         Exit Sub
  1350.     End If
  1351.     
  1352.     TextValiJudgeLock(Index) = False    '打开有效性判断锁
  1353.     
  1354.     '限制字段录入长度
  1355.           
  1356.     TextChangeLock = True  '加锁(防止执行Lrtext_Change)
  1357.     Call TextChangeLimit(LrText(Index), Textint(Index, 1))  '去掉无效字符
  1358.     Select Case Textint(Index, 1)
  1359.         Case 8, 11      '金额型
  1360.             Call Sjgskz(LrText(Index), Xtjezws - Xtjexsws - 1, Xtjexsws)
  1361.         Case 9, 12      '数量型
  1362.             Call Sjgskz(LrText(Index), Xtslzws - Xtslxsws - 1, Xtslxsws)
  1363.         Case 10          '单价型
  1364.             Call Sjgskz(LrText(Index), Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
  1365.         Case Else        '其他小数类型控制
  1366.             If Textint(Index, 6) <> 0 Or Textint(Index, 7) <> 0 Then
  1367.                 Call Sjgskz(LrText(Index), Textint(Index, 6), Textint(Index, 7))
  1368.             End If
  1369.     End Select
  1370.         
  1371.     TextChangeLock = False '解锁
  1372.     
  1373. End Sub
  1374. Private Sub LrText_GotFocus(Index As Integer)                                                 '文本框得到焦点,显示相应信息
  1375.    
  1376.     Call TextShow(Index)
  1377.     CurTextIndex = Index
  1378.     LrText(Index).SelStart = Len(LrText(Index))
  1379.    
  1380. End Sub
  1381. Private Sub LrText_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)            '字段按F2键提供帮助
  1382.    
  1383.     Select Case KeyCode
  1384.          Case vbKeyF2
  1385.              Call Text_Help(Index)
  1386.     End Select
  1387.    
  1388. End Sub
  1389. Private Sub LrText_KeyPress(Index As Integer, KeyAscii As Integer)                            '文本框录入事中控制
  1390.    
  1391.     Call InputFieldLimit(LrText(Index), Textint(Index, 1), KeyAscii)
  1392. End Sub
  1393. Private Sub LrText_LostFocus(Index As Integer)                                                '文本框失去焦点
  1394.     '显示相应信息但不能进行有效性判断
  1395.   
  1396. End Sub
  1397. Private Sub Ydcommand1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)     '按钮提供帮助
  1398.     
  1399.     Call Text_Help(Index)
  1400.     
  1401. End Sub
  1402. Private Sub Text_Help(Index As Integer)                                                       '录入字段帮助
  1403.   
  1404.     If Not Textboolean(Index, 1) Then
  1405.         Exit Sub
  1406.     End If
  1407.    
  1408.     '调用帮助
  1409.     If Textint(Index, 2) <> 1 Then
  1410.         strHlpR = FunHlpR(Trim(Textstr(Index, 4)), "whcode", Trim(LrText(0).Tag))
  1411.     End If
  1412.     Call Drbmhelp(Textint(Index, 2), Textstr(Index, 4), Trim(LrText(Index).Text))
  1413.   
  1414.     '根据设置选择显示编码和名称,并进行存储
  1415.     If Len(Xtfhcs) <> 0 Then
  1416.         If Textint(Index, 3) = 1 Then
  1417.             LrText(Index).Text = Xtfhcsfz
  1418.             LrText(Index).Tag = Xtfhcs
  1419.         Else
  1420.             LrText(Index).Text = Xtfhcs
  1421.             LrText(Index).Tag = Xtfhcsfz
  1422.         End If
  1423.     End If
  1424.    
  1425.     LrText(Index).SetFocus
  1426.     
  1427. End Sub
  1428. Private Sub TextShow(Index As Integer)        '文本框得到焦点,显示相应信息
  1429.     '填写文本框得到焦点,进行相应信息处理程序
  1430.    
  1431. End Sub
  1432. Private Sub Wbkcsh()                          '录入文本框初始化
  1433.     Dim jsqte As Integer
  1434.   
  1435.     '最大录入文本框索引值
  1436.     Max_Text_Index = Textvar(1)
  1437.   
  1438.     ReDim TextValiJudgeLock(Max_Text_Index)
  1439.     
  1440.     For jsqte = 0 To Max_Text_Index
  1441.      
  1442.         If Len(Trim(Textstr(jsqte, 1))) <> 0 Then
  1443.             If Textboolean(jsqte, 1) Then
  1444.                 If jsqte <> 0 And Not Textboolean(jsqte, 3) Then
  1445.                     Load Ydcommand1(jsqte)
  1446.                 End If
  1447.                 Ydcommand1(jsqte).Visible = True
  1448.                 Ydcommand1(jsqte).Move LrText(jsqte).Left + LrText(jsqte).Width, LrText(jsqte).Top
  1449.             End If
  1450.             TextChangeLock = True
  1451.             LrText(jsqte).Text = ""
  1452.             LrText(jsqte).Tag = ""
  1453.             
  1454.             If Textint(jsqte, 5) <> 0 Then
  1455.                 LrText(jsqte).MaxLength = Textint(jsqte, 5)
  1456.             End If
  1457.             
  1458.             TextChangeLock = False
  1459.         End If
  1460.         
  1461.         TextValiJudgeLock(jsqte) = True
  1462.     Next jsqte
  1463.     
  1464. End Sub
  1465. Private Function TextYxxpd(Index As Integer) As Boolean           '文本框有效性判断
  1466.     Dim Sqlstr As String
  1467.     Dim Findrec As ADODB.Recordset
  1468.   
  1469.     '文本框内容未曾改变不进行有效性判断
  1470.     If TextValiJudgeLock(Index) Then
  1471.         TextYxxpd = True
  1472.         Exit Function
  1473.     End If
  1474.   
  1475.     '文本框内容为空认为有效,并清空其Tag值
  1476.     If Trim(LrText(Index)) = "" Then
  1477.         LrText(Index).Tag = ""
  1478.         Call Wbklrwbcl(Index)
  1479.         TextValiJudgeLock(Index) = True
  1480.         TextYxxpd = True
  1481.         Exit Function
  1482.     End If
  1483.   
  1484.     '可在此加入不做有效性判断的理由
  1485.   
  1486.     Select Case Textint(Index, 4)
  1487.         Case 1      '编码型
  1488.             Sqlstr = Trim(Textstr(Index, 5))
  1489.             Sqlstr = Replace(Sqlstr, "@", "'" + Trim(LrText(Index).Text) + "'")
  1490.             Set Findrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1491.          
  1492.             If Findrec.EOF Then
  1493.                 Call Xtxxts(Trim(Textstr(Index, 6)), 0, 1)
  1494.                 LrText(Index).SetFocus
  1495.                 Exit Function
  1496.             Else
  1497.                 Select Case Textint(Index, 3)
  1498.                     Case 0
  1499.                         If Len(Trim(Textstr(Index, 2))) <> 0 Then
  1500.                             LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
  1501.                         End If
  1502.                         If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
  1503.                             LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
  1504.                         End If
  1505.                     Case 1
  1506.                         If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
  1507.                             LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
  1508.                         End If
  1509.                         If Len(Trim(Textstr(Index, 2))) <> 0 Then
  1510.                             LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
  1511.                         End If
  1512.                 End Select
  1513.             End If
  1514.             
  1515.         Case 2      '日期型
  1516.             If IsDate(LrText(Index).Text) Then
  1517.                 LrText(Index).Text = Format(LrText(Index).Text, "yyyy-mm-dd")
  1518.                 If Val(Mid(LrText(Index), 1, 4)) < 1900 Then
  1519.                     LrText(Index).Text = "1900" + Mid(LrText(Index), 5, 6)
  1520.                 End If
  1521.             Else
  1522.                 Tsxx = "非法公历日期!(格式:" + Format(Date, "yyyy-mm-dd") + ")"
  1523.                 Call Xtxxts(Tsxx, 0, 1)
  1524.                 LrText(Index).SetFocus
  1525.                 Exit Function
  1526.             End If
  1527.             
  1528.         Case 3      '其他类型
  1529.         
  1530.     End Select
  1531.     
  1532.     '如果有效则加锁,用户不改变内容则不再进行有效性判断
  1533.     TextValiJudgeLock(Index) = True
  1534.     '调用文本框事后处理程序
  1535.     Call Wbklrwbcl(Index)
  1536.    
  1537.     '有效性判断通过则返回True
  1538.     TextYxxpd = True
  1539.    
  1540. End Function