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

企业管理

开发平台:

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