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

企业管理

开发平台:

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_FrmPzcxjg 
  5.    Caption         =   "记帐凭证列表"
  6.    ClientHeight    =   8595
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11820
  10.    BeginProperty Font 
  11.       Name            =   "宋体"
  12.       Size            =   14.25
  13.       Charset         =   134
  14.       Weight          =   700
  15.       Underline       =   0   'False
  16.       Italic          =   0   'False
  17.       Strikethrough   =   0   'False
  18.    EndProperty
  19.    HelpContextID   =   5001
  20.    Icon            =   "凭证处理_凭证列表.frx":0000
  21.    KeyPreview      =   -1  'True
  22.    LinkTopic       =   "Form1"
  23.    MDIChild        =   -1  'True
  24.    ScaleHeight     =   8595
  25.    ScaleWidth      =   11820
  26.    WindowState     =   2  'Maximized
  27.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  28.       Height          =   6630
  29.       Left            =   30
  30.       TabIndex        =   0
  31.       Top             =   1710
  32.       Width           =   11775
  33.       _cx             =   5080
  34.       _cy             =   5080
  35.       Appearance      =   1
  36.       BorderStyle     =   1
  37.       Enabled         =   -1  'True
  38.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  39.          Name            =   "宋体"
  40.          Size            =   9
  41.          Charset         =   134
  42.          Weight          =   400
  43.          Underline       =   0   'False
  44.          Italic          =   0   'False
  45.          Strikethrough   =   0   'False
  46.       EndProperty
  47.       MousePointer    =   0
  48.       BackColor       =   16777215
  49.       ForeColor       =   -2147483640
  50.       BackColorFixed  =   13826538
  51.       ForeColorFixed  =   -2147483630
  52.       BackColorSel    =   -2147483635
  53.       ForeColorSel    =   -2147483634
  54.       BackColorBkg    =   -2147483636
  55.       BackColorAlternate=   16777215
  56.       GridColor       =   -2147483633
  57.       GridColorFixed  =   -2147483632
  58.       TreeColor       =   -2147483632
  59.       FloodColor      =   192
  60.       SheetBorder     =   -2147483642
  61.       FocusRect       =   1
  62.       HighLight       =   1
  63.       AllowSelection  =   -1  'True
  64.       AllowBigSelection=   -1  'True
  65.       AllowUserResizing=   0
  66.       SelectionMode   =   0
  67.       GridLines       =   1
  68.       GridLinesFixed  =   2
  69.       GridLineWidth   =   1
  70.       Rows            =   50
  71.       Cols            =   10
  72.       FixedRows       =   1
  73.       FixedCols       =   1
  74.       RowHeightMin    =   0
  75.       RowHeightMax    =   0
  76.       ColWidthMin     =   0
  77.       ColWidthMax     =   0
  78.       ExtendLastCol   =   0   'False
  79.       FormatString    =   ""
  80.       ScrollTrack     =   0   'False
  81.       ScrollBars      =   3
  82.       ScrollTips      =   0   'False
  83.       MergeCells      =   0
  84.       MergeCompare    =   0
  85.       AutoResize      =   -1  'True
  86.       AutoSizeMode    =   0
  87.       AutoSearch      =   0
  88.       AutoSearchDelay =   2
  89.       MultiTotals     =   -1  'True
  90.       SubtotalPosition=   1
  91.       OutlineBar      =   0
  92.       OutlineCol      =   0
  93.       Ellipsis        =   0
  94.       ExplorerBar     =   0
  95.       PicturesOver    =   0   'False
  96.       FillStyle       =   0
  97.       RightToLeft     =   0   'False
  98.       PictureType     =   0
  99.       TabBehavior     =   0
  100.       OwnerDraw       =   0
  101.       Editable        =   0
  102.       ShowComboButton =   1
  103.       WordWrap        =   0   'False
  104.       TextStyle       =   0
  105.       TextStyleFixed  =   0
  106.       OleDragMode     =   0
  107.       OleDropMode     =   0
  108.       DataMode        =   0
  109.       VirtualData     =   -1  'True
  110.       DataMember      =   ""
  111.       ComboSearch     =   3
  112.       AutoSizeMouse   =   -1  'True
  113.       FrozenRows      =   0
  114.       FrozenCols      =   0
  115.       AllowUserFreezing=   0
  116.       BackColorFrozen =   0
  117.       ForeColorFrozen =   0
  118.       WallPaperAlignment=   9
  119.       AccessibleName  =   ""
  120.       AccessibleDescription=   ""
  121.       AccessibleValue =   ""
  122.       AccessibleRole  =   24
  123.    End
  124.    Begin MSComctlLib.Toolbar GsToolbar 
  125.       Height          =   525
  126.       Left            =   9330
  127.       TabIndex        =   6
  128.       Top             =   0
  129.       Width           =   2475
  130.       _ExtentX        =   4366
  131.       _ExtentY        =   926
  132.       ButtonWidth     =   1455
  133.       ButtonHeight    =   926
  134.       AllowCustomize  =   0   'False
  135.       Appearance      =   1
  136.       Style           =   1
  137.       ImageList       =   "ImageList1"
  138.       _Version        =   393216
  139.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  140.          NumButtons      =   3
  141.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  142.             Caption         =   "保存格式"
  143.             Key             =   "bcgs"
  144.             ImageKey        =   "bcgs"
  145.          EndProperty
  146.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  147.             Caption         =   "默认列宽"
  148.             Key             =   "hfmrgs"
  149.             ImageKey        =   "mrlk"
  150.          EndProperty
  151.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  152.             Caption         =   "显示项目"
  153.             Key             =   "szxsxm"
  154.             ImageKey        =   "xsxm"
  155.          EndProperty
  156.       EndProperty
  157.    End
  158.    Begin VB.PictureBox Pic_Title 
  159.       BackColor       =   &H00FFFFFF&
  160.       BeginProperty Font 
  161.          Name            =   "宋体"
  162.          Size            =   9
  163.          Charset         =   134
  164.          Weight          =   400
  165.          Underline       =   0   'False
  166.          Italic          =   0   'False
  167.          Strikethrough   =   0   'False
  168.       EndProperty
  169.       Height          =   1080
  170.       Left            =   30
  171.       Picture         =   "凭证处理_凭证列表.frx":1042
  172.       ScaleHeight     =   1020
  173.       ScaleWidth      =   11715
  174.       TabIndex        =   2
  175.       Top             =   585
  176.       Width           =   11775
  177.       Begin VB.Label Label1 
  178.          Appearance      =   0  'Flat
  179.          BackColor       =   &H80000005&
  180.          BackStyle       =   0  'Transparent
  181.          Caption         =   "凭证分隔"
  182.          BeginProperty Font 
  183.             Name            =   "宋体"
  184.             Size            =   9
  185.             Charset         =   134
  186.             Weight          =   400
  187.             Underline       =   0   'False
  188.             Italic          =   0   'False
  189.             Strikethrough   =   0   'False
  190.          EndProperty
  191.          ForeColor       =   &H80000008&
  192.          Height          =   195
  193.          Index           =   2
  194.          Left            =   8430
  195.          TabIndex        =   10
  196.          Top             =   750
  197.          Width           =   795
  198.       End
  199.       Begin VB.Label Lab_Color 
  200.          Appearance      =   0  'Flat
  201.          BackColor       =   &H008080FF&
  202.          BorderStyle     =   1  'Fixed Single
  203.          BeginProperty Font 
  204.             Name            =   "宋体"
  205.             Size            =   9
  206.             Charset         =   134
  207.             Weight          =   400
  208.             Underline       =   0   'False
  209.             Italic          =   0   'False
  210.             Strikethrough   =   0   'False
  211.          EndProperty
  212.          ForeColor       =   &H80000008&
  213.          Height          =   195
  214.          Index           =   1
  215.          Left            =   9705
  216.          TabIndex        =   9
  217.          Top             =   720
  218.          Width           =   195
  219.       End
  220.       Begin VB.Label Label1 
  221.          Appearance      =   0  'Flat
  222.          BackColor       =   &H80000005&
  223.          BackStyle       =   0  'Transparent
  224.          Caption         =   "有错凭证"
  225.          BeginProperty Font 
  226.             Name            =   "宋体"
  227.             Size            =   9
  228.             Charset         =   134
  229.             Weight          =   400
  230.             Underline       =   0   'False
  231.             Italic          =   0   'False
  232.             Strikethrough   =   0   'False
  233.          EndProperty
  234.          ForeColor       =   &H80000008&
  235.          Height          =   195
  236.          Index           =   0
  237.          Left            =   10005
  238.          TabIndex        =   8
  239.          Top             =   720
  240.          Width           =   795
  241.       End
  242.       Begin VB.Label Lab_Color 
  243.          Appearance      =   0  'Flat
  244.          BackColor       =   &H00F7F3EC&
  245.          BorderStyle     =   1  'Fixed Single
  246.          BeginProperty Font 
  247.             Name            =   "宋体"
  248.             Size            =   9
  249.             Charset         =   134
  250.             Weight          =   400
  251.             Underline       =   0   'False
  252.             Italic          =   0   'False
  253.             Strikethrough   =   0   'False
  254.          EndProperty
  255.          ForeColor       =   &H80000008&
  256.          Height          =   195
  257.          Index           =   0
  258.          Left            =   8160
  259.          TabIndex        =   7
  260.          Top             =   720
  261.          Width           =   195
  262.       End
  263.       Begin VB.Label Lab_TitleText 
  264.          BackStyle       =   0  'Transparent
  265.          BeginProperty Font 
  266.             Name            =   "宋体"
  267.             Size            =   9
  268.             Charset         =   134
  269.             Weight          =   400
  270.             Underline       =   0   'False
  271.             Italic          =   0   'False
  272.             Strikethrough   =   0   'False
  273.          EndProperty
  274.          ForeColor       =   &H00000000&
  275.          Height          =   225
  276.          Left            =   1605
  277.          TabIndex        =   5
  278.          Top             =   780
  279.          Width           =   4635
  280.       End
  281.       Begin VB.Label Lab_TitleMess 
  282.          BackStyle       =   0  'Transparent
  283.          Caption         =   "会计期间:"
  284.          BeginProperty Font 
  285.             Name            =   "宋体"
  286.             Size            =   9
  287.             Charset         =   134
  288.             Weight          =   400
  289.             Underline       =   0   'False
  290.             Italic          =   0   'False
  291.             Strikethrough   =   0   'False
  292.          EndProperty
  293.          Height          =   225
  294.          Left            =   660
  295.          TabIndex        =   4
  296.          Top             =   780
  297.          Width           =   855
  298.       End
  299.       Begin VB.Label tsLabel 
  300.          BackColor       =   &H80000018&
  301.          BackStyle       =   0  'Transparent
  302.          Caption         =   "记帐凭证列表"
  303.          BeginProperty Font 
  304.             Name            =   "宋体"
  305.             Size            =   12
  306.             Charset         =   134
  307.             Weight          =   700
  308.             Underline       =   0   'False
  309.             Italic          =   0   'False
  310.             Strikethrough   =   0   'False
  311.          EndProperty
  312.          ForeColor       =   &H00000000&
  313.          Height          =   270
  314.          Index           =   4
  315.          Left            =   495
  316.          TabIndex        =   3
  317.          Top             =   240
  318.          Width           =   2355
  319.       End
  320.    End
  321.    Begin VB.Timer Timer1 
  322.       Enabled         =   0   'False
  323.       Interval        =   1
  324.       Left            =   7620
  325.       Top             =   90
  326.    End
  327.    Begin MSComctlLib.Toolbar SzToolbar 
  328.       Align           =   1  'Align Top
  329.       Height          =   555
  330.       Left            =   0
  331.       TabIndex        =   1
  332.       Top             =   0
  333.       Width           =   11820
  334.       _ExtentX        =   20849
  335.       _ExtentY        =   979
  336.       ButtonWidth     =   820
  337.       ButtonHeight    =   926
  338.       AllowCustomize  =   0   'False
  339.       Appearance      =   1
  340.       Style           =   1
  341.       ImageList       =   "ImageList1"
  342.       _Version        =   393216
  343.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  344.          NumButtons      =   16
  345.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  346.             Caption         =   "设置"
  347.             Key             =   "ymsz"
  348.             ImageKey        =   "sz"
  349.          EndProperty
  350.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  351.             Caption         =   "打印"
  352.             Key             =   "dy"
  353.             ImageKey        =   "dy"
  354.          EndProperty
  355.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  356.             Caption         =   "预览"
  357.             Key             =   "yl"
  358.             ImageKey        =   "yl"
  359.          EndProperty
  360.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  361.             Style           =   3
  362.          EndProperty
  363.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  364.             Caption         =   "查询"
  365.             Key             =   "cx"
  366.             ImageKey        =   "cx"
  367.          EndProperty
  368.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  369.             Caption         =   "凭证"
  370.             Key             =   "pz"
  371.             ImageKey        =   "pz"
  372.          EndProperty
  373.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  374.             Style           =   3
  375.          EndProperty
  376.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  377.             Caption         =   "新增"
  378.             Key             =   "xz"
  379.             ImageKey        =   "xz"
  380.          EndProperty
  381.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  382.             Caption         =   "删除"
  383.             Key             =   "sc"
  384.             ImageKey        =   "sc"
  385.          EndProperty
  386.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  387.             Style           =   3
  388.          EndProperty
  389.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  390.             Caption         =   "审核"
  391.             Key             =   "sh"
  392.             ImageKey        =   "check"
  393.          EndProperty
  394.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  395.             Style           =   3
  396.          EndProperty
  397.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  398.             Caption         =   "刷新"
  399.             Key             =   "sx"
  400.             ImageKey        =   "sx"
  401.          EndProperty
  402.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  403.             Style           =   3
  404.          EndProperty
  405.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  406.             Caption         =   "帮助"
  407.             Key             =   "bz"
  408.             ImageKey        =   "bz"
  409.          EndProperty
  410.          BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  411.             Caption         =   "退出"
  412.             Key             =   "fh"
  413.             ImageKey        =   "tc"
  414.          EndProperty
  415.       EndProperty
  416.       BorderStyle     =   1
  417.       Begin MSComctlLib.ImageList ImageList1 
  418.          Left            =   6840
  419.          Top             =   0
  420.          _ExtentX        =   1005
  421.          _ExtentY        =   1005
  422.          BackColor       =   -2147483643
  423.          ImageWidth      =   16
  424.          ImageHeight     =   16
  425.          MaskColor       =   12632256
  426.          _Version        =   393216
  427.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  428.             NumListImages   =   32
  429.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  430.                Picture         =   "凭证处理_凭证列表.frx":1DF82
  431.                Key             =   "sz"
  432.             EndProperty
  433.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  434.                Picture         =   "凭证处理_凭证列表.frx":1E31C
  435.                Key             =   "dy"
  436.             EndProperty
  437.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  438.                Picture         =   "凭证处理_凭证列表.frx":1E6B6
  439.                Key             =   "yl"
  440.             EndProperty
  441.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  442.                Picture         =   "凭证处理_凭证列表.frx":1EA50
  443.                Key             =   "xg"
  444.             EndProperty
  445.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  446.                Picture         =   "凭证处理_凭证列表.frx":1EDEA
  447.                Key             =   "zh"
  448.             EndProperty
  449.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  450.                Picture         =   "凭证处理_凭证列表.frx":1F184
  451.                Key             =   "sh"
  452.             EndProperty
  453.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  454.                Picture         =   "凭证处理_凭证列表.frx":1F51E
  455.                Key             =   "bc"
  456.             EndProperty
  457.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  458.                Picture         =   "凭证处理_凭证列表.frx":1F8B8
  459.                Key             =   "fq"
  460.             EndProperty
  461.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  462.                Picture         =   "凭证处理_凭证列表.frx":1FC52
  463.                Key             =   "bz"
  464.             EndProperty
  465.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  466.                Picture         =   "凭证处理_凭证列表.frx":1FFEC
  467.                Key             =   "tc"
  468.             EndProperty
  469.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  470.                Picture         =   "凭证处理_凭证列表.frx":20386
  471.                Key             =   "bcgs"
  472.             EndProperty
  473.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  474.                Picture         =   "凭证处理_凭证列表.frx":20720
  475.                Key             =   "mrlk"
  476.             EndProperty
  477.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  478.                Picture         =   "凭证处理_凭证列表.frx":20ABA
  479.                Key             =   "xsxm"
  480.             EndProperty
  481.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  482.                Picture         =   "凭证处理_凭证列表.frx":20E54
  483.                Key             =   "first"
  484.             EndProperty
  485.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  486.                Picture         =   "凭证处理_凭证列表.frx":211EE
  487.                Key             =   "prev"
  488.             EndProperty
  489.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  490.                Picture         =   "凭证处理_凭证列表.frx":21588
  491.                Key             =   "next"
  492.             EndProperty
  493.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  494.                Picture         =   "凭证处理_凭证列表.frx":21922
  495.                Key             =   "last"
  496.             EndProperty
  497.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  498.                Picture         =   "凭证处理_凭证列表.frx":21CBC
  499.                Key             =   "xx"
  500.             EndProperty
  501.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  502.                Picture         =   "凭证处理_凭证列表.frx":22056
  503.                Key             =   "define"
  504.             EndProperty
  505.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  506.                Picture         =   "凭证处理_凭证列表.frx":223F0
  507.                Key             =   "exec"
  508.             EndProperty
  509.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  510.                Picture         =   "凭证处理_凭证列表.frx":2278A
  511.                Key             =   "xz"
  512.             EndProperty
  513.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  514.                Picture         =   "凭证处理_凭证列表.frx":22B24
  515.                Key             =   "sc"
  516.             EndProperty
  517.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  518.                Picture         =   "凭证处理_凭证列表.frx":22EBE
  519.                Key             =   "sx"
  520.             EndProperty
  521.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  522.                Picture         =   "凭证处理_凭证列表.frx":23258
  523.                Key             =   "cx"
  524.             EndProperty
  525.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  526.                Picture         =   "凭证处理_凭证列表.frx":235F2
  527.                Key             =   "zd"
  528.             EndProperty
  529.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  530.                Picture         =   "凭证处理_凭证列表.frx":2398C
  531.                Key             =   "dz"
  532.             EndProperty
  533.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  534.                Picture         =   "凭证处理_凭证列表.frx":23D26
  535.                Key             =   "ph"
  536.             EndProperty
  537.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  538.                Picture         =   "凭证处理_凭证列表.frx":240C0
  539.                Key             =   "fz"
  540.             EndProperty
  541.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  542.                Picture         =   "凭证处理_凭证列表.frx":2445A
  543.                Key             =   "dw"
  544.             EndProperty
  545.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  546.                Picture         =   "凭证处理_凭证列表.frx":247F4
  547.                Key             =   "hf"
  548.             EndProperty
  549.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  550.                Picture         =   "凭证处理_凭证列表.frx":24B8E
  551.                Key             =   "pz"
  552.             EndProperty
  553.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  554.                Picture         =   "凭证处理_凭证列表.frx":24F28
  555.                Key             =   "check"
  556.             EndProperty
  557.          EndProperty
  558.       End
  559.    End
  560. End
  561. Attribute VB_Name = "PZ_FrmPzcxjg"
  562. Attribute VB_GlobalNameSpace = False
  563. Attribute VB_Creatable = False
  564. Attribute VB_PredeclaredId = True
  565. Attribute VB_Exposed = False
  566. '**************************************************************************
  567. '*    模 块 名 称 :记帐凭证列表
  568. '*    功 能 描 述 :
  569. '*    程序员姓名  : 张建忠
  570. '*    最后修改人  :奚俊峰
  571. '*    最后修改时间:2001/12/27
  572. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  573. '**************************************************************************
  574. Dim ReportTitle As String                '报表主标题
  575. Dim Str_RightEdit As String              '编辑(新增、修改、删除)权限索引
  576. Dim Str_RightCheck As String
  577. '以下为固定使用变量
  578. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  579. Dim GridCode As String                   '显示网格网格代码
  580. Dim GridInf() As Variant                 '整个网格设置信息
  581. Dim Tsxx As String                       '系统提示信息
  582. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  583. Dim Sjhgd As Double                      '网格数据行高度
  584. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  585. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  586. Dim GridStr()  As String                 '网格列信息(字符型)
  587. Dim GridInt() As Integer                 '网格列信息(整型)
  588. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  589. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小
  590.     On Error Resume Next
  591.     With CxbbGrid
  592.         .Width = Me.Width - 160
  593.         .Height = Me.Height - .Top - 400
  594.     End With
  595.     With Pic_Title
  596.         .Width = Me.Width - 160
  597.     End With
  598.     
  599.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  600. End Sub
  601. Private Sub Form_Load()                                                   '窗体装入
  602.     
  603.     '调入打印页面设置窗体
  604.     
  605.     XtReportCode = "Cwzz_jzpzcx"
  606.     Load Dyymctbl
  607.     ReportTitle = "记帐凭证列表"
  608.     
  609.     '调整标题栏及网格、格式工具条位置
  610.     Pic_Title.Left = 40
  611.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  612.     CxbbGrid.Left = Pic_Title.Left
  613.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  614.     
  615.     '调 入 网 格
  616.     GridCode = "Cwzz_jzpzcx"
  617.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  618.     
  619.     Qslz = GridInf(1)
  620.     Sjhgd = GridInf(2)
  621.     Sfxshjwg = GridInf(7)
  622.     Szzls = CxbbGrid.Cols - 1
  623.     
  624.     '调整标题位置
  625.     SetTitlePos tsLabel(4)
  626.     
  627.     '编辑(新增、修改、删除)权限索引
  628.     Str_RightEdit = "Cwzz_jzpzcx_edit"
  629.     Str_RightCheck = "Cwzz_jzpzcx_check"
  630.     
  631. End Sub
  632. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  633.     '卸载条件窗体
  634.     PZ_FrmPzcxtj.UnloadCheck.Value = 1
  635.     Unload PZ_FrmPzcxtj
  636.     '卸载打印页面设置窗体
  637.     Unload Dyymctbl
  638. End Sub
  639. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整
  640.     Select Case Button.Key
  641.     Case "bcgs"                                          '保存表格格式
  642.         Call Bcwggs(CxbbGrid, GridCode, GridStr)
  643.     Case "hfmrgs"                                        '恢复默认格式
  644.         Call Hfmrgs(CxbbGrid, GridCode, GridStr)
  645.     Case "szxsxm"                                        '设置显示项目
  646.         Call Szxsxm(CxbbGrid, GridCode)
  647.     End Select
  648. End Sub
  649. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  650.     Select Case Button.Key
  651.     Case "ymsz"                                          '页面设置
  652.         Dyymctbl.Show 1
  653.     Case "yl"                                            '预 览
  654.         Call bbyl(True)
  655.     Case "dy"                                            '打 印
  656.         Call bbyl(False)
  657.     Case "cx"                                            '查 询
  658.         PZ_FrmPzcxtj.Show 1
  659.     Case "pz"                                            '凭 证
  660.         Call CxbbGrid_DblClick
  661.     Case "xz"                                            '新 增
  662.         Call Sub_AddBill
  663.     Case "sc"                                            '删除当前单据
  664.         Call Sub_DeleteBill
  665.     Case "sh"                                            '审 核
  666.         Call Sub_CheckBill
  667.     Case "sx"                                            '刷 新
  668.         Call Timer1_Timer
  669.     Case "bz"                                            '帮 助
  670.         Call F1bz
  671.     Case "fh"                                            '退 出
  672.         Unload Me
  673.     End Select
  674. End Sub
  675. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  676.     Timer1.Enabled = False
  677.     Xt_Wait.Show
  678.     Xt_Wait.Refresh
  679.     
  680.     '加快显示速度
  681.     CxbbGrid.Redraw = False
  682.     
  683.     '生成查询结果
  684.     Call Sub_Query
  685.     
  686.     CxbbGrid.Redraw = True
  687.     
  688.     Xt_Wait.Hide
  689. End Sub
  690. Private Sub Sub_Query()                                    '生成查询结果
  691.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  692.     Dim Str_QueryCondi As String                '用户录入查询条件
  693.     Dim Sqlstr As String                        '查询字符串
  694.     Dim Coljsq As Long                          '网格列计数器
  695.     Dim Jsqte As Long                           '临时动态计数器
  696.     Dim Int_VouchID%                            '记录上一张凭证标识
  697.     Dim Dbl_Jfhj#, Dbl_Dfhj#                    '每张凭证借贷方合计
  698.     
  699.     '以下为用户自定义部分[
  700.     
  701.     With PZ_FrmPzcxtj
  702.         
  703.         '显示查询会计期间
  704.         Lab_TitleText.Caption = .Combo_Kjqj(0).Text & "-" & .Combo_Kjqj(1).Text
  705.         
  706.         Str_QueryCondi = " where 1=1 "
  707.         For Jsqte = 1 To 28
  708.             Select Case Jsqte
  709.                 
  710.             Case 1   '凭证范围
  711.                 Select Case Trim(.Combo_Pzfw.Text)
  712.                 Case "未记帐凭证"
  713.                     Str_QueryCondi = Str_QueryCondi & " and b.BookFlag=0"
  714.                 Case "记帐凭证"
  715.                     Str_QueryCondi = Str_QueryCondi & " and b.BookFlag=1"
  716.                 End Select
  717.                 
  718.             Case 2   '凭证类别
  719.                 If GetComboKey(.Imgebo_VouchClass, 0) <> "" Then
  720.                     Str_QueryCondi = Str_QueryCondi & " and b.VouchClassCode='" & Trim(GetComboKey(.Imgebo_VouchClass, 0)) & "'"
  721.                 End If
  722.                 
  723.             Case 3   '会计期间
  724.                 If .Combo_Kjqj(0).Text <> "" Then
  725.                     Str_QueryCondi = Str_QueryCondi & " and b.Year='" & Xtyear & "' and b.Period>='" & Mid(Trim(.Combo_Kjqj(0).Text), 6, 2) & "' and b.Period<='" & Mid(Trim(.Combo_Kjqj(1).Text), 6, 2) & "'"
  726.                 End If
  727.             Case 4   '凭证号范围(起始)
  728.                 Str_QueryCondi = Str_QueryCondi & " and b.VouchNo>= " & Val(.LrText(0).Text)
  729.                 
  730.             Case 5   '凭证号范围(终止)
  731.                 If Val(.LrText(1)) <> 0 Then
  732.                     Str_QueryCondi = Str_QueryCondi & " and b.VouchNo<= " & Val(.LrText(1).Text)
  733.                 End If
  734.                 
  735.             Case 6   '科目号
  736.                 If Trim(.LrText(2)) <> "" Then
  737.                     Str_QueryCondi = Str_QueryCondi & " and b.Ccode like '" & Trim(.LrText(2).Text) & "%'"
  738.                 End If
  739.                 
  740.             Case 7   '制单人
  741.                 If Trim(.Imgebo_Bill.Text) <> "" Then
  742.                     Str_QueryCondi = Str_QueryCondi & " and b.Bill='" & Trim(.Imgebo_Bill.Text) & "'"
  743.                 End If
  744.                 
  745.             Case 8   '审核人
  746.                 If Trim(.Imgebo_Checker.Text) <> "" Then
  747.                     Str_QueryCondi = Str_QueryCondi & " and b.Checker='" & Trim(.Imgebo_Checker.Text) & "'"
  748.                 End If
  749.                 
  750.             Case 9   '记帐人
  751.                 If Trim(.Imgebo_Book.Text) <> "" Then
  752.                     Str_QueryCondi = Str_QueryCondi & " and b.Book='" & Trim(.Imgebo_Book.Text) & "'"
  753.                 End If
  754.                 
  755.             Case 10   '摘要
  756.                 If Trim(.LrText(3).Text) <> "" Then
  757.                     Str_QueryCondi = Str_QueryCondi & " and b.Digest Like '" & Trim(.LrText(3).Text) & "%'"
  758.                 End If
  759.                 
  760.             Case 11   '金额范围(起始)
  761.                 Str_QueryCondi = Str_QueryCondi & " and (b.Jfje+b.Dfje>=" & Val(.LrText(4).Text) & " OR b.Dfje>=" & Val(.LrText(4).Text) & ")"
  762.                 
  763.             Case 12   '金额范围(终止)
  764.                 If Val(.LrText(5)) > 0 Then
  765.                     Str_QueryCondi = Str_QueryCondi & " and (b.Jfje+b.Dfje<=" & Val(.LrText(5).Text) & " and b.Dfje<=" & Val(.LrText(5).Text) & ")"
  766.                 End If
  767.                 
  768.             Case 13   '数量范围(起始)
  769.                 If Val(.LrText(6).Text) > 0 Then
  770.                     Str_QueryCondi = Str_QueryCondi & " and (b.Jfsl>=" & Val(.LrText(6).Text) & " OR b.Dfsl>=" & Val(.LrText(6).Text) & ")"
  771.                 End If
  772.                 
  773.             Case 14   '数量范围(终止)
  774.                 If Val(.LrText(7)) > 0 Then
  775.                     Str_QueryCondi = Str_QueryCondi & " and (b.Jfsl<=" & Val(.LrText(7).Text) & " and b.Dfsl<=" & Val(.LrText(7).Text) & ")"
  776.                 End If
  777.                 
  778.             Case 15   '外币范围(起始)
  779.                 If Val(.LrText(8).Text) > 0 Then
  780.                     Str_QueryCondi = Str_QueryCondi & " and (b.WbJfje>=" & Val(.LrText(8).Text) & " OR b.WbDfje>=" & Val(.LrText(8).Text) & ")"
  781.                 End If
  782.             Case 16   '外币范围(终止)
  783.                 If Val(.LrText(9)) > 0 Then
  784.                     Str_QueryCondi = Str_QueryCondi & " and (b.WbJfje<=" & Val(.LrText(9).Text) & " and b.WbDfje<=" & Val(.LrText(9).Text) & ")"
  785.                 End If
  786.                 
  787.             Case 17   '外币名称
  788.                 If GetComboKey(.Imgebo_ForeignCurr, 0) <> "" Then
  789.                     Str_QueryCondi = Str_QueryCondi & " and b.ForeignCurrCode='" & Trim(GetComboKey(.Imgebo_ForeignCurr, 0)) & "'"
  790.                 End If
  791.                 
  792.             Case 18   '个人
  793.                 If Trim(.LrText(11).Tag) <> "" Then
  794.                     Str_QueryCondi = Str_QueryCondi & " and b.PersonCode = '" & Trim(.LrText(11).Tag) & "'"
  795.                 End If
  796.                 
  797.             Case 19  '部门
  798.                 If Trim(.LrText(10).Tag) <> "" Then
  799.                     Str_QueryCondi = Str_QueryCondi & " and b.DeptCode = '" & Trim(.LrText(10).Tag) & "'"
  800.                 End If
  801.                 
  802.             Case 20  '往来客户
  803.                 If Trim(.LrText(12).Tag) <> "" Then
  804.                     Str_QueryCondi = Str_QueryCondi & " and b.CusCode = '" & Trim(.LrText(12).Tag) & "'"
  805.                 End If
  806.                 
  807.             Case 21   '项目类别
  808.                 If GetComboKey(.Imgebo_ItemClass, 0) <> "" Then
  809.                     Str_QueryCondi = Str_QueryCondi & " and b.ItemClassCode='" & Trim(GetComboKey(.Imgebo_ItemClass, 0)) & "'"
  810.                 End If
  811.                 
  812.             Case 22  '核算项目
  813.                 If Trim(.LrText(13).Tag) <> "" Then
  814.                     Str_QueryCondi = Str_QueryCondi & " and b.ItemCode= '" & Trim(.LrText(13).Tag) & "'"
  815.                 End If
  816.                 
  817.             Case 23   '结算方式
  818.                 If GetComboKey(.Imgebo_Settlement, 0) <> "" Then
  819.                     Str_QueryCondi = Str_QueryCondi & " and b.SScode='" & Trim(GetComboKey(.Imgebo_Settlement, 0)) & "'"
  820.                 End If
  821.                 
  822.             Case 24  '票号
  823.                 If Trim(.LrText(14).Text) <> "" Then
  824.                     Str_QueryCondi = Str_QueryCondi & " and b.BillNo= '" & Trim(.LrText(14).Text) & "'"
  825.                 End If
  826.                 
  827.             Case 25  '有错凭证
  828.                 
  829.                 If .Chk_ErrorBill.Value = 1 Then
  830.                     Str_QueryCondi = Str_QueryCondi & " and b.ErrorFlag= 1"
  831.                 End If
  832.                 
  833.             Case 26  '审核状态
  834.                 If .Opt_Check(1).Value Then
  835.                     Str_QueryCondi = Str_QueryCondi & " and b.CheckFlag= 0"
  836.                 End If
  837.                 If .Opt_Check(2).Value Then
  838.                     Str_QueryCondi = Str_QueryCondi & " and b.CheckFlag= 1"
  839.                 End If
  840.                 
  841.             Case 27  '往来供应商
  842.                 If Trim(.LrText(15).Tag) <> "" Then
  843.                     Str_QueryCondi = Str_QueryCondi & " and b.SupplierCode = '" & Trim(.LrText(15).Tag) & "'"
  844.                 End If
  845.                 
  846.             Case 28  '凭证来源
  847.                 If Trim(.Combo_VouchSource.Text) <> "" Then
  848.                     Str_QueryCondi = Str_QueryCondi & " and b.VouchSource = '" & Trim(.Combo_VouchSource.Text) & "'"
  849.                  End If
  850.                 
  851.             End Select
  852.         Next Jsqte
  853.     End With
  854.     Sqlstr = "SELECT a.*,Cwzz_AccCode.Cname From Cwzz_V_AccVouch a LEFT OUTER JOIN " & _
  855.     " Cwzz_AccCode ON " & _
  856.     " a.Ccode = Cwzz_AccCode.Ccode" & _
  857.     " Where EXISTS (SELECT * From Cwzz_V_AccVouch b " & Str_QueryCondi & " AND a.VouchID=b.VouchID) " & _
  858.     " Order by Year,Period,VouchClassCode,VouchNo,Vouchid"
  859.     
  860.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  861.     With Rec_Query
  862.         CxbbGrid.Rows = CxbbGrid.FixedRows
  863.         CxbbGrid.Rows = CxbbGrid.FixedRows + .RecordCount
  864.         Jsqte = CxbbGrid.FixedRows
  865.         
  866.         Do While Not .EOF
  867.             If Jsqte >= CxbbGrid.Rows Then
  868.                 CxbbGrid.AddItem ""
  869.             End If
  870.             
  871.             CxbbGrid.TextMatrix(Jsqte, 0) = .Fields("VouchID")           '凭证ID
  872.             
  873.             '如果为同一张凭证则不再输出制单日期和凭证号
  874.             If Int_VouchID <> .Fields("VouchID") Then
  875.                 Int_VouchID = .Fields("VouchID")                          '凭证ID
  876.                 CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = .Fields("Ddate")              '制单日期
  877.                 CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("VouchClassCode") & "") + "-" + Mid(Trim(Str(10000 + .Fields("VouchNo"))), 2, 4) '凭证号
  878.                 
  879.                 '如果凭证输出合计,则不加此分割色
  880.                 If PZ_FrmPzcxtj.Chk_Sum.Value = 0 Then
  881.                     '分割颜色
  882.                     CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(0).BackColor
  883.                 End If
  884.                 
  885.             End If
  886.             
  887.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("Digest") & "")           '摘要
  888.             CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("Ccode") & "")            '科目编码
  889.             CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("Cname") & "")            '科目名称
  890.             If .Fields("Jfje") <> 0 Then                                                                       '借方金额
  891.                 CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Trim(Str(.Fields("Jfje")))
  892.             End If
  893.             If .Fields("Dfje") <> 0 Then                                                                       '贷方金额
  894.                 CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Trim(Str(.Fields("Dfje")))
  895.             End If
  896.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("Bill") & "")             '制单人
  897.             CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("Checker") & "")          '审核人
  898.             CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("Book") & "")             '记帐人
  899.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("VouchSource") & "")      '凭证来源
  900.             
  901.             If .Fields("ErrorFlag") Then                                                                       '有错凭证(红色显示)
  902.                 CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(1).BackColor
  903.             End If
  904.             
  905.             '计算本张凭证合计
  906.             Dbl_Jfhj = Dbl_Jfhj + .Fields("Jfje")
  907.             Dbl_Dfhj = Dbl_Dfhj + .Fields("Dfje")
  908.             
  909.             CxbbGrid.RowHeight(Jsqte) = Sjhgd
  910.             
  911.             Jsqte = Jsqte + 1
  912.             .MoveNext
  913.             
  914.             '判断是否输出合计
  915.             If PZ_FrmPzcxtj.Chk_Sum.Value = 1 Then
  916.                 If .EOF Then
  917.                     CxbbGrid.AddItem ""
  918.                     CxbbGrid.RowHeight(Jsqte) = Sjhgd
  919.                     CxbbGrid.TextMatrix(Jsqte, 0) = Int_VouchID            '凭证ID
  920.                     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "合 计"
  921.                     If Dbl_Jfhj <> 0 Then                                                                       '借方合计
  922.                         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Trim(Str(Dbl_Jfhj))
  923.                     End If
  924.                     If Dbl_Dfhj <> 0 Then                                                                       '贷方合计
  925.                         CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Trim(Str(Dbl_Dfhj))
  926.                     End If
  927.                     
  928.                     '合计清零
  929.                     Dbl_Jfhj = 0
  930.                     Dbl_Dfhj = 0
  931.                     
  932.                     CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(0).BackColor
  933.                     Jsqte = Jsqte + 1
  934.                 Else
  935.                     If Int_VouchID <> .Fields("VouchID") Then
  936.                         CxbbGrid.AddItem ""
  937.                         CxbbGrid.RowHeight(Jsqte) = Sjhgd
  938.                         CxbbGrid.TextMatrix(Jsqte, 0) = Int_VouchID            '凭证ID
  939.                         CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "合 计"
  940.                         If Dbl_Jfhj <> 0 Then                                                                       '借方合计
  941.                             CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Trim(Str(Dbl_Jfhj))
  942.                         End If
  943.                         If Dbl_Dfhj <> 0 Then                                                                       '贷方合计
  944.                             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Trim(Str(Dbl_Dfhj))
  945.                         End If
  946.                         
  947.                         '合计清零
  948.                         Dbl_Jfhj = 0
  949.                         Dbl_Dfhj = 0
  950.                         
  951.                         CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(0).BackColor
  952.                         Jsqte = Jsqte + 1
  953.                     End If
  954.                 End If
  955.             End If
  956.             
  957.         Loop
  958.         
  959.     End With
  960.     
  961.     ']以上为用户自定义部分
  962.     
  963. End Sub
  964. Private Sub CxbbGrid_DblClick()          '用户双击网格调入相应凭证
  965.     Dim RecTemp As New ADODB.Recordset
  966.     
  967.     '非数据行退出
  968.     If CxbbGrid.Row < CxbbGrid.FixedRows Then
  969.         Exit Sub
  970.     End If
  971.     
  972.     Sqlstr = "SELECT VouchID From Cwzz_AccVouchMain" & _
  973.     " Where VouchID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  974.     
  975.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  976.     
  977.     With RecTemp
  978.         
  979.         If .EOF Then
  980.             Tsxx = "此凭证已被其他用户删除!"
  981.             Call Xtxxts(Tsxx, 0, 4)
  982.             Exit Sub
  983.         Else
  984.             
  985.             With PZ_JzpzclFrm
  986.                 '填充查询凭证标识
  987.                 .Lab_VouchId = Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  988.                 
  989.                 '设置凭证处理为列表查询状态
  990.                 .Lab_Pzclzt.Caption = "2"
  991.                 
  992.                 .Show 1
  993.                 
  994.             End With
  995.             
  996.             If Xtfhcs = "1" Then
  997.                 Tsxx = "凭证发生变化,是否刷新凭证列表?"
  998.                 Yhanswer = Xtxxts(Tsxx, 2, 2)
  999.                 If Yhanswer = 1 Then
  1000.                     Call Timer1_Timer
  1001.                 End If
  1002.             End If
  1003.             
  1004.         End If
  1005.         
  1006.     End With
  1007.     
  1008. End Sub
  1009. Private Sub Sub_AddBill()                                                '新增单据
  1010.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1011.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  1012.          Exit Sub
  1013.     End If
  1014.     
  1015.     With PZ_JzpzclFrm
  1016.         '设置凭证处理为填制凭证状态
  1017.         .Lab_Pzclzt.Caption = "1"
  1018.         
  1019.         .Show 1
  1020.         
  1021.     End With
  1022.     
  1023.     If Xtfhcs = "1" Then
  1024.         Tsxx = "凭证发生变化,是否刷新凭证列表?"
  1025.         Yhanswer = Xtxxts(Tsxx, 2, 2)
  1026.         If Yhanswer = 1 Then
  1027.             Call Timer1_Timer
  1028.         End If
  1029.     End If
  1030.     
  1031. End Sub
  1032. Private Sub Sub_DeleteBill()                                             '删除选中当前单据
  1033.     Dim YAnswer As Integer
  1034.     Dim Int_VouchID%                       '凭证标识
  1035.     
  1036.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1037.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  1038.          Exit Sub
  1039.     End If
  1040.     
  1041.     '光标处于非数据行不进行删除动作
  1042.     If CxbbGrid.Row < CxbbGrid.FixedRows Then
  1043.         Exit Sub
  1044.     End If
  1045.     
  1046.     '判断当前凭证是否允许删除
  1047.     If Not Fun_AllowEdit Then
  1048.         Exit Sub
  1049.     End If
  1050.     
  1051.     Tsxx = "请确认是否删除当前凭证?"
  1052.     Yhanswer = Xtxxts(Tsxx, 2, 2)
  1053.     If Yhanswer = 1 Then
  1054.         '1.删除凭证所有内容
  1055.         Int_VouchID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1056.         
  1057.         On Error GoTo Swcwcl
  1058.         
  1059.         Cw_DataEnvi.DataConnect.BeginTrans
  1060.         
  1061.         Cw_DataEnvi.DataConnect.Execute ("Delete Cwzz_AccVouchSub Where VouchID=" & Int_VouchID)
  1062.         Cw_DataEnvi.DataConnect.Execute ("Delete Cwzz_AccVouchMain Where VouchID=" & Int_VouchID)
  1063.         'add by 奚俊峰
  1064.         Cw_DataEnvi.DataConnect.Execute ("Delete from Cwzz_CashFlowData Where VouchID=" & Int_VouchID)
  1065.         
  1066.         Cw_DataEnvi.DataConnect.CommitTrans
  1067.         
  1068.         On Error GoTo 0
  1069.         
  1070.         '删除网格中凭证数据
  1071.         Jsqte = CxbbGrid.FixedRows
  1072.         Do While Jsqte <= CxbbGrid.Rows - 1
  1073.             If Val(CxbbGrid.TextMatrix(Jsqte, 0)) = Int_VouchID Then
  1074.                 CxbbGrid.RemoveItem (Jsqte)
  1075.             Else
  1076.                 Jsqte = Jsqte + 1
  1077.             End If
  1078.         Loop
  1079.     Else
  1080.         Exit Sub
  1081.     End If
  1082.     
  1083.     Exit Sub
  1084. Swcwcl:
  1085.     Cw_DataEnvi.DataConnect.RollbackTrans
  1086.     Tsxx = "删除凭证过程中出现未知错误,程序自动恢复删除前状态!"
  1087.     Call Xtxxts(Tsxx, 0, 1)
  1088.     Exit Sub
  1089.     
  1090. End Sub
  1091. Private Function Fun_AllowEdit() As Boolean                      '判断当前凭证是否允许编辑或删除
  1092.     Dim RecTemp As New ADODB.Recordset                           '临时使用动态集
  1093.     Dim Int_VouchID%                                             '凭证标识
  1094.     
  1095.     Int_VouchID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1096.     Sqlstr = "Select CheckFlag,BookFlag,Checker,Book From Cwzz_AccVouchMain Where VouchID=" & Int_VouchID
  1097.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1098.     With RecTemp
  1099.         If Not .EOF Then
  1100.             If .Fields("CheckFlag") Or .Fields("BookFlag") Then
  1101.                 Tsxx = "该凭证已审核或记帐,不允许修改或删除!"
  1102.                 Call Xtxxts(Tsxx, 0, 4)
  1103.                 Lab_Checker = Trim(.Fields("Checker") & "")
  1104.                 Lab_Book = Trim(.Fields("Book") & "")
  1105.                 Exit Function
  1106.             End If
  1107.         End If
  1108.     End With
  1109.     Fun_AllowEdit = True
  1110. End Function
  1111. Private Sub Sub_CheckBill()                            '审核凭证
  1112.     Dim Yhanswer As Integer
  1113.     
  1114.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1115.     If Not Security_Log(Str_RightCheck, Xtczybm, 1, True) Then
  1116.          Exit Sub
  1117.     End If
  1118.     
  1119.     '非数据行退出
  1120.     If CxbbGrid.Row < CxbbGrid.FixedRows Then
  1121.         Exit Sub
  1122.     End If
  1123.     
  1124.     Sqlstr = "SELECT VouchID From Cwzz_AccVouchMain" & _
  1125.     " Where VouchID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1126.     
  1127.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1128.     
  1129.     With RecTemp
  1130.         
  1131.         If .EOF Then
  1132.             Tsxx = "此凭证已被其他用户删除!"
  1133.             Call Xtxxts(Tsxx, 0, 4)
  1134.             Exit Sub
  1135.         Else
  1136.             
  1137.             With PZ_JzpzclFrm
  1138.                 '填充查询凭证标识
  1139.                 .Lab_VouchId = Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1140.                 
  1141.                 '设置凭证处理为审核凭证状态
  1142.                 .Lab_Pzclzt.Caption = "3"
  1143.                 
  1144.                 .Show 1
  1145.                 
  1146.                 If Xtfhcs = "1" Then
  1147.                     Tsxx = "凭证发生变化,是否刷新凭证列表?"
  1148.                     Yhanswer = Xtxxts(Tsxx, 2, 2)
  1149.                     If Yhanswer = 1 Then
  1150.                         Call Timer1_Timer
  1151.                     End If
  1152.                 End If
  1153.                 
  1154.             End With
  1155.         End If
  1156.         
  1157.     End With
  1158.     
  1159. End Sub
  1160. Private Sub bbyl(bbylte As Boolean)                      '报表打印预览
  1161.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1162.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1163.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1164.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1165.     ReDim Bbxbt(1 To Bbxbtgs)
  1166.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1167.     If Bbbwhgs <> 0 Then
  1168.         ReDim Bbbwh(1 To Bbbwhgs)
  1169.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1170.     End If
  1171.     Bbzbt = ReportTitle
  1172.     Bbxbt(1) = " "
  1173.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1174.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1175.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1176.     If Not bbylte Then
  1177.         Unload DY_Tybbyldy
  1178.     End If
  1179. End Sub