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