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

企业管理

开发平台:

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 ZF_Gys_Frmslmxzjg 
  5.    Caption         =   "供应商_三栏明细帐"
  6.    ClientHeight    =   7755
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11355
  10.    HelpContextID   =   5001
  11.    Icon            =   "辅助_供应商_三栏明细帐查询结果.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    LinkTopic       =   "Form1"
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   7755
  16.    ScaleWidth      =   11355
  17.    WindowState     =   2  'Maximized
  18.    Begin VB.Timer Timer1 
  19.       Enabled         =   0   'False
  20.       Interval        =   1
  21.       Left            =   7620
  22.       Top             =   90
  23.    End
  24.    Begin VB.PictureBox Pic_Title 
  25.       Height          =   1425
  26.       Left            =   0
  27.       Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":0442
  28.       ScaleHeight     =   1365
  29.       ScaleWidth      =   11535
  30.       TabIndex        =   0
  31.       Top             =   600
  32.       Width           =   11595
  33.       Begin VB.CommandButton Cmd_CancelPrint 
  34.          Caption         =   "取消打印(&C)"
  35.          Height          =   405
  36.          Left            =   9000
  37.          TabIndex        =   17
  38.          Top             =   240
  39.          Visible         =   0   'False
  40.          Width           =   1155
  41.       End
  42.       Begin VB.ComboBox Combo_AccFormat 
  43.          Height          =   300
  44.          Left            =   9570
  45.          Style           =   2  'Dropdown List
  46.          TabIndex        =   5
  47.          Top             =   1020
  48.          Width           =   1275
  49.       End
  50.       Begin MSComctlLib.ImageCombo Imgebo_FzCode 
  51.          Height          =   315
  52.          Left            =   1710
  53.          TabIndex        =   15
  54.          Top             =   990
  55.          Width           =   3315
  56.          _ExtentX        =   5847
  57.          _ExtentY        =   556
  58.          _Version        =   393216
  59.          ForeColor       =   -2147483640
  60.          BackColor       =   -2147483643
  61.          Locked          =   -1  'True
  62.       End
  63.       Begin VB.Label Lab_Ccode 
  64.          BackStyle       =   0  'Transparent
  65.          ForeColor       =   &H00000000&
  66.          Height          =   315
  67.          Left            =   1710
  68.          TabIndex        =   16
  69.          Top             =   750
  70.          Width           =   2985
  71.       End
  72.       Begin VB.Label Lab_TitleMess 
  73.          AutoSize        =   -1  'True
  74.          BackStyle       =   0  'Transparent
  75.          Caption         =   "科目名称:"
  76.          Height          =   180
  77.          Index           =   1
  78.          Left            =   870
  79.          TabIndex        =   14
  80.          Top             =   750
  81.          Width           =   810
  82.       End
  83.       Begin VB.Label Lab_TitleMess 
  84.          AutoSize        =   -1  'True
  85.          BackStyle       =   0  'Transparent
  86.          Caption         =   "供应商:"
  87.          Height          =   180
  88.          Index           =   3
  89.          Left            =   870
  90.          TabIndex        =   13
  91.          Top             =   1050
  92.          Width           =   630
  93.       End
  94.       Begin VB.Label Lab_TitleText 
  95.          BackStyle       =   0  'Transparent
  96.          ForeColor       =   &H00000000&
  97.          Height          =   225
  98.          Index           =   1
  99.          Left            =   6600
  100.          TabIndex        =   12
  101.          Top             =   720
  102.          Width           =   1395
  103.       End
  104.       Begin VB.Label Lab_TitleMess 
  105.          BackStyle       =   0  'Transparent
  106.          Caption         =   "外币名称:"
  107.          Height          =   225
  108.          Index           =   2
  109.          Left            =   5670
  110.          TabIndex        =   11
  111.          Top             =   750
  112.          Visible         =   0   'False
  113.          Width           =   915
  114.       End
  115.       Begin VB.Label Label1 
  116.          Appearance      =   0  'Flat
  117.          BackColor       =   &H80000005&
  118.          BackStyle       =   0  'Transparent
  119.          Caption         =   "未记帐明细会计分录"
  120.          ForeColor       =   &H80000008&
  121.          Height          =   195
  122.          Index           =   2
  123.          Left            =   9120
  124.          TabIndex        =   9
  125.          Top             =   750
  126.          Width           =   1665
  127.       End
  128.       Begin VB.Label Lab_Color 
  129.          Appearance      =   0  'Flat
  130.          BackColor       =   &H00FFFFC0&
  131.          BorderStyle     =   1  'Fixed Single
  132.          ForeColor       =   &H80000008&
  133.          Height          =   195
  134.          Index           =   0
  135.          Left            =   8820
  136.          TabIndex        =   8
  137.          Top             =   750
  138.          Width           =   195
  139.       End
  140.       Begin VB.Label Lab_TitleText 
  141.          BackStyle       =   0  'Transparent
  142.          ForeColor       =   &H00000000&
  143.          Height          =   225
  144.          Index           =   0
  145.          Left            =   6630
  146.          TabIndex        =   7
  147.          Top             =   1050
  148.          Width           =   1815
  149.       End
  150.       Begin VB.Label TsLabel 
  151.          BackStyle       =   0  'Transparent
  152.          Caption         =   "帐页格式:"
  153.          Height          =   225
  154.          Index           =   7
  155.          Left            =   8670
  156.          TabIndex        =   6
  157.          Top             =   1080
  158.          Width           =   915
  159.       End
  160.       Begin VB.Label TsLabel 
  161.          BackColor       =   &H80000018&
  162.          BackStyle       =   0  'Transparent
  163.          Caption         =   "供应商三栏明细帐"
  164.          BeginProperty Font 
  165.             Name            =   "宋体"
  166.             Size            =   14.25
  167.             Charset         =   134
  168.             Weight          =   700
  169.             Underline       =   0   'False
  170.             Italic          =   0   'False
  171.             Strikethrough   =   0   'False
  172.          EndProperty
  173.          ForeColor       =   &H00000000&
  174.          Height          =   330
  175.          Index           =   4
  176.          Left            =   570
  177.          TabIndex        =   2
  178.          Top             =   150
  179.          Width           =   2865
  180.       End
  181.       Begin VB.Label Lab_TitleMess 
  182.          BackStyle       =   0  'Transparent
  183.          Caption         =   "会计期间:"
  184.          Height          =   225
  185.          Index           =   0
  186.          Left            =   5670
  187.          TabIndex        =   1
  188.          Top             =   1080
  189.          Width           =   915
  190.       End
  191.    End
  192.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  193.       Height          =   5265
  194.       Left            =   30
  195.       TabIndex        =   3
  196.       Top             =   2100
  197.       Width           =   11715
  198.       _cx             =   5080
  199.       _cy             =   5080
  200.       Appearance      =   1
  201.       BorderStyle     =   1
  202.       Enabled         =   -1  'True
  203.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  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.       MousePointer    =   0
  213.       BackColor       =   16777215
  214.       ForeColor       =   -2147483640
  215.       BackColorFixed  =   12632256
  216.       ForeColorFixed  =   -2147483630
  217.       BackColorSel    =   -2147483635
  218.       ForeColorSel    =   -2147483634
  219.       BackColorBkg    =   -2147483636
  220.       BackColorAlternate=   16777215
  221.       GridColor       =   -2147483633
  222.       GridColorFixed  =   -2147483632
  223.       TreeColor       =   -2147483632
  224.       FloodColor      =   192
  225.       SheetBorder     =   -2147483642
  226.       FocusRect       =   1
  227.       HighLight       =   1
  228.       AllowSelection  =   -1  'True
  229.       AllowBigSelection=   -1  'True
  230.       AllowUserResizing=   0
  231.       SelectionMode   =   0
  232.       GridLines       =   1
  233.       GridLinesFixed  =   2
  234.       GridLineWidth   =   1
  235.       Rows            =   50
  236.       Cols            =   10
  237.       FixedRows       =   1
  238.       FixedCols       =   1
  239.       RowHeightMin    =   0
  240.       RowHeightMax    =   0
  241.       ColWidthMin     =   0
  242.       ColWidthMax     =   0
  243.       ExtendLastCol   =   0   'False
  244.       FormatString    =   ""
  245.       ScrollTrack     =   0   'False
  246.       ScrollBars      =   3
  247.       ScrollTips      =   0   'False
  248.       MergeCells      =   0
  249.       MergeCompare    =   0
  250.       AutoResize      =   -1  'True
  251.       AutoSizeMode    =   0
  252.       AutoSearch      =   0
  253.       AutoSearchDelay =   2
  254.       MultiTotals     =   -1  'True
  255.       SubtotalPosition=   1
  256.       OutlineBar      =   0
  257.       OutlineCol      =   0
  258.       Ellipsis        =   0
  259.       ExplorerBar     =   0
  260.       PicturesOver    =   0   'False
  261.       FillStyle       =   0
  262.       RightToLeft     =   0   'False
  263.       PictureType     =   0
  264.       TabBehavior     =   0
  265.       OwnerDraw       =   0
  266.       Editable        =   0
  267.       ShowComboButton =   1
  268.       WordWrap        =   0   'False
  269.       TextStyle       =   0
  270.       TextStyleFixed  =   0
  271.       OleDragMode     =   0
  272.       OleDropMode     =   0
  273.       DataMode        =   0
  274.       VirtualData     =   -1  'True
  275.       DataMember      =   ""
  276.       ComboSearch     =   3
  277.       AutoSizeMouse   =   -1  'True
  278.       FrozenRows      =   0
  279.       FrozenCols      =   0
  280.       AllowUserFreezing=   0
  281.       BackColorFrozen =   0
  282.       ForeColorFrozen =   0
  283.       WallPaperAlignment=   9
  284.       AccessibleName  =   ""
  285.       AccessibleDescription=   ""
  286.       AccessibleValue =   ""
  287.       AccessibleRole  =   24
  288.    End
  289.    Begin MSComctlLib.Toolbar SzToolbar 
  290.       Align           =   1  'Align Top
  291.       Height          =   555
  292.       Left            =   0
  293.       TabIndex        =   4
  294.       Top             =   0
  295.       Width           =   11355
  296.       _ExtentX        =   20029
  297.       _ExtentY        =   979
  298.       ButtonWidth     =   820
  299.       ButtonHeight    =   926
  300.       AllowCustomize  =   0   'False
  301.       Appearance      =   1
  302.       Style           =   1
  303.       ImageList       =   "ImageList1"
  304.       _Version        =   393216
  305.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  306.          NumButtons      =   11
  307.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  308.             Caption         =   "设置"
  309.             Key             =   "ymsz"
  310.             ImageKey        =   "sz"
  311.          EndProperty
  312.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  313.             Caption         =   "打印"
  314.             Key             =   "dy"
  315.             ImageKey        =   "dy"
  316.          EndProperty
  317.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  318.             Caption         =   "预览"
  319.             Key             =   "yl"
  320.             ImageKey        =   "yl"
  321.          EndProperty
  322.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  323.             Caption         =   "连打"
  324.             Key             =   "lxdy"
  325.             ImageIndex      =   36
  326.          EndProperty
  327.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  328.             Style           =   3
  329.          EndProperty
  330.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  331.             Caption         =   "查询"
  332.             Key             =   "cx"
  333.             ImageKey        =   "cx"
  334.          EndProperty
  335.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  336.             Style           =   3
  337.          EndProperty
  338.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  339.             Caption         =   "凭证"
  340.             Key             =   "pz"
  341.             ImageKey        =   "pz"
  342.          EndProperty
  343.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  344.             Style           =   3
  345.          EndProperty
  346.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  347.             Caption         =   "帮助"
  348.             Key             =   "bz"
  349.             ImageKey        =   "bz"
  350.          EndProperty
  351.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  352.             Caption         =   "退出"
  353.             Key             =   "fh"
  354.             ImageKey        =   "tc"
  355.          EndProperty
  356.       EndProperty
  357.       BorderStyle     =   1
  358.       Begin MSComctlLib.ImageList ImageList1 
  359.          Left            =   6000
  360.          Top             =   30
  361.          _ExtentX        =   1005
  362.          _ExtentY        =   1005
  363.          BackColor       =   -2147483643
  364.          ImageWidth      =   16
  365.          ImageHeight     =   16
  366.          MaskColor       =   12632256
  367.          _Version        =   393216
  368.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  369.             NumListImages   =   36
  370.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  371.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":34506
  372.                Key             =   "sz"
  373.             EndProperty
  374.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  375.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":348A0
  376.                Key             =   "dy"
  377.             EndProperty
  378.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  379.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":34C3A
  380.                Key             =   "yl"
  381.             EndProperty
  382.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  383.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":34FD4
  384.                Key             =   "xg"
  385.             EndProperty
  386.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  387.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3536E
  388.                Key             =   "zh"
  389.             EndProperty
  390.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  391.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":35708
  392.                Key             =   "sh"
  393.             EndProperty
  394.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  395.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":35AA2
  396.                Key             =   "bc"
  397.             EndProperty
  398.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  399.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":35E3C
  400.                Key             =   "fq"
  401.             EndProperty
  402.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  403.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":361D6
  404.                Key             =   "bz"
  405.             EndProperty
  406.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  407.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":36570
  408.                Key             =   "tc"
  409.             EndProperty
  410.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  411.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3690A
  412.                Key             =   "bcgs"
  413.             EndProperty
  414.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  415.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":36CA4
  416.                Key             =   "mrlk"
  417.             EndProperty
  418.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  419.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3703E
  420.                Key             =   "xsxm"
  421.             EndProperty
  422.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  423.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":373D8
  424.                Key             =   "first"
  425.             EndProperty
  426.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  427.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":37772
  428.                Key             =   "prev"
  429.             EndProperty
  430.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  431.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":37B0C
  432.                Key             =   "next"
  433.             EndProperty
  434.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  435.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":37EA6
  436.                Key             =   "last"
  437.             EndProperty
  438.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  439.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":38240
  440.                Key             =   "xx"
  441.             EndProperty
  442.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  443.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":385DA
  444.                Key             =   "define"
  445.             EndProperty
  446.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  447.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":38974
  448.                Key             =   "exec"
  449.             EndProperty
  450.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  451.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":38D0E
  452.                Key             =   "xz"
  453.             EndProperty
  454.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  455.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":390A8
  456.                Key             =   "sc"
  457.             EndProperty
  458.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  459.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":39442
  460.                Key             =   "sx"
  461.             EndProperty
  462.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  463.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":397DC
  464.                Key             =   "cx"
  465.             EndProperty
  466.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  467.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":39B76
  468.                Key             =   "zd"
  469.             EndProperty
  470.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  471.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":39F10
  472.                Key             =   "dz"
  473.             EndProperty
  474.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  475.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3A2AA
  476.                Key             =   "ph"
  477.             EndProperty
  478.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  479.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3A644
  480.                Key             =   "fz"
  481.             EndProperty
  482.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  483.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3A9DE
  484.                Key             =   "dw"
  485.             EndProperty
  486.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  487.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3AD78
  488.                Key             =   "hf"
  489.             EndProperty
  490.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  491.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3B112
  492.                Key             =   "pz"
  493.             EndProperty
  494.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  495.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3B4AC
  496.                Key             =   "check"
  497.             EndProperty
  498.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  499.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3B846
  500.                Key             =   "zz"
  501.             EndProperty
  502.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  503.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3BBE0
  504.                Key             =   "mx"
  505.             EndProperty
  506.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  507.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3BF7A
  508.                Key             =   "lj"
  509.             EndProperty
  510.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  511.                Picture         =   "辅助_供应商_三栏明细帐查询结果.frx":3C314
  512.                Key             =   ""
  513.             EndProperty
  514.          EndProperty
  515.       End
  516.       Begin MSComctlLib.Toolbar GsToolbar 
  517.          Height          =   525
  518.          Left            =   9660
  519.          TabIndex        =   10
  520.          Top             =   0
  521.          Width           =   1665
  522.          _ExtentX        =   2937
  523.          _ExtentY        =   926
  524.          ButtonWidth     =   1455
  525.          ButtonHeight    =   926
  526.          AllowCustomize  =   0   'False
  527.          Appearance      =   1
  528.          Style           =   1
  529.          ImageList       =   "ImageList1"
  530.          _Version        =   393216
  531.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  532.             NumButtons      =   2
  533.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  534.                Caption         =   "保存格式"
  535.                Key             =   "bcgs"
  536.                ImageKey        =   "bcgs"
  537.             EndProperty
  538.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  539.                Caption         =   "默认列宽"
  540.                Key             =   "hfmrgs"
  541.                ImageKey        =   "mrlk"
  542.             EndProperty
  543.          EndProperty
  544.       End
  545.    End
  546. End
  547. Attribute VB_Name = "ZF_Gys_Frmslmxzjg"
  548. Attribute VB_GlobalNameSpace = False
  549. Attribute VB_Creatable = False
  550. Attribute VB_PredeclaredId = True
  551. Attribute VB_Exposed = False
  552. '**********************************************************************
  553. '*    模 块 名 称 :(供应商)科目三栏明细帐
  554. '*    功 能 描 述 :本功能用于查询某科目某供应商在某月或某几月的明细帐情况
  555. '*                 并且能够进行立体联查凭证及总帐数据。
  556. '*    程序员姓名  : 张建忠
  557. '*    最后修改人  : 奚俊峰
  558. '*    最后修改时间:2001.12.27
  559. '*    备        注:其中外币汇率位数应该能够设置,有待完善
  560. '**********************************************************************
  561. Dim ReportTitle As String                '报表主标题
  562. Dim Bln_ConVertFlag As Boolean           '外币折算方式
  563. Dim Int_Wbhlxsws As Integer              '外币汇率小数位数
  564. Dim Bln_CancelPrint As Boolean           '用户是否取消打印
  565. Dim Bln_Printing As Boolean              '用户是否正在打印
  566. '以下为固定使用变量
  567. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  568. Dim GridCode As String                   '显示网格网格代码
  569. Dim GridInf() As Variant                 '整个网格设置信息
  570. Dim Tsxx As String                       '系统提示信息
  571. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  572. Dim Sjhgd As Double                      '网格数据行高度
  573. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  574. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  575. Dim GridStr()  As String                 '网格列信息(字符型)
  576. Dim GridInt() As Integer                 '网格列信息(整型)
  577. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  578. Dim Bln_Stop As Boolean                  '停止输出查询结果
  579. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小
  580.     On Error Resume Next
  581.     With CxbbGrid
  582.         .Width = Me.Width - 160
  583.         .Height = Me.Height - .Top - 400
  584.     End With
  585.     With Pic_Title
  586.         .Width = Me.Width - 160
  587.     End With
  588.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  589. End Sub
  590. Private Sub Form_Load()                                                   '窗体装入
  591.     '========bsj================
  592.     '设置窗体图标与主界面图标一致
  593.     Me.Icon = XT_Main.Icon
  594.     '==========================
  595.     '调入打印页面设置窗体
  596.     XtReportCode = "Cwzz_gys_slmxz"
  597.     Load Dyymctbl
  598.     ReportTitle = "供应商三栏明细帐"
  599.     
  600.     '调整标题栏及网格、格式工具条位置
  601.     Pic_Title.Left = 40
  602.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  603.     CxbbGrid.Left = Pic_Title.Left
  604.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  605.     
  606.     '调 入 网 格
  607.     GridCode = "Cwzz_gys_slmxz"
  608.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  609.     
  610.     Qslz = GridInf(1)
  611.     Sjhgd = GridInf(2)
  612.     Sfxshjwg = GridInf(7)
  613.     Szzls = CxbbGrid.Cols - 1
  614.     
  615.     '帐页格式
  616.     Call FillCombo(Combo_AccFormat, "Cwzz_zygs", "", 0)
  617.     '调整标题位置
  618.     SetTitlePos tsLabel(4)
  619.     
  620.     
  621. End Sub
  622. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  623.     '如果正在执行连续打印,则不能关闭窗体
  624.     If Bln_Printing Then
  625.         Cancel = 1
  626.     End If
  627.     '卸载条件窗体
  628.     ZF_Gys_Frmslmxztj.UnloadCheck.Value = 1
  629.     Unload ZF_Gys_Frmslmxztj
  630.     '卸载打印页面设置窗体
  631.     Unload Dyymctbl
  632. End Sub
  633. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整
  634.     Select Case Button.Key
  635.     Case "bcgs"                                          '保存表格格式
  636.         Call Bcwggs(CxbbGrid, GridCode, GridStr)
  637.     Case "hfmrgs"                                        '恢复默认格式
  638.         Call Hfmrgs(CxbbGrid, GridCode, GridStr)
  639.     Case "szxsxm"                                        '设置显示项目
  640.         Call Szxsxm(CxbbGrid, GridCode)
  641.     End Select
  642. End Sub
  643. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  644.     '如果用户正在连续打印帐页,则不能执行其他功能
  645.     If Bln_Printing Then
  646.         Exit Sub
  647.     End If
  648.     Select Case Button.Key
  649.     Case "ymsz"                                          '页面设置
  650.         Dyymctbl.Show 1
  651.     Case "yl"                                            '预 览
  652.         Call bbyl(True)
  653.     Case "dy"                                            '打 印
  654.         Call bbyl(False)
  655.     Case "lxdy"                                          '连续打印
  656.         Call Sub_Lxdy
  657.     Case "cx"                                            '查 询
  658.         ZF_Gys_Frmslmxztj.Show 1
  659.     Case "pz"                                            '凭 证
  660.         Call CxbbGrid_DblClick
  661.     Case "bz"                                            '帮 助
  662.         Call F1bz
  663.     Case "fh"                                            '退 出
  664.         Unload Me
  665.     End Select
  666. End Sub
  667. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  668.     Timer1.Enabled = False
  669.     '查询供应商
  670.     Call FillImageCombo(Imgebo_FzCode, "Cwzz_supplier", 0)
  671.     For Jsqte = 1 To Imgebo_FzCode.ComboItems.count
  672.         If Imgebo_FzCode.ComboItems.Item(Jsqte).Key = "@" + Trim(ZF_Gys_Frmslmxztj.LrText(0).Tag) Then
  673.             Imgebo_FzCode.ComboItems.Item(Jsqte).Selected = True
  674.             Imgebo_FzCode.Refresh
  675.             Exit For
  676.         End If
  677.     Next Jsqte
  678.     Call Imgebo_FzCode_Click
  679. End Sub
  680. Private Sub Imgebo_FzCode_Click()
  681.     Timer1.Enabled = False
  682.     Xt_Wait.Show
  683.     Xt_Wait.Refresh
  684.     CxbbGrid.Redraw = False '加快显示速度
  685.     Call Sub_Query '生成查询结果
  686.     CxbbGrid.Redraw = True
  687.     Xt_Wait.Hide
  688. End Sub
  689. Private Sub Sub_Query()                                    '生成查询结果
  690.     Dim RecTemp As New ADODB.Recordset          '临时使用动态集
  691.     Dim Sqlstr As String                        '查询字符串
  692.     Dim Coljsq As Long                          '网格列计数器
  693.     Dim Jsqte As Long                           '临时动态计数器
  694.     Dim Str_Ccode As String                     '查询会计科目
  695.     Dim Str_FzCode As String                    '查询辅助供应商编码
  696.     Dim Int_BPeriod As Integer                  '查询起始会计期间
  697.     Dim Int_EPeriod As Integer                  '查询终止会计期间
  698.     Dim Int_Year As Integer                     '查询会计年度
  699.     Dim Bln_IncluNotBook As Boolean             '是否包含未记帐凭证
  700.     Dim Bln_QcZeroShow As Boolean               '查询会计期间期初数据如果为零是否显示
  701.     Dim Bln_CqGcShow As Boolean                 '是否显示承前过次
  702.     Dim Int_Zdzyhs As Integer                   '正式帐页指定报表行数
  703.     Dim Bln_EndFlag As Boolean                  '判断当前科目是否为末级科目
  704.     Dim Int_DqPeriod As Integer                 '查询进行当前会计期间
  705.     Dim Bln_NotFirst As Boolean                 '是否为首次循环
  706.     Dim Bln_ForeignFlag As Boolean              '判断此科目是否外币核算
  707.     
  708.     Dim Dbl_Qcyete#, Dbl_Qcslte#, Dbl_Qcwbte#   '期初金额,数量,外币
  709.     Dim Dbl_Jejfhj#, Dbl_Jedfhj#, Dbl_Sljfhj#, Dbl_Sldfhj#, Dbl_Wbjfhj#, Dbl_Wbdfhj# '本期合计(金额,数量,外币)
  710.     Dim Dbl_Jejflj#, Dbl_Jedflj#, Dbl_Sljflj#, Dbl_Sldflj#, Dbl_Wbjflj#, Dbl_Wbdflj# '截止累计(金额,数量,外币)
  711.     Dim Dbl_Qmyete#, Dbl_Qmslte#, Dbl_Qmwbte#   '期末金额,数量,外币
  712.     '以下为用户自定义部分[
  713.     
  714.     '清除原查询数据
  715.     CxbbGrid.Rows = CxbbGrid.FixedRows
  716.     
  717.     With ZF_Gys_Frmslmxztj
  718.         '得到当前查询科目,并判断是否为末级科目
  719.         Lab_Ccode.Caption = .Imgebo_FzCcode.Text
  720.         Str_Ccode = GetComboKey(.Imgebo_FzCcode, 0)
  721.         Sqlstr = "SELECT EndFlag,AccFormat,ForeignFlag,ForeignCurrName,ConVertFlag From Cwzz_AccCode Left JOIN Gy_ForeignCurrency ON" & _
  722.         " Cwzz_AccCode.ForeignCurrCode = Gy_ForeignCurrency.ForeignCurrCode Where Ccode='" & Str_Ccode & "'"
  723.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  724.         If Not RecTemp.EOF Then
  725.             Bln_EndFlag = RecTemp.Fields("EndFlag")
  726.             Combo_AccFormat.Text = Trim(RecTemp.Fields("AccFormat") & "")
  727.             If RecTemp.Fields("ForeignFlag") Then
  728.                 Bln_ForeignFlag = True
  729.                 Lab_TitleMess(2).Visible = True
  730.                 Lab_TitleText(1).Caption = Trim(RecTemp.Fields("ForeignCurrName") & "")
  731.                 Bln_ConVertFlag = IIf(IsNull(RecTemp.Fields("ConVertFlag")), False, RecTemp.Fields("ConVertFlag"))
  732.             Else
  733.                 Bln_ForeignFlag = False
  734.                 Lab_TitleMess(2).Visible = False
  735.                 Lab_TitleText(1).Caption = ""
  736.             End If
  737.         End If
  738.         
  739.         '外币汇率小数位数(将来可变)
  740.         Int_Wbhlxsws = 4
  741.         
  742.         '得到查询辅助供应商编码
  743.         Str_FzCode = GetComboKey(Imgebo_FzCode, 0)
  744.         
  745.         '得到查询起始和截止会计期间,并判断是否包含未记帐凭证
  746.         Int_Year = Int(Mid(.Combo_Kjqj(0).Text, 1, 4))
  747.         Int_BPeriod = Int(Mid(.Combo_Kjqj(0).Text, 6, 2))
  748.         Int_EPeriod = Int(Mid(.Combo_Kjqj(1).Text, 6, 2))
  749.         Lab_TitleText(0).Caption = .Combo_Kjqj(0).Text & "--" & .Combo_Kjqj(1).Text
  750.         
  751.         '是否包含未记帐凭证
  752.         If .Chk_NotBook.Value = 1 Then
  753.             Bln_IncluNotBook = True
  754.         Else
  755.             Bln_IncluNotBook = False
  756.         End If
  757.         
  758.         '查询会计期间期初数据如果为零是否显示
  759.         If .Chk_QcZeroShow = 1 Then
  760.             Bln_QcZeroShow = True
  761.         Else
  762.             Bln_QcZeroShow = False
  763.         End If
  764.         
  765.     End With
  766.     
  767.     '初始化各种值
  768.     Dbl_Qcyete = 0
  769.     Dbl_Qcslte = 0
  770.     Dbl_Qcwbte = 0
  771.     
  772.     Dbl_Jejfhj = 0
  773.     Dbl_Jedfhj = 0
  774.     Dbl_Sljfhj = 0
  775.     Dbl_Sldfhj = 0
  776.     Dbl_Wbjfhj = 0
  777.     Dbl_Wbdfhj = 0
  778.     
  779.     Dbl_Jejflj = 0
  780.     Dbl_Jedflj = 0
  781.     Dbl_Sljflj = 0
  782.     Dbl_Sldflj = 0
  783.     Dbl_Wbjflj = 0
  784.     Dbl_Wbdflj = 0
  785.     
  786.     Jsqte = CxbbGrid.FixedRows - 1
  787.     
  788.     '1.计算期初余额(金额,数量,外币),并计算截止查询起始会计期间累计数据
  789.     Sqlstr = "SELECT Qcyehj=Isnull(Sum(Qcye),0),Qcslhj=Isnull(Sum(Qcsl),0),Qcwbhj=Isnull(Sum(Qcwb),0), " & _
  790.     " Byjfljjehj=Isnull(Sum(Byjfljje-Mjje),0),Bydfljjehj=Isnull(Sum(Bydfljje-Mdje),0),Byjfljslhj=Isnull(Sum(Byjfljsl-Mjsl),0)," & _
  791.     " Bydfljslhj=Isnull(Sum(Bydfljsl-Mdsl),0),Byjfljwbhj=Isnull(Sum(Byjfljwb-Mjwb),0),Bydfljwbhj=Isnull(Sum(Bydfljwb-Mdwb),0) " & _
  792.     " From Cwzz_AccSumassi Where Ccode like '" & Str_Ccode & "%' And SupplierCode='" & Str_FzCode & "' And Year=" & Int_Year & _
  793.     " And Period=" & Int_BPeriod
  794.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  795.     If Not RecTemp.EOF Then
  796.         Dbl_Qcyete = RecTemp.Fields("Qcyehj")
  797.         Dbl_Qcslte = RecTemp.Fields("Qcslhj")
  798.         Dbl_Qcwbte = RecTemp.Fields("Qcwbhj")
  799.         
  800.         '截止累计数据需要减掉本会计期间相应记帐数据
  801.         Dbl_Jejflj = RecTemp.Fields("Byjfljjehj")
  802.         Dbl_Jedflj = RecTemp.Fields("Bydfljjehj")
  803.         Dbl_Sljflj = RecTemp.Fields("Byjfljslhj")
  804.         Dbl_Sldflj = RecTemp.Fields("Bydfljslhj")
  805.         Dbl_Wbjflj = RecTemp.Fields("Byjfljwbhj")
  806.         Dbl_Wbdflj = RecTemp.Fields("Bydfljwbhj")
  807.     End If
  808.     
  809.     '如果包含未记帐凭证则计算小于查询起始会计期间包含科目借贷方合计
  810.     If Bln_IncluNotBook Then
  811.         Sqlstr = "SELECT Jfjehj=Isnull(Sum(Jfje),0),Dfjehj=Isnull(Sum(Dfje),0),Jfslhj=Isnull(Sum(Jfsl),0),Dfslhj=Isnull(Sum(Dfsl),0) " & _
  812.         ",Wbjfjehj=Isnull(Sum(Wbjfje),0),Wbdfjehj=Isnull(Sum(Wbdfje),0) From Cwzz_V_AccVouch Where BookFlag=0 And Ccode like '" & Str_Ccode & "%' And SupplierCode='" & Str_FzCode & "' And Year=" & Int_Year & _
  813.         " And Period<" & Int_BPeriod
  814.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  815.         If Not RecTemp.EOF Then
  816.             Dbl_Qcyete = Dbl_Qcyete + RecTemp.Fields("Jfjehj") - RecTemp.Fields("Dfjehj")
  817.             Dbl_Qcslte = Dbl_Qcslte + RecTemp.Fields("Jfslhj") - RecTemp.Fields("Dfslhj")
  818.             Dbl_Qcwbte = Dbl_Qcwbte + RecTemp.Fields("Wbjfjehj") - RecTemp.Fields("Wbdfjehj")
  819.             
  820.             '计算相应截止查询起始会计期间累计数据
  821.             Dbl_Jejflj = Dbl_Jejflj + RecTemp.Fields("Jfjehj")
  822.             Dbl_Jedflj = Dbl_Jedflj + RecTemp.Fields("Dfjehj")
  823.             Dbl_Sljflj = Dbl_Sljflj + RecTemp.Fields("Jfslhj")
  824.             Dbl_Sldflj = Dbl_Sldflj + RecTemp.Fields("Dfslhj")
  825.             Dbl_Wbjflj = Dbl_Wbjflj + RecTemp.Fields("Wbjfjehj")
  826.             Dbl_Wbdflj = Dbl_Wbdflj + RecTemp.Fields("Wbdfjehj")
  827.         End If
  828.     End If
  829.     
  830.     If (Dbl_Qcyete <> 0 Or (Bln_EndFlag And (Dbl_Qcslte <> 0 Or dnl_qcwbte <> 0))) Or Bln_QcZeroShow Then    '如果期初数据为零,且用户选择不输出则不显示此行数据
  831.         CxbbGrid.AddItem ""
  832.         Jsqte = Jsqte + 1
  833.         
  834.         '将期初数据写入网格(第1会计期间为上年结转,其余会计期间为期初余额)
  835.         If Int_BPeriod = 1 Then
  836.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "上年结转"
  837.         Else
  838.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "期初余额"
  839.         End If
  840.         
  841.         '输出余额
  842.         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  843.     End If
  844.     
  845.     
  846.     '2.读取查询会计期间范围内所有符合条件明细帐数据(以年度+会计期间),并写入网格
  847.     
  848.     Bln_NotFirst = False
  849.     
  850.     '筛选所有符合条件数据
  851.     Sqlstr = "SELECT *" & _
  852.     " From Cwzz_V_AccVouchAss Where Ccode like '" & Str_Ccode & "%' And SupplierCode='" & Str_FzCode & "' And Year=" & Int_Year & _
  853.     " And Period>=" & Int_BPeriod & " And Period<=" & Int_EPeriod
  854.     If Not Bln_IncluNotBook Then
  855.         Sqlstr = Sqlstr & " And BookFlag=1"
  856.     End If
  857.     Sqlstr = Sqlstr & " Order By Year,Period,Ddate,VouchID,SerialID"
  858.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  859.     With RecTemp
  860.         Do While Not .EOF
  861.             If Bln_NotFirst Then
  862.                 '当前进行会计期间发生变化则添加本月合计及本年累计
  863.                 If .Fields("Period") <> Int_DqPeriod Then
  864.                     '显示本月合计
  865.                     If Dbl_Jejfhj <> 0 Or Dbl_Jedfhj <> 0 Or (Bln_EndFlag And (Dbl_Sljfhj <> 0 Or Dbl_Sldfhj <> 0 Or Dbl_Wbjfhj <> 0 Or Dbl_Wbdfhj <> 0)) Then
  866.                         CxbbGrid.AddItem ""
  867.                         Jsqte = Jsqte + 1
  868.                         '输出本月合计
  869.                         Call Sub_OutPeriodSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejfhj, Dbl_Jedfhj, Dbl_Sljfhj, Dbl_Sldfhj, Dbl_Wbjfhj, Dbl_Wbdfhj)
  870.                         '输出余额
  871.                         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  872.                     End If
  873.                     '重新初始化本月合计数据
  874.                     Dbl_Jejfhj = 0
  875.                     Dbl_Jedfhj = 0
  876.                     Dbl_Sljfhj = 0
  877.                     Dbl_Sldfhj = 0
  878.                     Dbl_Wbjfhj = 0
  879.                     Dbl_Wbdfhj = 0
  880.                     '显示本年累计
  881.                     If Dbl_Jejflj <> 0 Or Dbl_Jedflj <> 0 Or (Bln_EndFlag And (Dbl_Sljflj <> 0 Or Dbl_Sldflj <> 0 Or Dbl_Wbjflj <> 0 Or Dbl_Wbdflj <> 0)) Then
  882.                         CxbbGrid.AddItem ""
  883.                         Jsqte = Jsqte + 1
  884.                         '输出本年累计
  885.                         Call Sub_OutYearSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejflj, Dbl_Jedflj, Dbl_Sljflj, Dbl_Sldflj, Dbl_Wbjflj, Dbl_Wbdflj)
  886.                         '输出余额
  887.                         Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  888.                     End If
  889.                 End If        '显示本月合计,本年累计完毕
  890.             End If
  891.             Bln_NotFirst = True
  892.             '显示明细数据
  893.             CxbbGrid.AddItem ""
  894.             Jsqte = Jsqte + 1
  895.             '未记帐明细分录变色显示
  896.             If .Fields("BookFlag") = 0 Then
  897.                 CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(0).BackColor
  898.             End If
  899.             '修改当前会计期间
  900.             Int_DqPeriod = .Fields("Period")
  901.             CxbbGrid.TextMatrix(Jsqte, 0) = .Fields("VouchId")              '凭证ID
  902.             If IsDate(.Fields("Ddate")) Then
  903.                 CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = .Fields("Ddate")                    '日期
  904.             End If
  905.             CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("VouchClassCode") & "") + "-" + Mid(Trim(Str(10000 + .Fields("VouchNo"))), 2, 4) '凭证字号
  906.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("Digest") & "")           '摘要
  907.             '个人
  908.             If Trim(.Fields("PersonName") & "") <> "" Then
  909.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("PersonName") & "")
  910.             End If
  911.             '客户
  912.             If Trim(.Fields("CusName") & "") <> "" Then
  913.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("CusName") & "")
  914.             End If
  915.             '项目
  916.             If Trim(.Fields("ItemName") & "") <> "" Then
  917.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) + " " + Trim(.Fields("ItemName") & "")
  918.             End If
  919.             If .Fields("Jfje") <> 0 Then                                                                       '借方金额
  920.                 CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = .Fields("Jfje")
  921.                 CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = .Fields("Jfje")
  922.             End If
  923.             If .Fields("Dfje") <> 0 Then                                                                       '贷方金额
  924.                 CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = .Fields("Dfje")
  925.                 CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = .Fields("Dfje")
  926.             End If
  927.             '只有末级科目才显示数量和外币,数量不为零则计算单价
  928.             If Bln_EndFlag Then
  929.                 If .Fields("Jfsl") <> 0 Then                                                                    '借方数量
  930.                     CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = .Fields("Jfsl")
  931.                     If .Fields("Jfje") <> 0 Then
  932.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Jfje") / .Fields("Jfsl"), "##." + String(Xtdjxsws, "0"))
  933.                     Else
  934.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Dfje") / .Fields("Jfsl"), "##." + String(Xtdjxsws, "0"))
  935.                     End If
  936.                 End If
  937.                 If .Fields("Dfsl") <> 0 Then                                                                    '贷方数量
  938.                     CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = .Fields("Dfsl")
  939.                     If .Fields("Jfje") <> 0 Then
  940.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Jfje") / .Fields("Dfsl"), "##." + String(Xtdjxsws, "0"))
  941.                     Else
  942.                         CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Format(.Fields("Dfje") / .Fields("Dfsl"), "##." + String(Xtdjxsws, "0"))
  943.                     End If
  944.                 End If
  945.             End If
  946.             If Bln_EndFlag And Bln_ForeignFlag Then
  947.                 If .Fields("Wbjfje") <> 0 Then                                                                  '借方外币
  948.                     CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = .Fields("Wbjfje")
  949.                 End If
  950.                 If .Fields("Wbdfje") <> 0 Then                                                                  '贷方外币
  951.                     CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = .Fields("Wbdfje")
  952.                 End If
  953.                 If .Fields("AccRate") <> 0 Then                                                                 '记帐汇率
  954.                     CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Format(.Fields("AccRate"), "##." + String(Int_Wbhlxsws, "0"))
  955.                 End If
  956.             End If
  957.             '累加本月合计,本年累计数据
  958.             Dbl_Jejfhj = Dbl_Jejfhj + .Fields("Jfje")
  959.             Dbl_Jedfhj = Dbl_Jedfhj + .Fields("Dfje")
  960.             Dbl_Sljfhj = Dbl_Sljfhj + .Fields("Jfsl")
  961.             Dbl_Sldfhj = Dbl_Sldfhj + .Fields("Dfsl")
  962.             Dbl_Wbjfhj = Dbl_Wbjfhj + .Fields("Wbjfje")
  963.             Dbl_Wbdfhj = Dbl_Wbdfhj + .Fields("Wbdfje")
  964.             
  965.             Dbl_Jejflj = Dbl_Jejflj + .Fields("Jfje")
  966.             Dbl_Jedflj = Dbl_Jedflj + .Fields("Dfje")
  967.             Dbl_Sljflj = Dbl_Sljflj + .Fields("Jfsl")
  968.             Dbl_Sldflj = Dbl_Sldflj + .Fields("Dfsl")
  969.             Dbl_Wbjflj = Dbl_Wbjflj + .Fields("Wbjfje")
  970.             Dbl_Wbdflj = Dbl_Wbdflj + .Fields("Wbdfje")
  971.             '3.计算余额
  972.             Dbl_Qcyete = Dbl_Qcyete + .Fields("Jfje") - .Fields("Dfje")
  973.             Dbl_Qcslte = Dbl_Qcslte + .Fields("Jfsl") - .Fields("Dfsl")
  974.             Dbl_Qcwbte = Dbl_Qcwbte + .Fields("Wbjfje") - .Fields("Wbdfje")
  975.             '输出余额
  976.             Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  977.             .MoveNext
  978.         Loop
  979.         '添加本月合计及本年累计
  980.         If Bln_NotFirst Then
  981.             If Dbl_Jejfhj <> 0 Or Dbl_Jedfhj <> 0 Or (Bln_EndFlag And (Dbl_Sljfhj <> 0 Or Dbl_Sldfhj <> 0 Or Dbl_Wbjfhj <> 0 Or Dbl_Wbdfhj <> 0)) Then
  982.                 CxbbGrid.AddItem ""
  983.                 Jsqte = Jsqte + 1
  984.                 '输出本月合计
  985.                 Call Sub_OutPeriodSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejfhj, Dbl_Jedfhj, Dbl_Sljfhj, Dbl_Sldfhj, Dbl_Wbjfhj, Dbl_Wbdfhj)
  986.                 '输出余额
  987.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  988.             End If
  989.             '显示本年累计
  990.             If Dbl_Jejflj <> 0 Or Dbl_Jedflj <> 0 Or (Bln_EndFlag And (Dbl_Sljflj <> 0 Or Dbl_Sldflj <> 0 Or Dbl_Wbjflj <> 0 Or Dbl_Wbdflj <> 0)) Then
  991.                 CxbbGrid.AddItem ""
  992.                 Jsqte = Jsqte + 1
  993.                 '输出本年累计
  994.                 Call Sub_OutYearSum(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Int_DqPeriod, Dbl_Jejflj, Dbl_Jedflj, Dbl_Sljflj, Dbl_Sldflj, Dbl_Wbjflj, Dbl_Wbdflj)
  995.                 '输出余额
  996.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  997.             End If
  998.             '如果会计期间为第12会计期间则输出结转下年
  999.             If Int_DqPeriod = 12 Then
  1000.                 CxbbGrid.AddItem ""
  1001.                 Jsqte = Jsqte + 1
  1002.                 CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "结转下年"
  1003.                 '输出余额
  1004.                 Call Sub_OutBalance(Jsqte, Bln_EndFlag, Bln_ForeignFlag, Dbl_Qcyete, Dbl_Qcslte, Dbl_Qcwbte)
  1005.             End If
  1006.         End If
  1007.     End With
  1008.     '重置网格行高
  1009.     For Jsqte = CxbbGrid.FixedRows To CxbbGrid.Rows - 1
  1010.         CxbbGrid.RowHeight(Jsqte) = Sjhgd
  1011.     Next Jsqte
  1012. End Sub
  1013. Private Sub Combo_AccFormat_Click()                    '用户选择不同帐页格式
  1014.     Dim Int_Coljsq As Integer         '网格列临时计数器
  1015.     '为了加快显示速度
  1016.     CxbbGrid.Redraw = False
  1017.     For Int_Coljsq = Qslz To CxbbGrid.Cols - 1
  1018.         CxbbGrid.ColHidden(Int_Coljsq) = True
  1019.     Next Int_Coljsq
  1020.     Select Case Combo_AccFormat
  1021.     Case "金额式"
  1022.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1023.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1024.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1025.         CxbbGrid.ColHidden(Sydz("006", GridStr(), Szzls)) = False      '借方.借方
  1026.         CxbbGrid.ColHidden(Sydz("010", GridStr(), Szzls)) = False      '贷方.贷方
  1027.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1028.         CxbbGrid.ColHidden(Sydz("020", GridStr(), Szzls)) = False      '余额.余额
  1029.     Case "外币金额式"
  1030.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1031.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1032.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1033.         CxbbGrid.ColHidden(Sydz("005", GridStr(), Szzls)) = False      '汇率
  1034.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '借方.外币
  1035.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1036.         CxbbGrid.ColHidden(Sydz("012", GridStr(), Szzls)) = False      '贷方.外币
  1037.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1038.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1039.         CxbbGrid.ColHidden(Sydz("017", GridStr(), Szzls)) = False      '余额.外币
  1040.         CxbbGrid.ColHidden(Sydz("018", GridStr(), Szzls)) = False      '余额.汇率
  1041.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1042.     Case "数量金额式"
  1043.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1044.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1045.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1046.         CxbbGrid.ColHidden(Sydz("004", GridStr(), Szzls)) = False      '单价
  1047.         CxbbGrid.ColHidden(Sydz("007", GridStr(), Szzls)) = False      '借方.数量
  1048.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1049.         CxbbGrid.ColHidden(Sydz("011", GridStr(), Szzls)) = False      '贷方.数量
  1050.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1051.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1052.         CxbbGrid.ColHidden(Sydz("015", GridStr(), Szzls)) = False      '余额.数量
  1053.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '余额.单价
  1054.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1055.     Case "数量外币式"
  1056.         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False      '日期
  1057.         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False      '凭证字号
  1058.         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False      '摘要
  1059.         CxbbGrid.ColHidden(Sydz("004", GridStr(), Szzls)) = False      '单价
  1060.         CxbbGrid.ColHidden(Sydz("005", GridStr(), Szzls)) = False      '汇率
  1061.         CxbbGrid.ColHidden(Sydz("007", GridStr(), Szzls)) = False      '借方.数量
  1062.         CxbbGrid.ColHidden(Sydz("008", GridStr(), Szzls)) = False      '借方.外币
  1063.         CxbbGrid.ColHidden(Sydz("009", GridStr(), Szzls)) = False      '借方.金额
  1064.         CxbbGrid.ColHidden(Sydz("011", GridStr(), Szzls)) = False      '贷方.数量
  1065.         CxbbGrid.ColHidden(Sydz("012", GridStr(), Szzls)) = False      '贷方.外币
  1066.         CxbbGrid.ColHidden(Sydz("013", GridStr(), Szzls)) = False      '贷方.金额
  1067.         CxbbGrid.ColHidden(Sydz("014", GridStr(), Szzls)) = False      '方向.方向
  1068.         CxbbGrid.ColHidden(Sydz("015", GridStr(), Szzls)) = False      '余额.数量
  1069.         CxbbGrid.ColHidden(Sydz("016", GridStr(), Szzls)) = False      '余额.单价
  1070.         CxbbGrid.ColHidden(Sydz("017", GridStr(), Szzls)) = False      '余额.外币
  1071.         CxbbGrid.ColHidden(Sydz("018", GridStr(), Szzls)) = False      '余额.汇率
  1072.         CxbbGrid.ColHidden(Sydz("019", GridStr(), Szzls)) = False      '余额.金额
  1073.     End Select
  1074.     CxbbGrid.Redraw = True
  1075. End Sub
  1076. Private Sub Sub_OutBalance(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Dbl_Qcyete#, Dbl_Qcslte#, Dbl_Qcwbte#)          '输出余额
  1077.     If Dbl_Qcyete = 0 Then
  1078.         CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "平"          '期初方向
  1079.         If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1080.             CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Dbl_Qcslte
  1081.         End If
  1082.         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1083.             CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = Dbl_Qcwbte
  1084.         End If
  1085.     Else
  1086.         If Dbl_Qcyete > 0 Then
  1087.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "借"
  1088.             CxbbGrid.TextMatrix(Jsqte, Sydz("019", GridStr(), Szzls)) = Dbl_Qcyete
  1089.             CxbbGrid.TextMatrix(Jsqte, Sydz("020", GridStr(), Szzls)) = Dbl_Qcyete
  1090.             If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1091.                 CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Dbl_Qcslte
  1092.             End If
  1093.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1094.                 CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = Dbl_Qcwbte
  1095.             End If
  1096.         Else
  1097.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = "贷"
  1098.             CxbbGrid.TextMatrix(Jsqte, Sydz("019", GridStr(), Szzls)) = -Dbl_Qcyete
  1099.             CxbbGrid.TextMatrix(Jsqte, Sydz("020", GridStr(), Szzls)) = -Dbl_Qcyete
  1100.             If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1101.                 CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = -Dbl_Qcslte
  1102.             End If
  1103.             If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1104.                 CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = -Dbl_Qcwbte
  1105.             End If
  1106.         End If
  1107.         
  1108.         '输出单价
  1109.         If Bln_EndFlag And Dbl_Qcslte <> 0 Then
  1110.             CxbbGrid.TextMatrix(Jsqte, Sydz("016", GridStr(), Szzls)) = Format(Dbl_Qcyete / Dbl_Qcslte, "##." + String(Xtdjxsws, "0"))
  1111.         End If
  1112.         '输出外币汇率
  1113.         If Bln_EndFlag And Bln_ForeignFlag And Dbl_Qcwbte <> 0 Then
  1114.             If Bln_ConVertFlag Then      '(外币/汇率=本位币)
  1115.                 CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = Format(Dbl_Qcwbte / Dbl_Qcyete, "##." + String(Int_Wbhlxsws, "0"))
  1116.             Else
  1117.                 CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = Format(Dbl_Qcyete / Dbl_Qcwbte, "##." + String(Int_Wbhlxsws, "0"))
  1118.             End If
  1119.         End If
  1120.     End If
  1121. End Sub
  1122. Private Sub Sub_OutPeriodSum(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Int_DqPeriod%, Dbl_Jejfhj#, Dbl_Jedfhj#, Dbl_Sljfhj#, Dbl_Sldfhj#, Dbl_Wbjfhj#, Dbl_Wbdfhj#)  '输出本月合计
  1123.     CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Mid(Trim(Str(100 + Int_DqPeriod)), 2, 2)
  1124.     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "本月合计"
  1125.     If Dbl_Jejfhj <> 0 Then                                                        '本月借方金额合计
  1126.         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Jejfhj
  1127.         CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejfhj
  1128.     End If
  1129.     If Dbl_Jedfhj <> 0 Then                                                        '本月贷方金额合计
  1130.         CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedfhj
  1131.         CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jedfhj
  1132.     End If
  1133.     
  1134.     '只有末级科目才显示数量和外币
  1135.     If Bln_EndFlag Then
  1136.         If Dbl_Sljfhj <> 0 Then                                                     '本月借方数量合计
  1137.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Sljfhj
  1138.         End If
  1139.         If Dbl_Sldfhj <> 0 Then                                                     '本月贷方数量合计
  1140.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sldfhj
  1141.         End If
  1142.     End If
  1143.     If Bln_EndFlag And Bln_ForeignFlag Then
  1144.         If Dbl_Wbjfhj <> 0 Then                                                     '本月借方外币合计
  1145.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Wbjfhj
  1146.         End If
  1147.         If Dbl_Wbdfhj <> 0 Then                                                     '本月贷方外币合计
  1148.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbdfhj
  1149.         End If
  1150.     End If
  1151. End Sub
  1152. Private Sub Sub_OutYearSum(Jsqte As Long, Bln_EndFlag As Boolean, Bln_ForeignFlag As Boolean, Int_DqPeriod%, Dbl_Jejflj#, Dbl_Jedflj#, Dbl_Sljflj#, Dbl_Sldflj#, Dbl_Wbjflj#, Dbl_Wbdflj#)  '输出本年累计
  1153.     CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Mid(Trim(Str(100 + Int_DqPeriod)), 2, 2)
  1154.     CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = "本年累计"
  1155.     If Dbl_Jejflj <> 0 Then                                                        '本年借方金额累计
  1156.         CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Dbl_Jejflj
  1157.         CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Dbl_Jejflj
  1158.     End If
  1159.     If Dbl_Jedflj <> 0 Then                                                        '本年贷方金额累计
  1160.         CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Dbl_Jedflj
  1161.         CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Dbl_Jedflj
  1162.     End If
  1163.     
  1164.     '只有末级科目才显示数量和外币
  1165.     If Bln_EndFlag Then
  1166.         If Dbl_Sljflj <> 0 Then                                                     '本年借方数量累计
  1167.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Dbl_Sljflj
  1168.         End If
  1169.         If Dbl_Sldflj <> 0 Then                                                     '本年贷方数量累计
  1170.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Dbl_Sldflj
  1171.         End If
  1172.     End If
  1173.     If Bln_EndFlag And Bln_ForeignFlag Then
  1174.         If Dbl_Wbjflj <> 0 Then                                                     '本年借方外币累计
  1175.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Dbl_Wbjflj
  1176.         End If
  1177.         If Dbl_Wbdflj <> 0 Then                                                     '本年贷方外币累计
  1178.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Dbl_Wbdflj
  1179.         End If
  1180.     End If
  1181. End Sub
  1182. Private Sub CxbbGrid_DblClick()          '用户双击网格调入相应凭证
  1183.     Dim RecTemp As New ADODB.Recordset
  1184.     With CxbbGrid
  1185.         '非数据行退出
  1186.         If CxbbGrid.Row < CxbbGrid.FixedRows Then
  1187.             Exit Sub
  1188.         End If
  1189.         If Trim(.TextMatrix(.Row, 0)) = "" Then
  1190.             Exit Sub
  1191.         End If
  1192.     End With
  1193.     Sqlstr = "SELECT VouchID From Cwzz_AccVouchMain" & _
  1194.     " Where VouchID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1195.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1196.     With RecTemp
  1197.         If .EOF Then
  1198.             Tsxx = "此凭证已被其他用户删除!"
  1199.             Call Xtxxts(Tsxx, 0, 4)
  1200.             Exit Sub
  1201.         Else
  1202.             With PZ_JzpzclFrm
  1203.                 '填充查询凭证标识
  1204.                 .Lab_VouchId = Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1205.                 
  1206.                 '设置凭证处理为列表查询状态
  1207.                 .Lab_Pzclzt.Caption = "4"
  1208.                 .Show 1
  1209.             End With
  1210.         End If
  1211.     End With
  1212. End Sub
  1213. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1214.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1215.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1216.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1217.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1218.     ReDim Bbxbt(1 To Bbxbtgs)
  1219.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1220.     If Bbbwhgs <> 0 Then
  1221.         ReDim Bbbwh(1 To Bbbwhgs)
  1222.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1223.     End If
  1224.     Bbzbt = ReportTitle
  1225.     'Bbxbt(1) = Space(2) + "科目名称:" + Me.Lab_Ccode.Caption
  1226.     Bbxbt(1) = "会计期间:" + Lab_TitleText(0) + Space(5) + "科目名称:" + Me.Lab_Ccode.Caption + Space(5) + "供应商:" + Me.Imgebo_FzCode.Text
  1227.     bbxbtzzxs(1) = 1                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1228.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1229.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1230.     If Not bbylte Then
  1231.         Unload DY_Tybbyldy
  1232.     End If
  1233. End Sub
  1234. Private Sub Sub_Lxdy()                                 '帐页连续打印(帐页每批尽量少选)
  1235.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1236.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1237.     Dim Jsqte As Long
  1238.     Dim Lng_CurrentIndex As Long
  1239.     Dim YAnswer As Integer
  1240.     
  1241.     '用户确认是否开始连续打印帐页
  1242.     Tsxx = "请确认是否开始连续打印帐页?"
  1243.     YAnswer = Xtxxts(Tsxx, 2, 2)
  1244.     If YAnswer <> 1 Then
  1245.         Exit Sub
  1246.     End If
  1247.     
  1248.     '初始化连续打印状态
  1249.     Cmd_CancelPrint.Visible = True
  1250.     Cmd_CancelPrint.SetFocus
  1251.     Cmd_CancelPrint.Refresh
  1252.     Bln_CancelPrint = False
  1253.     Bln_Printing = True
  1254.     
  1255.     If Imgebo_FzCode.ComboItems.count = 0 Then GoTo Zero_Handle
  1256.     
  1257.     '循环输出打印作业
  1258.     For Jsqte = 1 To Imgebo_FzCode.ComboItems.count
  1259.         If Imgebo_FzCode.Text = Imgebo_FzCode.ComboItems.Item(Jsqte) Then
  1260.             Lng_CurrentIndex = Jsqte
  1261.         End If
  1262.     Next Jsqte
  1263.     For Jsqte = Lng_CurrentIndex To Imgebo_FzCode.ComboItems.count
  1264.         Imgebo_FzCode.Text = Imgebo_FzCode.ComboItems.Item(Jsqte)
  1265.         Imgebo_FzCode.ComboItems.Item(Jsqte).Selected = True
  1266.         Imgebo_FzCode.Refresh
  1267.         Call Imgebo_FzCode_Click
  1268.         Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1269.         Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1270.         ReDim Bbxbt(1 To Bbxbtgs)
  1271.         ReDim bbxbtzzxs(1 To Bbxbtgs)
  1272.         If Bbbwhgs <> 0 Then
  1273.             ReDim Bbbwh(1 To Bbbwhgs)
  1274.             ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1275.         End If
  1276.         Bbzbt = ReportTitle
  1277.         Bbxbt(1) = "会计期间:" + Lab_TitleText(0) + Space(5) + "科目名称:" + Me.Lab_Ccode.Caption + Space(5) + "供应商:" + Me.Imgebo_FzCode.Text
  1278.         bbxbtzzxs(1) = 1                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1279.         Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1280.         Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, False, True)
  1281.         Unload DY_Tybbyldy
  1282.         DoEvents
  1283.         If Bln_CancelPrint Then
  1284.             Bln_Printing = False
  1285.             Exit Sub
  1286.         End If
  1287.     Next Jsqte
  1288. Zero_Handle:
  1289.     
  1290.     Bln_Printing = False
  1291.     Cmd_CancelPrint.Visible = False
  1292. End Sub
  1293. Private Sub Cmd_CancelPrint_Click()                    '取消帐页连续打印
  1294.     Bln_CancelPrint = True
  1295.     Cmd_CancelPrint.Visible = False
  1296. End Sub