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

企业管理

开发平台:

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 Cask_Wrappage 
  6.    BorderStyle     =   1  'Fixed Single
  7.    Caption         =   "包装物档案"
  8.    ClientHeight    =   7110
  9.    ClientLeft      =   45
  10.    ClientTop       =   330
  11.    ClientWidth     =   9375
  12.    HelpContextID   =   1711004
  13.    Icon            =   "包装物管理系统_基础设置_包装物档案.frx":0000
  14.    KeyPreview      =   -1  'True
  15.    LinkTopic       =   "Form2"
  16.    MaxButton       =   0   'False
  17.    ScaleHeight     =   7110
  18.    ScaleWidth      =   9375
  19.    StartUpPosition =   2  '屏幕中心
  20.    Begin TabDlg.SSTab StTab 
  21.       Height          =   6435
  22.       Left            =   30
  23.       TabIndex        =   8
  24.       Top             =   660
  25.       Width           =   9330
  26.       _ExtentX        =   16457
  27.       _ExtentY        =   11351
  28.       _Version        =   393216
  29.       Style           =   1
  30.       Tabs            =   2
  31.       TabHeight       =   520
  32.       TabCaption(0)   =   "列表视图"
  33.       TabPicture(0)   =   "包装物管理系统_基础设置_包装物档案.frx":08CA
  34.       Tab(0).ControlEnabled=   -1  'True
  35.       Tab(0).Control(0)=   "CzxsGrid"
  36.       Tab(0).Control(0).Enabled=   0   'False
  37.       Tab(0).ControlCount=   1
  38.       TabCaption(1)   =   "单张视图"
  39.       TabPicture(1)   =   "包装物管理系统_基础设置_包装物档案.frx":08E6
  40.       Tab(1).ControlEnabled=   0   'False
  41.       Tab(1).Control(0)=   "Frame1"
  42.       Tab(1).ControlCount=   1
  43.       Begin VB.Frame Frame1 
  44.          Height          =   6015
  45.          Left            =   -74910
  46.          TabIndex        =   11
  47.          Top             =   330
  48.          Width           =   9135
  49.          Begin VB.CommandButton BcCommand 
  50.             Caption         =   "保存(&S)"
  51.             Height          =   300
  52.             Left            =   6690
  53.             TabIndex        =   5
  54.             Top             =   210
  55.             Width           =   1120
  56.          End
  57.          Begin VB.CommandButton QxCommand 
  58.             Cancel          =   -1  'True
  59.             Caption         =   "取消(&C)"
  60.             Height          =   300
  61.             Left            =   7890
  62.             TabIndex        =   6
  63.             Top             =   210
  64.             Width           =   1120
  65.          End
  66.          Begin TabDlg.SSTab SSTab1 
  67.             Height          =   5625
  68.             Left            =   90
  69.             TabIndex        =   13
  70.             Top             =   300
  71.             Width           =   8925
  72.             _ExtentX        =   15743
  73.             _ExtentY        =   9922
  74.             _Version        =   393216
  75.             Style           =   1
  76.             TabHeight       =   520
  77.             TabCaption(0)   =   "基本信息"
  78.             TabPicture(0)   =   "包装物管理系统_基础设置_包装物档案.frx":0902
  79.             Tab(0).ControlEnabled=   -1  'True
  80.             Tab(0).Control(0)=   "Frame2"
  81.             Tab(0).Control(0).Enabled=   0   'False
  82.             Tab(0).ControlCount=   1
  83.             TabCaption(1)   =   "附属物"
  84.             TabPicture(1)   =   "包装物管理系统_基础设置_包装物档案.frx":091E
  85.             Tab(1).ControlEnabled=   0   'False
  86.             Tab(1).Control(0)=   "Grid_Layout"
  87.             Tab(1).Control(1)=   "Ydtext"
  88.             Tab(1).Control(2)=   "Ydcommand"
  89.             Tab(1).Control(3)=   "YdCombo"
  90.             Tab(1).ControlCount=   4
  91.             TabCaption(2)   =   "包装参数"
  92.             TabPicture(2)   =   "包装物管理系统_基础设置_包装物档案.frx":093A
  93.             Tab(2).ControlEnabled=   0   'False
  94.             Tab(2).Control(0)=   "Grid_Datum"
  95.             Tab(2).Control(1)=   "YdCombo2"
  96.             Tab(2).Control(2)=   "Ydtext2"
  97.             Tab(2).Control(3)=   "Ydcommand22"
  98.             Tab(2).ControlCount=   4
  99.             Begin VB.CommandButton Ydcommand22 
  100.                Height          =   300
  101.                Left            =   -68550
  102.                Picture         =   "包装物管理系统_基础设置_包装物档案.frx":0956
  103.                Style           =   1  'Graphical
  104.                TabIndex        =   25
  105.                Top             =   360
  106.                Visible         =   0   'False
  107.                Width           =   300
  108.             End
  109.             Begin VB.TextBox Ydtext2 
  110.                BackColor       =   &H80000018&
  111.                BorderStyle     =   0  'None
  112.                Height          =   330
  113.                Left            =   -67710
  114.                MultiLine       =   -1  'True
  115.                TabIndex        =   24
  116.                Top             =   360
  117.                Visible         =   0   'False
  118.                Width           =   1185
  119.             End
  120.             Begin VB.ComboBox YdCombo2 
  121.                Height          =   300
  122.                Left            =   -68520
  123.                Style           =   2  'Dropdown List
  124.                TabIndex        =   23
  125.                Top             =   390
  126.                Visible         =   0   'False
  127.                Width           =   1155
  128.             End
  129.             Begin VB.ComboBox YdCombo 
  130.                Height          =   300
  131.                Left            =   -68100
  132.                Style           =   2  'Dropdown List
  133.                TabIndex        =   21
  134.                Top             =   480
  135.                Visible         =   0   'False
  136.                Width           =   1155
  137.             End
  138.             Begin VB.CommandButton Ydcommand 
  139.                Height          =   300
  140.                Left            =   -68460
  141.                Picture         =   "包装物管理系统_基础设置_包装物档案.frx":0CE0
  142.                Style           =   1  'Graphical
  143.                TabIndex        =   20
  144.                Top             =   600
  145.                Visible         =   0   'False
  146.                Width           =   300
  147.             End
  148.             Begin VB.TextBox Ydtext 
  149.                BackColor       =   &H80000018&
  150.                BorderStyle     =   0  'None
  151.                Height          =   330
  152.                Left            =   -70140
  153.                MultiLine       =   -1  'True
  154.                TabIndex        =   19
  155.                Top             =   510
  156.                Visible         =   0   'False
  157.                Width           =   1185
  158.             End
  159.             Begin VB.Frame Frame2 
  160.                Height          =   5175
  161.                Left            =   120
  162.                TabIndex        =   14
  163.                Top             =   330
  164.                Width           =   8685
  165.                Begin VB.CommandButton Ydcommand1 
  166.                   Height          =   300
  167.                   Index           =   3
  168.                   Left            =   4020
  169.                   Picture         =   "包装物管理系统_基础设置_包装物档案.frx":106A
  170.                   Style           =   1  'Graphical
  171.                   TabIndex        =   30
  172.                   Top             =   1470
  173.                   Visible         =   0   'False
  174.                   Width           =   300
  175.                End
  176.                Begin VB.CommandButton Ydcommand1 
  177.                   Height          =   300
  178.                   Index           =   2
  179.                   Left            =   4020
  180.                   Picture         =   "包装物管理系统_基础设置_包装物档案.frx":13F4
  181.                   Style           =   1  'Graphical
  182.                   TabIndex        =   29
  183.                   Top             =   1110
  184.                   Visible         =   0   'False
  185.                   Width           =   300
  186.                End
  187.                Begin VB.TextBox LrText 
  188.                   Height          =   300
  189.                   Index           =   4
  190.                   Left            =   1485
  191.                   TabIndex        =   4
  192.                   Text            =   "4"
  193.                   Top             =   1860
  194.                   Width           =   2835
  195.                End
  196.                Begin VB.TextBox LrText 
  197.                   Height          =   300
  198.                   Index           =   3
  199.                   Left            =   1485
  200.                   TabIndex        =   3
  201.                   Text            =   "3"
  202.                   Top             =   1485
  203.                   Width           =   2535
  204.                End
  205.                Begin VB.TextBox LrText 
  206.                   Height          =   300
  207.                   Index           =   2
  208.                   Left            =   1485
  209.                   TabIndex        =   2
  210.                   Text            =   "2"
  211.                   Top             =   1110
  212.                   Width           =   2535
  213.                End
  214.                Begin VB.CommandButton Ydcommand1 
  215.                   Height          =   300
  216.                   Index           =   0
  217.                   Left            =   4590
  218.                   Picture         =   "包装物管理系统_基础设置_包装物档案.frx":177E
  219.                   Style           =   1  'Graphical
  220.                   TabIndex        =   15
  221.                   Top             =   390
  222.                   Visible         =   0   'False
  223.                   Width           =   300
  224.                End
  225.                Begin VB.TextBox LrText 
  226.                   Height          =   300
  227.                   Index           =   1
  228.                   Left            =   1485
  229.                   TabIndex        =   1
  230.                   Text            =   "1"
  231.                   Top             =   735
  232.                   Width           =   2835
  233.                End
  234.                Begin VB.TextBox LrText 
  235.                   Height          =   300
  236.                   Index           =   0
  237.                   Left            =   1485
  238.                   TabIndex        =   0
  239.                   Text            =   "0"
  240.                   Top             =   360
  241.                   Width           =   2835
  242.                End
  243.                Begin VB.Label TsLabel 
  244.                   AutoSize        =   -1  'True
  245.                   Caption         =   "备注:"
  246.                   Height          =   180
  247.                   Index           =   5
  248.                   Left            =   450
  249.                   TabIndex        =   28
  250.                   Top             =   1980
  251.                   Width           =   450
  252.                End
  253.                Begin VB.Label TsLabel 
  254.                   AutoSize        =   -1  'True
  255.                   Caption         =   "类别:"
  256.                   Height          =   180
  257.                   Index           =   2
  258.                   Left            =   450
  259.                   TabIndex        =   27
  260.                   Top             =   1590
  261.                   Width           =   450
  262.                End
  263.                Begin VB.Label TsLabel 
  264.                   AutoSize        =   -1  'True
  265.                   Caption         =   "计量单位:"
  266.                   Height          =   180
  267.                   Index           =   4
  268.                   Left            =   450
  269.                   TabIndex        =   18
  270.                   Top             =   1140
  271.                   Width           =   810
  272.                End
  273.                Begin VB.Label TsLabel 
  274.                   AutoSize        =   -1  'True
  275.                   Caption         =   "包装物名称:"
  276.                   Height          =   180
  277.                   Index           =   1
  278.                   Left            =   450
  279.                   TabIndex        =   17
  280.                   Top             =   780
  281.                   Width           =   990
  282.                End
  283.                Begin VB.Label TsLabel 
  284.                   AutoSize        =   -1  'True
  285.                   Caption         =   "包装物编码:"
  286.                   Height          =   180
  287.                   Index           =   0
  288.                   Left            =   450
  289.                   TabIndex        =   16
  290.                   Top             =   420
  291.                   Width           =   990
  292.                End
  293.             End
  294.             Begin VSFlex8Ctl.VSFlexGrid Grid_Layout 
  295.                Height          =   5025
  296.                Left            =   -74880
  297.                TabIndex        =   22
  298.                Top             =   480
  299.                Width           =   8685
  300.                _cx             =   5080
  301.                _cy             =   5080
  302.                Appearance      =   1
  303.                BorderStyle     =   1
  304.                Enabled         =   -1  'True
  305.                BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  306.                   Name            =   "宋体"
  307.                   Size            =   9
  308.                   Charset         =   134
  309.                   Weight          =   400
  310.                   Underline       =   0   'False
  311.                   Italic          =   0   'False
  312.                   Strikethrough   =   0   'False
  313.                EndProperty
  314.                MousePointer    =   0
  315.                BackColor       =   -2147483643
  316.                ForeColor       =   -2147483640
  317.                BackColorFixed  =   -2147483633
  318.                ForeColorFixed  =   -2147483630
  319.                BackColorSel    =   -2147483643
  320.                ForeColorSel    =   -2147483640
  321.                BackColorBkg    =   8421504
  322.                BackColorAlternate=   -2147483643
  323.                GridColor       =   -2147483633
  324.                GridColorFixed  =   -2147483632
  325.                TreeColor       =   -2147483632
  326.                FloodColor      =   192
  327.                SheetBorder     =   -2147483642
  328.                FocusRect       =   1
  329.                HighLight       =   1
  330.                AllowSelection  =   0   'False
  331.                AllowBigSelection=   0   'False
  332.                AllowUserResizing=   0
  333.                SelectionMode   =   0
  334.                GridLines       =   1
  335.                GridLinesFixed  =   2
  336.                GridLineWidth   =   1
  337.                Rows            =   5000
  338.                Cols            =   10
  339.                FixedRows       =   1
  340.                FixedCols       =   0
  341.                RowHeightMin    =   0
  342.                RowHeightMax    =   0
  343.                ColWidthMin     =   0
  344.                ColWidthMax     =   0
  345.                ExtendLastCol   =   0   'False
  346.                FormatString    =   ""
  347.                ScrollTrack     =   0   'False
  348.                ScrollBars      =   3
  349.                ScrollTips      =   0   'False
  350.                MergeCells      =   0
  351.                MergeCompare    =   0
  352.                AutoResize      =   -1  'True
  353.                AutoSizeMode    =   0
  354.                AutoSearch      =   0
  355.                AutoSearchDelay =   2
  356.                MultiTotals     =   -1  'True
  357.                SubtotalPosition=   1
  358.                OutlineBar      =   0
  359.                OutlineCol      =   0
  360.                Ellipsis        =   0
  361.                ExplorerBar     =   0
  362.                PicturesOver    =   0   'False
  363.                FillStyle       =   0
  364.                RightToLeft     =   0   'False
  365.                PictureType     =   0
  366.                TabBehavior     =   0
  367.                OwnerDraw       =   0
  368.                Editable        =   0
  369.                ShowComboButton =   1
  370.                WordWrap        =   -1  'True
  371.                TextStyle       =   0
  372.                TextStyleFixed  =   0
  373.                OleDragMode     =   0
  374.                OleDropMode     =   0
  375.                DataMode        =   0
  376.                VirtualData     =   -1  'True
  377.                DataMember      =   ""
  378.                ComboSearch     =   3
  379.                AutoSizeMouse   =   -1  'True
  380.                FrozenRows      =   0
  381.                FrozenCols      =   0
  382.                AllowUserFreezing=   0
  383.                BackColorFrozen =   0
  384.                ForeColorFrozen =   0
  385.                WallPaperAlignment=   9
  386.                AccessibleName  =   ""
  387.                AccessibleDescription=   ""
  388.                AccessibleValue =   ""
  389.                AccessibleRole  =   24
  390.             End
  391.             Begin VSFlex8Ctl.VSFlexGrid Grid_Datum 
  392.                Height          =   5025
  393.                Left            =   -74880
  394.                TabIndex        =   26
  395.                Top             =   480
  396.                Width           =   8685
  397.                _cx             =   5080
  398.                _cy             =   5080
  399.                Appearance      =   1
  400.                BorderStyle     =   1
  401.                Enabled         =   -1  'True
  402.                BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  403.                   Name            =   "宋体"
  404.                   Size            =   9
  405.                   Charset         =   134
  406.                   Weight          =   400
  407.                   Underline       =   0   'False
  408.                   Italic          =   0   'False
  409.                   Strikethrough   =   0   'False
  410.                EndProperty
  411.                MousePointer    =   0
  412.                BackColor       =   -2147483643
  413.                ForeColor       =   -2147483640
  414.                BackColorFixed  =   -2147483633
  415.                ForeColorFixed  =   -2147483630
  416.                BackColorSel    =   -2147483643
  417.                ForeColorSel    =   -2147483640
  418.                BackColorBkg    =   8421504
  419.                BackColorAlternate=   -2147483643
  420.                GridColor       =   -2147483633
  421.                GridColorFixed  =   -2147483632
  422.                TreeColor       =   -2147483632
  423.                FloodColor      =   192
  424.                SheetBorder     =   -2147483642
  425.                FocusRect       =   1
  426.                HighLight       =   1
  427.                AllowSelection  =   0   'False
  428.                AllowBigSelection=   0   'False
  429.                AllowUserResizing=   0
  430.                SelectionMode   =   0
  431.                GridLines       =   1
  432.                GridLinesFixed  =   2
  433.                GridLineWidth   =   1
  434.                Rows            =   5000
  435.                Cols            =   10
  436.                FixedRows       =   1
  437.                FixedCols       =   0
  438.                RowHeightMin    =   0
  439.                RowHeightMax    =   0
  440.                ColWidthMin     =   0
  441.                ColWidthMax     =   0
  442.                ExtendLastCol   =   0   'False
  443.                FormatString    =   ""
  444.                ScrollTrack     =   0   'False
  445.                ScrollBars      =   3
  446.                ScrollTips      =   0   'False
  447.                MergeCells      =   0
  448.                MergeCompare    =   0
  449.                AutoResize      =   -1  'True
  450.                AutoSizeMode    =   0
  451.                AutoSearch      =   0
  452.                AutoSearchDelay =   2
  453.                MultiTotals     =   -1  'True
  454.                SubtotalPosition=   1
  455.                OutlineBar      =   0
  456.                OutlineCol      =   0
  457.                Ellipsis        =   0
  458.                ExplorerBar     =   0
  459.                PicturesOver    =   0   'False
  460.                FillStyle       =   0
  461.                RightToLeft     =   0   'False
  462.                PictureType     =   0
  463.                TabBehavior     =   0
  464.                OwnerDraw       =   0
  465.                Editable        =   0
  466.                ShowComboButton =   1
  467.                WordWrap        =   -1  'True
  468.                TextStyle       =   0
  469.                TextStyleFixed  =   0
  470.                OleDragMode     =   0
  471.                OleDropMode     =   0
  472.                DataMode        =   0
  473.                VirtualData     =   -1  'True
  474.                DataMember      =   ""
  475.                ComboSearch     =   3
  476.                AutoSizeMouse   =   -1  'True
  477.                FrozenRows      =   0
  478.                FrozenCols      =   0
  479.                AllowUserFreezing=   0
  480.                BackColorFrozen =   0
  481.                ForeColorFrozen =   0
  482.                WallPaperAlignment=   9
  483.                AccessibleName  =   ""
  484.                AccessibleDescription=   ""
  485.                AccessibleValue =   ""
  486.                AccessibleRole  =   24
  487.             End
  488.          End
  489.          Begin VB.Label TsLabel 
  490.             AutoSize        =   -1  'True
  491.             Height          =   180
  492.             Index           =   3
  493.             Left            =   555
  494.             TabIndex        =   12
  495.             Top             =   1740
  496.             Width           =   90
  497.          End
  498.       End
  499.       Begin VSFlex8Ctl.VSFlexGrid CzxsGrid 
  500.          Height          =   5955
  501.          Left            =   90
  502.          TabIndex        =   7
  503.          Top             =   390
  504.          Width           =   9135
  505.          _cx             =   5080
  506.          _cy             =   5080
  507.          Appearance      =   1
  508.          BorderStyle     =   1
  509.          Enabled         =   -1  'True
  510.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  511.             Name            =   "宋体"
  512.             Size            =   9
  513.             Charset         =   134
  514.             Weight          =   400
  515.             Underline       =   0   'False
  516.             Italic          =   0   'False
  517.             Strikethrough   =   0   'False
  518.          EndProperty
  519.          MousePointer    =   0
  520.          BackColor       =   -2147483643
  521.          ForeColor       =   -2147483640
  522.          BackColorFixed  =   -2147483633
  523.          ForeColorFixed  =   -2147483630
  524.          BackColorSel    =   -2147483635
  525.          ForeColorSel    =   -2147483634
  526.          BackColorBkg    =   8421504
  527.          BackColorAlternate=   -2147483643
  528.          GridColor       =   -2147483633
  529.          GridColorFixed  =   -2147483632
  530.          TreeColor       =   -2147483632
  531.          FloodColor      =   192
  532.          SheetBorder     =   -2147483642
  533.          FocusRect       =   1
  534.          HighLight       =   1
  535.          AllowSelection  =   -1  'True
  536.          AllowBigSelection=   -1  'True
  537.          AllowUserResizing=   0
  538.          SelectionMode   =   0
  539.          GridLines       =   1
  540.          GridLinesFixed  =   2
  541.          GridLineWidth   =   1
  542.          Rows            =   5000
  543.          Cols            =   10
  544.          FixedRows       =   1
  545.          FixedCols       =   0
  546.          RowHeightMin    =   0
  547.          RowHeightMax    =   0
  548.          ColWidthMin     =   0
  549.          ColWidthMax     =   0
  550.          ExtendLastCol   =   0   'False
  551.          FormatString    =   ""
  552.          ScrollTrack     =   0   'False
  553.          ScrollBars      =   3
  554.          ScrollTips      =   0   'False
  555.          MergeCells      =   0
  556.          MergeCompare    =   0
  557.          AutoResize      =   -1  'True
  558.          AutoSizeMode    =   0
  559.          AutoSearch      =   0
  560.          AutoSearchDelay =   2
  561.          MultiTotals     =   -1  'True
  562.          SubtotalPosition=   1
  563.          OutlineBar      =   0
  564.          OutlineCol      =   0
  565.          Ellipsis        =   0
  566.          ExplorerBar     =   0
  567.          PicturesOver    =   0   'False
  568.          FillStyle       =   0
  569.          RightToLeft     =   0   'False
  570.          PictureType     =   0
  571.          TabBehavior     =   0
  572.          OwnerDraw       =   0
  573.          Editable        =   0
  574.          ShowComboButton =   1
  575.          WordWrap        =   0   'False
  576.          TextStyle       =   0
  577.          TextStyleFixed  =   0
  578.          OleDragMode     =   0
  579.          OleDropMode     =   0
  580.          DataMode        =   0
  581.          VirtualData     =   -1  'True
  582.          DataMember      =   ""
  583.          ComboSearch     =   3
  584.          AutoSizeMouse   =   -1  'True
  585.          FrozenRows      =   0
  586.          FrozenCols      =   0
  587.          AllowUserFreezing=   0
  588.          BackColorFrozen =   0
  589.          ForeColorFrozen =   0
  590.          WallPaperAlignment=   9
  591.          AccessibleName  =   ""
  592.          AccessibleDescription=   ""
  593.          AccessibleValue =   ""
  594.          AccessibleRole  =   24
  595.       End
  596.    End
  597.    Begin MSComctlLib.Toolbar SzToolbar 
  598.       Align           =   1  'Align Top
  599.       Height          =   555
  600.       Left            =   0
  601.       TabIndex        =   9
  602.       Top             =   0
  603.       Width           =   9375
  604.       _ExtentX        =   16536
  605.       _ExtentY        =   979
  606.       ButtonWidth     =   820
  607.       ButtonHeight    =   926
  608.       AllowCustomize  =   0   'False
  609.       Appearance      =   1
  610.       Style           =   1
  611.       ImageList       =   "ImageList1"
  612.       _Version        =   393216
  613.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  614.          NumButtons      =   15
  615.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  616.             Caption         =   "设置"
  617.             Key             =   "ymsz"
  618.             ImageKey        =   "sz"
  619.          EndProperty
  620.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  621.             Caption         =   "打印"
  622.             Key             =   "dy"
  623.             Object.ToolTipText     =   "点击或按Ctrl+P打印表格"
  624.             ImageKey        =   "dy"
  625.          EndProperty
  626.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  627.             Caption         =   "预览"
  628.             Key             =   "yl"
  629.             ImageKey        =   "yl"
  630.          EndProperty
  631.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  632.             Style           =   3
  633.          EndProperty
  634.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  635.             Caption         =   "增加"
  636.             Key             =   "zj"
  637.             Object.ToolTipText     =   "点击或按Ctrl+A增加记录"
  638.             ImageKey        =   "xz"
  639.          EndProperty
  640.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  641.             Caption         =   "修改"
  642.             Key             =   "xg"
  643.             ImageKey        =   "xg"
  644.          EndProperty
  645.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  646.             Caption         =   "删除"
  647.             Key             =   "sc"
  648.             Object.ToolTipText     =   "点击或按Ctrl+D删除当前记录"
  649.             ImageKey        =   "sc"
  650.          EndProperty
  651.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  652.             Style           =   3
  653.          EndProperty
  654.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  655.             Caption         =   "增行"
  656.             Key             =   "zh"
  657.             ImageKey        =   "zh"
  658.          EndProperty
  659.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  660.             Caption         =   "删行"
  661.             Key             =   "sh"
  662.             ImageKey        =   "sh"
  663.          EndProperty
  664.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  665.             Style           =   3
  666.          EndProperty
  667.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  668.             Caption         =   "刷新"
  669.             Key             =   "sx"
  670.             ImageKey        =   "sx"
  671.          EndProperty
  672.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  673.             Style           =   3
  674.          EndProperty
  675.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  676.             Caption         =   "帮助"
  677.             Key             =   "bz"
  678.             ImageKey        =   "bz"
  679.          EndProperty
  680.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  681.             Caption         =   "退出"
  682.             Key             =   "fh"
  683.             ImageKey        =   "tc"
  684.          EndProperty
  685.       EndProperty
  686.       BorderStyle     =   1
  687.       Begin MSComctlLib.Toolbar GsToolbar 
  688.          Height          =   525
  689.          Left            =   6870
  690.          TabIndex        =   10
  691.          Top             =   0
  692.          Width           =   2475
  693.          _ExtentX        =   4366
  694.          _ExtentY        =   926
  695.          ButtonWidth     =   1455
  696.          ButtonHeight    =   926
  697.          AllowCustomize  =   0   'False
  698.          Appearance      =   1
  699.          Style           =   1
  700.          ImageList       =   "ImageList1"
  701.          _Version        =   393216
  702.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  703.             NumButtons      =   3
  704.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  705.                Caption         =   "保存格式"
  706.                Key             =   "bcgs"
  707.                ImageKey        =   "bcgs"
  708.             EndProperty
  709.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  710.                Caption         =   "默认列宽"
  711.                Key             =   "hfmrgs"
  712.                ImageKey        =   "mrlk"
  713.             EndProperty
  714.             BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  715.                Caption         =   "显示项目"
  716.                Key             =   "szxsxm"
  717.                ImageKey        =   "xsxm"
  718.             EndProperty
  719.          EndProperty
  720.       End
  721.    End
  722.    Begin MSComctlLib.ImageList ImageList1 
  723.       Left            =   0
  724.       Top             =   420
  725.       _ExtentX        =   1005
  726.       _ExtentY        =   1005
  727.       BackColor       =   -2147483643
  728.       ImageWidth      =   16
  729.       ImageHeight     =   16
  730.       MaskColor       =   12632256
  731.       _Version        =   393216
  732.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  733.          NumListImages   =   29
  734.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  735.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":1B08
  736.             Key             =   "sz"
  737.          EndProperty
  738.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  739.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":1EA2
  740.             Key             =   "dy"
  741.          EndProperty
  742.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  743.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":223C
  744.             Key             =   "yl"
  745.          EndProperty
  746.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  747.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":25D6
  748.             Key             =   "xg"
  749.          EndProperty
  750.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  751.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":2970
  752.             Key             =   "zh"
  753.          EndProperty
  754.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  755.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":2D0A
  756.             Key             =   "sh"
  757.          EndProperty
  758.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  759.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":30A4
  760.             Key             =   "bc"
  761.          EndProperty
  762.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  763.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":343E
  764.             Key             =   "fq"
  765.          EndProperty
  766.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  767.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":37D8
  768.             Key             =   "bz"
  769.          EndProperty
  770.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  771.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":3B72
  772.             Key             =   "tc"
  773.          EndProperty
  774.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  775.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":3F0C
  776.             Key             =   "bcgs"
  777.          EndProperty
  778.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  779.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":42A6
  780.             Key             =   "mrlk"
  781.          EndProperty
  782.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  783.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":4640
  784.             Key             =   "xsxm"
  785.          EndProperty
  786.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  787.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":49DA
  788.             Key             =   "first"
  789.          EndProperty
  790.          BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  791.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":4D74
  792.             Key             =   "prev"
  793.          EndProperty
  794.          BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  795.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":510E
  796.             Key             =   "next"
  797.          EndProperty
  798.          BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  799.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":54A8
  800.             Key             =   "last"
  801.          EndProperty
  802.          BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  803.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":5842
  804.             Key             =   "xx"
  805.          EndProperty
  806.          BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  807.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":5BDC
  808.             Key             =   "define"
  809.          EndProperty
  810.          BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  811.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":5F76
  812.             Key             =   "exec"
  813.          EndProperty
  814.          BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  815.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":6310
  816.             Key             =   "xz"
  817.          EndProperty
  818.          BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  819.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":66AA
  820.             Key             =   "sc"
  821.          EndProperty
  822.          BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  823.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":6A44
  824.             Key             =   "sx"
  825.          EndProperty
  826.          BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  827.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":6DDE
  828.             Key             =   "cx"
  829.          EndProperty
  830.          BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  831.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":7178
  832.             Key             =   "zd"
  833.          EndProperty
  834.          BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  835.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":7512
  836.             Key             =   "dz"
  837.          EndProperty
  838.          BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  839.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":78AC
  840.             Key             =   "ph"
  841.          EndProperty
  842.          BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  843.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":7C46
  844.             Key             =   "fz"
  845.          EndProperty
  846.          BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  847.             Picture         =   "包装物管理系统_基础设置_包装物档案.frx":7FE0
  848.             Key             =   "dw"
  849.          EndProperty
  850.       EndProperty
  851.    End
  852. End
  853. Attribute VB_Name = "Cask_Wrappage"
  854. Attribute VB_GlobalNameSpace = False
  855. Attribute VB_Creatable = False
  856. Attribute VB_PredeclaredId = True
  857. Attribute VB_Exposed = False
  858. '**********************************************************
  859. '*    模 块 名 称 :包装物档案
  860. '*    功 能 描 述 :
  861. '*    程序员姓名  :邹力
  862. '*    最后修改人  :邹力
  863. '*    最后修改时间:2001/12/03
  864. '*    备        注:封版(*所有自定义部分程序均用[>> <<]括起)
  865. '**********************************************************
  866. Dim Rec_CodeSet As New ADODB.Recordset   '编码设置表
  867. Dim jdzygs As Integer                    '控件焦点转移个数
  868. Dim Lrzt As Integer                      '录入包装物标志(0-非录入包装物 1-增加 2-修改)
  869. Dim ReportTitle As String                '报表主标题
  870. Dim Str_RightEdit As String              '编辑(新增、修改、删除)权限索引
  871.   
  872. '以下为固定使用变量(网格)
  873. Dim Cxnrrec As New ADODB.Recordset       '显示查询内容动态集
  874. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  875. Dim GridCode As String                   '显示网格网格代码
  876. Dim GridInf() As Variant                 '整个网格设置信息
  877. Dim Tsxx As String                       '系统提示信息
  878. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  879. Dim Sjhgd As Double                      '网格数据行高度
  880. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  881. Dim GridStr()  As String                 '网格列信息(字符型)
  882. Dim GridInt() As Integer                 '网格列信息(整型)
  883. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  884. '以下为固定使用变量(文本框)
  885. Dim Textvar() As Variant                 '存储变体型文本框信息
  886. Dim Textboolean() As Boolean             '存储布尔型文本框信息
  887. Dim Textint() As Integer                 '存储整型文本框信息
  888. Dim Textstr() As String                  '存储字符型文本框信息
  889. Dim Max_Text_Index As Integer            '最大录入文本框索引值
  890. Dim TextGroupCode As String              '文本框录入分组编码
  891. Dim TextValiLock As Boolean              '文本框失去焦点是否进行有效性控制判断
  892. Dim TextValiJudgeLock() As Boolean       '文本框录入有效性判断控制锁
  893. Dim CurTextIndex As Integer              '当前文本框索引值
  894. Dim TextChangeLock As Boolean            '文本框内容变换控制锁
  895. Dim Bln_Cancel As Boolean                '取消按钮信息传递
  896. '*******     sup_Product
  897. Dim Cxnrrec1 As New ADODB.Recordset       '显示查询内容动态集
  898. Dim GridCode1 As String                   '显示网格网格代码
  899. Dim GridInf1() As Variant                 '整个网格设置信息
  900. Dim Tsxx1 As String                       '系统提示信息
  901. Dim Qslz1 As Long                         '网格隐藏(非操作显示)列数
  902. Dim Sjhgd1 As Double                      '网格数据行高度
  903. Dim GridBoolean1() As Boolean             '网格列信息(布尔型)
  904. Dim GridStr1()  As String                 '网格列信息(字符型)
  905. Dim GridInt1() As Integer                 '网格列信息(整型)
  906. Dim Szzls1 As Integer                     '数组总列数(网格列数-1)
  907. Dim Pmbcsjhs1 As Long                            '屏幕网格保持数据行数(大于等于1)
  908. Dim Fzxwghs1 As Integer                          '辅助项网格行数(包括合计行)
  909. Dim Sfxshjwg1 As Boolean                         '是否显示合计网格
  910. Dim Sfblbzkd1 As Boolean                         '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
  911. Dim Dqlrwgh1 As Long                             '当前录入数据网格行
  912. Dim Dqlrwgl1 As Long                             '当前录入数据网格列
  913. Dim Dqlkwgh1 As Long                             '刚刚离开网格行(不一定为录入行)
  914. Dim Dqlkwgl1 As Long                             '刚刚离开网格列
  915. Dim Dqtoprow1 As Long                            '当前录入状态时最上端可视行
  916. Dim Dqleftcol1 As Long                           '当前录入状态时最左端可视列
  917. Dim Zdlrqnr1 As String                           '字段录入修改前内容(用来判断内容是否修改)
  918. Dim Wbkbhlock1 As Boolean                        '文本框改变值锁
  919. Dim changelock1 As Boolean                       '网格行列改变控制锁(用来区别用户改变.程序改变)
  920. Dim Gdtlock1 As Boolean                          '滚动条滚动控制(用来区别用户改变.程序改变)
  921. Dim Yxxpdlock1 As Boolean                        '字段有效性判断锁(内容不修改不需进行字段有效性判断)
  922. Dim Hyxxpdlock1 As Boolean                       '行有效性判断锁(字段内容不修改不需进行行有效性判断)
  923. Dim Valilock1 As Boolean                         '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
  924. Dim Shsfts1 As Boolean                           '删除记录行是否提示
  925. '*******     sup_ProLine
  926. Dim Cxnrrec2 As New ADODB.Recordset       '显示查询内容动态集
  927. Dim GridCode2 As String                   '显示网格网格代码
  928. Dim GridInf2() As Variant                 '整个网格设置信息
  929. Dim Tsxx2 As String                       '系统提示信息
  930. Dim Qslz2 As Long                         '网格隐藏(非操作显示)列数
  931. Dim Sjhgd2 As Double                      '网格数据行高度
  932. Dim GridBoolean2() As Boolean             '网格列信息(布尔型)
  933. Dim GridStr2()  As String                 '网格列信息(字符型)
  934. Dim GridInt2() As Integer                 '网格列信息(整型)
  935. Dim Szzls2 As Integer                     '数组总列数(网格列数-1)
  936. Dim Pmbcsjhs2 As Long                            '屏幕网格保持数据行数(大于等于1)
  937. Dim Fzxwghs2 As Integer                          '辅助项网格行数(包括合计行)
  938. Dim Sfxshjwg2 As Boolean                         '是否显示合计网格
  939. Dim Sfblbzkd2 As Boolean                         '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
  940. Dim Dqlrwgh2 As Long                             '当前录入数据网格行
  941. Dim Dqlrwgl2 As Long                             '当前录入数据网格列
  942. Dim Dqlkwgh2 As Long                             '刚刚离开网格行(不一定为录入行)
  943. Dim Dqlkwgl2 As Long                             '刚刚离开网格列
  944. Dim Dqtoprow2 As Long                            '当前录入状态时最上端可视行
  945. Dim Dqleftcol2 As Long                           '当前录入状态时最左端可视列
  946. Dim Zdlrqnr2 As String                           '字段录入修改前内容(用来判断内容是否修改)
  947. Dim Wbkbhlock2 As Boolean                        '文本框改变值锁
  948. Dim changelock2 As Boolean                       '网格行列改变控制锁(用来区别用户改变.程序改变)
  949. Dim Gdtlock2 As Boolean                          '滚动条滚动控制(用来区别用户改变.程序改变)
  950. Dim Yxxpdlock2 As Boolean                        '字段有效性判断锁(内容不修改不需进行字段有效性判断)
  951. Dim Hyxxpdlock2 As Boolean                       '行有效性判断锁(字段内容不修改不需进行行有效性判断)
  952. Dim Valilock2 As Boolean                         '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
  953. Dim Shsfts2 As Boolean                           '删除记录行是否提示
  954. Dim RecTemp As ADODB.Recordset
  955. Private Sub Form_KeyPress(KeyAscii As Integer)   '控 制 焦 点 转 移
  956.     jdzygs = 10
  957.     
  958.     Select Case KeyAscii
  959.         Case vbKeyReturn
  960.             If Kjjdzy(jdzygs) Then
  961.                 KeyAscii = 0
  962.             End If
  963.         Case 39           '屏蔽"'"
  964.             KeyAscii = 0
  965.     End Select
  966.    
  967. End Sub
  968. Private Sub Form_Load()
  969.   
  970.     '打印报表标题信息
  971.     ReportTitle = "包装物档案"
  972.      
  973.     '调入打印页面设置窗体
  974.     XtReportCode = "Cask_Wrappage"
  975.     Load Dyymctbl
  976.     
  977.     '以下为文本框处理程序(读入文本框录入信息)
  978.     TextGroupCode = "Cask_Wrappage"
  979.     Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())
  980.     Call Wbkcsh
  981.     
  982.     '调入网格设置信息
  983.     GridCode = "Cask_Wrappage"
  984.     Call BzWgcsh(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  985.     Qslz = GridInf(1)
  986.     Sjhgd = GridInf(2)
  987.     Szzls = CzxsGrid.Cols - 1
  988.     
  989.     CzxsGrid.Cols = CzxsGrid.Cols + 2
  990.     CzxsGrid.ColHidden(CzxsGrid.Cols - 1) = True
  991.     CzxsGrid.ColHidden(CzxsGrid.Cols - 2) = True
  992.    '调 入 网 格   附属物
  993.   GridCode1 = "Cask_Appertain"
  994.   Call BzWgcsh(Grid_Layout, GridCode1, GridInf1(), GridBoolean1(), GridInt1(), GridStr1())
  995.   Qslz1 = GridInf1(1)
  996.   Sjhgd1 = GridInf1(2)
  997.   Szzls1 = Grid_Layout.Cols - 1
  998.   Pmbcsjhs1 = GridInf1(3)
  999.   Fzxwghs1 = GridInf1(4)
  1000.   Sfblbzkd1 = GridInf1(5)
  1001.   Shsfts1 = GridInf1(6)
  1002.   Sfxshjwg1 = GridInf1(7)
  1003.   '调 入 网 格   包装参数
  1004.   GridCode2 = "Cask_Parameter"
  1005.   Call BzWgcsh(Grid_Datum, GridCode2, GridInf2(), GridBoolean2(), GridInt2(), GridStr2())
  1006.   Qslz2 = GridInf2(1)
  1007.   Sjhgd2 = GridInf2(2)
  1008.   Szzls2 = Grid_Datum.Cols - 1
  1009.   Pmbcsjhs2 = GridInf2(3)
  1010.   Fzxwghs2 = GridInf2(4)
  1011.   Sfblbzkd2 = GridInf2(5)
  1012.   Shsfts2 = GridInf2(6)
  1013.   Sfxshjwg2 = GridInf2(7)
  1014.   
  1015.    '重置网格
  1016.     With Grid_Layout
  1017.         .Rows = Pmbcsjhs1 + .FixedRows + Fzxwghs1 + 1
  1018.         For Jsqte = .FixedRows To .Rows - 1
  1019.             .RowHeight(Jsqte) = Sjhgd1
  1020.         Next Jsqte
  1021.         .Clear 1
  1022.         changelock1 = True
  1023.         .Select .FixedRows, Qslz1
  1024.         changelock1 = False
  1025.     End With
  1026.     
  1027.     With Grid_Datum
  1028.         .Rows = Pmbcsjhs2 + .FixedRows + Fzxwghs2 + 1
  1029.         For Jsqte = .FixedRows To .Rows - 1
  1030.             .RowHeight(Jsqte) = Sjhgd2
  1031.         Next Jsqte
  1032.         .Clear 1
  1033.         changelock2 = True
  1034.         .Select .FixedRows, Qslz
  1035.         changelock2 = False
  1036.     End With
  1037.     SzToolbar.Buttons("zh").Enabled = False
  1038.     SzToolbar.Buttons("sh").Enabled = False
  1039.     '填 充 网 格
  1040.     Call Cxnrtcwg
  1041.        
  1042.     '初始化ToolBar,Tab卡包装物
  1043.     StTab.Tab = 0
  1044.     StTab.TabEnabled(1) = False
  1045.     Frame1.Enabled = False
  1046.     
  1047.     '设置为非录入包装物
  1048.     Lrzt = 0
  1049.     
  1050.      '编辑(新增、修改、删除)权限索引
  1051.     Str_RightEdit = "Cask_WrappageEdit"
  1052.  End Sub
  1053.  
  1054. Private Sub Cxnrtcwg()                               '查询内容填充网格
  1055.     Dim Sqlstr As String              '查询连接串
  1056.     Dim Jsqte As Long                 '查询临时使用变量
  1057.   
  1058.     '为加快显示速度,将网格刷新动作冻结
  1059.     CzxsGrid.Redraw = False
  1060.   
  1061.     '[>>查询连接串
  1062.     Sqlstr = "SELECT Cask_Wrappage.*,Cask_Sort.SortName,Gy_UnitSet.UnitName  " & _
  1063.             "FROM Cask_Wrappage LEFT OUTER JOIN Cask_Sort ON Cask_Wrappage.SortCode =" & _
  1064.             "Cask_Sort.SortCode LEFT OUTER JOIN Gy_UnitSet ON Cask_Wrappage.UnitCode =" & _
  1065.             "Gy_UnitSet.UnitCode Order By WrappageCode"
  1066.     '<<]
  1067.     Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1068.     
  1069.     With Cxnrrec
  1070.         CzxsGrid.Rows = CzxsGrid.FixedRows
  1071.         If .EOF And .BOF Then
  1072.             CzxsGrid.Redraw = True
  1073.             Exit Sub
  1074.         End If
  1075.         Jsqte = CzxsGrid.FixedRows
  1076.         Do While Not .EOF
  1077.             CzxsGrid.AddItem ""
  1078.             Call Jltcwg(Cxnrrec, Jsqte)                              '调入填充网格子过程
  1079.             CzxsGrid.RowHeight(Jsqte) = Sjhgd                        '设置网格高度
  1080.             .MoveNext
  1081.             Jsqte = Jsqte + 1
  1082.         Loop
  1083.     End With
  1084.   
  1085.     '将网格刷新动作解冻
  1086.     CzxsGrid.Redraw = True
  1087.     
  1088. End Sub
  1089. Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long)           '记录内容填充网格
  1090.     '[>>以下为自定义部分
  1091.     With Jlbrec
  1092.         CzxsGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(!WrappageCode & "")     '包装物编码
  1093.         CzxsGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(!WrappageName & "")     '包装物名称
  1094.         CzxsGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Trim(!UnitName & "")         '计量单位名称
  1095.         CzxsGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(!SortName & "")         '类别名称
  1096.         CzxsGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = Trim(!Remark & "")           '备注
  1097.         CzxsGrid.TextMatrix(Rowjsq, CzxsGrid.Cols - 2) = Trim(!UnitCode & "")                     '计量单位编码
  1098.         CzxsGrid.TextMatrix(Rowjsq, CzxsGrid.Cols - 1) = Trim(!SortCode & "")                     '类别编码
  1099.     End With
  1100.     '以上为自定义部分<<]
  1101.     
  1102. End Sub
  1103. Private Sub Form_Unload(Cancel As Integer)             '窗体卸载
  1104.     Set Cxnrrec = Nothing
  1105.     Set Rec_CodeSet = Nothing
  1106.     Unload Dyymctbl
  1107.    
  1108. End Sub
  1109. Private Function Bclrsj() As Boolean                   '判断录入数据有效性,并保存数据
  1110.     Dim Jsqte As Integer
  1111.     
  1112.     '对文本框录入内容进行为零和为空判断(固定不变)
  1113.     With Rec_CodeSet
  1114.         For Jsqte = 0 To Max_Text_Index
  1115.             If Textint(Jsqte, 8) = 1 Then     '字段不能为空
  1116.                 If Len(Trim(LrText(Jsqte).Text)) = 0 Then
  1117.                     Tsxx = Textstr(Jsqte, 7) & "不能为空!"
  1118.                     SSTab1.Tab = 0
  1119.                     Call Xtxxts(Tsxx, 0, 1)
  1120.                     LrText(Jsqte).SetFocus
  1121.                     Bclrsj = False
  1122.                     Exit Function
  1123.                 End If
  1124.             Else
  1125.                 If Textint(Jsqte, 8) = 2 Then   '字段不能为零
  1126.                     If Val(Trim(LrText(Jsqte).Text)) = 0 Then
  1127.                         Tsxx = Textstr(Jsqte, 7) & "不能为零!"
  1128.                         SSTab1.Tab = 0
  1129.                         Call Xtxxts(Tsxx, 0, 1)
  1130.                         LrText(Jsqte).SetFocus
  1131.                         Bclrsj = False
  1132.                         Exit Function
  1133.                     End If
  1134.                 End If
  1135.             End If
  1136.         Next Jsqte
  1137.     
  1138.         '对需要进行事后判断的文本框录入内容进行有效性判断 (固定不变)
  1139.         For Jsqte = 0 To Max_Text_Index
  1140.             If Textint(Jsqte, 9) = 0 Or Textint(Jsqte, 9) = 2 Then
  1141.                 If Not TextYxxpd(Jsqte) Then
  1142.                     Exit Function
  1143.                 End If
  1144.             End If
  1145.         Next Jsqte
  1146.         
  1147.         If Lrzt = 1 Then  '增 加
  1148.         
  1149.             '[>>判断编码是否重复
  1150.             If .State = 1 Then .Close
  1151.             .Open "SELECT * FROM Cask_Wrappage WHERE WrappageCode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1152.             
  1153.             If Not .EOF Then
  1154.                 Tsxx = "包装物编码重复!"
  1155.                 Call Xtxxts(Tsxx, 0, 1)
  1156.                 LrText(0).SetFocus
  1157.                 Bclrsj = False
  1158.                 Exit Function
  1159.             End If
  1160.            
  1161.             '判断名称是否重复
  1162.             If .State = 1 Then .Close
  1163.             .Open "SELECT * FROM Cask_Wrappage WHERE WrappageName= '" + Trim(LrText(1).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1164.             
  1165.             If Not .EOF Then
  1166.                 Tsxx = "包装物名称重复!"
  1167.                 Call Xtxxts(Tsxx, 0, 1)
  1168.                 LrText(1).SetFocus
  1169.                 
  1170.                 Bclrsj = False
  1171.                 Exit Function
  1172.             End If
  1173.     
  1174.     
  1175.             '判断记录内容无误后,将记录内容写入数据表
  1176.             On Error GoTo Swcwcl
  1177.     
  1178.             Cw_DataEnvi.DataConnect.BeginTrans
  1179.    
  1180.             .AddNew
  1181.                 .Fields("WrappageCode") = Trim(LrText(0).Text)    '包装物编码
  1182.                 .Fields("WrappageName") = Trim(LrText(1).Text)    '包装物名称
  1183.                 .Fields("UnitCode") = Trim(LrText(2).Tag)         '计量单位编码
  1184.                 .Fields("SortCode") = Trim(LrText(3).Tag)         '类型编码
  1185.                 .Fields("Remark") = Trim(LrText(4).Text)          '备注
  1186.             .Update
  1187.             
  1188.              Cw_DataEnvi.DataConnect.Execute "delete Cask_Appertain where WrappageCode= '" & Trim(LrText(0).Text) & "'"
  1189.             
  1190.             '附属物
  1191.             
  1192.             If .State = 1 Then .Close
  1193.             .Open "SELECT * FROM Cask_Appertain", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1194.             For Jsqte = Grid_Layout.FixedRows To Grid_Layout.Rows - 1
  1195.                 If Grid_Layout.TextMatrix(Jsqte, 0) = "*" Then
  1196.                     .AddNew
  1197.                     .Fields("WrappageCode") = Trim(LrText(0).Text)          '包装物编码
  1198.                     .Fields("AppertainCode") = Trim(Grid_Layout.TextMatrix(Jsqte, Sydz("001", GridStr1(), Szzls1)))          '附属物编码
  1199.                     .Fields("UnitPrice") = Val(Grid_Layout.ValueMatrix(Jsqte, Sydz("004", GridStr1(), Szzls1)))              '单价
  1200.                     .Fields("Quantity") = Val(Grid_Layout.ValueMatrix(Jsqte, Sydz("005", GridStr1(), Szzls1)))               '数量
  1201.                     .Fields("Remark") = Trim(Grid_Layout.TextMatrix(Jsqte, Sydz("006", GridStr1(), Szzls1)))                 '备注
  1202.                     .Fields("DataType") = 1          '数据类型
  1203.                     .Update
  1204.                 End If
  1205.             Next Jsqte
  1206.             
  1207.             '包装参数
  1208.             
  1209.             If .State = 1 Then .Close
  1210.             .Open "SELECT * FROM  Cask_Appertain", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1211.             For Jsqte = Grid_Datum.FixedRows To Grid_Datum.Rows - 1
  1212.                 If Grid_Datum.TextMatrix(Jsqte, 0) = "*" Then
  1213.                     .AddNew
  1214.                     .Fields("WrappageCode") = Trim(LrText(0).Text)          '包装物编码
  1215.                     .Fields("AppertainCode") = Trim(Grid_Datum.TextMatrix(Jsqte, Sydz("001", GridStr2(), Szzls2)))          '物料编码
  1216.                     .Fields("UnitPrice") = Val(Grid_Datum.ValueMatrix(Jsqte, Sydz("005", GridStr2(), Szzls2)))              '单价
  1217.                     .Fields("Quantity") = Val(Grid_Datum.ValueMatrix(Jsqte, Sydz("006", GridStr2(), Szzls2)))               '数量
  1218.                     .Fields("Remark") = Trim(Grid_Datum.TextMatrix(Jsqte, Sydz("007", GridStr2(), Szzls2)))                 '备注
  1219.                     .Fields("DataType") = 2          '数据类型
  1220.                     .Update
  1221.                 End If
  1222.             Next Jsqte
  1223.             
  1224.             Cw_DataEnvi.DataConnect.CommitTrans
  1225.    
  1226.             '将记录加入网格
  1227.             Sqlstr = "SELECT Cask_Wrappage.*,Cask_Sort.SortName,Gy_UnitSet.UnitName  " & _
  1228.                     "FROM Cask_Wrappage LEFT OUTER JOIN Cask_Sort ON Cask_Wrappage.SortCode =" & _
  1229.                     "Cask_Sort.SortCode LEFT OUTER JOIN Gy_UnitSet ON Cask_Wrappage.UnitCode =" & _
  1230.                     "Gy_UnitSet.UnitCode  WHERE WrappageCode= '" + Trim(LrText(0).Text) + "'"
  1231.             Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1232.             
  1233.             With CzxsGrid
  1234.                 .AddItem ""
  1235.                 .RowHeight(.Rows - 1) = Sjhgd
  1236.                 .Select .Rows - 1, Qslz
  1237.                 Call Jltcwg(Cxnrrec, .Rows - 1)
  1238.             End With
  1239.    
  1240.             Tsxx = "保存完毕!"
  1241.             Call Xtxxts(Tsxx, 0, 4)
  1242.             
  1243.             Call Cshlrxx(1)
  1244.             LrText(0).SetFocus
  1245.    
  1246.             '将网格按编码排序
  1247.             With CzxsGrid
  1248.                 .Col = Sydz("001", GridStr(), Szzls)
  1249.                 CzxsGrid.Sort = flexSortStringAscending
  1250.             End With
  1251.             '<<]
  1252.     
  1253.         Else  '否则为修改记录
  1254.  
  1255.             If .State = 1 Then .Close
  1256.             .Open "SELECT * FROM Cask_Wrappage WHERE WrappageName= '" + Trim(LrText(1).Text) + "' and WrappageCode<>'" & Trim(LrText(0).Text) & "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1257.         
  1258.             If Not .EOF Then
  1259.                 Tsxx = "包装物名称!"
  1260.                 Call Xtxxts(Tsxx, 0, 1)
  1261.                 LrText(1).SetFocus
  1262.                 Bclrsj = False
  1263.                 Exit Function
  1264.             End If
  1265.         
  1266.             On Error GoTo Swcwcl
  1267.         
  1268.             Cw_DataEnvi.DataConnect.BeginTrans
  1269.          
  1270.             If .State = 1 Then .Close
  1271.             .Open "SELECT * FROM Cask_Wrappage WHERE WrappageCode= '" + Trim(LrText(0).Text) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1272.              
  1273.             If Not .EOF Then
  1274.                 .Fields("WrappageName") = Trim(LrText(1).Text)    '包装物名称
  1275.                 .Fields("UnitCode") = Trim(LrText(2).Tag)         '计量单位编码
  1276.                 .Fields("SortCode") = Trim(LrText(3).Tag)         '类型编码
  1277.                 .Fields("Remark") = Trim(LrText(4).Text)          '备注
  1278.                 .Update
  1279.             End If
  1280.             
  1281.             Cw_DataEnvi.DataConnect.Execute "delete Cask_Appertain where WrappageCode= '" & Trim(LrText(0).Text) & "'"
  1282.     
  1283.             '附属物
  1284.             
  1285.             If .State = 1 Then .Close
  1286.             .Open "SELECT * FROM  Cask_Appertain", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1287.             For Jsqte = Grid_Layout.FixedRows To Grid_Layout.Rows - 1
  1288.                 If Grid_Layout.TextMatrix(Jsqte, 0) = "*" Then
  1289.                     .AddNew
  1290.                     .Fields("WrappageCode") = Trim(LrText(0).Text)          '包装物编码
  1291.                     .Fields("AppertainCode") = Trim(Grid_Layout.TextMatrix(Jsqte, Sydz("001", GridStr1(), Szzls1)))          '附属物编码
  1292.                     .Fields("UnitPrice") = Val(Grid_Layout.ValueMatrix(Jsqte, Sydz("004", GridStr1(), Szzls1)))              '单价
  1293.                     .Fields("Quantity") = Val(Grid_Layout.ValueMatrix(Jsqte, Sydz("005", GridStr1(), Szzls1)))               '数量
  1294.                     .Fields("Remark") = Trim(Grid_Layout.TextMatrix(Jsqte, Sydz("006", GridStr1(), Szzls1)))                 '备注
  1295.                     .Fields("DataType") = 1          '数据类型
  1296.                     .Update
  1297.                 End If
  1298.             Next Jsqte
  1299.             
  1300.             '包装参数
  1301.             
  1302.             If .State = 1 Then .Close
  1303.             .Open "SELECT * FROM  Cask_Appertain", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1304.             For Jsqte = Grid_Datum.FixedRows To Grid_Datum.Rows - 1
  1305.                 If Grid_Datum.TextMatrix(Jsqte, 0) = "*" Then
  1306.                     .AddNew
  1307.                     .Fields("WrappageCode") = Trim(LrText(0).Text)          '包装物编码
  1308.                     .Fields("AppertainCode") = Trim(Grid_Datum.TextMatrix(Jsqte, Sydz("001", GridStr2(), Szzls2)))          '物料编码
  1309.                     .Fields("UnitPrice") = Val(Grid_Datum.ValueMatrix(Jsqte, Sydz("005", GridStr2(), Szzls2)))              '单价
  1310.                     .Fields("Quantity") = Val(Grid_Datum.ValueMatrix(Jsqte, Sydz("006", GridStr2(), Szzls2)))               '数量
  1311.                     .Fields("Remark") = Trim(Grid_Datum.TextMatrix(Jsqte, Sydz("007", GridStr2(), Szzls2)))                 '备注
  1312.                     .Fields("DataType") = 2          '数据类型
  1313.                     .Update
  1314.                 End If
  1315.             Next Jsqte
  1316.             
  1317.             Cw_DataEnvi.DataConnect.CommitTrans
  1318.             
  1319.             '刷新当前网格
  1320.             Sqlstr = "SELECT Cask_Wrappage.*,Cask_Sort.SortName,Gy_UnitSet.UnitName  " & _
  1321.                 "FROM Cask_Wrappage LEFT OUTER JOIN Cask_Sort ON Cask_Wrappage.SortCode =" & _
  1322.                 "Cask_Sort.SortCode LEFT OUTER JOIN Gy_UnitSet ON Cask_Wrappage.UnitCode =" & _
  1323.                 "Gy_UnitSet.UnitCode  WHERE WrappageCode= '" + Trim(LrText(0).Text) + "'"
  1324.             Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1325.             
  1326.             If Not Cxnrrec.EOF Then
  1327.                 With CzxsGrid
  1328.                     Call Jltcwg(Cxnrrec, .Row)
  1329.                 End With
  1330.             Else
  1331.                 Tsxx = "该记录已经被其他人删除,请刷新当前数据!"
  1332.                 Call Xtxxts(Tsxx, 0, 4)
  1333.                 Exit Function
  1334.             End If
  1335.    
  1336.         End If
  1337.      
  1338.         '保存记录成功,函数返回真值
  1339.         Bclrsj = True
  1340.         Exit Function
  1341.     End With
  1342.  
  1343. Swcwcl:
  1344.     Cw_DataEnvi.DataConnect.RollbackTrans
  1345.     
  1346.     Tsxx = "存盘过程中出现错误,程序自动恢复保存前包装物!"
  1347.     Call Xtxxts(Tsxx, 0, 1)
  1348.     
  1349.     Exit Function
  1350. End Function
  1351. Private Function Cshlrxx(lrztxx As Integer) As Boolean              '初始化录入字段信息
  1352.     
  1353.     TextChangeLock = True       '关闭文本框Chang事件
  1354.     Grid_Layout.Clear 1
  1355.     Grid_Datum.Clear 1
  1356.     SSTab1.Tab = 0
  1357.     If lrztxx = 1 Then
  1358.         '增加新记录时将文本框清空
  1359.         For Jsqte = 0 To Max_Text_Index
  1360.             If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
  1361.                 LrText(Jsqte).Text = ""
  1362.                 LrText(Jsqte).Tag = ""
  1363.             End If
  1364.             TextValiJudgeLock(Jsqte) = True
  1365.         Next Jsqte
  1366.         '[>>
  1367.         '在此处可添加新增记录时初始化设置
  1368.         '<<]
  1369.     Else
  1370.         
  1371.         '修改记录时根据记录关键字(编码)从数据表中读入其他字段内容
  1372.         With RecTemp
  1373.         
  1374.             Sqlstr = "SELECT Cask_Wrappage.*,Cask_Sort.SortName,Gy_UnitSet.UnitName  " & _
  1375.                     "FROM Cask_Wrappage LEFT OUTER JOIN Cask_Sort ON Cask_Wrappage.SortCode =" & _
  1376.                     "Cask_Sort.SortCode LEFT OUTER JOIN Gy_UnitSet ON Cask_Wrappage.UnitCode =" & _
  1377.                     "Gy_UnitSet.UnitCode Where WrappageCode='" & Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) & "'"
  1378.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1379.        
  1380.             '记录如存在则读入其内容,否则提示记录已被其他人删除
  1381.             If Not RecTemp.EOF Then
  1382.                 LrText(0).Text = Trim(RecTemp!WrappageCode & "")            '包装物编码
  1383.                 LrText(1).Text = Trim(RecTemp!WrappageName & "")            '包装物名称
  1384.                 LrText(2).Tag = Trim(RecTemp!UnitCode & "")                 '计量单位编码
  1385.                 LrText(2).Text = Trim(RecTemp!UnitName & "")                '计量单位名称
  1386.                 LrText(3).Tag = Trim(RecTemp!SortCode & "")                 '类别编码
  1387.                 LrText(3).Text = Trim(RecTemp!SortName & "")                '类别名称
  1388.                 LrText(4).Text = Trim(RecTemp!Remark & "")                  '备注
  1389.                 '附属物
  1390.                 Sqlstr = "SELECT Cask_Wrappage.*,Cask_Appertain.*,Gy_UnitSet.UnitName FROM Cask_Wrappage INNER JOIN " & _
  1391.                             "Cask_Appertain ON Cask_Wrappage.WrappageCode =Cask_Appertain.AppertainCode LEFT OUTER " & _
  1392.                             "Join Gy_UnitSet ON Cask_Wrappage.UnitCode =Gy_UnitSet.UnitCode Where Cask_Appertain.WrappageCode='" & Trim(LrText(0).Text) & "' and DataType=1"
  1393.       
  1394.                 Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1395.                 Jsqte = Grid_Layout.FixedRows
  1396.                 Do While Not RecTemp.EOF
  1397.                       If Jsqte >= Grid_Layout.Rows Then
  1398.                          Grid_Layout.AddItem ""
  1399.                       End If
  1400.                     Grid_Layout.TextMatrix(Jsqte, 0) = "*"
  1401.                     
  1402.                     Grid_Layout.TextMatrix(Jsqte, Sydz("001", GridStr1(), Szzls1)) = Trim("" & RecTemp!AppertainCode)        '附属物编码
  1403.                     Grid_Layout.TextMatrix(Jsqte, Sydz("002", GridStr1(), Szzls1)) = Trim("" & RecTemp!WrappageName)         '附属物名称
  1404.                     Grid_Layout.TextMatrix(Jsqte, Sydz("003", GridStr1(), Szzls1)) = Trim("" & RecTemp!UnitName)             '计量单位
  1405.                     Grid_Layout.TextMatrix(Jsqte, Sydz("004", GridStr1(), Szzls1)) = IIf(Val(RecTemp!UnitPrice) = 0, "", RecTemp!UnitPrice)        '单价
  1406.                     Grid_Layout.TextMatrix(Jsqte, Sydz("005", GridStr1(), Szzls1)) = IIf(Val(RecTemp!Quantity) = 0, "", RecTemp!Quantity)          '数量
  1407.                     Grid_Layout.TextMatrix(Jsqte, Sydz("006", GridStr1(), Szzls1)) = Trim("" & RecTemp!Remark)               '备注
  1408.                     Grid_Layout.RowHeight(Jsqte) = Sjhgd1
  1409.                     RecTemp.MoveNext
  1410.                     Jsqte = Jsqte + 1
  1411.                 Loop
  1412.                 If RecTemp.RecordCount >= GridInf1(3) Then
  1413.                     Grid_Layout.AddItem ""
  1414.                     Grid_Layout.RowHeight(Jsqte) = Sjhgd1
  1415.                 Else
  1416.                     Grid_Layout.Rows = 16
  1417.                 End If
  1418.                 
  1419.                 '包装参数
  1420.                 Sqlstr = "SELECT Cask_Appertain.*,Gy_Material.MName,Gy_Material.Model,Gy_UnitSet.UnitName " & _
  1421.                         "FROM Gy_Material INNER JOIN Cask_Appertain ON Gy_Material.MNumber =" & _
  1422.                         "Cask_Appertain.AppertainCode LEFT OUTER JOIN Gy_UnitSet ON Gy_Material.PrimaryUnit =" & _
  1423.                         "Gy_UnitSet.UnitCode Where Gy_Material.StopFlag<>1 and Cask_Appertain.WrappageCode='" & Trim(LrText(0).Text) & "' and DataType=2"
  1424.                 Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1425.                 Jsqte = Grid_Datum.FixedRows
  1426.                 Do While Not RecTemp.EOF
  1427.                       If Jsqte >= Grid_Datum.Rows Then
  1428.                          Grid_Datum.AddItem ""
  1429.                       End If
  1430.                     Grid_Datum.TextMatrix(Jsqte, 0) = "*"
  1431.                     
  1432.                     Grid_Datum.TextMatrix(Jsqte, Sydz("001", GridStr2(), Szzls2)) = Trim("" & RecTemp!AppertainCode) '物料编号
  1433.                     Grid_Datum.TextMatrix(Jsqte, Sydz("002", GridStr2(), Szzls2)) = Trim("" & RecTemp!MName)         '物料名称
  1434.                     Grid_Datum.TextMatrix(Jsqte, Sydz("003", GridStr2(), Szzls2)) = Trim("" & RecTemp!model)         '规格型号
  1435.                     Grid_Datum.TextMatrix(Jsqte, Sydz("004", GridStr2(), Szzls2)) = Trim("" & RecTemp!UnitName)      '计量单位
  1436.                     Grid_Datum.TextMatrix(Jsqte, Sydz("005", GridStr2(), Szzls2)) = IIf(Val(RecTemp!UnitPrice) = 0, "", RecTemp!UnitPrice) '单价
  1437.                     Grid_Datum.TextMatrix(Jsqte, Sydz("006", GridStr2(), Szzls2)) = IIf(Val(RecTemp!Quantity) = 0, "", RecTemp!Quantity)          '数量
  1438.                     Grid_Datum.TextMatrix(Jsqte, Sydz("007", GridStr2(), Szzls2)) = Trim("" & RecTemp!Remark)        '备注
  1439.                     Grid_Datum.RowHeight(Jsqte) = Sjhgd2
  1440.                     RecTemp.MoveNext
  1441.                     Jsqte = Jsqte + 1
  1442.                 Loop
  1443.                 If RecTemp.RecordCount >= GridInf2(3) Then
  1444.                     Grid_Datum.AddItem ""
  1445.                     Grid_Datum.RowHeight(Jsqte) = Sjhgd2
  1446.                 Else
  1447.                     Grid_Datum.Rows = 16
  1448.                 End If
  1449.             Else
  1450.                 Tsxx = "该记录已经被其他人删除,请刷新当前数据!"
  1451.                 Call Xtxxts(Tsxx, 0, 4)
  1452.                 Call Cancel
  1453.                 TextChangeLock = False
  1454.                 Exit Function
  1455.             End If
  1456.             
  1457.         End With
  1458.         
  1459.     End If
  1460.     
  1461.     Cshlrxx = True
  1462.     TextChangeLock = False
  1463.     
  1464. End Function
  1465. Private Sub Scdqjl()                 '删 除 当 前 记 录
  1466.     Dim yhAnswer As Integer
  1467.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1468.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  1469.         Exit Sub
  1470.     End If
  1471.     '非数据行不能删除
  1472.     If CzxsGrid.Row < CzxsGrid.FixedRows Then
  1473.         Exit Sub
  1474.     End If
  1475.   
  1476.     '用户确认是否删除记录
  1477.     Tsxx = "请确认是否删除当前记录?"
  1478.     yhAnswer = Xtxxts(Tsxx, 2, 2)
  1479.     
  1480.     If yhAnswer = 2 Then
  1481.         Exit Sub
  1482.     End If
  1483.   
  1484.     On Error GoTo Cwcl
  1485.   
  1486.     Cw_DataEnvi.DataConnect.BeginTrans
  1487.   
  1488.     '[以下需自定义部分
  1489.     
  1490.     Cw_DataEnvi.DataConnect.Execute "delete Cask_Appertain where WrappageCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  1491.     Cw_DataEnvi.DataConnect.Execute "delete Cask_Wrappage where WrappageCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  1492.     '以上为自定义部分]
  1493.   
  1494.     Cw_DataEnvi.DataConnect.CommitTrans
  1495.     
  1496.     CzxsGrid.RemoveItem CzxsGrid.Row
  1497.   
  1498.     Exit Sub
  1499.   
  1500. Cwcl:
  1501.     Cw_DataEnvi.DataConnect.RollbackTrans
  1502.     
  1503.     If Err.Number = -2147217873 Then              '(-2147217873 为SQL Server 2000通过建立外键产生的错误号)
  1504.         Tsxx = "该包装物已经被使用,不能删除!"
  1505.         Call Xtxxts(Tsxx, 0, 1)
  1506.         Exit Sub
  1507.     Else
  1508.         Tsxx = "出现未知情况,该包装物不能被删除!"
  1509.         Call Xtxxts(Tsxx, 0, 1)
  1510.         Exit Sub
  1511.     End If
  1512.     
  1513. End Sub
  1514. '*******************以下区域为编写自定义过程区域**********************
  1515. Private Sub Lrsjhx()                                                   '文本框录入数据回写
  1516.   With Grid_Layout
  1517.    If YdCombo.Visible Then
  1518.     .Text = Trim(YdCombo.Text)
  1519.    End If
  1520.    If Ydtext.Visible Then
  1521.     .Text = Trim(Ydtext.Text)
  1522.    End If
  1523.    
  1524.    '(如果字段录入内容发生变化,则打开有效性判断锁)
  1525.    If Zdlrqnr1 <> Trim(.Text) Then
  1526.       Yxxpdlock1 = False
  1527.       Hyxxpdlock1 = False
  1528.    End If
  1529.    
  1530.    '如果字段录入内容不为空则写数据行有效性标志
  1531.    
  1532.    If Len(Trim(.Text)) <> 0 Then
  1533.       Call Xyxhbz(.Row)
  1534.    End If
  1535.    
  1536.    '隐藏文本框,帮助按钮,列表组合框
  1537.    Call Ycwbk
  1538.    
  1539.   End With
  1540. End Sub
  1541. Private Sub Lrsjhx2()                                                   '文本框录入数据回写
  1542.   With Grid_Datum
  1543.    If YdCombo2.Visible Then
  1544.     .Text = Trim(YdCombo2.Text)
  1545.    End If
  1546.    If Ydtext2.Visible Then
  1547.     .Text = Trim(Ydtext2.Text)
  1548.    End If
  1549.    
  1550.    '(如果字段录入内容发生变化,则打开有效性判断锁)
  1551.    If Zdlrqnr2 <> Trim(.Text) Then
  1552.       Yxxpdlock2 = False
  1553.       Hyxxpdlock2 = False
  1554.    End If
  1555.    
  1556.    '如果字段录入内容不为空则写数据行有效性标志
  1557.    
  1558.    If Len(Trim(.Text)) <> 0 Then
  1559.       Call Xyxhbz2(.Row)
  1560.    End If
  1561.    
  1562.    '隐藏文本框,帮助按钮,列表组合框
  1563.    Call Ycwbk2
  1564.    
  1565.   End With
  1566. End Sub
  1567. Private Sub Xyxhbz(sjh As Long)                                         '写行有效性标志,并判断是否增行
  1568.    With Grid_Layout
  1569.     If .TextMatrix(sjh, 0) = "*" Then
  1570.        Exit Sub
  1571.     End If
  1572.     .TextMatrix(sjh, 0) = "*"
  1573.     If sjh >= .Rows - Fzxwghs1 - 1 Then
  1574.        .AddItem ""
  1575.        .RowHeight(.Rows - 1) = Sjhgd
  1576.     End If
  1577.    End With
  1578. End Sub
  1579. Private Sub Xyxhbz2(sjh As Long)                                         '写行有效性标志,并判断是否增行
  1580.    With Grid_Datum
  1581.     If .TextMatrix(sjh, 0) = "*" Then
  1582.        Exit Sub
  1583.     End If
  1584.     .TextMatrix(sjh, 0) = "*"
  1585.     If sjh >= .Rows - Fzxwghs2 - 1 Then
  1586.        .AddItem ""
  1587.        .RowHeight(.Rows - 1) = Sjhgd
  1588.     End If
  1589.    End With
  1590. End Sub
  1591. Private Sub Ycwbk()                      '隐藏文本框,帮助按钮,列表组合框
  1592.  Valilock1 = True
  1593.    Ydtext.Visible = False
  1594.    YdCombo.Visible = False
  1595.    Ydcommand.Visible = False
  1596. End Sub
  1597. Private Sub Ycwbk2()                      '隐藏文本框,帮助按钮,列表组合框
  1598.  Valilock2 = True
  1599.    Ydtext2.Visible = False
  1600.    YdCombo2.Visible = False
  1601.    Ydcommand22.Visible = False
  1602. End Sub
  1603. Private Sub xswbk()                       '在当前选中单元显示文本框,列表框,帮助按钮(通用)
  1604.   Dim Wbkpy As Integer, Wbkpy1 As Integer '文本框偏移量
  1605.   If CBoolean Then
  1606.     Exit Sub
  1607.   End If
  1608.   '如果单据操作状态为浏览状态则不能显示录入载体
  1609.    If Grid_Layout.Row < Grid_Layout.FixedRows Then
  1610.      Exit Sub
  1611.    End If
  1612.   If Grid_Layout.ColHidden(Grid_Layout.Col) Then
  1613.    Exit Sub
  1614.   End If
  1615.   '显示文本框前返回有效行列(解决滚动条问题)
  1616.   Call Xldqh
  1617.   Call Xldql
  1618.   
  1619.   '隐藏文本框,帮助按钮,列表组合框
  1620.   Call Ycwbk
  1621.   
  1622.   With Grid_Layout
  1623.     Dqlrwgh1 = .Row
  1624.     Dqlrwgl1 = .Col
  1625.     If Not GridBoolean1(.Col, 1) Or .Row < .FixedRows Then
  1626.        Exit Sub
  1627.     End If
  1628.      
  1629.     Wbkpy = 30
  1630.     Wbkpy1 = 15
  1631.     
  1632.     If GridBoolean1(.Col, 3) Then
  1633.        YdCombo.Left = .CellLeft + .Left + Wbkpy
  1634.        YdCombo.Top = .CellTop + .Top + Wbkpy
  1635.        YdCombo.Width = .CellWidth - Wbkpy1
  1636.        Call Wbkcl
  1637.        YdCombo.Visible = True
  1638.        YdCombo.SetFocus
  1639.        Ydcommand.Visible = False
  1640.        Ydtext.Visible = False
  1641.     Else
  1642.       If GridBoolean1(.Col, 2) Then
  1643.         Ydcommand.Left = .Left + .CellLeft + .CellWidth - Ydcommand.Width + Wbkpy
  1644.         Ydcommand.Top = .Top + .CellTop + .CellHeight - Ydcommand.Height + Wbkpy
  1645.         Ydcommand.Visible = True
  1646.       Else
  1647.         Ydcommand.Visible = False
  1648.       End If
  1649.      
  1650.       Ydtext.Left = .CellLeft + .Left + Wbkpy
  1651.       Ydtext.Top = .CellTop + .Top + Wbkpy
  1652.       If Ydcommand.Visible Then
  1653.         If Sfblbzkd1 Then
  1654.          Ydtext.Width = .CellWidth - Ydcommand.Width
  1655.         Else
  1656.          Ydtext.Width = .CellWidth - Wbkpy1
  1657.         End If
  1658.       Else
  1659.          Ydtext.Width = .CellWidth - Wbkpy1
  1660.       End If
  1661.       Ydtext.Height = .CellHeight - Wbkpy1
  1662.       
  1663.       If GridInt1(.Col, 2) <> 0 Then
  1664.          Ydtext.MaxLength = GridInt1(.Col, 2)
  1665.       Else
  1666.          Ydtext.MaxLength = 3000
  1667.       End If
  1668.       
  1669.       Call Wbkcl
  1670.       On Error Resume Next
  1671.       Ydtext.Visible = True
  1672.       Ydtext.SetFocus
  1673.     End If
  1674.     Dqtoprow1 = .TopRow
  1675.     Dqleftcol1 = .LeftCol
  1676.     
  1677.     '重置锁值
  1678.     Valilock1 = False
  1679.     Wbkbhlock1 = False
  1680.  End With
  1681. End Sub
  1682. Private Sub xswbk2()                       '在当前选中单元显示文本框,列表框,帮助按钮(通用)
  1683.   Dim Wbkpy As Integer, Wbkpy1 As Integer '文本框偏移量
  1684.   If CBoolean Then
  1685.     Exit Sub
  1686.   End If
  1687.   '如果单据操作状态为浏览状态则不能显示录入载体
  1688.    If Grid_Datum.Row < Grid_Datum.FixedRows Then
  1689.      Exit Sub
  1690.    End If
  1691.   If Grid_Datum.ColHidden(Grid_Datum.Col) Then
  1692.    Exit Sub
  1693.   End If
  1694.   '显示文本框前返回有效行列(解决滚动条问题)
  1695.   Call Xldqh2
  1696.   Call Xldql2
  1697.   
  1698.   '隐藏文本框,帮助按钮,列表组合框
  1699.   Call Ycwbk2
  1700.   
  1701.   With Grid_Datum
  1702.     Dqlrwgh2 = .Row
  1703.     Dqlrwgl2 = .Col
  1704.     If Not GridBoolean2(.Col, 1) Or .Row < .FixedRows Then
  1705.        Exit Sub
  1706.     End If
  1707.      
  1708.     Wbkpy = 30
  1709.     Wbkpy1 = 15
  1710.     
  1711.     If GridBoolean2(.Col, 3) Then
  1712.        YdCombo2.Left = .CellLeft + .Left + Wbkpy
  1713.        YdCombo2.Top = .CellTop + .Top + Wbkpy
  1714.        YdCombo2.Width = .CellWidth - Wbkpy1
  1715.        Call Wbkcl2
  1716.        YdCombo2.Visible = True
  1717.        YdCombo2.SetFocus
  1718.        Ydcommand22.Visible = False
  1719.        Ydtext2.Visible = False
  1720.     Else
  1721.       If GridBoolean2(.Col, 2) Then
  1722.         Ydcommand22.Left = .Left + .CellLeft + .CellWidth - Ydcommand22.Width + Wbkpy
  1723.         Ydcommand22.Top = .Top + .CellTop + .CellHeight - Ydcommand22.Height + Wbkpy
  1724.         Ydcommand22.Visible = True
  1725.       Else
  1726.         Ydcommand22.Visible = False
  1727.       End If
  1728.      
  1729.       Ydtext2.Left = .CellLeft + .Left + Wbkpy
  1730.       Ydtext2.Top = .CellTop + .Top + Wbkpy
  1731.       If Ydcommand22.Visible Then
  1732.         If Sfblbzkd2 Then
  1733.          Ydtext2.Width = .CellWidth - Ydcommand22.Width
  1734.         Else
  1735.          Ydtext2.Width = .CellWidth - Wbkpy1
  1736.         End If
  1737.       Else
  1738.          Ydtext2.Width = .CellWidth - Wbkpy1
  1739.       End If
  1740.       Ydtext2.Height = .CellHeight - Wbkpy1
  1741.       
  1742.       If GridInt2(.Col, 2) <> 0 Then
  1743.          Ydtext2.MaxLength = GridInt2(.Col, 2)
  1744.       Else
  1745.          Ydtext2.MaxLength = 3000
  1746.       End If
  1747.       
  1748.       Call Wbkcl2
  1749.       
  1750.       
  1751.       Ydtext2.Visible = True
  1752.       Ydtext2.SetFocus
  1753.       
  1754.       
  1755.     End If
  1756.     Dqtoprow2 = .TopRow
  1757.     Dqleftcol2 = .LeftCol
  1758.     
  1759.     '重置锁值
  1760.     Valilock2 = False
  1761.     Wbkbhlock2 = False
  1762.  End With
  1763. End Sub
  1764. Private Sub Wbkcl()                                                 '文本框录入之前处理(根据实际情况)
  1765.  Dim xswbrr As String
  1766.  With Grid_Layout
  1767.     Zdlrqnr1 = Trim(.Text)
  1768.     xswbrr = Trim(.Text)
  1769.     
  1770.     If GridBoolean1(.Col, 3) Then   '列表框录入
  1771.     
  1772.        '填充列表框程序
  1773.         Call FillCombo(YdCombo, GridStr1(.Col, 5), xswbrr, 0)
  1774.     Else
  1775.        Wbkbhlock1 = True
  1776.        
  1777.          '====以下为用户自定义
  1778.            Ydtext.Text = xswbrr
  1779.          '====以上为用户自定义
  1780.          
  1781.        Wbkbhlock1 = False
  1782.        Ydtext.SelStart = Len(Ydtext.Text)
  1783.     End If
  1784.  End With
  1785. End Sub
  1786. Private Sub Wbkcl2()                                                 '文本框录入之前处理(根据实际情况)
  1787.  Dim xswbrr As String
  1788.  With Grid_Datum
  1789.     Zdlrqnr2 = Trim(.Text)
  1790.     xswbrr = Trim(.Text)
  1791.     
  1792.     If GridBoolean2(.Col, 3) Then   '列表框录入
  1793.     
  1794.        '填充列表框程序
  1795.         Call FillCombo(YdCombo2, GridStr2(.Col, 5), xswbrr, 0)
  1796.     Else
  1797.        Wbkbhlock2 = True
  1798.        
  1799.          '====以下为用户自定义
  1800.            Ydtext2.Text = xswbrr
  1801.          '====以上为用户自定义
  1802.          
  1803.        Wbkbhlock2 = False
  1804.        Ydtext2.SelStart = Len(Ydtext2.Text)
  1805.     End If
  1806.  End With
  1807. End Sub
  1808. Private Sub Xldqh()                                                      '显露当前行
  1809.   Dim Toprowte As Long
  1810.   With Grid_Layout
  1811.     Toprowte = 0
  1812.     Do While .CellTop + .RowHeight(.Row) + Fzxwghs1 * Sjhgd > .Height And .TopRow <> Toprowte
  1813.        Toprowte = .TopRow
  1814.        .TopRow = .TopRow + 1
  1815.     Loop
  1816.     Toprowte = 0
  1817.     Do While .CellTop < .FixedRows * .RowHeight(0) And .TopRow <> Toprowte
  1818.        Toprowte = .TopRow
  1819.        .TopRow = .TopRow - 1
  1820.     Loop
  1821.   End With
  1822. End Sub
  1823. Private Sub Xldqh2()                                                      '显露当前行
  1824.   Dim Toprowte As Long
  1825.   With Grid_Datum
  1826.     Toprowte = 0
  1827.     Do While .CellTop + .RowHeight(.Row) + Fzxwghs2 * Sjhgd > .Height And .TopRow <> Toprowte
  1828.        Toprowte = .TopRow
  1829.        .TopRow = .TopRow + 1
  1830.     Loop
  1831.     Toprowte = 0