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

企业管理

开发平台:

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