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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{65A39231-6133-11D1-BAA2-444553540000}#1.0#0"; "VSLIGHT6.OCX"
  3. Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.OCX"
  4. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  5. Begin VB.Form Class_frmEmp 
  6.    Caption         =   "类别人员选择"
  7.    ClientHeight    =   8595
  8.    ClientLeft      =   315
  9.    ClientTop       =   390
  10.    ClientWidth     =   11880
  11.    HelpContextID   =   2212009
  12.    Icon            =   "基础设置_类别人员选择.frx":0000
  13.    KeyPreview      =   -1  'True
  14.    LinkTopic       =   "Form1"
  15.    LockControls    =   -1  'True
  16.    ScaleHeight     =   8595
  17.    ScaleWidth      =   11880
  18.    WindowState     =   2  'Maximized
  19.    Begin VB.TextBox Ydtext 
  20.       BackColor       =   &H00C0FFFF&
  21.       BorderStyle     =   0  'None
  22.       Height          =   300
  23.       Left            =   9570
  24.       MultiLine       =   -1  'True
  25.       TabIndex        =   9
  26.       Top             =   2820
  27.       Visible         =   0   'False
  28.       Width           =   1185
  29.    End
  30.    Begin VB.ComboBox YdCombo 
  31.       Height          =   300
  32.       Left            =   9570
  33.       Style           =   2  'Dropdown List
  34.       TabIndex        =   8
  35.       Top             =   3210
  36.       Visible         =   0   'False
  37.       Width           =   1695
  38.    End
  39.    Begin VB.CommandButton Ydcommand 
  40.       Height          =   300
  41.       Left            =   11370
  42.       Picture         =   "基础设置_类别人员选择.frx":1042
  43.       Style           =   1  'Graphical
  44.       TabIndex        =   7
  45.       Top             =   3210
  46.       Visible         =   0   'False
  47.       Width           =   300
  48.    End
  49.    Begin MSComctlLib.Toolbar GsToolbar 
  50.       Height          =   540
  51.       Left            =   9330
  52.       TabIndex        =   2
  53.       Top             =   30
  54.       Width           =   2475
  55.       _ExtentX        =   4366
  56.       _ExtentY        =   953
  57.       ButtonWidth     =   1455
  58.       ButtonHeight    =   953
  59.       Appearance      =   1
  60.       Style           =   1
  61.       ImageList       =   "ImageList2"
  62.       _Version        =   393216
  63.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  64.          NumButtons      =   3
  65.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  66.             Caption         =   "保存格式"
  67.             Key             =   "bcgs"
  68.             ImageKey        =   "bcgs"
  69.          EndProperty
  70.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  71.             Caption         =   "默认列宽"
  72.             Key             =   "hfmrgs"
  73.             ImageKey        =   "mrlk"
  74.          EndProperty
  75.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  76.             Caption         =   "显示项目"
  77.             Key             =   "szxsxm"
  78.             ImageKey        =   "xsxm"
  79.          EndProperty
  80.       EndProperty
  81.    End
  82.    Begin VB.PictureBox Pic_Title 
  83.       BackColor       =   &H00FFFFFF&
  84.       Height          =   825
  85.       Left            =   0
  86.       Picture         =   "基础设置_类别人员选择.frx":13CC
  87.       ScaleHeight     =   765
  88.       ScaleWidth      =   11715
  89.       TabIndex        =   1
  90.       Top             =   570
  91.       Width           =   11775
  92.       Begin MSComctlLib.ImageCombo ImgCbo_Sort 
  93.          Height          =   315
  94.          Left            =   930
  95.          TabIndex        =   5
  96.          Top             =   240
  97.          Width           =   2655
  98.          _ExtentX        =   4683
  99.          _ExtentY        =   556
  100.          _Version        =   393216
  101.          ForeColor       =   -2147483640
  102.          BackColor       =   -2147483643
  103.          Text            =   "ImageCombo1"
  104.       End
  105.       Begin VB.Label Lbl_Count 
  106.          AutoSize        =   -1  'True
  107.          BackStyle       =   0  'Transparent
  108.          Caption         =   "Label2"
  109.          Height          =   180
  110.          Left            =   8430
  111.          TabIndex        =   6
  112.          Top             =   300
  113.          Width           =   540
  114.       End
  115.       Begin VB.Label Label1 
  116.          AutoSize        =   -1  'True
  117.          BackStyle       =   0  'Transparent
  118.          Caption         =   "工资类别"
  119.          Height          =   180
  120.          Left            =   90
  121.          TabIndex        =   4
  122.          Top             =   300
  123.          Width           =   720
  124.       End
  125.    End
  126.    Begin VB.Timer Timer1 
  127.       Enabled         =   0   'False
  128.       Interval        =   1
  129.       Left            =   7620
  130.       Top             =   90
  131.    End
  132.    Begin VSFlex8Ctl.VSFlexGrid CzxsGrid 
  133.       Height          =   7545
  134.       Left            =   0
  135.       TabIndex        =   0
  136.       Top             =   1410
  137.       Width           =   9285
  138.       _ExtentX        =   16378
  139.       _ExtentY        =   13309
  140.       Appearance      =   1
  141.       BorderStyle     =   1
  142.       Enabled         =   -1  'True
  143.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  144.          Name            =   "宋体"
  145.          Size            =   9
  146.          Charset         =   134
  147.          Weight          =   400
  148.          Underline       =   0   'False
  149.          Italic          =   0   'False
  150.          Strikethrough   =   0   'False
  151.       EndProperty
  152.       MousePointer    =   0
  153.       BackColor       =   16777215
  154.       ForeColor       =   -2147483640
  155.       BackColorFixed  =   13826538
  156.       ForeColorFixed  =   -2147483630
  157.       BackColorSel    =   -2147483635
  158.       ForeColorSel    =   -2147483634
  159.       BackColorBkg    =   -2147483636
  160.       BackColorAlternate=   16777215
  161.       GridColor       =   -2147483633
  162.       GridColorFixed  =   -2147483632
  163.       TreeColor       =   -2147483632
  164.       FloodColor      =   192
  165.       SheetBorder     =   -2147483642
  166.       FocusRect       =   1
  167.       HighLight       =   1
  168.       AllowSelection  =   -1  'True
  169.       AllowBigSelection=   -1  'True
  170.       AllowUserResizing=   0
  171.       SelectionMode   =   0
  172.       GridLines       =   1
  173.       GridLinesFixed  =   2
  174.       GridLineWidth   =   1
  175.       Rows            =   50
  176.       Cols            =   10
  177.       FixedRows       =   1
  178.       FixedCols       =   1
  179.       RowHeightMin    =   0
  180.       RowHeightMax    =   0
  181.       ColWidthMin     =   0
  182.       ColWidthMax     =   0
  183.       ExtendLastCol   =   0   'False
  184.       FormatString    =   ""
  185.       ScrollTrack     =   0   'False
  186.       ScrollBars      =   3
  187.       ScrollTips      =   0   'False
  188.       MergeCells      =   0
  189.       MergeCompare    =   0
  190.       AutoResize      =   -1  'True
  191.       AutoSizeMode    =   0
  192.       AutoSearch      =   0
  193.       MultiTotals     =   -1  'True
  194.       SubtotalPosition=   1
  195.       OutlineBar      =   0
  196.       OutlineCol      =   0
  197.       Ellipsis        =   0
  198.       ExplorerBar     =   0
  199.       PicturesOver    =   0   'False
  200.       FillStyle       =   0
  201.       RightToLeft     =   0   'False
  202.       PictureType     =   0
  203.       TabBehavior     =   0
  204.       OwnerDraw       =   0
  205.       Editable        =   0   'False
  206.       ShowComboButton =   -1  'True
  207.       WordWrap        =   0   'False
  208.       TextStyle       =   0
  209.       TextStyleFixed  =   0
  210.       OleDragMode     =   0
  211.       OleDropMode     =   0
  212.       DataMode        =   0
  213.       VirtualData     =   -1  'True
  214.       Begin MSComctlLib.ImageList ImageList2 
  215.          Left            =   0
  216.          Top             =   0
  217.          _ExtentX        =   1005
  218.          _ExtentY        =   1005
  219.          BackColor       =   -2147483643
  220.          ImageWidth      =   16
  221.          ImageHeight     =   16
  222.          MaskColor       =   12632256
  223.          _Version        =   393216
  224.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  225.             NumListImages   =   40
  226.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  227.                Picture         =   "基础设置_类别人员选择.frx":1E30C
  228.                Key             =   "sz"
  229.             EndProperty
  230.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  231.                Picture         =   "基础设置_类别人员选择.frx":1E6A6
  232.                Key             =   "dy"
  233.             EndProperty
  234.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  235.                Picture         =   "基础设置_类别人员选择.frx":1EA40
  236.                Key             =   "yl"
  237.             EndProperty
  238.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  239.                Picture         =   "基础设置_类别人员选择.frx":1EDDA
  240.                Key             =   "xg"
  241.             EndProperty
  242.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  243.                Picture         =   "基础设置_类别人员选择.frx":1F174
  244.                Key             =   "zh"
  245.             EndProperty
  246.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  247.                Picture         =   "基础设置_类别人员选择.frx":1F50E
  248.                Key             =   "sh"
  249.             EndProperty
  250.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  251.                Picture         =   "基础设置_类别人员选择.frx":1F8A8
  252.                Key             =   "bc"
  253.             EndProperty
  254.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  255.                Picture         =   "基础设置_类别人员选择.frx":1FC42
  256.                Key             =   "fq"
  257.             EndProperty
  258.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  259.                Picture         =   "基础设置_类别人员选择.frx":1FFDC
  260.                Key             =   "bz"
  261.             EndProperty
  262.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  263.                Picture         =   "基础设置_类别人员选择.frx":20376
  264.                Key             =   "tc"
  265.             EndProperty
  266.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  267.                Picture         =   "基础设置_类别人员选择.frx":20710
  268.                Key             =   "bcgs"
  269.             EndProperty
  270.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  271.                Picture         =   "基础设置_类别人员选择.frx":20AAA
  272.                Key             =   "mrlk"
  273.             EndProperty
  274.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  275.                Picture         =   "基础设置_类别人员选择.frx":20E44
  276.                Key             =   "xsxm"
  277.             EndProperty
  278.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  279.                Picture         =   "基础设置_类别人员选择.frx":211DE
  280.                Key             =   "first"
  281.             EndProperty
  282.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  283.                Picture         =   "基础设置_类别人员选择.frx":21578
  284.                Key             =   "prev"
  285.             EndProperty
  286.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  287.                Picture         =   "基础设置_类别人员选择.frx":21912
  288.                Key             =   "next"
  289.             EndProperty
  290.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  291.                Picture         =   "基础设置_类别人员选择.frx":21CAC
  292.                Key             =   "last"
  293.             EndProperty
  294.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  295.                Picture         =   "基础设置_类别人员选择.frx":22046
  296.                Key             =   "xx"
  297.             EndProperty
  298.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  299.                Picture         =   "基础设置_类别人员选择.frx":223E0
  300.                Key             =   "define"
  301.             EndProperty
  302.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  303.                Picture         =   "基础设置_类别人员选择.frx":2277A
  304.                Key             =   "exec"
  305.             EndProperty
  306.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  307.                Picture         =   "基础设置_类别人员选择.frx":22B14
  308.                Key             =   "xz"
  309.             EndProperty
  310.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  311.                Picture         =   "基础设置_类别人员选择.frx":22EAE
  312.                Key             =   "sc"
  313.             EndProperty
  314.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  315.                Picture         =   "基础设置_类别人员选择.frx":23248
  316.                Key             =   "sx"
  317.             EndProperty
  318.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  319.                Picture         =   "基础设置_类别人员选择.frx":235E2
  320.                Key             =   "cx"
  321.             EndProperty
  322.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  323.                Picture         =   "基础设置_类别人员选择.frx":2397C
  324.                Key             =   "zd"
  325.             EndProperty
  326.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  327.                Picture         =   "基础设置_类别人员选择.frx":23D16
  328.                Key             =   "dz"
  329.             EndProperty
  330.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  331.                Picture         =   "基础设置_类别人员选择.frx":240B0
  332.                Key             =   "ph"
  333.             EndProperty
  334.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  335.                Picture         =   "基础设置_类别人员选择.frx":2444A
  336.                Key             =   "fz"
  337.             EndProperty
  338.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  339.                Picture         =   "基础设置_类别人员选择.frx":247E4
  340.                Key             =   "dw"
  341.             EndProperty
  342.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  343.                Picture         =   "基础设置_类别人员选择.frx":24B7E
  344.                Key             =   "hf"
  345.             EndProperty
  346.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  347.                Picture         =   "基础设置_类别人员选择.frx":24F18
  348.                Key             =   "pz"
  349.             EndProperty
  350.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  351.                Picture         =   "基础设置_类别人员选择.frx":252B2
  352.                Key             =   "check"
  353.             EndProperty
  354.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  355.                Picture         =   "基础设置_类别人员选择.frx":2564C
  356.                Key             =   "qs"
  357.             EndProperty
  358.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  359.                Picture         =   "基础设置_类别人员选择.frx":259E6
  360.                Key             =   "fullcheck"
  361.             EndProperty
  362.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  363.                Picture         =   "基础设置_类别人员选择.frx":25D80
  364.                Key             =   "qq"
  365.             EndProperty
  366.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  367.                Picture         =   "基础设置_类别人员选择.frx":2611A
  368.                Key             =   "bcw"
  369.             EndProperty
  370.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  371.                Picture         =   "基础设置_类别人员选择.frx":264B4
  372.                Key             =   "ye"
  373.             EndProperty
  374.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  375.                Picture         =   "基础设置_类别人员选择.frx":2684E
  376.                Key             =   ""
  377.             EndProperty
  378.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  379.                Picture         =   "基础设置_类别人员选择.frx":26BE8
  380.                Key             =   "frist"
  381.             EndProperty
  382.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  383.                Picture         =   "基础设置_类别人员选择.frx":26F82
  384.                Key             =   "dj"
  385.             EndProperty
  386.          EndProperty
  387.       End
  388.    End
  389.    Begin MSComctlLib.Toolbar SzToolbar 
  390.       Align           =   1  'Align Top
  391.       Height          =   570
  392.       Left            =   0
  393.       TabIndex        =   3
  394.       Top             =   0
  395.       Width           =   11880
  396.       _ExtentX        =   20955
  397.       _ExtentY        =   1005
  398.       ButtonWidth     =   820
  399.       ButtonHeight    =   953
  400.       AllowCustomize  =   0   'False
  401.       Appearance      =   1
  402.       Style           =   1
  403.       ImageList       =   "ImageList1"
  404.       _Version        =   393216
  405.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  406.          NumButtons      =   19
  407.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  408.             Caption         =   "设置"
  409.             Key             =   "ymsz"
  410.             ImageKey        =   "sz"
  411.          EndProperty
  412.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  413.             Caption         =   "打印"
  414.             Key             =   "dy"
  415.             ImageKey        =   "dy"
  416.          EndProperty
  417.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  418.             Caption         =   "预览"
  419.             Key             =   "yl"
  420.             ImageKey        =   "yl"
  421.          EndProperty
  422.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  423.             Style           =   3
  424.          EndProperty
  425.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  426.             Caption         =   "增加"
  427.             Key             =   "zj"
  428.             ImageKey        =   "xz"
  429.          EndProperty
  430.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  431.             Caption         =   "查询"
  432.             Key             =   "cx"
  433.             ImageKey        =   "cx"
  434.          EndProperty
  435.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  436.             Caption         =   "全选"
  437.             Key             =   "all"
  438.             ImageKey        =   "pz"
  439.          EndProperty
  440.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  441.             Style           =   3
  442.          EndProperty
  443.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  444.             Caption         =   "停发"
  445.             Key             =   "stop"
  446.             ImageIndex      =   34
  447.          EndProperty
  448.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  449.             Caption         =   "恢复"
  450.             Key             =   "resume"
  451.             ImageKey        =   "hf"
  452.          EndProperty
  453.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  454.             Style           =   3
  455.          EndProperty
  456.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  457.             Caption         =   "删除"
  458.             Key             =   "sc"
  459.             ImageKey        =   "sc"
  460.          EndProperty
  461.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  462.             Style           =   3
  463.          EndProperty
  464.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  465.             Caption         =   "银行"
  466.             Key             =   "bank"
  467.             ImageKey        =   "zd"
  468.          EndProperty
  469.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  470.             Style           =   3
  471.          EndProperty
  472.          BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  473.             Caption         =   "刷新"
  474.             Key             =   "sx"
  475.             ImageKey        =   "sx"
  476.          EndProperty
  477.          BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  478.             Style           =   3
  479.          EndProperty
  480.          BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  481.             Caption         =   "帮助"
  482.             Key             =   "bz"
  483.             ImageKey        =   "bz"
  484.          EndProperty
  485.          BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  486.             Caption         =   "退出"
  487.             Key             =   "fh"
  488.             ImageKey        =   "tc"
  489.          EndProperty
  490.       EndProperty
  491.       BorderStyle     =   1
  492.       Begin MSComctlLib.ImageList ImageList1 
  493.          Left            =   6990
  494.          Top             =   30
  495.          _ExtentX        =   1005
  496.          _ExtentY        =   1005
  497.          BackColor       =   -2147483643
  498.          ImageWidth      =   16
  499.          ImageHeight     =   16
  500.          MaskColor       =   12632256
  501.          _Version        =   393216
  502.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  503.             NumListImages   =   34
  504.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  505.                Picture         =   "基础设置_类别人员选择.frx":2731C
  506.                Key             =   "sz"
  507.             EndProperty
  508.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  509.                Picture         =   "基础设置_类别人员选择.frx":276B6
  510.                Key             =   "dy"
  511.             EndProperty
  512.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  513.                Picture         =   "基础设置_类别人员选择.frx":27A50
  514.                Key             =   "yl"
  515.             EndProperty
  516.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  517.                Picture         =   "基础设置_类别人员选择.frx":27DEA
  518.                Key             =   "xg"
  519.             EndProperty
  520.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  521.                Picture         =   "基础设置_类别人员选择.frx":28184
  522.                Key             =   "zh"
  523.             EndProperty
  524.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  525.                Picture         =   "基础设置_类别人员选择.frx":2851E
  526.                Key             =   "sh"
  527.             EndProperty
  528.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  529.                Picture         =   "基础设置_类别人员选择.frx":288B8
  530.                Key             =   "bc"
  531.             EndProperty
  532.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  533.                Picture         =   "基础设置_类别人员选择.frx":28C52
  534.                Key             =   "fq"
  535.             EndProperty
  536.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  537.                Picture         =   "基础设置_类别人员选择.frx":28FEC
  538.                Key             =   "bz"
  539.             EndProperty
  540.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  541.                Picture         =   "基础设置_类别人员选择.frx":29386
  542.                Key             =   "tc"
  543.             EndProperty
  544.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  545.                Picture         =   "基础设置_类别人员选择.frx":29720
  546.                Key             =   "bcgs"
  547.             EndProperty
  548.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  549.                Picture         =   "基础设置_类别人员选择.frx":29ABA
  550.                Key             =   "mrlk"
  551.             EndProperty
  552.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  553.                Picture         =   "基础设置_类别人员选择.frx":29E54
  554.                Key             =   "xsxm"
  555.             EndProperty
  556.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  557.                Picture         =   "基础设置_类别人员选择.frx":2A1EE
  558.                Key             =   "first"
  559.             EndProperty
  560.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  561.                Picture         =   "基础设置_类别人员选择.frx":2A588
  562.                Key             =   "prev"
  563.             EndProperty
  564.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  565.                Picture         =   "基础设置_类别人员选择.frx":2A922
  566.                Key             =   "next"
  567.             EndProperty
  568.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  569.                Picture         =   "基础设置_类别人员选择.frx":2ACBC
  570.                Key             =   "last"
  571.             EndProperty
  572.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  573.                Picture         =   "基础设置_类别人员选择.frx":2B056
  574.                Key             =   "xx"
  575.             EndProperty
  576.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  577.                Picture         =   "基础设置_类别人员选择.frx":2B3F0
  578.                Key             =   "define"
  579.             EndProperty
  580.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  581.                Picture         =   "基础设置_类别人员选择.frx":2B78A
  582.                Key             =   "exec"
  583.             EndProperty
  584.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  585.                Picture         =   "基础设置_类别人员选择.frx":2BB24
  586.                Key             =   "xz"
  587.             EndProperty
  588.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  589.                Picture         =   "基础设置_类别人员选择.frx":2BEBE
  590.                Key             =   "sc"
  591.             EndProperty
  592.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  593.                Picture         =   "基础设置_类别人员选择.frx":2C258
  594.                Key             =   "sx"
  595.             EndProperty
  596.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  597.                Picture         =   "基础设置_类别人员选择.frx":2C5F2
  598.                Key             =   "cx"
  599.             EndProperty
  600.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  601.                Picture         =   "基础设置_类别人员选择.frx":2C98C
  602.                Key             =   "zd"
  603.             EndProperty
  604.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  605.                Picture         =   "基础设置_类别人员选择.frx":2CD26
  606.                Key             =   "dz"
  607.             EndProperty
  608.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  609.                Picture         =   "基础设置_类别人员选择.frx":2D0C0
  610.                Key             =   "ph"
  611.             EndProperty
  612.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  613.                Picture         =   "基础设置_类别人员选择.frx":2D45A
  614.                Key             =   "fz"
  615.             EndProperty
  616.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  617.                Picture         =   "基础设置_类别人员选择.frx":2D7F4
  618.                Key             =   "dw"
  619.             EndProperty
  620.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  621.                Picture         =   "基础设置_类别人员选择.frx":2DB8E
  622.                Key             =   "hf"
  623.             EndProperty
  624.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  625.                Picture         =   "基础设置_类别人员选择.frx":2DF28
  626.                Key             =   "pz"
  627.             EndProperty
  628.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  629.                Picture         =   "基础设置_类别人员选择.frx":2E2C2
  630.                Key             =   "check"
  631.             EndProperty
  632.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  633.                Picture         =   "基础设置_类别人员选择.frx":2E65C
  634.                Key             =   ""
  635.             EndProperty
  636.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  637.                Picture         =   "基础设置_类别人员选择.frx":2E9F6
  638.                Key             =   ""
  639.             EndProperty
  640.          EndProperty
  641.       End
  642.    End
  643.    Begin VB.Label Lab_OperStatus 
  644.       BackColor       =   &H000080FF&
  645.       Caption         =   "1"
  646.       Height          =   345
  647.       Left            =   11040
  648.       TabIndex        =   10
  649.       Top             =   2790
  650.       Visible         =   0   'False
  651.       Width           =   345
  652.    End
  653. End
  654. Attribute VB_Name = "Class_frmEmp"
  655. Attribute VB_GlobalNameSpace = False
  656. Attribute VB_Creatable = False
  657. Attribute VB_PredeclaredId = True
  658. Attribute VB_Exposed = False
  659. '**************************************************************************
  660. '*    模 块 名 称 :类别人员选择
  661. '*    功 能 描 述 :选择每个类别需计算工资的人员
  662. '*    程序员姓名  :田建秀
  663. '*    最后修改人  :田建秀
  664. '*    最后修改时间:2001/12/12
  665. '*    备        注:
  666. '**************************************************************************
  667. Dim ReportTitle As String                '报表主标题
  668. Dim Tsxx As String                              '系统信息提示(Fixed)
  669. Dim Str_QueryCondi As String             '用户录入查询条件
  670. Dim Sql As String
  671. Dim ICondition As String                 '增加条件字符串
  672. Dim QCondition As String                 '查询条件字符串
  673. Dim i As Long
  674. Dim coll As New Collection
  675. Dim SortId As String
  676. Dim Rsc As New ADODB.Recordset
  677. Dim BankCode As String
  678. Dim Str_RightEdit As String              '编辑(增加、停发、恢复、删除)权限索引
  679. Dim Str_RightBank As String              '银行(银行、账号)
  680. '以下为固定使用变量(网格)
  681. Dim Cxnrrec As New ADODB.Recordset              '显示查询内容动态集
  682. Dim Dyymctbl As New DY_Dyymsz                   '打印页面窗体变量
  683. Dim GridCode As String                          '显示网格网格代码
  684. Dim GridInf() As Variant                        '整个网格设置信息
  685. Dim Pmbcsjhs As Long                            '屏幕网格保持数据行数(大于等于1)
  686. Dim Fzxwghs As Integer                          '辅助项网格行数(包括合计行)
  687. Dim Sfxshjwg As Boolean                         '是否显示合计网格
  688. Dim Qslz As Long                                '网格隐藏(非操作显示)列数
  689. Dim Sjhgd As Double                             '网格数据行高度
  690. Dim GridBoolean() As Boolean                    '网格列信息(布尔型)
  691. Dim GridStr()  As String                        '网格列信息(字符型)
  692. Dim GridInt() As Integer                        '网格列信息(整型)
  693. Dim Sfblbzkd As Boolean                         '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
  694. Dim Dqlrwgh As Long                             '当前录入数据网格行
  695. Dim Dqlrwgl As Long                             '当前录入数据网格列
  696. Dim Dqlkwgh As Long                             '刚刚离开网格行(不一定为录入行)
  697. Dim Dqlkwgl As Long                             '刚刚离开网格列
  698. Dim Dqtoprow As Long                            '当前录入状态时最上端可视行
  699. Dim Dqleftcol As Long                           '当前录入状态时最左端可视列
  700. Dim Zdlrqnr As String                           '字段录入修改前内容(用来判断内容是否修改)
  701. Dim Wbkbhlock As Boolean                        '文本框改变值锁
  702. Dim Changelock As Boolean                       '网格行列改变控制锁(用来区别用户改变.程序改变)
  703. Dim Gdtlock As Boolean                          '滚动条滚动控制(用来区别用户改变.程序改变)
  704. Dim Yxxpdlock As Boolean                        '字段有效性判断锁(内容不修改不需进行字段有效性判断)
  705. Dim Hyxxpdlock As Boolean                       '行有效性判断锁(字段内容不修改不需进行行有效性判断)
  706. Dim Valilock As Boolean                         '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
  707. Dim Shsfts As Boolean                           '删除记录行是否提示
  708. Dim Szzls As Integer                            '网格信息数组最大下标值(网格列数-1)
  709. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  710.     On Error Resume Next
  711.     With CzxsGrid
  712.         .Width = Me.Width - 160
  713.         .Height = Me.Height - .Top - 400
  714.     End With
  715.     With Pic_Title
  716.         .Width = Me.Width - 160
  717.     End With
  718.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  719.     Call Cxxswbk
  720. End Sub
  721. Private Sub Form_Load()                                                   '窗体装入
  722.     '初始化各种锁值(Fixed)
  723.     Changelock = False             '网格行列改变控制锁
  724.     Gdtlock = False                '滚动条滚动控制
  725.     Yxxpdlock = True               '字段有效性判断锁
  726.     Hyxxpdlock = True              '行有效性判断锁
  727.     Wbkbhlock = False              '文本框内容改变锁
  728.     
  729.     '调入打印页面设置窗体
  730.     ReportTitle = "工资类别的人员"
  731.     XtReportCode = "PM_SortEmp"
  732.     Load Dyymctbl
  733.     
  734.     '调整标题栏及网格、格式工具条位置(Fixed)
  735.     Pic_Title.Left = 40
  736.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  737.     CzxsGrid.Left = Pic_Title.Left
  738.     CzxsGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  739.     
  740.     '调 入 网 格(Fixed)
  741.     GridCode = "PM_SortEmp"
  742.     Call BzWgcsh(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  743.     
  744.     Qslz = GridInf(1)
  745.     Sjhgd = GridInf(2)
  746.     Pmbcsjhs = GridInf(3)
  747.     Fzxwghs = GridInf(4)
  748.     Sfblbzkd = GridInf(5)
  749.     Shsfts = GridInf(6)
  750.     Sfxshjwg = GridInf(7)
  751.     Szzls = CzxsGrid.Cols - 1
  752.     
  753.     CzxsGrid.TextMatrix(0, 0) = "职工ID号"
  754.     CzxsGrid.TextMatrix(0, 1) = "银行编号"
  755.     
  756.     ImgCbo_Sort.Text = ""
  757.     Sql = " and czybm='" & Xtczybm & "'"
  758.     Call DynaFillImageCombo(ImgCbo_Sort, "PM_SortEmp", 0, Sql)
  759.     SortId = GetComboKey(ImgCbo_Sort, 0)
  760.   
  761.     Lbl_Count.Caption = ""
  762.     ICondition = ""
  763.     If ImgCbo_Sort.ComboItems.Count <> 0 Then
  764.         toolEnable
  765.     Else
  766.         toolUnEnable
  767.     End If
  768.     '填 充 网 格
  769.     Sql = "select p.EmpId,r.DeptCode,DeptName,EmpNO,EmpName,haltFlag,p.BankCode,BankName,p.Accounts from " & _
  770.           " gy_department d inner join rs_BasicInfo r on d.deptcode=r.deptcode " & _
  771.           " inner join pm_sortEmp p on p.empid=r.empid left join pm_Bank b on  " & _
  772.           " p.BankCode=b.BankCode " & _
  773.           " where sortid='" & SortId & "' and p.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
  774.               " and Czybm='" & Xtczybm & "') order by r.DeptCode,EmpNo"
  775.     Call Cxnrtcwg(Sql)
  776.     Pub_FrmSortChoice.SortId = SortId
  777.     QCondition = ""
  778.     
  779.     '设置状态为修改状态
  780.     Lab_OperStatus = "2"
  781.     '编辑(新增、修改、删除)权限索引
  782.     Str_RightEdit = "Pm_SortEmp_Edit"
  783.     '银行
  784.     Str_RightBank = "Pm_SortEmp_Bank"
  785. End Sub
  786. Private Sub Form_KeyPress(KeyAscii As Integer)      '限制录入字符"'"
  787.     Select Case KeyAscii
  788.         Case 39           '屏蔽字符"'"
  789.             KeyAscii = 0
  790.     End Select
  791.     
  792. End Sub
  793. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)        '支持热键操作
  794.   
  795.     If Shift = 2 Then
  796.         Select Case UCase(Chr(KeyCode))
  797.             Case "P"                   'Ctrl+P 打印
  798.                 If Tlb_Action.Buttons("dy").Enabled Then
  799.                     Call bbyl(False)
  800.                 End If
  801.         End Select
  802.     End If
  803.     
  804. End Sub
  805. Private Sub Cxnrtcwg(Sqlstr As String)                                '查询内容填充网格
  806.     Dim jsqte As Long                 '查询临时使用变量
  807.   
  808.     '为加快显示速度,将网格刷新动作冻结
  809.     CzxsGrid.Redraw = False
  810.   
  811.     '[>>查询连接串
  812.     
  813.     '<<]
  814.     Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  815.     
  816.     With Cxnrrec
  817.         CzxsGrid.Rows = CzxsGrid.FixedRows
  818.         If .EOF And .BOF Then
  819.             CzxsGrid.Redraw = True
  820.             Lbl_Count.Caption = ""
  821.             Exit Sub
  822.         End If
  823.         
  824.         jsqte = CzxsGrid.FixedRows
  825.         
  826.         Do While Not .EOF
  827.             CzxsGrid.AddItem ""
  828.             Call Jltcwg(Cxnrrec, jsqte)                              '调入填充网格子过程
  829.             CzxsGrid.RowHeight(jsqte) = Sjhgd                        '设置网格高度
  830.             .MoveNext
  831.             jsqte = jsqte + 1
  832.         Loop
  833.     End With
  834.   
  835.     '将网格刷新动作解冻
  836.     CzxsGrid.Redraw = True
  837.     Lbl_Count = "共" & CzxsGrid.Rows - 1 & "人"
  838. End Sub
  839. Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long)           '记录内容填充网格
  840.     '[>>以下为自定义部分
  841.     With Jlbrec
  842.         CzxsGrid.TextMatrix(Rowjsq, 0) = Trim(.Fields("EmpID") & "")                                 '职工ID号
  843.         CzxsGrid.TextMatrix(Rowjsq, 1) = Trim(.Fields("BankCode") & "")                                 '职工ID号
  844.         CzxsGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("DeptCode") & "")    '部门编号
  845.         CzxsGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("DeptName") & "")           '部门名称
  846.         CzxsGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("EmpNO") & "")             '工号
  847.         CzxsGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("EmpName") & "")          '姓名
  848.         CzxsGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = .Fields("HaltFlag")          '停发
  849.         CzxsGrid.TextMatrix(Rowjsq, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("BankName") & "")          '银行名称
  850.         CzxsGrid.TextMatrix(Rowjsq, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("Accounts") & "")          '银行账号
  851.     End With
  852.     '以上为自定义部分<<]
  853.     
  854. End Sub
  855. Private Sub ImgCbo_Sort_Click()
  856.     SortId = GetComboKey(ImgCbo_Sort, 0)
  857.     Pub_FrmSortChoice.SortId = SortId
  858.     ICondition = ""
  859.     QCondition = ""
  860.     Sql = "select p.EmpId,r.DeptCode,DeptName,EmpNO,EmpName,haltFlag,p.BankCode,BankName,p.Accounts from " & _
  861.           " gy_department d inner join rs_BasicInfo r on d.deptcode=r.deptcode " & _
  862.           " inner join pm_sortEmp p on p.empid=r.empid left join pm_Bank b on  " & _
  863.           " p.BankCode=b.BankCode " & _
  864.           " where sortid='" & SortId & "' and p.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
  865.               " and Czybm='" & Xtczybm & "') order by r.DeptCode,EmpNo"
  866.     Call Cxnrtcwg(Sql)
  867. End Sub
  868. Private Sub Form_Unload(Cancel As Integer)           '窗体卸载
  869.     If Not Fun_Drfrmyxxpd Then
  870.        Cancel = True
  871.        Exit Sub
  872.     End If
  873.     Set Cxnrrec = Nothing
  874.     Set Rsc = Nothing
  875.     '卸载打印页面窗体
  876.     Unload Dyymctbl
  877. End Sub
  878. Private Sub CzxsGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  879.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  880. End Sub
  881. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整(Fixed)
  882.     
  883.     Select Case Button.Key
  884.     Case "bcgs"                                          '保存表格格式
  885.         Call Bcwggs(CzxsGrid, GridCode, GridStr())
  886.     Case "hfmrgs"                                        '恢复默认格式
  887.         Call Hfmrgs(CzxsGrid, GridCode, GridStr())
  888.     Case "szxsxm"                                        '设置显示项目
  889.         Call Szxsxm(CzxsGrid, GridCode)
  890.     End Select
  891.     
  892. End Sub
  893. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  894.      
  895.     '屏蔽文本框,下拉组合框有效性判断
  896.      
  897.     Valilock = True
  898.      
  899.     '屏蔽网格失去焦点产生的有效性判断
  900.      
  901.     Changelock = True
  902.     
  903.     Select Case Button.Key
  904.         Case "ymsz"                                          '页面设置
  905.             Dyymctbl.Show 1
  906.         Case "yl"                                            '预 览
  907.             Call bbyl(True)
  908.         Case "dy"                                            '打 印
  909.             Call bbyl(False)
  910.         Case "zj"                                            '增 加
  911.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  912.             If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  913.                 Exit Sub
  914.             End If
  915.             
  916.             Call AddEmp
  917.         Case "cx"                                            '查 询
  918.              Squery
  919.         Case "all"                                           '全 选
  920.             With CzxsGrid
  921.                 If .Rows > .FixedRows Then
  922.                     .Row = .FixedRows
  923.                     .RowSel = .Rows - 1
  924.                 End If
  925.             End With
  926.         Case "stop"                                          '停 发
  927.             Call StopH(1)
  928.         Case "resume"                                        '恢 复
  929.             Call StopH(0)
  930.         Case "sc"                                            '删 除
  931.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  932.             If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  933.                 Exit Sub
  934.             End If
  935.             Call DelEmp
  936.         Case "bank"                                          '银 行
  937.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  938.             If Not Security_Log(Str_RightBank, Xtczybm, 1, True) Then
  939.                 Exit Sub
  940.             End If
  941.             BankChoice
  942.         Case "sx"                                            '刷 新
  943.             Sql = "select p.EmpId,r.DeptCode,DeptName,EmpNO,EmpName,haltFlag,p.BankCode,BankName,p.Accounts from " & _
  944.                   " gy_department d inner join rs_BasicInfo r on d.deptcode=r.deptcode " & _
  945.                   " inner join pm_sortEmp p on p.empid=r.empid left join pm_Bank b on  " & _
  946.                   " p.BankCode=b.BankCode " & _
  947.                   " where sortid='" & SortId & "' and p.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
  948.                   " and Czybm='" & Xtczybm & "') order by r.DeptCode,EmpNo"
  949.             Call Cxnrtcwg(Sql)
  950.         Case "bz"                                            '帮 助
  951.             Call F1bz
  952.         Case "fh"                                            '退 出
  953.             Unload Me
  954.     End Select
  955.     '解 锁
  956.     Valilock = False
  957.     Changelock = False
  958. End Sub
  959. Private Sub BankChoice()
  960.     Dim SqlT As String
  961.     With CzxsGrid
  962.         If .Rows = .FixedRows Then
  963.             Exit Sub
  964.         End If
  965.     End With
  966.     SqlT = SqlCon
  967.     With Class_FrmBank
  968.         .Show 1
  969.         If .OpeStatus = "cancel" Then
  970.             Exit Sub
  971.         End If
  972.         '判断银行账号是否有重复的。
  973.         With CzxsGrid
  974.             If .Row <= .RowSel Then
  975.                 For i = .Row To .RowSel
  976.                     If BankA(i) = False Then
  977.                         Exit Sub
  978.                     End If
  979.                 Next
  980.             Else
  981.                 For i = .RowSel To .Row
  982.                     If BankA(i) = False Then
  983.                         Exit Sub
  984.                     End If
  985.                 Next
  986.             End If
  987.             
  988.         End With
  989.         
  990.         If ImgCbo_Sort.ComboItems.Count > 1 Then
  991.             With Pub_FrmSortChoice
  992.                 .Show 1
  993.                 If .OpeStatus = "cancel" Then
  994.                     Exit Sub
  995.                 End If
  996.                 .SortId = SortId
  997.                 Sql = ""
  998.                 If LCase(Trim(Class_FrmBank.BankCode)) = "c" Then
  999.                     '清空银行
  1000.                     BankCode = ""
  1001.                     For i = 1 To .cSort.Count
  1002.                         Sql = Sql & " update Pm_SortEmp set BankCode='" & _
  1003.                               BankCode & "',Accounts='' where sortid='" & _
  1004.                                .cSort.Item(i) & "' and EmpId in " & SqlT
  1005.                     Next
  1006.                 Else
  1007.                     BankCode = Class_FrmBank.BankCode
  1008.                     For i = 1 To .cSort.Count
  1009.                         Sql = Sql & " update Pm_SortEmp set BankCode='" & _
  1010.                             BankCode & "' where sortid='" & _
  1011.                             .cSort.Item(i) & "' and EmpId in " & SqlT
  1012.                     Next
  1013.                 End If
  1014.             End With
  1015.         Else
  1016.             If LCase(Trim(Class_FrmBank.BankCode)) = "c" Then
  1017.                 Sql = " update Pm_SortEmp set BankCode='' " & _
  1018.                       ",Accounts=''  where sortid='" & _
  1019.                       SortId & "' and EmpId in  " & SqlT
  1020.             Else
  1021.                 Sql = " update Pm_SortEmp set BankCode='" & _
  1022.                       Class_FrmBank.BankCode & "' where sortid='" & _
  1023.                       SortId & "' and EmpId in " & SqlT
  1024.             End If
  1025.         End If
  1026.         
  1027.     End With
  1028.     On Error GoTo Err1
  1029.     With Cw_DataEnvi.DataConnect
  1030.         .BeginTrans
  1031.         .Execute Sql
  1032.         .CommitTrans
  1033.     End With
  1034.     With CzxsGrid
  1035.         If .Row <= .RowSel Then
  1036.             Call bankB(i, .Row, .RowSel)
  1037.         Else
  1038.             Call bankB(i, .RowSel, .Row)
  1039.         End If
  1040.     End With
  1041.     Exit Sub
  1042. Err1:
  1043.     Cw_DataEnvi.DataConnect.RollbackTrans
  1044. End Sub
  1045. Private Sub bankB(i As Long, row1 As Long, row2 As Long)
  1046.     With CzxsGrid
  1047.         If LCase(Trim(Class_FrmBank.BankCode)) = "c" Then
  1048.             For i = row1 To row2
  1049.                 .TextMatrix(i, 1) = ""
  1050.                 .TextMatrix(i, Sydz("006", GridStr(), Szzls)) = ""
  1051.                 .TextMatrix(i, Sydz("007", GridStr(), Szzls)) = ""
  1052.             Next
  1053.         Else
  1054.             For i = row1 To row2
  1055.                 .TextMatrix(i, 1) = Class_FrmBank.BankCode
  1056.                 .TextMatrix(i, Sydz("006", GridStr(), Szzls)) = Class_FrmBank.BankName
  1057.             Next
  1058.         End If
  1059.     End With
  1060. End Sub
  1061. Private Function BankA(i As Long) As Boolean
  1062.     With CzxsGrid
  1063.         If Trim(.TextMatrix(i, Sydz("007", GridStr(), Szzls))) <> "" Then
  1064.             If Rsc.State = 1 Then Rsc.Close
  1065.             Sql = " select p.*,EmpNO,EmpName,SortName from PM_SortEmp p inner join rs_BasicInfo r " & _
  1066.                 " on p.EmpID=r.EmpID inner join PM_sort s on p.Sortid=S.sortid " & _
  1067.                 "where BankCode='" & _
  1068.                 Class_FrmBank.BankCode & "' and Accounts='" & _
  1069.                 .TextMatrix(i, Sydz("007", GridStr(), Szzls)) & _
  1070.                 "' and p.EmpID <>" & .TextMatrix(i, 0)
  1071.             Set Rsc = Cw_DataEnvi.DataConnect.Execute(Sql)
  1072.             If Not Rsc.EOF Then
  1073.                 Call Xtxxts("将" & Trim(.TextMatrix(i, Sydz("006", GridStr(), Szzls))) & _
  1074.                             "换成" & Trim(Class_FrmBank.BankName) & "时," & Chr(10) & _
  1075.                             Chr(13) & Trim(.TextMatrix(i, Sydz("003", GridStr(), Szzls))) & _
  1076.                            "号" & Trim(.TextMatrix(i, Sydz("004", GridStr(), Szzls))) & _
  1077.                            "与" & Trim(Rsc!EmpNo) & "号" & _
  1078.                            Trim(Rsc!EmpName) & "的银行账号重复," & Chr(10) & Chr(13) & _
  1079.                            "请先将该行的银行名称清空,再改写银行!" & _
  1080.                            "请在各个工资类别中查看。", 0, 1)
  1081.                 BankA = False
  1082.                 Exit Function
  1083.             End If
  1084.         End If
  1085.     End With
  1086.     BankA = True
  1087. End Function
  1088. Private Sub StopH(StopH As String)
  1089.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1090.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  1091.         Exit Sub
  1092.     End If
  1093.     
  1094.     '1 停发 0 恢复
  1095.     Dim Sqlstr As String
  1096.     With CzxsGrid
  1097.         If .Rows = .FixedRows Or .Row <= .FixedRows - 1 Then
  1098.             Exit Sub
  1099.         End If
  1100.         
  1101.         Sql = SqlCon
  1102.         Sqlstr = ""
  1103.         If ImgCbo_Sort.ComboItems.Count > 1 Then
  1104.             With Pub_FrmSortChoice
  1105.                 .Show 1
  1106.                 If .OpeStatus = "cancel" Then
  1107.                     Exit Sub
  1108.                 Else
  1109.                     For i = 1 To .cSort.Count
  1110.                        Sqlstr = Sqlstr & " update PM_SortEmp set haltFlag=" & StopH & "  where  sortid ='" & _
  1111.                            .cSort.Item(i) & "' and EmpId in " & Sql
  1112.                     Next
  1113.                 End If
  1114.             End With
  1115.         Else
  1116.             Sqlstr = " update PM_SortEmp set haltFlag=" & StopH & " where  sortid ='" & _
  1117.                      SortId & "' and EmpId in " & Sql
  1118.         End If
  1119.     End With
  1120.     On Error GoTo Err1
  1121.     With Cw_DataEnvi.DataConnect
  1122.         .BeginTrans
  1123.         .Execute Sqlstr
  1124.         .CommitTrans
  1125.         With CzxsGrid
  1126.             If .Row <= .RowSel Then
  1127.                 For i = .Row To .RowSel
  1128.                     .TextMatrix(i, Sydz("005", GridStr(), Szzls)) = StopH
  1129.                 Next
  1130.             Else
  1131.                 For i = .Row To .RowSel Step -1
  1132.                     .TextMatrix(i, Sydz("005", GridStr(), Szzls)) = StopH
  1133.                 Next
  1134.             End If
  1135.         End With
  1136.     End With
  1137.     
  1138.     Exit Sub
  1139. Err1:
  1140.     Cw_DataEnvi.DataConnect.RollbackTrans
  1141.     
  1142. End Sub
  1143. Private Function SqlCon() As String
  1144.     With CzxsGrid
  1145.         Sql = "("
  1146.         If .Row <= .RowSel Then
  1147.             For i = .Row To .RowSel
  1148.                 Sql = Sql & Val(.TextMatrix(i, 0)) & ","
  1149.             Next
  1150.         Else
  1151.             For i = .RowSel To .Row
  1152.                 Sql = Sql & Val(.TextMatrix(i, 0)) & ","
  1153.             Next
  1154.         End If
  1155.         If Trim(Sql) <> "(" Then
  1156.             Sql = Left(Trim(Sql), Len(Trim(Sql)) - 1) & ")"
  1157.         Else
  1158.             Sql = ""
  1159.         End If
  1160.         SqlCon = Sql
  1161.     End With
  1162. End Function
  1163. Private Sub DelEmp()
  1164.     '删除
  1165.     Dim Sqlstr As String
  1166.     Dim Yhanswer As Integer
  1167.     With CzxsGrid
  1168.         If .Rows = .FixedRows Then
  1169.             Exit Sub
  1170.         End If
  1171.     End With
  1172.     Sql = SqlCon
  1173.     Tsxx = "请确认是否删除所选记录?"
  1174.     Yhanswer = Xtxxts(Tsxx, 2, 2)
  1175.     
  1176.     If Yhanswer = 2 Then
  1177.         Exit Sub
  1178.     End If
  1179.     
  1180.     With CzxsGrid
  1181.         Sqlstr = ""
  1182.         If ImgCbo_Sort.ComboItems.Count > 1 Then
  1183.             With Pub_FrmSortChoice
  1184.                 .Show 1
  1185.                 If .OpeStatus = "cancel" Then
  1186.                     Exit Sub
  1187.                 Else
  1188.                     For i = 1 To .cSort.Count
  1189.                        Sqlstr = Sqlstr & " delete PM_SortEmp where  sortid ='" & _
  1190.                            .cSort.Item(i) & "' and EmpId in " & Sql
  1191.                     Next
  1192.                 End If
  1193.             End With
  1194.         Else
  1195.             Sqlstr = " delete PM_SortEmp where  sortid ='" & _
  1196.                      SortId & "' and EmpId in " & Sql
  1197.         End If
  1198.     End With
  1199.     On Error GoTo Err1
  1200.     With Cw_DataEnvi.DataConnect
  1201.         .BeginTrans
  1202.         .Execute Sqlstr
  1203.         .CommitTrans
  1204.         With CzxsGrid
  1205.             If .Row <= .RowSel Then
  1206.                 For i = .Row To .RowSel
  1207.                     .RemoveItem (.Row)
  1208.                 Next
  1209.             Else
  1210.                 For i = .RowSel To .Row
  1211.                     .RemoveItem (.RowSel)
  1212.                 Next
  1213.             End If
  1214.             Lbl_Count.Caption = "共" & .Rows - .FixedRows & "人"
  1215.         End With
  1216.         
  1217.     End With
  1218.     
  1219.     Exit Sub
  1220. Err1:
  1221.     Cw_DataEnvi.DataConnect.RollbackTrans
  1222.     
  1223. End Sub
  1224. Private Sub AddEmp()
  1225.     Dim SqlT As String
  1226.     Dim coll As New Collection
  1227.     Dim Scount() As String    '存放每个类别增加的人员数
  1228.     Dim sqlF As String
  1229.     Sql = ""
  1230.     '增加人员
  1231.     With Query_Frm
  1232.         Set .collTableName = coll
  1233.         .QueryTableSql = " ltrim(rtrim(TableName))= 'rs_basicInfo' or ltrim(rtrim(TableName))= 'rs_ExtendInfo'"
  1234.         .Show 1
  1235.         If .bChecked = True Then
  1236.             ICondition = .sSqlWhere
  1237.         Else
  1238.             Exit Sub
  1239.         End If
  1240.         
  1241.         If Trim(ICondition) = "" Then
  1242.             '没有选择查询条件
  1243.             SqlT = " from Rs_BasicInfo where ynstop=0 "
  1244.         Else
  1245.             SqlT = " from rs_basicInfo,rs_ExtendInfo where rs_basicInfo.EmpId=rs_ExtendInfo.EmpId and (" & _
  1246.                     ICondition & ")  and ynstop=0 "
  1247.         End If
  1248.     End With
  1249.     
  1250.     If ImgCbo_Sort.ComboItems.Count > 1 Then  '当操作员可操作的类别大于一个时。
  1251.         With Pub_FrmSortChoice
  1252.             .Show 1
  1253.             If LCase(Trim(.OpeStatus)) = "cancel" Then
  1254.                 Exit Sub
  1255.             Else
  1256.                 For i = 1 To .cSort.Count
  1257.                     Sql = Sql & " insert PM_SortEmp(SortId,EmpID,HaltFlag) select '" & .cSort.Item(i) & "'," & _
  1258.                         " rs_basicInfo.EmpID,0  " & SqlT & " and rs_basicInfo.EmpId not in (select EmpId from " & _
  1259.                         " pm_SortEmp where SortId='" & .cSort.Item(i) & "')" & _
  1260.                         " and rs_basicInfo.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
  1261.                         " and Czybm='" & Xtczybm & "')"
  1262.                 Next
  1263.             End If
  1264.         End With
  1265.     Else  '只有一个类别
  1266.         Sql = " insert PM_SortEmp(SortId,EmpID,HaltFlag) select '" & SortId & "'," & " rs_basicInfo.EmpID,0 " & SqlT & _
  1267.               " and rs_basicInfo.EmpId not in (select EmpId from pm_SortEmp where SortId='" & SortId & "')" & _
  1268.               " and rs_basicInfo.EmpId in ( select EmpID from Rs_BasicInfo r  inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
  1269.               " and Czybm='" & Xtczybm & "')"
  1270.     End If
  1271.     On Error GoTo Err1
  1272.     Cw_DataEnvi.DataConnect.BeginTrans
  1273.     If ImgCbo_Sort.ComboItems.Count > 1 Then
  1274.         With Pub_FrmSortChoice
  1275.             ReDim Scount(.cSort.Count - 1, 2)
  1276.             For i = 1 To .cSort.Count
  1277.                 sqlF = "select '" & .cSort.Item(i) & "'," & _
  1278.                       " rs_basicInfo.EmpID,0  " & SqlT & " and rs_basicInfo.EmpId not in (select EmpId from " & _
  1279.                       " pm_SortEmp where SortId='" & .cSort.Item(i) & "')" & _
  1280.                       " and rs_basicInfo.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
  1281.                       " and Czybm='" & Xtczybm & "')"
  1282.                       
  1283.                 If Rsc.State = 1 Then Rsc.Close
  1284.                 Set Rsc = Cw_DataEnvi.DataConnect.Execute(sqlF)
  1285.                 Scount(i - 1, 0) = Trim(.cSort.Item(i))
  1286.                 Scount(i - 1, 1) = Rsc.RecordCount
  1287.                 If Rsc.State = 1 Then Rsc.Close
  1288.                 sqlF = "select * from pm_sort where sortid='" & .cSort.Item(i) & "'"
  1289.                 Set Rsc = Cw_DataEnvi.DataConnect.Execute(sqlF)
  1290.                 Scount(i - 1, 2) = Trim(Rsc!SortName)
  1291.             Next
  1292.         End With
  1293.     Else
  1294.         sqlF = "select '" & SortId & "'," & " rs_basicInfo.EmpID,0 " & SqlT & _
  1295.             " and rs_basicInfo.EmpId not in (select EmpId from pm_SortEmp where SortId='" & SortId & "')" & _
  1296.             " and rs_basicInfo.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
  1297.             " and Czybm='" & Xtczybm & "')"
  1298.         If Rsc.State = 1 Then Rsc.Close
  1299.         Set Rsc = Cw_DataEnvi.DataConnect.Execute(sqlF)
  1300.         ReDim Scount(0, 2)
  1301.         Scount(0, 0) = Trim(SortId)
  1302.         Scount(0, 1) = Rsc.RecordCount
  1303.         If Rsc.State = 1 Then Rsc.Close
  1304.         sqlF = "select * from pm_sort where sortid='" & SortId & "'"
  1305.         Set Rsc = Cw_DataEnvi.DataConnect.Execute(sqlF)
  1306.         Scount(0, 2) = Trim(Rsc!SortName)
  1307.     End If
  1308.     Cw_DataEnvi.DataConnect.Execute Sql
  1309.     Cw_DataEnvi.DataConnect.CommitTrans
  1310.     For i = 0 To UBound(Scount)
  1311.         Call Xtxxts("工资类别“" & Scount(i, 2) & "”新增" & Scount(i, 1) & "人", 0, 4)
  1312.     Next
  1313.     Sql = "select p.EmpId,r.DeptCode,DeptName,EmpNO,EmpName,haltFlag,p.BankCode,BankName,p.Accounts from " & _
  1314.           " gy_department d inner join rs_BasicInfo r on d.deptcode=r.deptcode " & _
  1315.           " inner join pm_sortEmp p on p.empid=r.empid left join pm_Bank b on  " & _
  1316.           " p.BankCode=b.BankCode " & _
  1317.           " where sortid='" & SortId & "' order by r.DeptCode,EmpNo"
  1318.     Call Cxnrtcwg(Sql)
  1319.     QCondition = ""
  1320.     Exit Sub
  1321. Err1:
  1322.     Cw_DataEnvi.DataConnect.RollbackTrans
  1323.     Call Xtxxts("增加不成功!", 0, 1)
  1324. End Sub
  1325. Private Sub Squery()
  1326.     '查询
  1327.     Dim SqlT As String
  1328.     Dim coll As New Collection
  1329.     
  1330.     With CzxsGrid
  1331.         If .Rows = .FixedRows Then
  1332.             Exit Sub
  1333.         End If
  1334.     End With
  1335.     
  1336.     With Query_Frm
  1337.         Set .collTableName = coll
  1338.         .QueryTableSql = " ltrim(rtrim(TableName))= 'rs_basicInfo' or ltrim(rtrim(TableName))= 'rs_ExtendInfo'"
  1339.         .Show 1
  1340.         If .bChecked = True Then
  1341.             QCondition = .sSqlWhere
  1342.         Else
  1343.             Exit Sub
  1344.         End If
  1345.         If Trim(QCondition) = "" Then
  1346.             '没有选择查询条件
  1347.             SqlT = " from Pm_SortEmp  where SortId='" & SortId & "'"
  1348.         Else
  1349.             If coll.Count = 1 Then
  1350.                 SqlT = " from Pm_SortEmp p," & coll.Item(1) & _
  1351.                        " where  p.EmpID=" & coll.Item(1) & ".EmpID" & _
  1352.                        " and (" & Trim(QCondition) & ")"
  1353.             Else
  1354.                 SqlT = " from Pm_SortEmp p,rs_basicInfo,rs_ExtendInfo" & _
  1355.                        " where rs_basicInfo.EmpId=rs_ExtendInfo.EmpID " & _
  1356.                        " and p.EmpID=rs_basicInfo.EmpId and (" & QCondition & ")  "
  1357.             End If
  1358.         End If
  1359.         SqlT = " select p.EmpID " & SqlT
  1360.         Sql = "select p.EmpId,r.DeptCode,DeptName,EmpNO,EmpName,haltFlag,p.BankCode,BankName,p.Accounts from " & _
  1361.               " gy_department d inner join rs_BasicInfo r on d.deptcode=r.deptcode " & _
  1362.               " inner join pm_sortEmp p on p.empid=r.empid left join pm_Bank b on  " & _
  1363.               " p.BankCode=b.BankCode " & _
  1364.               " where sortid='" & SortId & "' and p.EmpID in (" & SqlT & _
  1365.               ") and p.EmpId in ( select EmpID from Rs_BasicInfo r inner join PM_OpeDept p on r.DeptCode=p.DeptCode " & _
  1366.               " and Czybm='" & Xtczybm & "') order by r.DeptCode,EmpNo"
  1367.         Call Cxnrtcwg(Sql)
  1368.     End With
  1369. End Sub
  1370. Private Sub toolEnable()
  1371.     With SzToolbar
  1372.         .Buttons("zj").Enabled = True
  1373.         .Buttons("cx").Enabled = True
  1374.         .Buttons("all").Enabled = True
  1375.         .Buttons("stop").Enabled = True
  1376.         .Buttons("resume").Enabled = True
  1377.         .Buttons("sc").Enabled = True
  1378.     End With
  1379. End Sub
  1380. Private Sub toolUnEnable()
  1381.     With SzToolbar
  1382.         .Buttons("zj").Enabled = False
  1383.         .Buttons("cx").Enabled = False
  1384.         .Buttons("all").Enabled = False
  1385.         .Buttons("stop").Enabled = False
  1386.         .Buttons("resume").Enabled = False
  1387.         .Buttons("sc").Enabled = False
  1388.     End With
  1389. End Sub
  1390. Private Sub Wbkcl()                                                 '文本框录入之前处理(根据实际情况)
  1391.  
  1392.     Dim xswbrr As String
  1393.  
  1394.     With CzxsGrid
  1395.         Zdlrqnr = Trim(.Text)
  1396.         xswbrr = Trim(.Text)
  1397.     
  1398.         If GridBoolean(.Col, 3) Then   '列表框录入
  1399.     
  1400.             '填充列表框程序
  1401.             Call FillCombo(YdCombo, GridStr(.Col, 5), xswbrr, 0)
  1402.         Else
  1403.             Wbkbhlock = True
  1404.        
  1405.             '====以下为用户自定义
  1406.             Ydtext.Text = xswbrr
  1407.             '====以上为用户自定义
  1408.          
  1409.             Wbkbhlock = False
  1410.             Ydtext.SelStart = Len(Ydtext.Text)
  1411.         End If
  1412.     End With
  1413.     
  1414. End Sub
  1415. Private Function sjzdyxxpd(Dqpdwgh As Long, Dqpdwgl As Long)        '录入数据字段有效性判断,同时进行字段录入事后处理
  1416.     
  1417.     Dim Str_JudgeText As String            '临时有效性判断字段内容
  1418.     Dim Coljsq As Long                     '临时列计数器
  1419.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1420.     Dim Dbl_Qcye As Double                 '临时期初余额
  1421.  
  1422.     With CzxsGrid
  1423.     
  1424.         '非录入状态有效性为合法
  1425.         If Yxxpdlock Or .Row < .FixedRows Then
  1426.            sjzdyxxpd = True
  1427.            Exit Function
  1428.         End If
  1429.  
  1430.         Str_JudgeText = Trim(.TextMatrix(Dqpdwgh, Dqpdwgl))
  1431.         Select Case GridStr(Dqpdwgl, 1)
  1432.          
  1433.             '以下为自定义部分[
  1434.                 '1.放置字段有效性判断程序
  1435.                     Case "006", "007"
  1436.                         '账号不能重复
  1437.                         If Rsc.State = 1 Then Rsc.Close
  1438.                         Sql = " select p.*,EmpNO,EmpName,s.SortName from PM_SortEmp p,rs_BasicInfo r " & _
  1439.                               ", Pm_Sort s where p.EmpID=r.EmpId and p.SortId=s.SortID and p.EmpId<>" & _
  1440.                             .TextMatrix(Dqpdwgh, 0) & " and BankCode='" & _
  1441.                             .TextMatrix(Dqpdwgh, 1) & "' and accounts='" & _
  1442.                             .TextMatrix(Dqpdwgh, Dqpdwgl) & "' and ltrim(rtrim(accounts))<>''"
  1443.                         Set Rsc = Cw_DataEnvi.DataConnect.Execute(Sql)
  1444.                         If Not Rsc.EOF Then
  1445.                             Tsxx = .TextMatrix(Dqpdwgh, Sydz("003", GridStr(), Szzls)) & "号" & _
  1446.                                    .TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) & _
  1447.                                    "的银行账号与" & Trim(Rsc!EmpNo) & "号" & _
  1448.                                    Trim(Rsc!EmpName) & "的银行账号重复!" & _
  1449.                                    Chr(10) & Chr(13) & "请在各个工资类别中查看。"
  1450.                             GoTo Lrcwcl
  1451.                         End If
  1452.                 '2.放置字段事后处理程序
  1453.                 
  1454.             '以上为自定义部分]
  1455.             
  1456.         End Select
  1457.      
  1458.         '字段录入正确后为零字段清空
  1459.         Call Qkwlzd(Dqpdwgh, Dqpdwgl)
  1460.     
  1461.         sjzdyxxpd = True
  1462.         Yxxpdlock = True
  1463.         Exit Function
  1464.     
  1465.     End With
  1466.   
  1467. Lrcwcl:    '录入错误处理
  1468.     With CzxsGrid
  1469.         Call Xtxxts(Tsxx, 0, 1)
  1470.         Changelock = True
  1471.         .Select Dqpdwgh, Dqpdwgl
  1472.         Changelock = False
  1473.         Call xswbk
  1474.         sjzdyxxpd = False
  1475.         Exit Function
  1476.     End With
  1477.     
  1478. End Function
  1479. Private Function Sjhzyxxpd(ByVal Yxxpdh As Long) As Boolean                  '录入数据行有效性判断,同时进行行处理
  1480.  
  1481.     Dim Lrywlz As Long                     '录入错误列值(Fixed)
  1482.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1483.     Dim Sqlstr As String                   '临时查询字符串
  1484.     Dim Str_Ccode As String                '临时索引编码
  1485.     Dim BankCode As String                 '修改账号人员对应的代发银行
  1486.     Dim EmpID As String                    '修改账号人员的ID号
  1487.     With CzxsGrid
  1488.         '行没有发生变化则不进行有效性判断
  1489.         If Hyxxpdlock Then
  1490.             Sjhzyxxpd = True
  1491.             Exit Function
  1492.         End If
  1493.     
  1494.         '以下为自定义部分[
  1495.     
  1496.         '1.1首先进行单个不能为空或不能为零判断(Fixed)
  1497.         For jsqte = Qslz To .Cols - 1
  1498.             '字段不能为空
  1499.             If GridInt(jsqte, 5) = 1 Then
  1500.                 If Len(Trim(.TextMatrix(Yxxpdh, jsqte))) = 0 Then
  1501.                     Tsxx = GridStr(jsqte, 2)
  1502.                     Lrywlz = jsqte
  1503.                     GoTo Lrcwcl
  1504.                     Exit For
  1505.                 End If
  1506.             End If
  1507.             
  1508.             '字段不能为零
  1509.             If GridInt(jsqte, 5) = 2 Then
  1510.                 If Val(Trim(.TextMatrix(Yxxpdh, jsqte))) = 0 Then
  1511.                     Tsxx = GridStr(jsqte, 2)
  1512.                     Lrywlz = jsqte
  1513.                     GoTo Lrcwcl
  1514.                     Exit For
  1515.                 End If
  1516.             End If
  1517.         Next jsqte
  1518.     
  1519.     
  1520.         '1.2进行其他有效性判断,编写格式同1.1
  1521.         
  1522.         '2.放置行处理程序(当数据行通过有效性判断)
  1523.            
  1524.         Str_Ccode = Trim(.TextMatrix(Yxxpdh, Sydz("007", GridStr(), Szzls)))
  1525.         EmpID = Trim(.TextMatrix(Yxxpdh, 0))
  1526.         BankCode = Trim(.TextMatrix(Yxxpdh, 1))
  1527.         
  1528.         On Error GoTo Swcwcl
  1529.     
  1530.         Cw_DataEnvi.DataConnect.BeginTrans
  1531.         Sql = " update PM_SortEmp set Accounts='" & Str_Ccode & "'" & _
  1532.               " where Empid=" & EmpID & " and BankCode='" & BankCode & "'"
  1533.         Cw_DataEnvi.DataConnect.Execute Sql
  1534.         Cw_DataEnvi.DataConnect.CommitTrans
  1535.          
  1536.     End With
  1537.     '以上为自定义部分]
  1538.     Sjhzyxxpd = True
  1539.     Hyxxpdlock = True
  1540.     Exit Function
  1541. Swcwcl:
  1542.     Cw_DataEnvi.DataConnect.RollbackTrans
  1543.     Tsxx = "存盘过程中出现未知错误,程序自动恢复保存前状态!"
  1544.     Call Xtxxts(Tsxx, 0, 1)
  1545.     Exit Function
  1546. Lrcwcl:      '录入错误处理
  1547.     With CzxsGrid
  1548.         Call Xtxxts(Tsxx, 0, 1)
  1549.         Changelock = True
  1550.         .Select Yxxpdh, Lrywlz
  1551.         Changelock = False
  1552.         Call xswbk
  1553.         Sjhzyxxpd = False
  1554.         Exit Function
  1555.     End With
  1556.     
  1557. End Function
  1558. '===================以 下 程 序 为 通 用 部 分 ,一 般 不 需 更 改(程序动作部分)======================='
  1559. Private Sub Lrzdbz()                                                      '录入字段帮助
  1560.   
  1561.     If Not Ydcommand.Visible Then
  1562.         Exit Sub
  1563.     End If
  1564.    
  1565.     With CzxsGrid
  1566.      
  1567.         Valilock = True
  1568.     
  1569.         '处理通用部分
  1570.         Changelock = True        '调入另外窗体必须加锁
  1571.         Call Drbmhelp(GridInt(.Col, 6), GridStr(.Col, 3), Trim(Ydtext.Text))
  1572.         Changelock = False
  1573.         
  1574.         If Len(Xtfhcs) <> 0 Then
  1575.             If GridInt(.Col, 7) = 0 Then
  1576.                 Ydtext.Text = Xtfhcs
  1577.             Else
  1578.                 Ydtext.Text = Xtfhcsfz
  1579.             End If
  1580.         End If
  1581.         
  1582.         Valilock = False
  1583.   
  1584.         If Ydtext.Visible Then
  1585.             Ydtext.SetFocus
  1586.         End If
  1587.     End With
  1588.     
  1589. End Sub
  1590. Private Function Fun_Drfrmyxxpd() As Boolean                             '调入其它窗体或功能产生的有效性判断(包括数据回写)
  1591.   
  1592.     Fun_Drfrmyxxpd = True
  1593.     
  1594.     With CzxsGrid
  1595.    
  1596.         '如果当前网格处于编辑状态,则先进行数据回写再进行有效性判断
  1597.   
  1598.         If Ydtext.Visible Or YdCombo.Visible Then
  1599.             Call Lrsjhx
  1600.             If Not sjzdyxxpd(Dqlrwgh, Dqlrwgl) Then
  1601.                 Fun_Drfrmyxxpd = False
  1602.                 Exit Function
  1603.             End If
  1604.         End If
  1605.    
  1606.         '进行行有效性判断
  1607.         If Not Sjhzyxxpd(.Row) Then
  1608.             Fun_Drfrmyxxpd = False
  1609.             Exit Function
  1610.         End If
  1611.     End With
  1612.   
  1613. End Function
  1614. Private Sub czxsgrid_EnterCell()                                          '显示当前数据行相关信息
  1615.     With CzxsGrid
  1616.         If .Row >= .FixedRows Then
  1617.             '[>>
  1618.                 '此处可以填写显示与此网格行相关信息
  1619.             '<<]
  1620.         End If
  1621.     End With
  1622.    
  1623. End Sub
  1624. Private Sub CzxsGrid_GotFocus()                                           '网格得到焦点
  1625.     '网格得到焦点,如果当前选择行为非数据行
  1626.     '则调整当前焦点至有效数据行
  1627.     With CzxsGrid
  1628.         If .Row < .FixedRows And .Rows > .FixedRows Then
  1629.             Changelock = True
  1630.             .Select .FixedRows, .Col
  1631.             Changelock = False
  1632.         End If
  1633.         If .Col < Qslz Then
  1634.             Changelock = True
  1635.             .Select .Row, Qslz
  1636.             Changelock = False
  1637.         End If
  1638.     End With
  1639. End Sub
  1640. Private Sub czxsgrid_LostFocus()                                          '录入网格失去焦点
  1641.     '用以屏蔽调用其它窗体时发生网格失去焦点事件
  1642.     If Changelock Then
  1643.         Exit Sub
  1644.     End If
  1645.     '引发网格RowcolChange事件
  1646.     With CzxsGrid
  1647.         If Not (Ydtext.Visible Or YdCombo.Visible) Then
  1648.             .Select 0, 0
  1649.         End If
  1650.     End With
  1651. End Sub
  1652. Private Sub czxsgrid_AfterScroll(ByVal OldTopRow As Long, ByVal OldLeftCol As Long, ByVal NewTopRow As Long, ByVal NewLeftCol As Long)                                             '限制用户在录入过程中滚动鼠标
  1653.     If Gdtlock Then
  1654.         Exit Sub
  1655.     End If
  1656.  
  1657.     With CzxsGrid
  1658.         If Ydtext.Visible Or YdCombo.Visible Then
  1659.             Gdtlock = True
  1660.             .TopRow = Dqtoprow
  1661.             .LeftCol = Dqleftcol
  1662.             Gdtlock = False
  1663.             Exit Sub
  1664.         End If
  1665.     End With
  1666.     
  1667. End Sub
  1668. Private Sub czxsgrid_LeaveCell()                                    '离开单元格
  1669.     If Changelock Then
  1670.         Exit Sub
  1671.     End If
  1672.     '记录刚刚离开网格单元的行列值
  1673.     Dqlkwgh = CzxsGrid.Row
  1674.     Dqlkwgl = CzxsGrid.Col
  1675.     '判断是否需要录入数据回写
  1676.     If Not (Ydtext.Visible Or YdCombo.Visible) Then
  1677.         Exit Sub
  1678.     End If
  1679.     
  1680.     Call Lrsjhx
  1681.     
  1682. End Sub
  1683. Private Sub czxsgrid_RowColChange()                                '网格录入行列发生变化时,进行有效性判断
  1684.    
  1685.     Valilock = True       '屏蔽文本框失去焦点进行有效性判断
  1686.     
  1687.     With CzxsGrid
  1688.         If Changelock Then
  1689.             Exit Sub
  1690.         End If
  1691.         If Not sjzdyxxpd(Dqlrwgh, Dqlrwgl) Then
  1692.             Exit Sub
  1693.         End If
  1694.         If .Row <> Dqlkwgh Then
  1695.             If Not Sjhzyxxpd(Dqlkwgh) Then
  1696.                 Exit Sub
  1697.             End If
  1698.         End If
  1699.    End With
  1700.    
  1701.    Call fhyxh
  1702.    Call Xldql
  1703.    
  1704. End Sub
  1705. Private Sub CzxsGrid_DblClick()                                    '鼠标双击网格显示文本框
  1706.   
  1707.     With CzxsGrid
  1708.         If .Rows <> .FixedRows Then
  1709.             Call xswbk
  1710.         End If
  1711.     End With
  1712.     
  1713. End Sub
  1714. Private Sub Ycwbk()                                                '隐藏文本框,帮助按钮,列表组合框
  1715.     
  1716.     Valilock = True
  1717.     Ydtext.Visible = False
  1718.     YdCombo.Visible = False
  1719.     Ydcommand.Visible = False
  1720.     
  1721. End Sub
  1722. Private Sub YdCombo_KeyDown(KeyCode As Integer, Shift As Integer)        '列表框移动
  1723.     
  1724.     With CzxsGrid
  1725.         Select Case KeyCode
  1726.             Case vbKeyEscape                'ESC 键放弃录入
  1727.                 Valilock = True
  1728.                 .SetFocus
  1729.                 Call Ycwbk
  1730.                 Valilock = False
  1731.                 
  1732.             Case vbKeyReturn                '回 车 键 =13
  1733.                 KeyCode = 0
  1734.                 .SetFocus
  1735.                 Call Lrsjhx
  1736.                 Rowjsq = .Row
  1737.                 Coljsq = .Col + 1
  1738.                 If Coljsq > .Cols - 1 Then
  1739.                     If Rowjsq < .Rows - 1 Then
  1740.                         Rowjsq = Rowjsq + 1
  1741.                     End If
  1742.                     Coljsq = Qslz
  1743.                 End If
  1744.                 Do While Rowjsq <= .Rows - 1
  1745.                     If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
  1746.                         Coljsq = Coljsq + 1
  1747.                         If Coljsq > .Cols - 1 Then
  1748.                             Rowjsq = Rowjsq + 1
  1749.                             Coljsq = Qslz
  1750.                         End If
  1751.                     Else
  1752.                         Exit Do
  1753.                     End If
  1754.                 Loop
  1755.                 .Select Rowjsq, Coljsq
  1756.                 
  1757.             Case vbKeyLeft                  '左 箭 头 =37
  1758.                 If .Col - 1 = Qslz Then
  1759.                     If .ColHidden(Qslz) Or (Not GridBoolean(Qslz, 1)) Then
  1760.                         GoTo jzzx
  1761.                     End If
  1762.                 End If
  1763.                 If .Col > Qslz Then
  1764.                     KeyCode = 0
  1765.                     .SetFocus
  1766.                     Call Lrsjhx
  1767.                     Coljsq = .Col - 1
  1768.                     Do While Coljsq > Qslz
  1769.                         If Coljsq - 1 = Qslz Then
  1770.                             If .ColHidden(Qslz) Or (Not GridBoolean(Qslz, 1)) Then
  1771.                                 GoTo jzzx
  1772.                             End If
  1773.                         End If
  1774.                         If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
  1775.                             Coljsq = Coljsq - 1
  1776.                         Else
  1777.                             Exit Do
  1778.                         End If
  1779.                     Loop
  1780.                     .Select .Row, Coljsq
  1781.                 End If
  1782.             Case vbKeyRight                 '右 箭 头 =39
  1783.                 KeyCode = 0
  1784.                 .SetFocus
  1785.                 Call Lrsjhx
  1786.                 Rowjsq = .Row
  1787.                 Coljsq = .Col + 1
  1788.                 If Coljsq > .Cols - 1 Then
  1789.                     If Rowjsq < .Rows - 1 Then
  1790.                         Rowjsq = Rowjsq + 1
  1791.                     End If
  1792.                     Coljsq = Qslz
  1793.                 End If
  1794.                 Do While Rowjsq <= .Rows - 1
  1795.                     If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
  1796.                         Coljsq = Coljsq + 1
  1797.                         If Coljsq > .Cols - 1 Then
  1798.                             Rowjsq = Rowjsq + 1
  1799.                             Coljsq = Qslz
  1800.                         End If
  1801.                     Else
  1802.                         Exit Do
  1803.                     End If
  1804.                 Loop
  1805.                 .Select Rowjsq, Coljsq
  1806.         Case Else
  1807.     End Select
  1808.    
  1809. jzzx:
  1810.    
  1811.     End With
  1812.     
  1813. End Sub
  1814. Private Sub YdCombo_LostFocus()                    '列表框失去焦点
  1815.     
  1816.     With CzxsGrid                                    '因为选中网格会先发生Rowcolchange事件置Valiock
  1817.         If Not Valilock Then                           '为TRUE
  1818.             Call Lrsjhx
  1819.             If Not Sjhzyxxpd(Dqlrwgh) Then
  1820.                 Exit Sub
  1821.             End If
  1822.         End If
  1823.     End With
  1824.     
  1825. End Sub
  1826. Private Sub Ydcommand_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
  1827.     
  1828.     Call Lrzdbz
  1829.     
  1830. End Sub
  1831. Private Sub ydtext_KeyDown(KeyCode As Integer, Shift As Integer)
  1832.    
  1833.     Dim Rowjsq As Long, Coljsq As Long
  1834.    
  1835.     With CzxsGrid
  1836.         Select Case KeyCode
  1837.             Case vbKeyF2
  1838.                 Call Lrzdbz
  1839.             Case vbKeyEscape                'ESC 键放弃录入
  1840.                 Valilock = True
  1841.                 Call Ycwbk
  1842.                 .SetFocus
  1843.             Case vbKeyReturn                '回 车 键 =13
  1844.                 KeyCode = 0
  1845.                 .SetFocus
  1846.                 Call Lrsjhx
  1847.                 Rowjsq = .Row
  1848.                 Coljsq = .Col + 1
  1849.                 If Coljsq > .Cols - 1 Then
  1850.                     If Rowjsq < .Rows - 1 Then
  1851.                         Rowjsq = Rowjsq + 1
  1852.                     End If
  1853.                     Coljsq = Qslz
  1854.                 End If
  1855.                 Do While Rowjsq <= .Rows - 1
  1856.                     If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
  1857.                         Coljsq = Coljsq + 1
  1858.                         If Coljsq > .Cols - 1 Then
  1859.                             Rowjsq = Rowjsq + 1
  1860.                             Coljsq = Qslz
  1861.                         End If
  1862.                     Else
  1863.                         Exit Do
  1864.                     End If
  1865.                 Loop
  1866.                 If Rowjsq <= .Rows - 1 Then
  1867.                     .Select Rowjsq, Coljsq
  1868.                 End If
  1869.                 
  1870.             Case vbKeyUp                    '上 箭 头 =38
  1871.                 KeyCode = 0
  1872.                 .SetFocus
  1873.                 Call Lrsjhx
  1874.                 If .Row > .FixedRows Then
  1875.                     .Row = .Row - 1
  1876.                 End If
  1877.                 
  1878.             Case vbKeyDown                  '下 箭 头 =40
  1879.                 KeyCode = 0
  1880.                 .SetFocus
  1881.                 Call Lrsjhx
  1882.                 If .Row < .Rows - 1 Then
  1883.                     .Row = .Row + 1
  1884.                 End If
  1885.             Case vbKeyLeft                  '左 箭 头 =37
  1886.                 If .Col - 1 = Qslz Then
  1887.                     If .ColHidden(Qslz) Or (Not GridBoolean(Qslz, 1)) Then
  1888.                         GoTo jzzx
  1889.                     End If
  1890.                 End If
  1891.                 If Ydtext.SelStart = 0 And .Col > Qslz Then
  1892.                     KeyCode = 0
  1893.                     .SetFocus
  1894.                     Call Lrsjhx
  1895.                     Coljsq = .Col - 1
  1896.                     Do While Coljsq > Qslz
  1897.                         If Coljsq - 1 = Qslz Then
  1898.                             If .ColHidden(Qslz) Or (Not GridBoolean(Qslz, 1)) Then
  1899.                                 GoTo jzzx
  1900.                             End If
  1901.                         End If
  1902.                         If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
  1903.                             Coljsq = Coljsq - 1
  1904.                         Else
  1905.                             Exit Do
  1906.                         End If
  1907.                     Loop
  1908.                     .Select .Row, Coljsq
  1909.                 End If
  1910. jzzx:
  1911.            
  1912.            
  1913.             Case vbKeyRight                 '右 箭 头 =39
  1914.                 wblong = Len(Ydtext.Text)
  1915.                 If (Ydtext.SelStart = wblong Or Ydtext.SelLength = wblong) Then
  1916.                     KeyCode = 0
  1917.                     .SetFocus
  1918.                     Call Lrsjhx
  1919.                     Rowjsq = .Row
  1920.                     Coljsq = .Col + 1
  1921.                     If Coljsq > .Cols - 1 Then
  1922.                         If Rowjsq < .Rows - 1 Then
  1923.                             Rowjsq = Rowjsq + 1
  1924.                         End If
  1925.                         Coljsq = Qslz
  1926.                     End If
  1927.                     Do While Rowjsq <= .Rows - 1
  1928.                         If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
  1929.                             Coljsq = Coljsq + 1
  1930.                             If Coljsq > .Cols - 1 Then
  1931.                                 Rowjsq = Rowjsq + 1
  1932.                                 Coljsq = Qslz
  1933.                             End If
  1934.                         Else
  1935.                             Exit Do
  1936.                         End If
  1937.                     Loop
  1938.                     .Select Rowjsq, Coljsq
  1939.                 End If
  1940.             Case Else
  1941.         End Select
  1942.     End With
  1943.     
  1944. End Sub
  1945. Private Sub ydtext_KeyPress(KeyAscii As Integer)         '录入字符事中控制
  1946.   
  1947.     Call InputFieldLimit(Ydtext, GridInt(CzxsGrid.Col, 1), KeyAscii)
  1948. End Sub
  1949. Private Sub ydtext_Change()                              '录入事中变化处理
  1950.     '防止程序改变但不进行处理
  1951.     If Wbkbhlock Then
  1952.          Exit Sub
  1953.     End If
  1954.     With CzxsGrid
  1955.         '限制字段录入长度
  1956.         Wbkbhlock = True
  1957.         
  1958.         Call TextChangeLimit(Ydtext, GridInt(.Col, 1))  '去掉无效字符
  1959.         
  1960.         Select Case GridInt(.Col, 1)
  1961.             Case 8, 11   '金额型
  1962.                 Call Sjgskz(Ydtext, Xtjezws - Xtjexsws - 1, Xtjexsws)
  1963.             Case 9, 12   '数量型
  1964.                 Call Sjgskz(Ydtext, Xtslzws - Xtslxsws - 1, Xtslxsws)
  1965.             Case 10      '单价型
  1966.                 Call Sjgskz(Ydtext, Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
  1967.             Case Else    '其他类型
  1968.                 If GridInt(.Col, 3) <> 0 Or GridInt(.Col, 4) <> 0 Then
  1969.                     Call Sjgskz(Ydtext, GridInt(.Col, 3), GridInt(.Col, 4))
  1970.                 End If
  1971.         End Select
  1972.         
  1973.         Wbkbhlock = False
  1974.     End With
  1975.     
  1976. End Sub
  1977. Private Sub ydtext_LostFocus()            '如果由于选中网格之外的控件而发生有效性判断(选中网格会先发生Rowcolchange事件置Valiock为TRUE)
  1978.   
  1979.     With CzxsGrid
  1980.         If Not Valilock Then
  1981.             Call Lrsjhx
  1982.             If Not sjzdyxxpd(Dqlrwgh, Dqlrwgl) Then
  1983.                 Exit Sub
  1984.             End If
  1985.             If Not Sjhzyxxpd(Dqlrwgh) Then
  1986.                 Exit Sub
  1987.             End If
  1988.         End If
  1989.     End With
  1990.   
  1991. End Sub
  1992. Private Sub xswbk()                       '在当前选中单元显示文本框,列表框,帮助按钮(通用)
  1993.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1994.     If Not Security_Log(Str_RightBank, Xtczybm, 1, True) Then
  1995.         Exit Sub
  1996.     End If
  1997.     Dim Wbkpy As Integer, Wbkpy1 As Integer '文本框偏移量
  1998.     
  1999.     '当某种条件成立时禁止文本框激活使单据处于录入状态
  2000.     If Not Fun_AllowInput Then
  2001.         Exit Sub
  2002.     End If
  2003.   
  2004.     '显示文本框前返回有效行列(解决滚动条问题)
  2005.     Call Xldqh
  2006.     Call Xldql
  2007.   
  2008.     '隐藏文本框,帮助按钮,列表组合框
  2009.     Call Ycwbk
  2010.   
  2011.     With CzxsGrid
  2012.         Dqlrwgh = .Row
  2013.         Dqlrwgl = .Col
  2014.         If Not GridBoolean(.Col, 1) Or .Row < .FixedRows Then
  2015.             Exit Sub
  2016.         End If
  2017.      
  2018.         Wbkpy = 30
  2019.         Wbkpy1 = 15
  2020.     
  2021.         On Error Resume Next
  2022.         
  2023.         If GridBoolean(.Col, 3) Then
  2024.             YdCombo.Left = .CellLeft + .Left + Wbkpy
  2025.             YdCombo.Top = .CellTop + .Top + Wbkpy
  2026.             YdCombo.Width = .CellWidth - Wbkpy1
  2027.             Call Wbkcl
  2028.             YdCombo.Visible = True
  2029.             YdCombo.SetFocus
  2030.             Ydcommand.Visible = False
  2031.             Ydtext.Visible = False
  2032.         Else
  2033.             If GridBoolean(.Col, 2) Then
  2034.                 Ydcommand.Left = .Left + .CellLeft + .CellWidth - Ydcommand.Width + Wbkpy
  2035.                 Ydcommand.Top = .Top + .CellTop + .CellHeight - Ydcommand.Height + Wbkpy
  2036.                 Ydcommand.Visible = True
  2037.             Else
  2038.                 Ydcommand.Visible = False
  2039.             End If
  2040.      
  2041.             Ydtext.Left = .CellLeft + .Left + Wbkpy
  2042.             Ydtext.Top = .CellTop + .Top + Wbkpy
  2043.             
  2044.             If Ydcommand.Visible Then
  2045.                 If Sfblbzkd Then
  2046.                     Ydtext.Width = .CellWidth - Ydcommand.Width
  2047.                 Else
  2048.                     Ydtext.Width = .CellWidth - Wbkpy1
  2049.                 End If
  2050.             Else
  2051.                 Ydtext.Width = .CellWidth - Wbkpy1
  2052.             End If
  2053.             
  2054.             Ydtext.Height = .CellHeight - Wbkpy1
  2055.       
  2056.             If GridInt(.Col, 2) <> 0 Then
  2057.                 Ydtext.MaxLength = GridInt(.Col, 2)
  2058.             Else
  2059.                 Ydtext.MaxLength = 3000
  2060.             End If
  2061.       
  2062.             Call Wbkcl
  2063.       
  2064.             Ydtext.Visible = True
  2065.             Ydtext.SetFocus
  2066.         End If
  2067.     
  2068.         Dqtoprow = .TopRow
  2069.         Dqleftcol = .LeftCol
  2070.     
  2071.         '重置锁值
  2072.         Valilock = False
  2073.         Wbkbhlock = False
  2074.     End With
  2075.  
  2076. End Sub
  2077. Private Function Fun_AllowInput() As Boolean                           '当某种条件成立时禁止文本框激活使单据处于录入状态
  2078.    
  2079.     '如果单据操作状态为浏览状态则不能显示录入载体(通用)
  2080.     If Trim(Lab_OperStatus.Caption) = "1" Then
  2081.         Exit Function
  2082.     End If
  2083.    
  2084.     '[>>
  2085.     
  2086.         '此处可以填写禁止文本框激活使单据处于录入状态的理由
  2087.         With CzxsGrid
  2088.             If .TextMatrix(.Row, Sydz("006", GridStr(), Szzls)) = "" And .Col = Sydz("007", GridStr(), Szzls) Then
  2089.                 Call Xtxxts("没有代发银行,不必录入银行账号!", 0, 1)
  2090.                 Fun_AllowInput = False
  2091.                 Exit Function
  2092.             End If
  2093.         End With
  2094.     '<<]
  2095.    
  2096.     Fun_AllowInput = True
  2097.     
  2098. End Function
  2099. Private Sub Cxxswbk()                                                  'Formresize中重新显示文本框,列表框,帮助按钮(通用)
  2100.                    
  2101.     Dim Wbkpy As Integer, Wbkpy1 As Integer
  2102.     
  2103.     Wbkpy = 30
  2104.     Wbkpy1 = 15
  2105.     
  2106.     With CzxsGrid
  2107.         If YdCombo.Visible Then
  2108.             YdCombo.Left = .CellLeft + .Left + Wbkpy
  2109.             YdCombo.Top = .CellTop + .Top + Wbkpy
  2110.             YdCombo.Width = .CellWidth - Wbkpy1
  2111.         End If
  2112.         If Ydcommand.Visible Then
  2113.             Ydcommand.Left = .Left + .CellLeft + .CellWidth - Ydcommand.Width + Wbkpy
  2114.             Ydcommand.Top = .Top + .CellTop + .CellHeight - Ydcommand.Height + Wbkpy
  2115.         End If
  2116.         If Ydtext.Visible Then
  2117.             If Ydcommand.Visible Then
  2118.                 If Sfblbzkd Then
  2119.                     Ydtext.Width = .CellWidth - Ydcommand.Width
  2120.                 Else
  2121.                     Ydtext.Width = .CellWidth - Wbkpy1
  2122.                 End If
  2123.             Else
  2124.                 Ydtext.Width = .CellWidth - Wbkpy1
  2125.             End If
  2126.       
  2127.             Ydtext.Left = .CellLeft + .Left + Wbkpy
  2128.             Ydtext.Top = .CellTop + .Top + Wbkpy
  2129.             Ydtext.Height = .CellHeight - Wbkpy1
  2130.         End If
  2131.     End With
  2132. End Sub
  2133. Private Sub Lrsjhx()                                                             '文本框录入数据回写
  2134.   
  2135.     With CzxsGrid
  2136.         If YdCombo.Visible Then
  2137.             .Text = Trim(YdCombo.Text)
  2138.         End If
  2139.         If Ydtext.Visible Then
  2140.             .Text = Trim(Ydtext.Text)
  2141.         End If
  2142.    
  2143.         '(如果字段录入内容发生变化,则打开有效性判断锁)
  2144.         If Zdlrqnr <> Trim(.Text) Then
  2145.             Yxxpdlock = False
  2146.             Hyxxpdlock = False
  2147.         End If
  2148.    
  2149.         '隐藏文本框,帮助按钮,列表组合框
  2150.         Call Ycwbk
  2151.    
  2152.     End With
  2153.     
  2154. End Sub
  2155. Private Sub czxsgrid_KeyDown(KeyCode As Integer, Shift As Integer)              '网格快捷键
  2156.   
  2157.     '如果单据操作状态为浏览状态则不能显示录入载体
  2158.     If Trim(Lab_OperStatus.Caption) = "1" Then
  2159.         Exit Sub
  2160.     End If
  2161.     Select Case KeyCode
  2162.         Case vbKeyF2                   '按F2键参照
  2163.             Call xswbk
  2164.             Call Lrzdbz
  2165.     End Select
  2166. End Sub
  2167. Private Sub czxsgrid_KeyPress(KeyAscii As Integer)                              '网格接受键盘录入
  2168.     '当某种条件成立时禁止文本框激活使单据处于录入状态
  2169.     If Not Fun_AllowInput Then
  2170.         Exit Sub
  2171.     End If
  2172.   
  2173.     With CzxsGrid
  2174.   
  2175.         '屏 蔽 回 车 键
  2176.         If KeyAscii = vbKeyReturn Then
  2177.             KeyAscii = 0
  2178.             Rowjsq = .Row
  2179.             Coljsq = .Col + 1
  2180.             If Coljsq > .Cols - 1 Then
  2181.                 If Rowjsq < .Rows - 1 Then
  2182.                     Rowjsq = Rowjsq + 1
  2183.                 End If
  2184.                 Coljsq = Qslz
  2185.             End If
  2186.             Do While Rowjsq <= .Rows - 1
  2187.                 If .ColHidden(Coljsq) Or (Not GridBoolean(Coljsq, 1)) Then
  2188.                     Coljsq = Coljsq + 1
  2189.                     If Coljsq > .Cols - 1 Then
  2190.                         Rowjsq = Rowjsq + 1
  2191.                         Coljsq = Qslz
  2192.                     End If
  2193.                 Else
  2194.                     Exit Do
  2195.                 End If
  2196.             Loop
  2197.           
  2198.             If Rowjsq <= .Rows - 1 Then
  2199.                 .Select Rowjsq, Coljsq
  2200.             End If
  2201.        
  2202.             Exit Sub
  2203.        
  2204.         End If
  2205.      
  2206.         '接受用户录入
  2207.         Select Case KeyAscii
  2208.             Case 0 To 32             '用户输入KeyAscii为0-32的键 如空格
  2209.                 '显示录入载体
  2210.                 Call xswbk
  2211.             Case Else
  2212.                 
  2213.                 '防止非编辑字段SendKeys()出现死循环
  2214.                 If Not GridBoolean(.Col, 1) Or .Row < .FixedRows Then
  2215.                     Exit Sub
  2216.                 End If
  2217.                 
  2218.                 '如果此字段为列表框录入则调入相应列表框
  2219.                 If GridBoolean(.Col, 3) Then
  2220.                    '列表框录入
  2221.                     Call xswbk
  2222.                 Else
  2223.                     Ydtext.Text = ""
  2224.             
  2225.                     '录入限制
  2226.                     Call InputFieldLimit(Ydtext, GridInt(CzxsGrid.Col, 1), KeyAscii)
  2227.                     If KeyAscii = 0 Then
  2228.                         Exit Sub
  2229.                     End If
  2230.                     Call xswbk
  2231.                     Ydtext.Text = ""
  2232.                     Valilock = True
  2233.                     SendKeys Chr(KeyAscii), True
  2234.                     DoEvents
  2235.                     Valilock = False
  2236.                 End If
  2237.         End Select
  2238.     End With
  2239. End Sub
  2240. Private Sub Qkwlzd(sjh As Long, Sjl As Long)                            '清空为零字段
  2241.     
  2242.     If Not GridBoolean(Sjl, 5) Then
  2243.         Exit Sub
  2244.     End If
  2245.     
  2246.     With CzxsGrid
  2247.         If Val(Trim(.TextMatrix(sjh, Sjl))) = 0 Then
  2248.             .TextMatrix(sjh, Sjl) = ""
  2249.         End If
  2250.     End With
  2251. End Sub
  2252. Private Sub fhyxh()                                                     '返回录入数据有效行,同时让得到焦点网格可见
  2253.     
  2254.     With CzxsGrid
  2255.         If .Row >= .FixedRows Then
  2256.             Call Xldqh
  2257.         End If
  2258.     End With
  2259. End Sub
  2260. Private Sub Xldqh()                                                      '显露当前行
  2261.     
  2262.     Dim Toprowte As Long
  2263.     With CzxsGrid
  2264.         Toprowte = 0
  2265.         Do While .CellTop + .RowHeight(.Row) + Fzxwghs * Sjhgd > .Height And .TopRow <> Toprowte
  2266.             Toprowte = .TopRow
  2267.             .TopRow = .TopRow + 1
  2268.         Loop
  2269.         Toprowte = 0
  2270.         Do While .CellTop < .FixedRows * .RowHeight(0) And .TopRow <> Toprowte
  2271.             Toprowte = .TopRow
  2272.             If .TopRow > 1 Then
  2273.                 .TopRow = .TopRow - 1
  2274.             End If
  2275.         Loop
  2276.     End With
  2277. End Sub
  2278. Private Sub Xldql()                                                                  '显露当前列
  2279.     
  2280.     Dim Leftcolte As Long
  2281.     With CzxsGrid
  2282.         If .Col >= Qslz And .Col >= .FixedCols Then
  2283.             If .LeftCol > .Col Then
  2284.                 .LeftCol = .Col
  2285.             End If
  2286.             Leftcolte = 0
  2287.             Do While .CellLeft + .CellWidth > .Width And .LeftCol <> Leftcolte
  2288.                 Leftcolte = .LeftCol
  2289.                 .LeftCol = .LeftCol + 1
  2290.             Loop
  2291.         End If
  2292.     End With
  2293. End Sub
  2294. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  2295.     
  2296.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  2297.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  2298.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  2299.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  2300.     
  2301.     ReDim Bbxbt(1 To Bbxbtgs)
  2302.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  2303.     If Bbbwhgs <> 0 Then
  2304.         ReDim Bbbwh(1 To Bbbwhgs)
  2305.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  2306.     End If
  2307.     
  2308.     Bbzbt = ReportTitle
  2309.     With CzxsGrid
  2310.         If .Rows > .FixedRows Then
  2311.             Bbxbt(1) = "工资类别:" & Trim(GetComboKey(ImgCbo_Sort, 1))
  2312.         End If
  2313.     End With
  2314.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  2315.     Call Scyxsjb(CzxsGrid)                               '生成报表数据
  2316.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  2317.     If Not bbylte Then
  2318.         Unload DY_Tybbyldy
  2319.     End If
  2320.     
  2321. End Sub