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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  4. Begin VB.Form AutoTran_PzFrm 
  5.    BackColor       =   &H00E9F4FA&
  6.    BorderStyle     =   1  'Fixed Single
  7.    Caption         =   "记帐凭证"
  8.    ClientHeight    =   6720
  9.    ClientLeft      =   675
  10.    ClientTop       =   720
  11.    ClientWidth     =   10515
  12.    BeginProperty Font 
  13.       Name            =   "宋体"
  14.       Size            =   14.25
  15.       Charset         =   134
  16.       Weight          =   700
  17.       Underline       =   0   'False
  18.       Italic          =   0   'False
  19.       Strikethrough   =   0   'False
  20.    EndProperty
  21.    HelpContextID   =   113001
  22.    Icon            =   "自动转帐凭证_凭证处理.frx":0000
  23.    KeyPreview      =   -1  'True
  24.    LinkTopic       =   "Form4"
  25.    MaxButton       =   0   'False
  26.    MinButton       =   0   'False
  27.    ScaleHeight     =   6720
  28.    ScaleWidth      =   10515
  29.    StartUpPosition =   1  '所有者中心
  30.    Begin VB.CommandButton Ydcommand1 
  31.       BeginProperty Font 
  32.          Name            =   "宋体"
  33.          Size            =   9
  34.          Charset         =   134
  35.          Weight          =   400
  36.          Underline       =   0   'False
  37.          Italic          =   0   'False
  38.          Strikethrough   =   0   'False
  39.       EndProperty
  40.       Height          =   300
  41.       Left            =   6930
  42.       Picture         =   "自动转帐凭证_凭证处理.frx":1042
  43.       Style           =   1  'Graphical
  44.       TabIndex        =   21
  45.       Top             =   1110
  46.       Visible         =   0   'False
  47.       Width           =   300
  48.    End
  49.    Begin VB.CommandButton Ydcommand 
  50.       BeginProperty Font 
  51.          Name            =   "宋体"
  52.          Size            =   9
  53.          Charset         =   134
  54.          Weight          =   400
  55.          Underline       =   0   'False
  56.          Italic          =   0   'False
  57.          Strikethrough   =   0   'False
  58.       EndProperty
  59.       Height          =   300
  60.       Left            =   6600
  61.       Picture         =   "自动转帐凭证_凭证处理.frx":13CC
  62.       Style           =   1  'Graphical
  63.       TabIndex        =   7
  64.       Top             =   1110
  65.       Visible         =   0   'False
  66.       Width           =   300
  67.    End
  68.    Begin VB.Timer Timer1 
  69.       Interval        =   1
  70.       Left            =   7200
  71.       Top             =   840
  72.    End
  73.    Begin VB.TextBox Ydtext 
  74.       BackColor       =   &H00C0FFFF&
  75.       BorderStyle     =   0  'None
  76.       BeginProperty Font 
  77.          Name            =   "宋体"
  78.          Size            =   9
  79.          Charset         =   134
  80.          Weight          =   400
  81.          Underline       =   0   'False
  82.          Italic          =   0   'False
  83.          Strikethrough   =   0   'False
  84.       EndProperty
  85.       Height          =   270
  86.       Left            =   7800
  87.       MultiLine       =   -1  'True
  88.       TabIndex        =   5
  89.       Top             =   540
  90.       Visible         =   0   'False
  91.       Width           =   1185
  92.    End
  93.    Begin VB.CheckBox Chk_DeleteMess 
  94.       BackColor       =   &H00C9ECFE&
  95.       Caption         =   "删除会计分录是否提示"
  96.       BeginProperty Font 
  97.          Name            =   "宋体"
  98.          Size            =   9
  99.          Charset         =   134
  100.          Weight          =   400
  101.          Underline       =   0   'False
  102.          Italic          =   0   'False
  103.          Strikethrough   =   0   'False
  104.       EndProperty
  105.       Height          =   285
  106.       Left            =   6330
  107.       TabIndex        =   32
  108.       Top             =   3030
  109.       Value           =   1  'Checked
  110.       Visible         =   0   'False
  111.       Width           =   2685
  112.    End
  113.    Begin VB.CheckBox Chk_Quantity 
  114.       BackColor       =   &H00C9ECFE&
  115.       Caption         =   "科目数量核算则数量不能为零"
  116.       BeginProperty Font 
  117.          Name            =   "宋体"
  118.          Size            =   9
  119.          Charset         =   134
  120.          Weight          =   400
  121.          Underline       =   0   'False
  122.          Italic          =   0   'False
  123.          Strikethrough   =   0   'False
  124.       EndProperty
  125.       Height          =   285
  126.       Left            =   6330
  127.       TabIndex        =   28
  128.       Top             =   3330
  129.       Value           =   1  'Checked
  130.       Visible         =   0   'False
  131.       Width           =   2685
  132.    End
  133.    Begin VB.TextBox LrText 
  134.       Appearance      =   0  'Flat
  135.       BeginProperty Font 
  136.          Name            =   "宋体"
  137.          Size            =   9
  138.          Charset         =   134
  139.          Weight          =   400
  140.          Underline       =   0   'False
  141.          Italic          =   0   'False
  142.          Strikethrough   =   0   'False
  143.       EndProperty
  144.       ForeColor       =   &H00FF0000&
  145.       Height          =   300
  146.       Index           =   3
  147.       Left            =   2250
  148.       TabIndex        =   24
  149.       Text            =   "3"
  150.       Top             =   1320
  151.       Visible         =   0   'False
  152.       Width           =   795
  153.    End
  154.    Begin VB.ComboBox Combo_Kjqj 
  155.       BeginProperty Font 
  156.          Name            =   "宋体"
  157.          Size            =   9
  158.          Charset         =   134
  159.          Weight          =   400
  160.          Underline       =   0   'False
  161.          Italic          =   0   'False
  162.          Strikethrough   =   0   'False
  163.       EndProperty
  164.       ForeColor       =   &H00FF0000&
  165.       Height          =   300
  166.       Left            =   8670
  167.       Style           =   2  'Dropdown List
  168.       TabIndex        =   22
  169.       Top             =   1020
  170.       Width           =   1095
  171.    End
  172.    Begin VB.TextBox LrText 
  173.       Appearance      =   0  'Flat
  174.       BeginProperty Font 
  175.          Name            =   "宋体"
  176.          Size            =   9
  177.          Charset         =   134
  178.          Weight          =   400
  179.          Underline       =   0   'False
  180.          Italic          =   0   'False
  181.          Strikethrough   =   0   'False
  182.       EndProperty
  183.       ForeColor       =   &H00FF0000&
  184.       Height          =   300
  185.       Index           =   2
  186.       Left            =   8670
  187.       TabIndex        =   2
  188.       Text            =   "2"
  189.       Top             =   1320
  190.       Width           =   1095
  191.    End
  192.    Begin VB.TextBox LrText 
  193.       Appearance      =   0  'Flat
  194.       BeginProperty Font 
  195.          Name            =   "宋体"
  196.          Size            =   9
  197.          Charset         =   134
  198.          Weight          =   400
  199.          Underline       =   0   'False
  200.          Italic          =   0   'False
  201.          Strikethrough   =   0   'False
  202.       EndProperty
  203.       ForeColor       =   &H00FF0000&
  204.       Height          =   300
  205.       Index           =   0
  206.       Left            =   1530
  207.       TabIndex        =   0
  208.       Text            =   "0"
  209.       Top             =   1320
  210.       Width           =   450
  211.    End
  212.    Begin VB.TextBox LrText 
  213.       Appearance      =   0  'Flat
  214.       BeginProperty Font 
  215.          Name            =   "宋体"
  216.          Size            =   9
  217.          Charset         =   134
  218.          Weight          =   400
  219.          Underline       =   0   'False
  220.          Italic          =   0   'False
  221.          Strikethrough   =   0   'False
  222.       EndProperty
  223.       ForeColor       =   &H00FF0000&
  224.       Height          =   300
  225.       Index           =   1
  226.       Left            =   5280
  227.       TabIndex        =   1
  228.       Text            =   "1"
  229.       Top             =   1320
  230.       Width           =   1155
  231.    End
  232.    Begin VB.ComboBox YdCombo 
  233.       BeginProperty Font 
  234.          Name            =   "宋体"
  235.          Size            =   9
  236.          Charset         =   134
  237.          Weight          =   400
  238.          Underline       =   0   'False
  239.          Italic          =   0   'False
  240.          Strikethrough   =   0   'False
  241.       EndProperty
  242.       Height          =   300
  243.       Left            =   6570
  244.       Style           =   2  'Dropdown List
  245.       TabIndex        =   6
  246.       Top             =   540
  247.       Visible         =   0   'False
  248.       Width           =   1155
  249.    End
  250.    Begin VSFlex8Ctl.VSFlexGrid WglrGrid 
  251.       Height          =   3795
  252.       Left            =   135
  253.       TabIndex        =   3
  254.       Top             =   1680
  255.       Width           =   10260
  256.       _cx             =   5080
  257.       _cy             =   5080
  258.       Appearance      =   1
  259.       BorderStyle     =   1
  260.       Enabled         =   -1  'True
  261.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  262.          Name            =   "宋体"
  263.          Size            =   9
  264.          Charset         =   134
  265.          Weight          =   400
  266.          Underline       =   0   'False
  267.          Italic          =   0   'False
  268.          Strikethrough   =   0   'False
  269.       EndProperty
  270.       MousePointer    =   0
  271.       BackColor       =   -2147483643
  272.       ForeColor       =   -2147483640
  273.       BackColorFixed  =   12640511
  274.       ForeColorFixed  =   -2147483630
  275.       BackColorSel    =   -2147483643
  276.       ForeColorSel    =   -2147483640
  277.       BackColorBkg    =   16777215
  278.       BackColorAlternate=   -2147483643
  279.       GridColor       =   -2147483633
  280.       GridColorFixed  =   -2147483632
  281.       TreeColor       =   -2147483632
  282.       FloodColor      =   192
  283.       SheetBorder     =   -2147483642
  284.       FocusRect       =   1
  285.       HighLight       =   1
  286.       AllowSelection  =   0   'False
  287.       AllowBigSelection=   0   'False
  288.       AllowUserResizing=   0
  289.       SelectionMode   =   0
  290.       GridLines       =   1
  291.       GridLinesFixed  =   2
  292.       GridLineWidth   =   1
  293.       Rows            =   5000
  294.       Cols            =   10
  295.       FixedRows       =   1
  296.       FixedCols       =   0
  297.       RowHeightMin    =   0
  298.       RowHeightMax    =   0
  299.       ColWidthMin     =   0
  300.       ColWidthMax     =   0
  301.       ExtendLastCol   =   0   'False
  302.       FormatString    =   ""
  303.       ScrollTrack     =   0   'False
  304.       ScrollBars      =   2
  305.       ScrollTips      =   0   'False
  306.       MergeCells      =   0
  307.       MergeCompare    =   0
  308.       AutoResize      =   -1  'True
  309.       AutoSizeMode    =   0
  310.       AutoSearch      =   0
  311.       AutoSearchDelay =   2
  312.       MultiTotals     =   -1  'True
  313.       SubtotalPosition=   1
  314.       OutlineBar      =   0
  315.       OutlineCol      =   0
  316.       Ellipsis        =   0
  317.       ExplorerBar     =   0
  318.       PicturesOver    =   0   'False
  319.       FillStyle       =   0
  320.       RightToLeft     =   0   'False
  321.       PictureType     =   0
  322.       TabBehavior     =   0
  323.       OwnerDraw       =   0
  324.       Editable        =   0
  325.       ShowComboButton =   1
  326.       WordWrap        =   -1  'True
  327.       TextStyle       =   0
  328.       TextStyleFixed  =   0
  329.       OleDragMode     =   0
  330.       OleDropMode     =   0
  331.       DataMode        =   0
  332.       VirtualData     =   -1  'True
  333.       DataMember      =   ""
  334.       ComboSearch     =   3
  335.       AutoSizeMouse   =   -1  'True
  336.       FrozenRows      =   0
  337.       FrozenCols      =   0
  338.       AllowUserFreezing=   0
  339.       BackColorFrozen =   0
  340.       ForeColorFrozen =   0
  341.       WallPaperAlignment=   9
  342.       AccessibleName  =   ""
  343.       AccessibleDescription=   ""
  344.       AccessibleValue =   ""
  345.       AccessibleRole  =   24
  346.       Begin VB.CheckBox Chk_CodeOutput 
  347.          BackColor       =   &H00C9ECFE&
  348.          Caption         =   "打印凭证是否输出科目编码"
  349.          BeginProperty Font 
  350.             Name            =   "宋体"
  351.             Size            =   9
  352.             Charset         =   134
  353.             Weight          =   400
  354.             Underline       =   0   'False
  355.             Italic          =   0   'False
  356.             Strikethrough   =   0   'False
  357.          EndProperty
  358.          Height          =   255
  359.          Left            =   6060
  360.          TabIndex        =   36
  361.          Top             =   1740
  362.          Visible         =   0   'False
  363.          Width           =   2685
  364.       End
  365.       Begin VSFlex8Ctl.VSFlexGrid HjGrid 
  366.          Height          =   555
  367.          Left            =   0
  368.          TabIndex        =   8
  369.          Top             =   3270
  370.          Width           =   7545
  371.          _cx             =   5080
  372.          _cy             =   5080
  373.          Appearance      =   1
  374.          BorderStyle     =   0
  375.          Enabled         =   -1  'True
  376.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  377.             Name            =   "宋体"
  378.             Size            =   9
  379.             Charset         =   134
  380.             Weight          =   400
  381.             Underline       =   0   'False
  382.             Italic          =   0   'False
  383.             Strikethrough   =   0   'False
  384.          EndProperty
  385.          MousePointer    =   0
  386.          BackColor       =   15332602
  387.          ForeColor       =   -2147483640
  388.          BackColorFixed  =   -2147483633
  389.          ForeColorFixed  =   -2147483630
  390.          BackColorSel    =   -2147483643
  391.          ForeColorSel    =   -2147483640
  392.          BackColorBkg    =   16777215
  393.          BackColorAlternate=   15332602
  394.          GridColor       =   -2147483633
  395.          GridColorFixed  =   -2147483632
  396.          TreeColor       =   -2147483632
  397.          FloodColor      =   192
  398.          SheetBorder     =   -2147483642
  399.          FocusRect       =   1
  400.          HighLight       =   1
  401.          AllowSelection  =   0   'False
  402.          AllowBigSelection=   0   'False
  403.          AllowUserResizing=   0
  404.          SelectionMode   =   0
  405.          GridLines       =   1
  406.          GridLinesFixed  =   2
  407.          GridLineWidth   =   1
  408.          Rows            =   5000
  409.          Cols            =   10
  410.          FixedRows       =   1
  411.          FixedCols       =   0
  412.          RowHeightMin    =   0
  413.          RowHeightMax    =   0
  414.          ColWidthMin     =   0
  415.          ColWidthMax     =   0
  416.          ExtendLastCol   =   0   'False
  417.          FormatString    =   ""
  418.          ScrollTrack     =   0   'False
  419.          ScrollBars      =   3
  420.          ScrollTips      =   0   'False
  421.          MergeCells      =   0
  422.          MergeCompare    =   0
  423.          AutoResize      =   -1  'True
  424.          AutoSizeMode    =   0
  425.          AutoSearch      =   0
  426.          AutoSearchDelay =   2
  427.          MultiTotals     =   -1  'True
  428.          SubtotalPosition=   1
  429.          OutlineBar      =   0
  430.          OutlineCol      =   0
  431.          Ellipsis        =   0
  432.          ExplorerBar     =   0
  433.          PicturesOver    =   0   'False
  434.          FillStyle       =   0
  435.          RightToLeft     =   0   'False
  436.          PictureType     =   0
  437.          TabBehavior     =   0
  438.          OwnerDraw       =   0
  439.          Editable        =   0
  440.          ShowComboButton =   1
  441.          WordWrap        =   -1  'True
  442.          TextStyle       =   0
  443.          TextStyleFixed  =   0
  444.          OleDragMode     =   0
  445.          OleDropMode     =   0
  446.          DataMode        =   0
  447.          VirtualData     =   -1  'True
  448.          DataMember      =   ""
  449.          ComboSearch     =   3
  450.          AutoSizeMouse   =   -1  'True
  451.          FrozenRows      =   0
  452.          FrozenCols      =   0
  453.          AllowUserFreezing=   0
  454.          BackColorFrozen =   0
  455.          ForeColorFrozen =   0
  456.          WallPaperAlignment=   9
  457.          AccessibleName  =   ""
  458.          AccessibleDescription=   ""
  459.          AccessibleValue =   ""
  460.          AccessibleRole  =   24
  461.       End
  462.    End
  463.    Begin VB.Frame Frame1 
  464.       BackColor       =   &H00E9F4FA&
  465.       BeginProperty Font 
  466.          Name            =   "宋体"
  467.          Size            =   9
  468.          Charset         =   134
  469.          Weight          =   400
  470.          Underline       =   0   'False
  471.          Italic          =   0   'False
  472.          Strikethrough   =   0   'False
  473.       EndProperty
  474.       Height          =   855
  475.       Left            =   150
  476.       TabIndex        =   12
  477.       Top             =   5400
  478.       Width           =   10215
  479.       Begin VB.Label Lab_Memo 
  480.          Appearance      =   0  'Flat
  481.          BackColor       =   &H00E9F4FA&
  482.          BorderStyle     =   1  'Fixed Single
  483.          BeginProperty Font 
  484.             Name            =   "宋体"
  485.             Size            =   9
  486.             Charset         =   134
  487.             Weight          =   400
  488.             Underline       =   0   'False
  489.             Italic          =   0   'False
  490.             Strikethrough   =   0   'False
  491.          EndProperty
  492.          ForeColor       =   &H00FF0000&
  493.          Height          =   675
  494.          Index           =   0
  495.          Left            =   330
  496.          TabIndex        =   13
  497.          Top             =   120
  498.          Width           =   9825
  499.       End
  500.       Begin VB.Label Lab_Memo 
  501.          Alignment       =   2  'Center
  502.          Appearance      =   0  'Flat
  503.          BackColor       =   &H00E9F4FA&
  504.          BorderStyle     =   1  'Fixed Single
  505.          Caption         =   "备 注"
  506.          BeginProperty Font 
  507.             Name            =   "宋体"
  508.             Size            =   9
  509.             Charset         =   134
  510.             Weight          =   400
  511.             Underline       =   0   'False
  512.             Italic          =   0   'False
  513.             Strikethrough   =   0   'False
  514.          EndProperty
  515.          ForeColor       =   &H80000008&
  516.          Height          =   675
  517.          Index           =   1
  518.          Left            =   30
  519.          TabIndex        =   14
  520.          Top             =   120
  521.          Width           =   285
  522.          WordWrap        =   -1  'True
  523.       End
  524.    End
  525.    Begin MSComctlLib.ImageList ImageList1 
  526.       Left            =   9780
  527.       Top             =   1320
  528.       _ExtentX        =   1005
  529.       _ExtentY        =   1005
  530.       BackColor       =   -2147483643
  531.       ImageWidth      =   16
  532.       ImageHeight     =   16
  533.       MaskColor       =   12632256
  534.       _Version        =   393216
  535.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  536.          NumListImages   =   18
  537.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  538.             Picture         =   "自动转帐凭证_凭证处理.frx":1756
  539.             Key             =   "sz"
  540.          EndProperty
  541.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  542.             Picture         =   "自动转帐凭证_凭证处理.frx":1AF0
  543.             Key             =   "dy"
  544.          EndProperty
  545.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  546.             Picture         =   "自动转帐凭证_凭证处理.frx":1E8A
  547.             Key             =   "yl"
  548.          EndProperty
  549.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  550.             Picture         =   "自动转帐凭证_凭证处理.frx":2224
  551.             Key             =   "xg"
  552.          EndProperty
  553.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  554.             Picture         =   "自动转帐凭证_凭证处理.frx":25BE
  555.             Key             =   "zh"
  556.          EndProperty
  557.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  558.             Picture         =   "自动转帐凭证_凭证处理.frx":2958
  559.             Key             =   "sh"
  560.          EndProperty
  561.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  562.             Picture         =   "自动转帐凭证_凭证处理.frx":2CF2
  563.             Key             =   "bc"
  564.          EndProperty
  565.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  566.             Picture         =   "自动转帐凭证_凭证处理.frx":308C
  567.             Key             =   "fq"
  568.          EndProperty
  569.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  570.             Picture         =   "自动转帐凭证_凭证处理.frx":3426
  571.             Key             =   "bz"
  572.          EndProperty
  573.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  574.             Picture         =   "自动转帐凭证_凭证处理.frx":37C0
  575.             Key             =   "tc"
  576.          EndProperty
  577.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  578.             Picture         =   "自动转帐凭证_凭证处理.frx":3B5A
  579.             Key             =   "bcgs"
  580.          EndProperty
  581.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  582.             Picture         =   "自动转帐凭证_凭证处理.frx":3EF4
  583.             Key             =   "mrlk"
  584.          EndProperty
  585.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  586.             Picture         =   "自动转帐凭证_凭证处理.frx":428E
  587.             Key             =   "xsxm"
  588.          EndProperty
  589.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  590.             Picture         =   "自动转帐凭证_凭证处理.frx":4628
  591.             Key             =   "first"
  592.          EndProperty
  593.          BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  594.             Picture         =   "自动转帐凭证_凭证处理.frx":49C2
  595.             Key             =   "prev"
  596.          EndProperty
  597.          BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  598.             Picture         =   "自动转帐凭证_凭证处理.frx":4D5C
  599.             Key             =   "next"
  600.          EndProperty
  601.          BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  602.             Picture         =   "自动转帐凭证_凭证处理.frx":50F6
  603.             Key             =   "last"
  604.          EndProperty
  605.          BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  606.             Picture         =   "自动转帐凭证_凭证处理.frx":5490
  607.             Key             =   "xx"
  608.          EndProperty
  609.       EndProperty
  610.    End
  611.    Begin MSComctlLib.Toolbar Tlb_Action 
  612.       Align           =   1  'Align Top
  613.       Height          =   555
  614.       Left            =   0
  615.       TabIndex        =   49
  616.       Top             =   0
  617.       Width           =   10515
  618.       _ExtentX        =   18547
  619.       _ExtentY        =   979
  620.       ButtonWidth     =   820
  621.       ButtonHeight    =   926
  622.       AllowCustomize  =   0   'False
  623.       Wrappable       =   0   'False
  624.       Appearance      =   1
  625.       Style           =   1
  626.       ImageList       =   "ImageList1"
  627.       _Version        =   393216
  628.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  629.          NumButtons      =   19
  630.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  631.             Caption         =   "设置"
  632.             Key             =   "ymsz"
  633.             Object.ToolTipText     =   "打印页面设置"
  634.             ImageIndex      =   1
  635.          EndProperty
  636.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  637.             Caption         =   "打印"
  638.             Key             =   "dy"
  639.             Object.ToolTipText     =   "打印当前单据或Ctrl+P"
  640.             ImageIndex      =   2
  641.          EndProperty
  642.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  643.             Caption         =   "预览"
  644.             Key             =   "yl"
  645.             ImageIndex      =   3
  646.          EndProperty
  647.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  648.             Style           =   3
  649.          EndProperty
  650.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  651.             Caption         =   "增行"
  652.             Key             =   "zh"
  653.             Object.ToolTipText     =   "插入一行或Insert"
  654.             ImageIndex      =   5
  655.          EndProperty
  656.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  657.             Caption         =   "删行"
  658.             Key             =   "sh"
  659.             Object.ToolTipText     =   "删除当前记录行或Delete"
  660.             ImageIndex      =   6
  661.          EndProperty
  662.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  663.             Key             =   "fgh1"
  664.             Style           =   3
  665.          EndProperty
  666.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  667.             Caption         =   "保存"
  668.             Key             =   "bc"
  669.             Object.ToolTipText     =   "保存单据或F6"
  670.             ImageIndex      =   7
  671.          EndProperty
  672.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  673.             Caption         =   "放弃"
  674.             Key             =   "fq"
  675.             Object.ToolTipText     =   "放弃此次操作"
  676.             ImageIndex      =   8
  677.          EndProperty
  678.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  679.             Key             =   "fgh2"
  680.             Style           =   3
  681.          EndProperty
  682.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  683.             Caption         =   "首张"
  684.             Key             =   "first"
  685.             ImageIndex      =   14
  686.          EndProperty
  687.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  688.             Caption         =   "上张"
  689.             Key             =   "prev"
  690.             ImageIndex      =   15
  691.          EndProperty
  692.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  693.             Caption         =   "下张"
  694.             Key             =   "next"
  695.             ImageIndex      =   16
  696.          EndProperty
  697.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  698.             Caption         =   "末张"
  699.             Key             =   "last"
  700.             ImageIndex      =   17
  701.          EndProperty
  702.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  703.             Key             =   "fgh5"
  704.             ImageIndex      =   18
  705.             Style           =   3
  706.          EndProperty
  707.          BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  708.             Caption         =   "选项"
  709.             Key             =   "xx"
  710.             ImageIndex      =   18
  711.          EndProperty
  712.          BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  713.             Style           =   3
  714.          EndProperty
  715.          BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  716.             Caption         =   "帮助"
  717.             Key             =   "bz"
  718.             ImageIndex      =   9
  719.          EndProperty
  720.          BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  721.             Caption         =   "退出"
  722.             Key             =   "fh"
  723.             ImageIndex      =   10
  724.          EndProperty
  725.       EndProperty
  726.       BorderStyle     =   1
  727.    End
  728.    Begin VB.Label TsLabel 
  729.       BackStyle       =   0  'Transparent
  730.       Caption         =   "制单:"
  731.       BeginProperty Font 
  732.          Name            =   "宋体"
  733.          Size            =   9
  734.          Charset         =   134
  735.          Weight          =   400
  736.          Underline       =   0   'False
  737.          Italic          =   0   'False
  738.          Strikethrough   =   0   'False
  739.       EndProperty
  740.       Height          =   225
  741.       Index           =   23
  742.       Left            =   8520
  743.       TabIndex        =   48
  744.       Top             =   6390
  745.       Width           =   525
  746.    End
  747.    Begin VB.Label TsLabel 
  748.       BackStyle       =   0  'Transparent
  749.       Caption         =   "审核:"
  750.       BeginProperty Font 
  751.          Name            =   "宋体"
  752.          Size            =   9
  753.          Charset         =   134
  754.          Weight          =   400
  755.          Underline       =   0   'False
  756.          Italic          =   0   'False
  757.          Strikethrough   =   0   'False
  758.       EndProperty
  759.       Height          =   225
  760.       Index           =   22
  761.       Left            =   6645
  762.       TabIndex        =   47
  763.       Top             =   6390
  764.       Width           =   495
  765.    End
  766.    Begin VB.Label TsLabel 
  767.       BackStyle       =   0  'Transparent
  768.       Caption         =   "记帐:"
  769.       BeginProperty Font 
  770.          Name            =   "宋体"
  771.          Size            =   9
  772.          Charset         =   134
  773.          Weight          =   400
  774.          Underline       =   0   'False
  775.          Italic          =   0   'False
  776.          Strikethrough   =   0   'False
  777.       EndProperty
  778.       Height          =   225
  779.       Index           =   21
  780.       Left            =   2595
  781.       TabIndex        =   46
  782.       Top             =   6390
  783.       Width           =   495
  784.    End
  785.    Begin VB.Label TsLabel 
  786.       BackStyle       =   0  'Transparent
  787.       Caption         =   "会计主管:"
  788.       BeginProperty Font 
  789.          Name            =   "宋体"
  790.          Size            =   9
  791.          Charset         =   134
  792.          Weight          =   400
  793.          Underline       =   0   'False
  794.          Italic          =   0   'False
  795.          Strikethrough   =   0   'False
  796.       EndProperty
  797.       Height          =   225
  798.       Index           =   20
  799.       Left            =   360
  800.       TabIndex        =   45
  801.       Top             =   6390
  802.       Width           =   915
  803.    End
  804.    Begin VB.Label TsLabel 
  805.       BackStyle       =   0  'Transparent
  806.       Caption         =   "出纳:"
  807.       BeginProperty Font 
  808.          Name            =   "宋体"
  809.          Size            =   9
  810.          Charset         =   134
  811.          Weight          =   400
  812.          Underline       =   0   'False
  813.          Italic          =   0   'False
  814.          Strikethrough   =   0   'False
  815.       EndProperty
  816.       Height          =   225
  817.       Index           =   19
  818.       Left            =   4620
  819.       TabIndex        =   44
  820.       Top             =   6390
  821.       Width           =   645
  822.    End
  823.    Begin VB.Label Label5 
  824.       Appearance      =   0  'Flat
  825.       BackColor       =   &H80000005&
  826.       BackStyle       =   0  'Transparent
  827.       BeginProperty Font 
  828.          Name            =   "宋体"
  829.          Size            =   9
  830.          Charset         =   134
  831.          Weight          =   400
  832.          Underline       =   0   'False
  833.          Italic          =   0   'False
  834.          Strikethrough   =   0   'False
  835.       EndProperty
  836.       ForeColor       =   &H00000000&
  837.       Height          =   225
  838.       Left            =   2790
  839.       TabIndex        =   43
  840.       Top             =   30
  841.       Width           =   735
  842.    End
  843.    Begin VB.Label Label2 
  844.       Appearance      =   0  'Flat
  845.       BackColor       =   &H80000005&
  846.       BackStyle       =   0  'Transparent
  847.       BeginProperty Font 
  848.          Name            =   "宋体"
  849.          Size            =   9
  850.          Charset         =   134
  851.          Weight          =   400
  852.          Underline       =   0   'False
  853.          Italic          =   0   'False
  854.          Strikethrough   =   0   'False
  855.       EndProperty
  856.       ForeColor       =   &H00000000&
  857.       Height          =   225
  858.       Left            =   5730
  859.       TabIndex        =   42
  860.       Top             =   6390
  861.       Width           =   735
  862.    End
  863.    Begin VB.Label Lab_VouchSource 
  864.       Caption         =   "Lab_VouchSource"
  865.       BeginProperty Font 
  866.          Name            =   "宋体"
  867.          Size            =   9
  868.          Charset         =   134
  869.          Weight          =   400
  870.          Underline       =   0   'False
  871.          Italic          =   0   'False
  872.          Strikethrough   =   0   'False
  873.       EndProperty
  874.       Height          =   285
  875.       Left            =   1260
  876.       TabIndex        =   41
  877.       Top             =   660
  878.       Visible         =   0   'False
  879.       Width           =   1095
  880.    End
  881.    Begin VB.Label Lab_OperNum 
  882.       Caption         =   "Lab_OperNum"
  883.       BeginProperty Font 
  884.          Name            =   "宋体"
  885.          Size            =   9
  886.          Charset         =   134
  887.          Weight          =   400
  888.          Underline       =   0   'False
  889.          Italic          =   0   'False
  890.          Strikethrough   =   0   'False
  891.       EndProperty
  892.       Height          =   285
  893.       Left            =   2370
  894.       TabIndex        =   40
  895.       Top             =   660
  896.       Visible         =   0   'False
  897.       Width           =   1065
  898.    End
  899.    Begin VB.Label Lab_Error 
  900.       Appearance      =   0  'Flat
  901.       BackColor       =   &H80000005&
  902.       BackStyle       =   0  'Transparent
  903.       BorderStyle     =   1  'Fixed Single
  904.       Caption         =   "有错"
  905.       BeginProperty Font 
  906.          Name            =   "宋体"
  907.          Size            =   15.75
  908.          Charset         =   134
  909.          Weight          =   400
  910.          Underline       =   0   'False
  911.          Italic          =   0   'False
  912.          Strikethrough   =   0   'False
  913.       EndProperty
  914.       ForeColor       =   &H000000FF&
  915.       Height          =   390
  916.       Left            =   120
  917.       TabIndex        =   39
  918.       Top             =   720
  919.       Visible         =   0   'False
  920.       Width           =   825
  921.    End
  922.    Begin VB.Label Lab_Succeed 
  923.       Appearance      =   0  'Flat
  924.       BackColor       =   &H80000005&
  925.       BackStyle       =   0  'Transparent
  926.       BorderStyle     =   1  'Fixed Single
  927.       Caption         =   "已生成"
  928.       BeginProperty Font 
  929.          Name            =   "宋体"
  930.          Size            =   15
  931.          Charset         =   134
  932.          Weight          =   400
  933.          Underline       =   0   'False
  934.          Italic          =   0   'False
  935.          Strikethrough   =   0   'False
  936.       EndProperty
  937.       ForeColor       =   &H000000FF&
  938.       Height          =   405
  939.       Left            =   120
  940.       TabIndex        =   38
  941.       Top             =   660
  942.       Visible         =   0   'False
  943.       Width           =   1005
  944.    End
  945.    Begin VB.Label Lab_VouchId 
  946.       AutoSize        =   -1  'True
  947.       BackColor       =   &H00C0C0C0&
  948.       Caption         =   "Lab_VouchId"
  949.       BeginProperty Font 
  950.          Name            =   "宋体"
  951.          Size            =   9
  952.          Charset         =   134
  953.          Weight          =   400
  954.          Underline       =   0   'False
  955.          Italic          =   0   'False
  956.          Strikethrough   =   0   'False
  957.       EndProperty
  958.       Height          =   180
  959.       Left            =   3060
  960.       TabIndex        =   37
  961.       Top             =   1380
  962.       Visible         =   0   'False
  963.       Width           =   990
  964.    End
  965.    Begin VB.Label TsLabel 
  966.       BackStyle       =   0  'Transparent
  967.       Caption         =   "出纳:"
  968.       BeginProperty Font 
  969.          Name            =   "宋体"
  970.          Size            =   9
  971.          Charset         =   134
  972.          Weight          =   400
  973.          Underline       =   0   'False
  974.          Italic          =   0   'False
  975.          Strikethrough   =   0   'False
  976.       EndProperty
  977.       Height          =   225
  978.       Index           =   14
  979.       Left            =   4680
  980.       TabIndex        =   35
  981.       Top             =   6900
  982.       Width           =   645
  983.    End
  984.    Begin VB.Label TsLabel 
  985.       BackStyle       =   0  'Transparent
  986.       Caption         =   "会计主管:"
  987.       BeginProperty Font 
  988.          Name            =   "宋体"
  989.          Size            =   9
  990.          Charset         =   134
  991.          Weight          =   400
  992.          Underline       =   0   'False
  993.          Italic          =   0   'False
  994.          Strikethrough   =   0   'False
  995.       EndProperty
  996.       Height          =   225
  997.       Index           =   3
  998.       Left            =   420
  999.       TabIndex        =   34
  1000.       Top             =   6900
  1001.       Width           =   855
  1002.    End
  1003.    Begin VB.Label TsLabel 
  1004.       BackStyle       =   0  'Transparent
  1005.       Caption         =   "当前记录"
  1006.       BeginProperty Font 
  1007.          Name            =   "宋体"
  1008.          Size            =   9
  1009.          Charset         =   134
  1010.          Weight          =   400
  1011.          Underline       =   0   'False
  1012.          Italic          =   0   'False
  1013.          Strikethrough   =   0   'False
  1014.       EndProperty
  1015.       Height          =   255
  1016.       Index           =   13
  1017.       Left            =   7860
  1018.       TabIndex        =   33
  1019.       Top             =   810
  1020.       Width           =   825
  1021.    End
  1022.    Begin VB.Label Lab_Pzclzt 
  1023.       BackColor       =   &H0000FFFF&
  1024.       Caption         =   "1"
  1025.       BeginProperty Font 
  1026.          Name            =   "宋体"
  1027.          Size            =   9
  1028.          Charset         =   134
  1029.          Weight          =   400
  1030.          Underline       =   0   'False
  1031.          Italic          =   0   'False
  1032.          Strikethrough   =   0   'False
  1033.       EndProperty
  1034.       ForeColor       =   &H00808080&
  1035.       Height          =   255
  1036.       Left            =   6600
  1037.       TabIndex        =   31
  1038.       Top             =   840
  1039.       Visible         =   0   'False
  1040.       Width           =   285
  1041.    End
  1042.    Begin VB.Label TsLabel 
  1043.       BackStyle       =   0  'Transparent
  1044.       Caption         =   "行)"
  1045.       BeginProperty Font 
  1046.          Name            =   "宋体"
  1047.          Size            =   9
  1048.          Charset         =   134
  1049.          Weight          =   400
  1050.          Underline       =   0   'False
  1051.          Italic          =   0   'False
  1052.          Strikethrough   =   0   'False
  1053.       EndProperty
  1054.       Height          =   255
  1055.       Index           =   12
  1056.       Left            =   9330
  1057.       TabIndex        =   30
  1058.       Top             =   810
  1059.       Width           =   405
  1060.    End
  1061.    Begin VB.Label TsLabel 
  1062.       BackStyle       =   0  'Transparent
  1063.       Caption         =   "(第"
  1064.       BeginProperty Font 
  1065.          Name            =   "宋体"
  1066.          Size            =   9
  1067.          Charset         =   134
  1068.          Weight          =   400
  1069.          Underline       =   0   'False
  1070.          Italic          =   0   'False
  1071.          Strikethrough   =   0   'False
  1072.       EndProperty
  1073.       Height          =   255
  1074.       Index           =   11
  1075.       Left            =   8700
  1076.       TabIndex        =   29
  1077.       Top             =   810
  1078.       Width           =   315
  1079.    End
  1080.    Begin VB.Label Lab_Row 
  1081.       Alignment       =   2  'Center
  1082.       Appearance      =   0  'Flat
  1083.       BackColor       =   &H80000005&
  1084.       BackStyle       =   0  'Transparent
  1085.       BeginProperty Font 
  1086.          Name            =   "宋体"
  1087.          Size            =   9
  1088.          Charset         =   134
  1089.          Weight          =   400
  1090.          Underline       =   0   'False
  1091.          Italic          =   0   'False
  1092.          Strikethrough   =   0   'False
  1093.       EndProperty
  1094.       ForeColor       =   &H00FF0000&
  1095.       Height          =   225
  1096.       Left            =   9000
  1097.       TabIndex        =   27
  1098.       Top             =   810
  1099.       Width           =   315
  1100.    End
  1101.    Begin VB.Label Lab_OperStatus 
  1102.       BackColor       =   &H000080FF&
  1103.       Caption         =   "2"
  1104.       BeginProperty Font 
  1105.          Name            =   "宋体"
  1106.          Size            =   9
  1107.          Charset         =   134
  1108.          Weight          =   400
  1109.          Underline       =   0   'False
  1110.          Italic          =   0   'False
  1111.          Strikethrough   =   0   'False
  1112.       EndProperty
  1113.       Height          =   225
  1114.       Left            =   6930
  1115.       TabIndex        =   26
  1116.       Top             =   840
  1117.       Visible         =   0   'False
  1118.       Width           =   195
  1119.    End
  1120.    Begin VB.Label TsLabel 
  1121.       BackStyle       =   0  'Transparent
  1122.       Caption         =   "字"
  1123.       BeginProperty Font 
  1124.          Name            =   "宋体"
  1125.          Size            =   9
  1126.          Charset         =   134
  1127.          Weight          =   400
  1128.          Underline       =   0   'False
  1129.          Italic          =   0   'False
  1130.          Strikethrough   =   0   'False
  1131.       EndProperty
  1132.       Height          =   195
  1133.       Index           =   10
  1134.       Left            =   2040
  1135.       TabIndex        =   25
  1136.       Top             =   1380
  1137.       Visible         =   0   'False
  1138.       Width           =   255
  1139.    End
  1140.    Begin VB.Label TsLabel 
  1141.       BackStyle       =   0  'Transparent
  1142.       Caption         =   "会计期间"
  1143.       BeginProperty Font 
  1144.          Name            =   "宋体"
  1145.          Size            =   9
  1146.          Charset         =   134
  1147.          Weight          =   400
  1148.          Underline       =   0   'False
  1149.          Italic          =   0   'False
  1150.          Strikethrough   =   0   'False
  1151.       EndProperty
  1152.       Height          =   255
  1153.       Index           =   9
  1154.       Left            =   7860
  1155.       TabIndex        =   23
  1156.       Top             =   1080
  1157.       Width           =   825
  1158.    End
  1159.    Begin VB.Label Lab_Bill 
  1160.       Appearance      =   0  'Flat
  1161.       AutoSize        =   -1  'True
  1162.       BackColor       =   &H80000005&
  1163.       BackStyle       =   0  'Transparent
  1164.       BeginProperty Font 
  1165.          Name            =   "宋体"
  1166.          Size            =   9
  1167.          Charset         =   134
  1168.          Weight          =   400
  1169.          Underline       =   0   'False
  1170.          Italic          =   0   'False
  1171.          Strikethrough   =   0   'False
  1172.       EndProperty
  1173.       ForeColor       =   &H00000000&
  1174.       Height          =   180
  1175.       Left            =   9150
  1176.       TabIndex        =   20
  1177.       Top             =   6390
  1178.       Width           =   540
  1179.    End
  1180.    Begin VB.Label Lab_Checker 
  1181.       Appearance      =   0  'Flat
  1182.       AutoSize        =   -1  'True
  1183.       BackColor       =   &H80000005&
  1184.       BackStyle       =   0  'Transparent
  1185.       BeginProperty Font 
  1186.          Name            =   "宋体"
  1187.          Size            =   9
  1188.          Charset         =   134
  1189.          Weight          =   400
  1190.          Underline       =   0   'False
  1191.          Italic          =   0   'False
  1192.          Strikethrough   =   0   'False
  1193.       EndProperty
  1194.       ForeColor       =   &H00000000&
  1195.       Height          =   180
  1196.       Left            =   7260
  1197.       TabIndex        =   19
  1198.       Top             =   6390
  1199.       Width           =   90
  1200.    End
  1201.    Begin VB.Label Lab_Book 
  1202.       Appearance      =   0  'Flat
  1203.       AutoSize        =   -1  'True
  1204.       BackColor       =   &H80000005&
  1205.       BackStyle       =   0  'Transparent
  1206.       BeginProperty Font 
  1207.          Name            =   "宋体"
  1208.          Size            =   9
  1209.          Charset         =   134
  1210.          Weight          =   400
  1211.          Underline       =   0   'False
  1212.          Italic          =   0   'False
  1213.          Strikethrough   =   0   'False
  1214.       EndProperty
  1215.       ForeColor       =   &H00000000&
  1216.       Height          =   180
  1217.       Left            =   3210
  1218.       TabIndex        =   18
  1219.       Top             =   6390
  1220.       Width           =   90
  1221.    End
  1222.    Begin VB.Label TsLabel 
  1223.       BackStyle       =   0  'Transparent
  1224.       Caption         =   "记帐:"
  1225.       BeginProperty Font 
  1226.          Name            =   "宋体"
  1227.          Size            =   9
  1228.          Charset         =   134
  1229.          Weight          =   400
  1230.          Underline       =   0   'False
  1231.          Italic          =   0   'False
  1232.          Strikethrough   =   0   'False
  1233.       EndProperty
  1234.       Height          =   225
  1235.       Index           =   8
  1236.       Left            =   2655
  1237.       TabIndex        =   17
  1238.       Top             =   6900
  1239.       Width           =   645
  1240.    End
  1241.    Begin VB.Label TsLabel 
  1242.       BackStyle       =   0  'Transparent
  1243.       Caption         =   "审核:"
  1244.       BeginProperty Font 
  1245.          Name            =   "宋体"
  1246.          Size            =   9
  1247.          Charset         =   134
  1248.          Weight          =   400
  1249.          Underline       =   0   'False
  1250.          Italic          =   0   'False
  1251.          Strikethrough   =   0   'False
  1252.       EndProperty
  1253.       Height          =   225
  1254.       Index           =   7
  1255.       Left            =   6705
  1256.       TabIndex        =   16
  1257.       Top             =   6900
  1258.       Width           =   495
  1259.    End
  1260.    Begin VB.Label TsLabel 
  1261.       BackStyle       =   0  'Transparent
  1262.       Caption         =   "制单:"
  1263.       BeginProperty Font 
  1264.          Name            =   "宋体"
  1265.          Size            =   9
  1266.          Charset         =   134
  1267.          Weight          =   400
  1268.          Underline       =   0   'False
  1269.          Italic          =   0   'False
  1270.          Strikethrough   =   0   'False
  1271.       EndProperty
  1272.       Height          =   225
  1273.       Index           =   5
  1274.       Left            =   8580
  1275.       TabIndex        =   15
  1276.       Top             =   6900
  1277.       Width           =   525
  1278.    End
  1279.    Begin VB.Label TsLabel 
  1280.       BackStyle       =   0  'Transparent
  1281.       Caption         =   "附单据数"
  1282.       BeginProperty Font 
  1283.          Name            =   "宋体"
  1284.          Size            =   9
  1285.          Charset         =   134
  1286.          Weight          =   400
  1287.          Underline       =   0   'False
  1288.          Italic          =   0   'False
  1289.          Strikethrough   =   0   'False
  1290.       EndProperty
  1291.       Height          =   255
  1292.       Index           =   2
  1293.       Left            =   7860
  1294.       TabIndex        =   11
  1295.       Top             =   1380
  1296.       Width           =   825
  1297.    End
  1298.    Begin VB.Label TsLabel 
  1299.       BackStyle       =   0  'Transparent
  1300.       Caption         =   "类别字号"
  1301.       BeginProperty Font 
  1302.          Name            =   "宋体"
  1303.          Size            =   9
  1304.          Charset         =   134
  1305.          Weight          =   400
  1306.          Underline       =   0   'False
  1307.          Italic          =   0   'False
  1308.          Strikethrough   =   0   'False
  1309.       EndProperty
  1310.       Height          =   225
  1311.       Index           =   0
  1312.       Left            =   750
  1313.       TabIndex        =   10
  1314.       Top             =   1380
  1315.       Width           =   825
  1316.    End
  1317.    Begin VB.Label TsLabel 
  1318.       BackStyle       =   0  'Transparent
  1319.       Caption         =   "制单日期"
  1320.       BeginProperty Font 
  1321.          Name            =   "宋体"
  1322.          Size            =   9
  1323.          Charset         =   134
  1324.          Weight          =   400
  1325.          Underline       =   0   'False
  1326.          Italic          =   0   'False
  1327.          Strikethrough   =   0   'False
  1328.       EndProperty
  1329.       Height          =   255
  1330.       Index           =   1
  1331.       Left            =   4470
  1332.       TabIndex        =   9
  1333.       Top             =   1380
  1334.       Width           =   825
  1335.    End
  1336.    Begin VB.Line Line1 
  1337.       BorderColor     =   &H00000000&
  1338.       Index           =   0
  1339.       X1              =   3945
  1340.       X2              =   6270
  1341.       Y1              =   1035
  1342.       Y2              =   1035
  1343.    End
  1344.    Begin VB.Line Line1 
  1345.       BorderColor     =   &H00000000&
  1346.       Index           =   1
  1347.       X1              =   3930
  1348.       X2              =   6270
  1349.       Y1              =   1080
  1350.       Y2              =   1080
  1351.    End
  1352.    Begin VB.Label TsLabel 
  1353.       BackColor       =   &H80000018&
  1354.       BackStyle       =   0  'Transparent
  1355.       Caption         =   "记 帐 凭 证"
  1356.       ForeColor       =   &H00000000&
  1357.       Height          =   330
  1358.       Index           =   4
  1359.       Left            =   4290
  1360.       TabIndex        =   4
  1361.       Top             =   720
  1362.       Width           =   2115
  1363.    End
  1364. End
  1365. Attribute VB_Name = "AutoTran_PzFrm"
  1366. Attribute VB_GlobalNameSpace = False
  1367. Attribute VB_Creatable = False
  1368. Attribute VB_PredeclaredId = True
  1369. Attribute VB_Exposed = False
  1370. '***********************************************************************************************************
  1371. '*    模 块 名 称 :自动转帐凭证处理
  1372. '*    功 能 描 述 :此功能模块主要完成凭证自动生成功能。对外接口为本次"工作批号"
  1373. '*    程序员姓名  :姜冬梅
  1374. '*    最后修改人  :魏永生
  1375. '*    最后修改时间:2002/01/03
  1376. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  1377. '*
  1378. '*    1.每次调入外部功能窗体,均要加锁ChangeLock=True,窗体关闭后解锁ChangeLock=false
  1379. '*    2.网格列存储内容注解
  1380. '*      0-行有效标识 1-结算方式编码 2-结算方式名称 3-票号 4-发生日期 5-数量 6-用户录入单价(显示时自动计算)
  1381. '*      7-计量单位 8-外币编码 9-外币名称 10-外币金额 11-汇率 12-部门编码 13-部门名称
  1382. '*      14-客户编码 15-客户名称  16-职员编码 17-职员名称 18-项目大类编码 19-项目大类名称
  1383. '*      20-项目编码 21-项目名称  22-项目数量 23-项目计量单位 24-经办人 25-供应商编码 26-供应商名称
  1384. '*      索引对照:001-摘要  002-科目编码 003-科目名称 004-借方金额 005-贷方金额
  1385. '*    3.Lab_OperStatus 用此标签来标识单据录入状态(默认值为1) "1"-浏览 "2"-编辑
  1386. '*    4.Lab_Pzclzt 用此标签来标识凭证处理状态(默认值为1) "1"-编辑凭证                                                       "4"-明细帐联查凭证
  1387. '*    5.原则:只要单据能够存盘(无论修改或新增)则其必须接受完整性及有效性规则检查
  1388. '*    6.当执行“下张、上张、首张、末张”,写临时凭证;当“保存”时,则保存到正式凭证中,同时写临时凭证。
  1389. '*
  1390. '***********************************************************************************************************
  1391. Public OperationNumPz As String               '转帐批号
  1392. Public vouchsourcePz As String                '转帐系统名
  1393.  
  1394.  '[以下为根据实际情况设置变量
  1395.     Dim Int_AssCount As Integer                     '辅助核算项目总数
  1396.     Dim Bln_AssShow() As Boolean                    '辅助核算项目是否显示
  1397.     Dim Bln_AssHelp() As Boolean                    '辅助核算项目是否有帮助
  1398.     Dim Str_Digest As String                        '最后录入的一条凭证分录的摘要内容
  1399.     Dim Bln_BillChange As Boolean                   '标识单据是否发生改动
  1400.     Dim Int_Year As Integer     '年份
  1401.     Dim Int_Period As Integer   '会计期间
  1402.     Dim Rec_VouchMainTemp As New ADODB.Recordset    '临时凭证主表
  1403.     Dim Rec_VouchTemp As New ADODB.Recordset        '临时凭证辅表
  1404.     Dim RecTemp As New ADODB.Recordset              '临时数据表
  1405.     Dim Sqlstr As String                            '临时查询字符串
  1406.     Dim Rec_TranMainTemp  As New ADODB.Recordset    '本批结转的所有凭证记录集
  1407.     Dim Max_VouchIdTemp As Integer                  '本批凭证中最大的VouchIdTemp值
  1408.     Dim Min_VouchIdTemp As Integer                  '本批凭证中最小的VouchIdTemp值
  1409.     
  1410.     Dim Pub_VouchSource As String
  1411.     
  1412.  ']
  1413.  
  1414.  '以下为固定使用变量(网格)
  1415.     Dim Cxnrrec As New ADODB.Recordset              '显示查询内容动态集
  1416.     Dim Dyymctbl As New DY_Dyymsz                   '打印页面窗体变量
  1417.     Dim GridCode As String                          '显示网格网格代码
  1418.     Dim GridInf() As Variant                        '整个网格设置信息
  1419.     Dim ReportTitle As String                       '报表主标题
  1420.     Dim Tsxx As String                              '系统提示信息
  1421.     Dim Pmbcsjhs As Long                            '屏幕网格保持数据行数(大于等于1)
  1422.     Dim Fzxwghs As Integer                          '辅助项网格行数(包括合计行)
  1423.     Dim Sfxshjwg As Boolean                         '是否显示合计网格
  1424.     Dim Qslz As Long                                '网格隐藏(非操作显示)列数
  1425.     Dim Sjhgd As Double                             '网格数据行高度
  1426.     Dim GridBoolean() As Boolean                    '网格列信息(布尔型)
  1427.     Dim GridStr()  As String                        '网格列信息(字符型)
  1428.     Dim GridInt() As Integer                        '网格列信息(整型)
  1429.     Dim Sfblbzkd As Boolean                         '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
  1430.     Dim Dqlrwgh As Long                             '当前录入数据网格行
  1431.     Dim Dqlrwgl As Long                             '当前录入数据网格列
  1432.     Dim Dqlkwgh As Long                             '刚刚离开网格行(不一定为录入行)
  1433.     Dim Dqlkwgl As Long                             '刚刚离开网格列
  1434.     Dim Dqtoprow As Long                            '当前录入状态时最上端可视行
  1435.     Dim Dqleftcol As Long                           '当前录入状态时最左端可视列
  1436.     Dim Zdlrqnr As String                           '字段录入修改前内容(用来判断内容是否修改)
  1437.     Dim Wbkbhlock As Boolean                        '文本框改变值锁
  1438.     Dim Changelock As Boolean                       '网格行列改变控制锁(用来区别用户改变.程序改变)
  1439.     Dim Gdtlock As Boolean                          '滚动条滚动控制(用来区别用户改变.程序改变)
  1440.     Dim Yxxpdlock As Boolean                        '字段有效性判断锁(内容不修改不需进行字段有效性判断)
  1441.     Dim Hyxxpdlock As Boolean                       '行有效性判断锁(字段内容不修改不需进行行有效性判断)
  1442.     Dim Valilock As Boolean                         '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
  1443.     Dim Shsfts As Boolean                           '删除记录行是否提示
  1444.     Dim Szzls As Integer                            '网格信息数组最大下标值(网格列数-1)
  1445.     
  1446.  '以下为固定使用变量(文本框)
  1447.     Dim Textvar() As Variant                        '存储变体型文本框信息
  1448.     Dim Textboolean() As Boolean                    '存储布尔型文本框信息
  1449.     Dim Textint() As Integer                        '存储整型文本框信息
  1450.     Dim Textstr() As String                         '存储字符型文本框信息
  1451.     Dim Max_Text_Index As Integer                   '最大录入文本框索引值
  1452.     Dim TextGroupCode As String                     '文本框录入分组编码
  1453.     Dim TextValiLock As Boolean                     '文本框失去焦点是否进行有效性控制判断
  1454.     Dim TextValiJudgeLock() As Boolean              '文本框录入有效性判断控制锁
  1455.     Dim TextChangeLock As Boolean                   '文本框内容变换控制锁
  1456.     Dim Bln_Cancel As Boolean                       '取消按钮信息传递
  1457. Private Sub Form_KeyPress(KeyAscii As Integer)       '控 制 焦 点 转 移
  1458.     Dim jdzygs As Integer
  1459.     jdzygs = 3
  1460.     Select Case KeyAscii
  1461.     Case vbKeyReturn
  1462.         If Kjjdzy(jdzygs) Then
  1463.             KeyAscii = 0
  1464.         End If
  1465.     Case 39           '屏蔽字符"'"
  1466.         KeyAscii = 0
  1467.     End Select
  1468. End Sub
  1469. Private Sub Form_Load()                              '窗 体 装 入
  1470.        
  1471.     '初始化各种锁值
  1472.     Changelock = False             '网格行列改变控制锁
  1473.     Gdtlock = False                '滚动条滚动控制
  1474.     Yxxpdlock = True               '字段有效性判断锁
  1475.     Hyxxpdlock = True              '行有效性判断锁
  1476.     Wbkbhlock = False              '文本框内容改变锁
  1477.     
  1478.     Me.Lab_OperNum.Caption = OperationNumPz
  1479.     
  1480.     '[>>开始 设置辅助核算项目属性
  1481.     Int_AssCount = 14
  1482.     ReDim Bln_AssShow(Int_AssCount - 1)
  1483.     ReDim Bln_AssHelp(Int_AssCount - 1)
  1484.     Bln_AssHelp(0) = True         '结算方式
  1485.     Bln_AssHelp(2) = True         '发生日期
  1486.     Bln_AssHelp(7) = True         '部门
  1487.     Bln_AssHelp(8) = True         '往来客户
  1488.     Bln_AssHelp(9) = True         '个人
  1489.     Bln_AssHelp(10) = True        '项目
  1490.     Bln_AssHelp(12) = True        '供应商
  1491.     Bln_AssHelp(13) = True        '经办人
  1492.      
  1493.     '整理凭证临时表,清除非法字段
  1494.     Sqlstr = "Exec Cwzz_Sp_ValidPz '" & OperationNumPz & "','" & vouchsourcePz & "'"
  1495.     Cw_DataEnvi.DataConnect.Execute Sqlstr
  1496.     '报表主标题及报表编码
  1497.     ReportTitle = "记 帐 凭 证"
  1498.     XtReportCode = "Cwzz_jzpzcl"
  1499.     Load Dyymctbl
  1500.     
  1501.     '以下为文本框处理程序
  1502.     TextGroupCode = "Cwzz_jzpzcl"
  1503.     
  1504.     Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())  '读入文本框录入信息
  1505.     Call Wbkcsh
  1506.     
  1507.     '调 入 网 格
  1508.     GridCode = "Cwzz_jzpzcl"          '网格属性编码
  1509.     Call BzWgcsh(WglrGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  1510.     
  1511.     Qslz = GridInf(1)
  1512.     Sjhgd = GridInf(2)
  1513.     Pmbcsjhs = GridInf(3)
  1514.     Fzxwghs = GridInf(4)
  1515.     Sfblbzkd = GridInf(5)
  1516.     Shsfts = GridInf(6)
  1517.     Sfxshjwg = GridInf(7)
  1518.     Szzls = WglrGrid.Cols - 1
  1519.     
  1520.     For Jsqte = WglrGrid.FixedRows To WglrGrid.Rows - 1
  1521.         WglrGrid.RowHeight(Jsqte) = Sjhgd
  1522.     Next Jsqte
  1523.     
  1524.     
  1525.     '[>>置删行是否提示状态
  1526.     If Shsfts Then
  1527.         Chk_DeleteMess.Value = 1
  1528.     Else
  1529.         Chk_DeleteMess.Value = 0
  1530.     End If
  1531.     '<<]
  1532.     
  1533.     '初始化合计网格
  1534.     
  1535.     Call Cshhjwg
  1536.     
  1537.     '单据变动置为False
  1538.     Bln_BillChange = False
  1539.     
  1540.     '装入会计科目编码帮助窗体(为加快参照速度)PZ_FrmKjkmcz
  1541.     Load PZ_FrmKjkmcz
  1542.     Lab_Succeed.Caption = ""
  1543.     
  1544. End Sub
  1545. Private Sub Form_Unload(Cancel As Integer)           '窗体卸载
  1546.     
  1547.     '卸载打印页面窗体
  1548.     Unload Dyymctbl
  1549.     
  1550.     '卸载会计科目编码参照窗体
  1551.     PZ_FrmKjkmcz.UnloadCheck.Value = 1
  1552.     Unload PZ_FrmKjkmcz
  1553.     
  1554.     '判断凭证是否发生变化
  1555.     If Bln_BillChange Then
  1556.         Xtfhcs = "1"
  1557.     Else
  1558.         Xtfhcs = "0"
  1559.     End If
  1560.     Set Rec_VouchMainTemp = Nothing
  1561.     Set Rec_VouchTemp = Nothing
  1562.     Set RecTemp = Nothing
  1563.     Set Rec_TranMainTemp = Nothing
  1564.     Set Rs_TranMainTemp = Nothing
  1565. End Sub
  1566. Private Sub Timer1_Timer()                           '根据不同凭证或单据状态处理不同的数据初始化
  1567.     
  1568.     '关闭定时器
  1569.     Timer1.Enabled = False
  1570.     
  1571.     '调入数据初始化模块
  1572.     Call Read_Data
  1573.     Call Sjcsh(Trim(Lab_Pzclzt.Caption))
  1574.     
  1575.     '填充会计期间列表框(年度默认为用户选择年度)
  1576.     Call Sub_FillPeriTran
  1577.     Int_Year = Val(Mid(Combo_Kjqj.Text, 1, 4))
  1578.     Int_Period = Val(Mid(Combo_Kjqj.Text, 6, 2))
  1579. End Sub
  1580. Private Sub Sjcsh(Str_Pzclzt As String)              '数据初始化模块(根据实际情况)
  1581.     Dim Sqlstr As String       '查询凭证列表条件
  1582.     
  1583.     '[>>根据实际情况初始化
  1584.     Select Case Str_Pzclzt
  1585.     Case "1"   '编辑凭证
  1586.         Me.Caption = Lab_VouchSource.Caption
  1587.         
  1588.         '日期默认值为用户选择日期
  1589.         LrText(1).Text = Xtrq
  1590.         
  1591.         '设置操作状态为修改
  1592.         Lab_OperStatus = "2"         '编辑状态
  1593.         Call Sub_OperStatus("30")
  1594.         Call Sub_ShowBill
  1595.         Call Sub_First
  1596.     End Select
  1597.     
  1598.     '<<]
  1599.     '重 置 网 格
  1600.     Call Sub_AdjustGrid
  1601. End Sub
  1602. Private Sub Sub_ShowBill()                                          '根据当前单据号显示整张单据内容
  1603.     Dim Jsqte As Long                       '临时计数器
  1604.     Sqlstr = "select * from Cwzz_V_AccVouchTempCh where OperationNo='" & Lab_OperNum.Caption & "' and VouchId='" & Val(Trim(Lab_VouchId.Caption)) & "' Order by VouchId,SerialId"
  1605.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1606.     '若该临时凭证没有保存为正式凭证,可以编辑
  1607.     If RecTemp.EOF = True Then
  1608.         Exit Sub
  1609.     End If
  1610.     If Trim(RecTemp.Fields("VouchNo") & "") = "" Or Trim(RecTemp.Fields("VouchNo") & "") = 0 Then
  1611.         Lab_Succeed.Visible = False
  1612.         Lab_Succeed.Caption = ""
  1613.         Lab_OperStatus = "2"
  1614.         Call Sub_OperStatus("30")
  1615.     Else
  1616.         Lab_Succeed.Visible = True
  1617.         Lab_Succeed.Caption = "已生成"
  1618.         Lab_OperStatus = "1"
  1619.         Call Sub_OperStatus("11")
  1620.     End If
  1621.     With RecTemp
  1622.         WglrGrid.Clear 1
  1623.         If .EOF Then
  1624.             Exit Sub
  1625.         Else
  1626.             WglrGrid.Rows = .RecordCount + WglrGrid.FixedRows
  1627.             
  1628.             '[>>显示单据头
  1629.             TextChangeLock = True
  1630.             LrText(0).Text = Trim(.Fields("VouchClassCode"))                                        '凭证类别
  1631.             If Lab_Succeed.Caption = "已生成" Then
  1632.                 LrText(3).Text = Mid(Trim(Str(10000 + .Fields("VouchNo"))), 2, 4)                    '凭证号
  1633.             End If
  1634.             LrText(3).Text = Lab_VouchId.Caption                                                    '在主表中取到的ID号
  1635.             If IsDate(.Fields("DDate")) Then
  1636.                 LrText(1).Text = Format(.Fields("Ddate"), "yyyy-mm-dd")                              '制单日期
  1637.             End If
  1638.             LrText(2).Text = Trim(Str(.Fields("Doc")))                                              '附单据数
  1639.             Lab_Bill.Caption = Trim(.Fields("Bill") & "")                                           '制单人
  1640.             Lab_Checker.Caption = ""                                                                '审核人
  1641.             Lab_Book.Caption = ""                                                                   '记帐人
  1642.             Lab_Error.Visible = False                                                               '标错
  1643.             TextChangeLock = False
  1644.             '<<]
  1645.         End If
  1646.         Jsqte = WglrGrid.FixedRows
  1647.         Do While Not .EOF
  1648.             If Jsqte >= WglrGrid.Rows Then
  1649.                 WglrGrid.AddItem ""
  1650.             End If
  1651.             
  1652.             '[>>显示单据分录
  1653.             WglrGrid.TextMatrix(Jsqte, 0) = "*"                                                     '行标识
  1654.             '结算方式编码
  1655.             WglrGrid.TextMatrix(Jsqte, 1) = Trim(IIf(IsNull(.Fields("SScode")), "", .Fields("SScode")))
  1656.             WglrGrid.TextMatrix(Jsqte, 2) = Trim(IIf(IsNull(.Fields("SSName")), "", .Fields("SSName")))   '结算方式名称
  1657.             WglrGrid.TextMatrix(Jsqte, 3) = Trim(IIf(IsNull(.Fields("billno")), "", .Fields("billno")))                  '票号
  1658.             If IsDate(.Fields("BillDate") & "") Then
  1659.                 WglrGrid.TextMatrix(Jsqte, 4) = Format(.Fields("BillDate"), "yyyy-mm-dd")            '发生日期
  1660.             End If
  1661.             If .Fields("Jfsl") <> 0 Then
  1662.                 WglrGrid.TextMatrix(Jsqte, 5) = Trim(Str(.Fields("Jfsl")))                           '数量
  1663.             End If
  1664.             If .Fields("Dfsl") <> 0 Then
  1665.                 WglrGrid.TextMatrix(Jsqte, 5) = Trim(Str(.Fields("Dfsl")))                           '数量
  1666.             End If
  1667.             WglrGrid.TextMatrix(Jsqte, 7) = ""                                                      '计量单位
  1668.             '币种为外币时填充网格
  1669.             If Trim(.Fields("ForeignCurrCode") & "") <> XtSCurrCode Then
  1670.                 WglrGrid.TextMatrix(Jsqte, 8) = Trim(.Fields("ForeignCurrCode") & "")                         '原币编码
  1671.                 WglrGrid.TextMatrix(Jsqte, 9) = Trim(.Fields("ForeignCurrName") & "")                         '原币名称
  1672.                 If .Fields("Wbjfje") <> 0 Then
  1673.                     WglrGrid.TextMatrix(Jsqte, 10) = Trim(Str(.Fields("Wbjfje")))                              '原币金额
  1674.                 End If
  1675.                 If .Fields("Wbdfje") <> 0 Then
  1676.                     WglrGrid.TextMatrix(Jsqte, 10) = Trim(Str(.Fields("Wbdfje")))                              '原币金额
  1677.                 End If
  1678.                 If .Fields("AccRate") <> 0 Then
  1679.                     WglrGrid.TextMatrix(Jsqte, 11) = Trim(Str(.Fields("AccRate")))                             '记帐汇率
  1680.                 End If
  1681.             End If
  1682.             WglrGrid.TextMatrix(Jsqte, 12) = Trim(.Fields("DeptCode") & "")                         '部门编码
  1683.             WglrGrid.TextMatrix(Jsqte, 13) = Trim(.Fields("DeptName") & "")                         '部门名称
  1684.             WglrGrid.TextMatrix(Jsqte, 14) = Trim(.Fields("CusCode") & "")                          '客户编码
  1685.             WglrGrid.TextMatrix(Jsqte, 15) = Trim(.Fields("CusName") & "")                          '客户名称
  1686.             WglrGrid.TextMatrix(Jsqte, 25) = Trim(.Fields("Suppliercode") & "")                    '供应商编码
  1687.             WglrGrid.TextMatrix(Jsqte, 26) = Trim(.Fields("Suppliername") & "")                    '供应商名称
  1688.             WglrGrid.TextMatrix(Jsqte, 16) = Trim(.Fields("PersonCode") & "")                       '职员编码
  1689.             WglrGrid.TextMatrix(Jsqte, 17) = Trim(.Fields("PersonName") & "")                       '职员名称
  1690.             WglrGrid.TextMatrix(Jsqte, 18) = Trim(.Fields("ItemClassCode") & "")                    '项目类别编码
  1691.             WglrGrid.TextMatrix(Jsqte, 19) = Trim(.Fields("ItemClassName") & "")                    '项目类别名称
  1692.             WglrGrid.TextMatrix(Jsqte, 20) = Trim(.Fields("ItemCode") & "")                         '项目编码
  1693.             WglrGrid.TextMatrix(Jsqte, 21) = Trim(.Fields("ItemName") & "")                         '项目名称
  1694.             If Val(Trim(.Fields("ItemJfsl") & "")) <> 0 Then
  1695.                 WglrGrid.TextMatrix(Jsqte, 22) = Trim(Str(.Fields("ItemJfsl")))                     '项目数量
  1696.             End If
  1697.             If Val(Trim(.Fields("ItemDfsl") & "")) <> 0 Then
  1698.                 WglrGrid.TextMatrix(Jsqte, 22) = Trim(Str(.Fields("ItemDfsl")))                      '项目数量
  1699.             End If
  1700.             WglrGrid.TextMatrix(Jsqte, 24) = Trim(.Fields("TranPerson") & "")                       '经办人
  1701.             WglrGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("Digest"))     '摘 要
  1702.             WglrGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("Ccode") & "")       '科目编码
  1703.             WglrGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("Cname") & "")   '科目名称
  1704.             If .Fields("Jfje") <> 0 Then
  1705.                 WglrGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(Str(.Fields("Jfje"))) '借方金额
  1706.             Else
  1707.                 WglrGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Trim(Str(.Fields("Dfje"))) '贷方金额
  1708.             End If
  1709.             
  1710.             Pub_VouchSource = .Fields("VouchSource") & ""
  1711.             '<<]
  1712.             
  1713.             WglrGrid.RowHeight(Jsqte) = Sjhgd
  1714.             .MoveNext
  1715.             Jsqte = Jsqte + 1
  1716.         Loop
  1717.     End With
  1718.     
  1719.     '调整网格
  1720.     Call Sub_AdjustGrid
  1721.     
  1722.     '显示备注信息
  1723.     Call Sub_ShowMemo(WglrGrid.Row)
  1724.     
  1725.     '计算合计数据
  1726.     For Jsqte = Qslz To WglrGrid.Cols - 1
  1727.         Call Sjhj(Jsqte)
  1728.     Next Jsqte
  1729.     
  1730. End Sub
  1731. Private Sub Tlb_Action_ButtonClick(ByVal Button As MSComctlLib.Button)             '用户点击工具条
  1732.     
  1733.     '屏蔽文本框,下拉组合框有效性判断
  1734.     
  1735.     Valilock = True
  1736.     
  1737.     '屏蔽网格失去焦点产生的有效性判断
  1738.     
  1739.     Changelock = True
  1740.     
  1741.     Select Case Button.Key
  1742.     Case "ymsz"                                          '页面设置
  1743.         Dyymctbl.Show 1
  1744.     Case "yl"                                            '预 览
  1745.         If Fun_Drfrmyxxpd Then
  1746.             Call bbyl(True)
  1747.         End If
  1748.     Case "dy"                                            '打 印
  1749.         If Fun_Drfrmyxxpd Then
  1750.             Call bbyl(False)
  1751.         End If
  1752.     Case "zh"                                            '增 行
  1753.         If Lab_Succeed.Caption = "已生成" Then
  1754.             Tsxx = "已生成凭证,不能执行此操作"
  1755.             Call Xtxxts(Tsxx, 0, 1)
  1756.             Exit Sub
  1757.         End If
  1758.         Call zjlrfl
  1759.     Case "sh"                                            '删 行
  1760.         If Lab_Succeed.Caption = "已生成" Then
  1761.             Tsxx = "已生成凭证,不能执行此操作"
  1762.             Call Xtxxts(Tsxx, 0, 1)
  1763.             Exit Sub
  1764.         End If
  1765.         Call Scdqfl
  1766.     Case "xx"                                            '选 项
  1767.         Call Sub_Option
  1768.     Case "bc"                                            '保 存 即生成正式凭证
  1769.         Call Sub_SaveBill
  1770.     Case "fq"                                            '放 弃
  1771.         Call Sub_AbandonBill
  1772.     Case "first"                                         '首 张
  1773.         Call Sub_First
  1774.     Case "prev"                                          '上 张
  1775.         Call Sub_Prev
  1776.     Case "next"                                          '下 张
  1777.         Call Sub_Next
  1778.     Case "last"                                          '末 张
  1779.         Call Sub_Last
  1780.     Case "bz"                                            '帮 助
  1781.         Call F1bz
  1782.     Case "fh"                                            '退 出
  1783.         Call Quit
  1784.     End Select
  1785.     
  1786.     '解 锁
  1787.     Valilock = False
  1788.     Changelock = False
  1789.     
  1790. End Sub
  1791. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)     '支持热键操作
  1792.     Select Case KeyCode
  1793.     Case vbKeyF6                                                 '保存凭证
  1794.         If Tlb_Action.Buttons("bc").Enabled Then
  1795.             Call Sub_SaveBill
  1796.         End If
  1797.     End Select
  1798. End Sub
  1799. Private Sub Sub_Option()                             '调用填制凭证选项
  1800.     With AutoTran_OptFrm
  1801.         
  1802.         '删行是否提示
  1803.         .Chk_DeleteMess.Value = Me.Chk_DeleteMess.Value
  1804.         
  1805.         '科目数量核算数量项是否可以为零
  1806.         .Chk_Quantity.Value = Me.Chk_Quantity.Value
  1807.         
  1808.         '打印凭证是否输出科目编码
  1809.         .Chk_CodeOutput.Value = Me.Chk_CodeOutput.Value
  1810.         
  1811.         .Show 1
  1812.         
  1813.     End With
  1814.     
  1815. End Sub
  1816. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)       '支持热键操作
  1817.     If Shift = 2 Then
  1818.         Select Case UCase(Chr(KeyCode))
  1819.         Case "P"                   'Ctrl+P 打印
  1820.             If Tlb_Action.Buttons("dy").Enabled Then
  1821.                 Call bbyl(False)
  1822.             End If
  1823.         End Select
  1824.     End If
  1825. End Sub
  1826. Private Sub Sub_OperStatus(Str_Status As String)                 '工具条依据不同状态所进行的变化
  1827.     With Tlb_Action
  1828.         Select Case Str_Status
  1829.         Case "11"   '浏览(放弃修改单据,查询单据,明细帐联查凭证)
  1830.             '工具条
  1831.             .Buttons("dy").Enabled = True      '打印
  1832.             .Buttons("yl").Enabled = True      '预览
  1833.             .Buttons("zh").Enabled = False     '增行
  1834.             .Buttons("sh").Enabled = False     '删行
  1835.             .Buttons("bc").Enabled = False     '保存
  1836.             .Buttons("fq").Enabled = False     '放弃
  1837.             If Val(Lab_VouchId.Caption) = Min_VouchIdTemp Then
  1838.                 .Buttons("first").Enabled = False   '首张
  1839.                 .Buttons("prev").Enabled = False    '上张
  1840.             Else
  1841.                 .Buttons("first").Enabled = True    '首张
  1842.                 .Buttons("prev").Enabled = True     '上张
  1843.             End If
  1844.             If Val(Lab_VouchId.Caption) = Max_VouchIdTemp Then
  1845.                 .Buttons("next").Enabled = False    '下张
  1846.                 .Buttons("last").Enabled = False    '末张
  1847.             Else
  1848.                 .Buttons("next").Enabled = True     '下张
  1849.                 .Buttons("last").Enabled = True     '末张
  1850.             End If
  1851.             '录入文本框
  1852.             For Jsqte = Max_Text_Index To 0 Step -1
  1853.                 LrText(Jsqte).Enabled = False
  1854.             Next Jsqte
  1855.             Ydcommand.Visible = False
  1856.             Combo_Kjqj.Enabled = False
  1857.             
  1858.             '合计金额大写显示
  1859.             HjGrid.TextMatrix(0, Sydz("003", GridStr(), Szzls)) = Fun_Jezh(Val(HjGrid.TextMatrix(0, Sydz("004", GridStr(), Szzls))))
  1860.             
  1861.         Case "30"   '修改
  1862.             
  1863.             '工具条
  1864.             If Lab_Succeed.Caption = "已生成" Then
  1865.                 .Buttons("dy").Enabled = True                   '打印
  1866.                 .Buttons("yl").Enabled = True                   '预览
  1867.             Else
  1868.                 .Buttons("dy").Enabled = False                  '打印
  1869.                 .Buttons("yl").Enabled = False                  '预览
  1870.             End If
  1871.             .Buttons("zh").Enabled = True                       '增行
  1872.             .Buttons("sh").Enabled = True                       '删行
  1873.             .Buttons("bc").Enabled = True                       '保存
  1874.             .Buttons("fq").Enabled = True                       '放弃
  1875.             If Val(Lab_VouchId.Caption) = Min_VouchIdTemp Then
  1876.                 .Buttons("first").Enabled = False               '首张
  1877.                 .Buttons("prev").Enabled = False                '上张
  1878.             Else
  1879.                 .Buttons("first").Enabled = True                '首张
  1880.                 .Buttons("prev").Enabled = True                 '上张
  1881.             End If
  1882.             If Val(Lab_VouchId.Caption) = Max_VouchIdTemp Then
  1883.                 .Buttons("next").Enabled = False                '下张
  1884.                 .Buttons("last").Enabled = False                '末张
  1885.             Else
  1886.                 .Buttons("next").Enabled = True                 '下张
  1887.                 .Buttons("last").Enabled = True                 '末张
  1888.             End If
  1889.             
  1890.             '录入文本框
  1891.             For Jsqte = 0 To Max_Text_Index
  1892.                 LrText(Jsqte).Enabled = True
  1893.             Next Jsqte
  1894.             
  1895.             LrText(0).Enabled = False
  1896.             LrText(3).Enabled = False
  1897.             Ydcommand.Visible = False
  1898.             Combo_Kjqj.Enabled = True
  1899.             
  1900.             '清空合计大写
  1901.             HjGrid.TextMatrix(0, Sydz("003", GridStr(), Szzls)) = ""
  1902.             
  1903.         End Select
  1904.     End With
  1905. End Sub
  1906. Private Sub Wbkcl()                                                 '文本框录入之前处理(根据实际情况)
  1907.     Dim xswbrr As String
  1908.     With WglrGrid
  1909.         Zdlrqnr = Trim(.Text)
  1910.         xswbrr = Trim(.Text)
  1911.         
  1912.         If GridBoolean(.Col, 3) Then   '列表框录入
  1913.             
  1914.             '填充列表框程序
  1915.             Call FillCombo(YdCombo, GridStr(.Col, 5), xswbrr, 0)
  1916.         Else
  1917.             Wbkbhlock = True
  1918.             
  1919.             '====以下为用户自定义
  1920.             Ydtext.Text = xswbrr
  1921.             '====以上为用户自定义
  1922.             
  1923.             Wbkbhlock = False
  1924.             Ydtext.SelStart = Len(Ydtext.Text)
  1925.         End If
  1926.     End With
  1927. End Sub
  1928. Private Function sjzdyxxpd(Dqpdwgh As Long, Dqpdwgl As Long)        '录入数据字段有效性判断,同时进行字段录入事后处理
  1929.     Dim Str_JudgeText As String            '临时有效性判断字段内容
  1930.     Dim Coljsq As Long                     '临时列计数器
  1931.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1932.     
  1933.     With WglrGrid
  1934.         
  1935.         '非录入状态有效性为合法
  1936.         If Yxxpdlock Or .Row < .FixedRows Then
  1937.             sjzdyxxpd = True
  1938.             Exit Function
  1939.         End If
  1940.         
  1941.         Str_JudgeText = Trim(.TextMatrix(Dqpdwgh, Dqpdwgl))
  1942.         Select Case GridStr(Dqpdwgl, 1)
  1943.             
  1944.             '以下为自定义部分[
  1945.         Case "001"          '凭证摘要(如用户录入编码正确,则自动调入摘要内容)
  1946.             If Len(Str_JudgeText) <> 0 Then
  1947.                 Sqlstr = "SELECT * FROM Cwzz_Digest Where DigestCode='" & Str_JudgeText & "'"
  1948.                 Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1949.                 If Not RecTemp.EOF Then
  1950.                     .TextMatrix(Dqpdwgh, Sydz("001", GridStr(), Szzls)) = Trim(RecTemp.Fields("DigestText"))
  1951.                 End If
  1952.                 
  1953.                 '保存最后录入的一条凭证分录的摘要内容
  1954.                 Str_Digest = .TextMatrix(Dqpdwgh, Sydz("001", GridStr(), Szzls))
  1955.             End If
  1956.         Case "002"          '会计科目(如有效则调入科目名称,如有辅助核算则调入辅助核算项录入窗体)
  1957.             If Len(Str_JudgeText) <> 0 Then
  1958.                 Sqlstr = "Select Cwzz_AccCode.* ,ItemClassName,ForeignCurrName,AccRate FROM  Cwzz_AccCode " & _
  1959.                 " LEFT OUTER JOIN Cwzz_ItemClass ON Cwzz_AccCode.ItemClassCode = Cwzz_ItemClass.ItemClassCode " & _
  1960.                 " LEFT OUTER JOIN Gy_ForeignCurrency ON Cwzz_AccCode.ForeignCurrCode= Gy_ForeignCurrency.ForeignCurrCode " & _
  1961.                 " Where Ccode='" & Str_JudgeText & "' OR AssCode='" & Str_JudgeText & "'"
  1962.                 Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1963.                 With RecTemp
  1964.                     If .EOF Then
  1965.                         Tsxx = "此科目不存在!"
  1966.                         GoTo Lrcwcl
  1967.                     Else
  1968.                         If Not .Fields("EndFlag") Then
  1969.                             Tsxx = "此科目非末级科目!"
  1970.                             GoTo Lrcwcl
  1971.                         End If
  1972.                         If .Fields("StopFlag") Then
  1973.                             Tsxx = "此科目已停用"
  1974.                             GoTo Lrcwcl
  1975.                         End If
  1976.                         
  1977.                         '如果此科目存在且改变过则执行下列操作
  1978.                         
  1979.                         '1.显示科目编码,改变科目名称
  1980.                         WglrGrid.TextMatrix(Dqpdwgh, Sydz("002", GridStr(), Szzls)) = Trim(RecTemp.Fields("Ccode"))
  1981.                         WglrGrid.TextMatrix(Dqpdwgh, Sydz("003", GridStr(), Szzls)) = Trim(RecTemp.Fields("Cname"))
  1982.                         
  1983.                         '2.判断科目进行哪些辅助核算
  1984.                         '读入外币汇率
  1985.                         If Not IsNull(RecTemp.Fields("AccRate")) Then
  1986.                             WglrGrid.TextMatrix(Dqpdwgh, 11) = RecTemp.Fields("AccRate")
  1987.                         Else
  1988.                             WglrGrid.TextMatrix(Dqpdwgh, 11) = ""
  1989.                         End If
  1990.                         Call Sub_Drfzhsx(Dqpdwgh, Str_JudgeText)
  1991.                     End If
  1992.                 End With
  1993.             Else
  1994.                 '清除所有辅助核算内容
  1995.                 For Jsqte = 1 To 23
  1996.                     WglrGrid.TextMatrix(Dqpdwgh, Jsqte) = ""
  1997.                 Next Jsqte
  1998.                 .TextMatrix(Dqpdwgh, Sydz("003", GridStr(), Szzls)) = ""
  1999.                 
  2000.             End If
  2001.         Case "004"                                              '借方金额
  2002.             '用户如录入借方金额,系统则自动清除贷方金额
  2003.             If Val(WglrGrid.TextMatrix(Dqpdwgh, Dqpdwgl)) <> 0 Then
  2004.                 WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)) = ""
  2005.             End If
  2006.         Case "005"                                              '贷方金额
  2007.             '用户如录入贷方金额,系统则自动清除借方金额
  2008.             If Val(WglrGrid.TextMatrix(Dqpdwgh, Dqpdwgl)) <> 0 Then
  2009.                 WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) = ""
  2010.             End If
  2011.             
  2012.             '2.放置字段事后处理程序
  2013.             '以上为自定义部分]
  2014.         End Select
  2015.         
  2016.         '字段录入正确后为零字段清空
  2017.         Call Qkwlzd(Dqpdwgh, Dqpdwgl)
  2018.         
  2019.         '字段录入正确后进行数据合计
  2020.         For Coljsq = Qslz To .Cols - 1
  2021.             Call Sjhj(Coljsq)
  2022.         Next Coljsq
  2023.         sjzdyxxpd = True
  2024.         Yxxpdlock = True
  2025.         Exit Function
  2026.     End With
  2027. Lrcwcl:    '录入错误处理
  2028.     With WglrGrid
  2029.         Call Xtxxts(Tsxx, 0, 1)
  2030.         Changelock = True
  2031.         .Select Dqpdwgh, Dqpdwgl
  2032.         Changelock = False
  2033.         Call xswbk
  2034.         sjzdyxxpd = False
  2035.         Exit Function
  2036.     End With
  2037. End Function
  2038. Private Function Sjhzyxxpd(ByVal Yxxpdh As Long) As Boolean                  '录入数据行有效性判断,同时进行行处理
  2039.     Dim Lrywlz As Long
  2040.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  2041.     Dim Bln_AssVali As Boolean             '辅助核算错误
  2042.     Dim Jsqte As Long                      '临时计数器
  2043.     
  2044.     With WglrGrid
  2045.         
  2046.         '判断行为空和无效数据行则清除当前行
  2047.         If Yxxpdh > (.Rows - .FixedRows) Then Exit Function
  2048.         If .TextMatrix(Yxxpdh, 0) <> "*" Then
  2049.             Sjhzyxxpd = True
  2050.             Exit Function
  2051.         Else
  2052.             If pdhwk(Yxxpdh) And Yxxpdh + 1 <= .Rows - 1 Then
  2053.                 If .TextMatrix(Yxxpdh + 1, 0) <> "*" Then
  2054.                     Changelock = True
  2055.                     .RemoveItem Yxxpdh
  2056.                     If .Rows < Pmbcsjhs + .FixedRows + Fzxwghs + 1 Then
  2057.                         .AddItem ""
  2058.                         .RowHeight(.Rows - 1) = Sjhgd
  2059.                     End If
  2060.                     Changelock = False
  2061.                     Sjhzyxxpd = True
  2062.                     Exit Function
  2063.                 End If
  2064.             End If
  2065.         End If
  2066.         
  2067.         '行没有发生变化则不进行有效性判断
  2068.         If Hyxxpdlock Then
  2069.             Sjhzyxxpd = True
  2070.             Exit Function
  2071.         End If
  2072.         
  2073.         '以下为自定义部分[
  2074.         
  2075.         '1.放置行有效性判断程序
  2076.         
  2077.         '首先进行为空判断(固定不变)
  2078.         For Jsqte = Qslz To .Cols - 1
  2079.             If (GridInt(Jsqte, 5) = 1 And Len(Trim(.TextMatrix(Yxxpdh, Jsqte))) = 0) Or (GridInt(Jsqte, 5) = 2 And Val(Trim(.TextMatrix(Yxxpdh, Jsqte))) = 0) Then
  2080.                 Tsxx = GridStr(Jsqte, 2)
  2081.                 Lrywlz = Jsqte
  2082.                 GoTo Lrcwcl
  2083.                 Exit For
  2084.             End If
  2085.         Next Jsqte
  2086.         
  2087.         '2.[自定义判断(补丁)
  2088.         If Val(Trim(.TextMatrix(Yxxpdh, Sydz("004", GridStr(), Szzls)))) = 0 And Val(Trim(.TextMatrix(Yxxpdh, Sydz("005", GridStr(), Szzls)))) = 0 Then
  2089.             Tsxx = "借方和贷方金额不能同时为零!"
  2090.             Lrywlz = Sydz("004", GridStr(), Szzls)
  2091.             GoTo Lrcwcl
  2092.         End If
  2093.         
  2094.         If Val(Trim(.TextMatrix(Yxxpdh, Sydz("004", GridStr(), Szzls)))) <> 0 And Val(Trim(.TextMatrix(Yxxpdh, Sydz("005", GridStr(), Szzls)))) <> 0 Then
  2095.             Tsxx = "借方和贷方金额不能同时不为零!"
  2096.             Lrywlz = Sydz("004", GridStr(), Szzls)
  2097.             GoTo Lrcwcl
  2098.         End If
  2099.         
  2100.         '判断辅助核算项目是否填写
  2101.         Sqlstr = "Select * FROM Cwzz_AccCode Where Ccode='" & Trim(.TextMatrix(Yxxpdh, Sydz("002", GridStr(), Szzls))) & "'"
  2102.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  2103.         With RecTemp
  2104.             If Not .EOF Then
  2105.                 
  2106.                 '如有数量核算且用户选择数量不能为零则数量项不能为零
  2107.                 If RecTemp.Fields("QuantityFlag") And Chk_Quantity.Value = 1 And Val(WglrGrid.TextMatrix(Yxxpdh, 5)) = 0 Then
  2108.                     Tsxx = "此科目需要数量核算,数量项不能为零!"
  2109.                     Lrywlz = Sydz("002", GridStr(), Szzls)
  2110.                     Bln_AssVali = True
  2111.                     GoTo Lrcwcl
  2112.                 End If
  2113.                 
  2114.                 '部门核算则部门不能为空
  2115.                 If RecTemp.Fields("DeptFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 12))) = 0 Then
  2116.                     Tsxx = "此科目需要部门核算,部门项不能为空!"
  2117.                     Lrywlz = Sydz("002", GridStr(), Szzls)
  2118.                     Bln_AssVali = True
  2119.                     GoTo Lrcwcl
  2120.                 End If
  2121.                 
  2122.                 '往来客户核算则往来单位不能为空
  2123.                 If RecTemp.Fields("CusFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 14))) = 0 Then
  2124.                     Tsxx = "此科目需要往来客户核算,往来客户项不能为空!"
  2125.                     Lrywlz = Sydz("002", GridStr(), Szzls)
  2126.                     Bln_AssVali = True
  2127.                     GoTo Lrcwcl
  2128.                 End If
  2129.                 
  2130.                 '往来供应商核算则往来供应商不能为空
  2131.                 If RecTemp.Fields("SupplierFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 25))) = 0 Then
  2132.                     Tsxx = "此科目需要往来供应商核算,往来供应商项不能为空!"
  2133.                     Lrywlz = Sydz("002", GridStr(), Szzls)
  2134.                     Bln_AssVali = True
  2135.                     GoTo Lrcwcl
  2136.                 End If
  2137.                 
  2138.                 '个人往来核算则个人项不能为空
  2139.                 If RecTemp.Fields("PersonFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 16))) = 0 Then
  2140.                     Tsxx = "此科目需要个人往来核算,个人项不能为空!"
  2141.                     Lrywlz = Sydz("002", GridStr(), Szzls)
  2142.                     Bln_AssVali = True
  2143.                     GoTo Lrcwcl
  2144.                 End If
  2145.                 
  2146.                 '项目核算则项目不能为空
  2147.                 If RecTemp.Fields("ItemFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 20))) = 0 Then
  2148.                     Tsxx = "此科目需要项目核算,核算项目不能为空!"
  2149.                     Lrywlz = Sydz("002", GridStr(), Szzls)
  2150.                     Bln_AssVali = True
  2151.                     GoTo Lrcwcl
  2152.                 End If
  2153.             End If
  2154.         End With
  2155.         
  2156.         '2.放置行处理程序
  2157.         '以上为自定义部分]
  2158.     End With
  2159.     Sjhzyxxpd = True
  2160.     Hyxxpdlock = True
  2161.     Exit Function
  2162.     
  2163. Lrcwcl:      '录入错误处理
  2164.     With WglrGrid
  2165.         Call Xtxxts(Tsxx, 0, 1)
  2166.         Changelock = True
  2167.         .Select Yxxpdh, Lrywlz
  2168.         Changelock = False
  2169.         
  2170.         '[>>如果辅助核算出现错误则调用辅助核算功能
  2171.         If Bln_AssVali Then
  2172.             Call Sub_Drfzhsx(Yxxpdh, Trim(.TextMatrix(Yxxpdh, Sydz("002", GridStr(), Szzls))))
  2173.             
  2174.             '解决鼠标点击取消造成的换行
  2175.             Changelock = True
  2176.             .Select Yxxpdh, Lrywlz
  2177.             Changelock = False
  2178.             
  2179.             '<<]
  2180.         Else
  2181.             Call xswbk
  2182.         End If
  2183.         Sjhzyxxpd = False
  2184.         Exit Function
  2185.     End With
  2186. End Function
  2187. Private Sub Lab_Memo_DblClick(Index As Integer)            '点击辅助核算信息列
  2188.     
  2189.     '如果单据操作状态为浏览状态则不能显示录入载体
  2190.     If Trim(Lab_OperStatus.Caption) = "1" Then
  2191.         Exit Sub
  2192.     End If
  2193.     
  2194.     '当科目编码处于录入状态时不能调入辅助核算项目
  2195.     If Ydtext.Visible And GridStr(WglrGrid.Col, 1) = "002" Then
  2196.         Exit Sub
  2197.     End If
  2198.     
  2199.     '当焦点处于非录入区域时也不能调入辅助核算项目
  2200.     If WglrGrid.Row < WglrGrid.FixedRows Then
  2201.         Exit Sub
  2202.     End If
  2203.     
  2204.     '屏蔽文本框,下拉组合框有效性判断
  2205.     Valilock = True
  2206.     Call Sub_Drfzhsx(WglrGrid.Row, Trim(WglrGrid.TextMatrix(WglrGrid.Row, Sydz("002", GridStr(), Szzls))))
  2207.     Valilock = False
  2208. End Sub
  2209. Private Sub Sub_Drfzhsx(Dqpdwgh As Long, Str_JudgeText As String)   '判断科目是否有辅助核算,如有则调入辅助核算窗体
  2210.     '函数参数:当前判断网格行,判断科目
  2211.     
  2212.     Dim Coljsq As Long           '临时列计数器
  2213.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  2214.     
  2215.     If Len(Str_JudgeText) <> 0 Then
  2216.         Sqlstr = "Select Cwzz_AccCode.* ,ItemClassName,ForeignCurrName,ConVertFlag FROM  Cwzz_AccCode " & _
  2217.         " LEFT OUTER JOIN Cwzz_ItemClass ON Cwzz_AccCode.ItemClassCode = Cwzz_ItemClass.ItemClassCode " & _
  2218.         " LEFT OUTER JOIN Gy_ForeignCurrency ON Cwzz_AccCode.ForeignCurrCode= Gy_ForeignCurrency.ForeignCurrCode " & _
  2219.         " Where Ccode='" + Str_JudgeText + "' and EndFlag=1 and StopFlag=0"
  2220.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  2221.         With RecTemp
  2222.             If .EOF Then
  2223.                 Exit Sub
  2224.             Else
  2225.                 '判断科目进行哪些辅助核算
  2226.                 
  2227.                 '清空辅助核算标识
  2228.                 For Jsqte = 0 To Int_AssCount - 1
  2229.                     Bln_AssShow(Jsqte) = False
  2230.                 Next Jsqte
  2231.                 '客户往来,供应商往来,银行科目需录入经办人
  2232.                 If Trim(RecTemp.Fields("Cproperty")) = "银行" Or RecTemp.Fields("CusFlag") Or RecTemp.Fields("SupplierFlag") Then
  2233.                     Bln_AssShow(13) = True '经办人
  2234.                 Else
  2235.                     WglrGrid.TextMatrix(Dqpdwgh, 24) = ""
  2236.                 End If
  2237.                 
  2238.                 '银行科目--结算方式、票号、日期
  2239.                 If Trim(RecTemp.Fields("Cproperty")) = "银行" Then
  2240.                     Bln_AssShow(0) = True  '结算方式
  2241.                     Bln_AssShow(1) = True  '票号
  2242.                     Bln_AssShow(2) = True  '日期
  2243.                     Bln_AssShow(13) = True '经办人
  2244.                 Else
  2245.                     WglrGrid.TextMatrix(Dqpdwgh, 1) = ""
  2246.                     WglrGrid.TextMatrix(Dqpdwgh, 2) = ""
  2247.                     WglrGrid.TextMatrix(Dqpdwgh, 3) = ""
  2248.                     WglrGrid.TextMatrix(Dqpdwgh, 4) = ""
  2249.                 End If
  2250.                 
  2251.                 '数量核算--数量,单价
  2252.                 If RecTemp.Fields("QuantityFlag") Then
  2253.                     Bln_AssShow(3) = True  '数量
  2254.                     Bln_AssShow(4) = True  '单价
  2255.                     WglrGrid.TextMatrix(Dqpdwgh, 6) = ""
  2256.                     WglrGrid.TextMatrix(Dqpdwgh, 7) = Trim(.Fields("measure")) '单位
  2257.                 Else
  2258.                     WglrGrid.TextMatrix(Dqpdwgh, 5) = ""
  2259.                     WglrGrid.TextMatrix(Dqpdwgh, 6) = ""
  2260.                     WglrGrid.TextMatrix(Dqpdwgh, 7) = ""
  2261.                 End If
  2262.                 
  2263.                 '外币核算--外币,汇率
  2264.                 If RecTemp.Fields("ForeignFlag") Then
  2265.                     WglrGrid.TextMatrix(Dqpdwgh, 8) = Trim(.Fields("ForeignCurrCode"))
  2266.                     WglrGrid.TextMatrix(Dqpdwgh, 9) = Trim(.Fields("ForeignCurrName"))
  2267.                     Bln_AssShow(5) = True  '外币金额
  2268.                     Bln_AssShow(6) = True  '汇率
  2269.                 Else
  2270.                     WglrGrid.TextMatrix(Dqpdwgh, 8) = ""
  2271.                     WglrGrid.TextMatrix(Dqpdwgh, 9) = ""
  2272.                     WglrGrid.TextMatrix(Dqpdwgh, 10) = ""
  2273.                     WglrGrid.TextMatrix(Dqpdwgh, 11) = ""
  2274.                 End If
  2275.                 
  2276.                 '部门核算
  2277.                 If RecTemp.Fields("DeptFlag") Then
  2278.                     Bln_AssShow(7) = True  '部门
  2279.                 Else
  2280.                     WglrGrid.TextMatrix(Dqpdwgh, 12) = ""
  2281.                     WglrGrid.TextMatrix(Dqpdwgh, 13) = ""
  2282.                 End If
  2283.                 
  2284.                 '客户核算
  2285.                 If RecTemp.Fields("CusFlag") Then
  2286.                     Bln_AssShow(8) = True  '客户
  2287.                 Else
  2288.                     WglrGrid.TextMatrix(Dqpdwgh, 14) = ""
  2289.                     WglrGrid.TextMatrix(Dqpdwgh, 15) = ""
  2290.                 End If
  2291.                 
  2292.                 '供应商核算
  2293.                 If RecTemp.Fields("SupplierFlag") Then
  2294.                     Bln_AssShow(12) = True  '供应商
  2295.                 Else
  2296.                     WglrGrid.TextMatrix(Dqpdwgh, 25) = ""
  2297.                     WglrGrid.TextMatrix(Dqpdwgh, 26) = ""
  2298.                 End If
  2299.                 
  2300.                 '个人核算
  2301.                 If RecTemp.Fields("PersonFlag") Then
  2302.                     Bln_AssShow(9) = True  '个人
  2303.                 Else
  2304.                     WglrGrid.TextMatrix(Dqpdwgh, 16) = ""
  2305.                     WglrGrid.TextMatrix(Dqpdwgh, 17) = ""
  2306.                 End If
  2307.                 
  2308.                 '项目核算
  2309.                 If RecTemp.Fields("ItemFlag") Then
  2310.                     If WglrGrid.TextMatrix(Dqpdwgh, 18) <> Trim(.Fields("ItemClassCode")) Then
  2311.                         WglrGrid.TextMatrix(Dqpdwgh, 20) = ""
  2312.                         WglrGrid.TextMatrix(Dqpdwgh, 21) = ""
  2313.                         WglrGrid.TextMatrix(Dqpdwgh, 22) = ""
  2314.                         WglrGrid.TextMatrix(Dqpdwgh, 23) = ""
  2315.                     End If
  2316.                     
  2317.                     WglrGrid.TextMatrix(Dqpdwgh, 18) = Trim(.Fields("ItemClassCode")) '项目类别编码
  2318.                     WglrGrid.TextMatrix(Dqpdwgh, 19) = Trim(.Fields("ItemClassName")) '项目类别名称
  2319.                     
  2320.                     Bln_AssShow(10) = True  '项目
  2321.                     Bln_AssShow(11) = True  '项目数量
  2322.                 Else
  2323.                     WglrGrid.TextMatrix(Dqpdwgh, 18) = ""
  2324.                     WglrGrid.TextMatrix(Dqpdwgh, 19) = ""
  2325.                     WglrGrid.TextMatrix(Dqpdwgh, 20) = ""
  2326.                     WglrGrid.TextMatrix(Dqpdwgh, 21) = ""
  2327.                     WglrGrid.TextMatrix(Dqpdwgh, 22) = ""
  2328.                     WglrGrid.TextMatrix(Dqpdwgh, 23) = ""
  2329.                     
  2330.                 End If
  2331.                 
  2332.                 '调入科目辅助核算项目
  2333.                 For Jsqte = 0 To Int_AssCount - 1
  2334.                     If Bln_AssShow(Jsqte) Then
  2335.                         AutoTran_PzAss.lab_GridRow = Dqpdwgh
  2336.                         Call Kmfzhsx(Dqpdwgh)
  2337.                         
  2338.                         '判断用户录入数量单价是否为零,如不为零则由数量*单价=金额
  2339.                         '(考虑销售收入主要为贷方则借贷金额均为零时,金额自动填入贷方)
  2340.                         If Val(WglrGrid.TextMatrix(Dqpdwgh, 5)) <> 0 And Val(WglrGrid.TextMatrix(Dqpdwgh, 6)) <> 0 Then
  2341.                             If Val(Trim(WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)))) <> 0 Then
  2342.                                 WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 5)) * Val(WglrGrid.TextMatrix(Dqpdwgh, 6)), "##." + String(Xtjexsws, "0"))
  2343.                             Else
  2344.                                 WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 5)) * Val(WglrGrid.TextMatrix(Dqpdwgh, 6)), "##." + String(Xtjexsws, "0"))
  2345.                             End If
  2346.                         End If
  2347.                         
  2348.                         '判断用户录入外币汇率是否为零,如不为零则由外币*汇率=金额
  2349.                         '(借贷金额均为零时,金额自动填入借方)
  2350.                         If Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) <> 0 And Val(WglrGrid.TextMatrix(Dqpdwgh, 11)) <> 0 Then
  2351.                             If Val(Trim(WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)))) <> 0 Then
  2352.