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

企业管理

开发平台:

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   =   20801
  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           =   450
  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. '*    最后修改时间:2001/12/18
  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 = "Ar_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 = "Ar_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 = 'AR'  "
  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.         If Str_QueryCondi = "" Then
  797.             Str_QueryCondi = " where 1=2 "
  798.         End If
  799.     End If
  800.      
  801.     '计算年初余额
  802.     SqlStrTmp = "Select Sum(YbNcye) YbNcye,Sum(BbNcye) BbNcye From RP_AccSum " & Str_QueryCondi & " Group By KjYear,Period "
  803.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStrTmp)
  804.         If Not RecTemp.EOF Then
  805.             RecTemp.MoveFirst
  806.             YbNcye = Val(RecTemp!YbNcye)        '原币年初余额
  807.             BbNcye = Val(RecTemp!BbNcye)        '本币年初余额
  808.         End If
  809.     
  810.     Sqlstr = "SELECT * FROM Ar_v_AccMxList " & Str_QueryCondi & " and StartFlag=0 Order By BillDate,BillCode"
  811.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  812.     
  813.     With Rec_Query
  814.         CxbbGrid.Rows = CxbbGrid.FixedRows
  815.         jsqte = CxbbGrid.FixedRows
  816.         Do While Not .EOF
  817.             CxbbGrid.AddItem ""
  818.             
  819.             '如果为首记录则填充年初余额
  820.             If jsqte = CxbbGrid.FixedRows Then
  821.                 CxbbGrid.TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = "年初余额"          '摘要
  822.                 If TempForCur <> XtSCurrCode And BbNcye <> 0 Then
  823.                     CxbbGrid.TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = Abs(YbNcye)     '原币年初余额
  824.                 End If
  825.                 If BbNcye <> 0 Then
  826.                     If BbNcye < 0 Then                                                          '年初余额借贷方向
  827.                         CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "贷"
  828.                     Else
  829.                         CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "借"
  830.                     End If
  831.                 Else
  832.                     CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "平"
  833.                 End If
  834.                 
  835.                 If BbNcye <> 0 Then
  836.                     CxbbGrid.TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = Abs(BbNcye)     '本币年初余额
  837.                 End If
  838.                 
  839.                 '设置年初余额的颜色
  840.                 CxbbGrid.Cell(flexcpBackColor, jsqte, 0, , CxbbGrid.Cols - 1) = "&H00C0E0FF"
  841.                 
  842.                 CxbbGrid.AddItem ""
  843.                 jsqte = CxbbGrid.FixedRows + 1
  844.             End If
  845.             
  846.             '[>>自定义填充内容
  847.             CxbbGrid.TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("BillDate") & "")       '单据日期
  848.             CxbbGrid.TextMatrix(jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("BillItemName") & "")   '单据类型
  849.             If Trim(.Fields("BillCode") & "") <> "0" Then
  850.                 CxbbGrid.TextMatrix(jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("BillCode") & "")   '单据编号
  851.             End If
  852.             If Trim((.Fields!VouchClassCode) & "") <> "" And Trim((.Fields!VouchNo) & "") <> "" Then
  853.                 CxbbGrid.TextMatrix(jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("VouchClassCode") & "") & "-" & Trim(.Fields("VouchNo") & "")  '凭证号
  854.             End If
  855.             CxbbGrid.TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("Digest") & "")         '摘要
  856.             
  857.             If Val(.Fields!BbYsje) <> 0 Then
  858.                 CxbbGrid.TextMatrix(jsqte, Sydz("007", GridStr(), Szzls)) = Val(.Fields("BbYsje"))           '本币应收金额
  859.             End If
  860.             
  861.             If Val(.Fields!BbSsje) <> 0 Then
  862.                 CxbbGrid.TextMatrix(jsqte, Sydz("009", GridStr(), Szzls)) = Val(.Fields("BbSsje"))           '本币实收金额
  863.             End If
  864.             
  865.             '统计期末余额
  866.             BbNcye = BbNcye + Val(.Fields("BbYsje")) - Val(.Fields("BbSsje"))   '本币期末余额
  867.             YbNcye = YbNcye + Val(.Fields("YbYsje")) - Val(.Fields("YbSsje"))   '原币期末余额
  868.             
  869.             If BbNcye <> 0 Then
  870.                 If BbNcye < 0 Then
  871.                     CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "贷"                         '借贷方向
  872.                 Else
  873.                     CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "借"
  874.                 End If
  875.             Else
  876.                 CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "平"
  877.             End If
  878.             
  879.             If TempForCur <> XtSCurrCode Then
  880.                 If Val(.Fields!YbYsje) <> 0 Then
  881.                     CxbbGrid.TextMatrix(jsqte, Sydz("006", GridStr(), Szzls)) = Val(.Fields("YbYsje"))       '原币应收金额
  882.                 End If
  883.                 If Val(.Fields!YbSsje) <> 0 Then
  884.                     CxbbGrid.TextMatrix(jsqte, Sydz("008", GridStr(), Szzls)) = Val(.Fields("YbSsje"))       '原币实收金额
  885.                 End If
  886.                 If BbNcye <> 0 Then
  887.                     CxbbGrid.TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = Abs(YbNcye)                  '原币期末余额
  888.                 End If
  889.             End If
  890.             If BbNcye <> 0 Then
  891.                 CxbbGrid.TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = Abs(BbNcye)                      '本币期末余额
  892.             End If
  893.             CxbbGrid.TextMatrix(jsqte, Sydz("013", GridStr(), Szzls)) = Trim(.Fields("DeptName") & "")       '部门
  894.             CxbbGrid.TextMatrix(jsqte, Sydz("014", GridStr(), Szzls)) = Trim(.Fields("PersonName") & "")     '经办人
  895.             
  896.              '读取当前会计期间
  897.             GetPeriod = .Fields("Period")
  898.             
  899.             '统计本月合计数据项和本年累计数据项
  900.             MonthTotal(1) = MonthTotal(1) + .Fields("YbYsje")   '原币本月应收合计
  901.             MonthTotal(2) = MonthTotal(2) + .Fields("BbYsje")   '本币本月应收合计
  902.             MonthTotal(3) = MonthTotal(3) + .Fields("YbSsje")   '原币本月实收合计
  903.             MonthTotal(4) = MonthTotal(4) + .Fields("BbSsje")   '本币本月实收合计
  904.             
  905.             YearTotal(1) = YearTotal(1) + .Fields("YbYsje")     '原币本年应收累计
  906.             YearTotal(2) = YearTotal(2) + .Fields("BbYsje")     '本币本年应收累计
  907.             YearTotal(3) = YearTotal(3) + .Fields("YbSsje")     '原币本年应收累计
  908.             YearTotal(4) = YearTotal(4) + .Fields("BbSsje")     '本币本年应收累计
  909.             
  910.             '<<]
  911.                 
  912.             '动态集指针加1,同时将计数器加1(Fixed)
  913.             .MoveNext
  914.             jsqte = jsqte + 1
  915.             
  916.             '如果会计期间发生变化,则显示本月和本年的合计内容
  917.             If .EOF Then
  918.                 
  919.                 '输出本月合计数据
  920.                 CxbbGrid.AddItem ""
  921.                 Call Sub_MonthTotal(jsqte)
  922.                 jsqte = jsqte + 1
  923.                 
  924.                 '输出本年累计数据
  925.                 CxbbGrid.AddItem ""
  926.                 Call Sub_YearTotal(jsqte)
  927.                 jsqte = jsqte + 1
  928.                 
  929.             Else
  930.                 If (GetPeriod <> .Fields("Period")) And GetPeriod <> 0 Then
  931.                     '输出本月合计数据
  932.                     CxbbGrid.AddItem ""
  933.                     Call Sub_MonthTotal(jsqte)
  934.                     jsqte = jsqte + 1
  935.                     
  936.                     '输出本年累计数据
  937.                     CxbbGrid.AddItem ""
  938.                     Call Sub_YearTotal(jsqte)
  939.                     jsqte = jsqte + 1
  940.                 End If
  941.             End If
  942.             
  943.         Loop
  944.         
  945.     End With
  946.     
  947.     '清空临时数据
  948.     For I = 1 To 4
  949.         MonthTotal(I) = 0
  950.         YearTotal(I) = 0
  951.     Next I
  952.     YbNcye = 0
  953.     BbNcye = 0
  954.     GetPeriod = 0
  955.     TempForCur = ""
  956.     ']以上为用户自定义部分
  957. End Sub
  958. '输出本月合计数据
  959. Private Sub Sub_MonthTotal(jsqte As Integer)
  960.     With CxbbGrid
  961.         '输出本月合计
  962.         .TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = GetPeriod                       '会计期间
  963.         .TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = "本月合计"                      '摘要
  964.         .TextMatrix(jsqte, Sydz("007", GridStr(), Szzls)) = MonthTotal(2)                   '本币应收本月合计
  965.         .TextMatrix(jsqte, Sydz("009", GridStr(), Szzls)) = MonthTotal(4)                   '本币实收本月合计
  966.         If TempForCur <> XtSCurrCode Then
  967.             .TextMatrix(jsqte, Sydz("006", GridStr(), Szzls)) = MonthTotal(1)               '原币应收本月合计
  968.             .TextMatrix(jsqte, Sydz("008", GridStr(), Szzls)) = MonthTotal(3)               '原币实收本月合计
  969.             If BbNcye <> 0 Then
  970.                 .TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = Abs(YbNcye)             '原币期末余额
  971.             End If
  972.         End If
  973.         
  974.         '输出借贷方向
  975.         If BbNcye <> 0 Then
  976.             If BbNcye < 0 Then                                                              '借贷方向
  977.                 .TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "贷"
  978.             Else
  979.                 .TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "借"
  980.             End If
  981.         Else
  982.             .TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "平"
  983.         End If
  984.         If BbNcye <> 0 Then
  985.             .TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = Abs(BbNcye)                 '本币期末余额
  986.         End If
  987.         
  988.         '设置本月合计的颜色
  989.         .Cell(flexcpBackColor, jsqte, 0, , CxbbGrid.Cols - 1) = "&H00F7F3EC"
  990.     
  991.     End With
  992.     
  993.     '清空本月合计
  994.     For I = 1 To 4
  995.         MonthTotal(I) = 0
  996.     Next I
  997.     
  998. End Sub
  999. '输出本年累加数据
  1000. Private Sub Sub_YearTotal(jsqte As Integer)
  1001.     With CxbbGrid
  1002.         '输出本年累计
  1003.         .TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = GetPeriod                      '会计期间
  1004.         .TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = "本年累计"                     '摘要
  1005.         .TextMatrix(jsqte, Sydz("007", GridStr(), Szzls)) = YearTotal(2)                   '本币应收本月合计
  1006.         .TextMatrix(jsqte, Sydz("009", GridStr(), Szzls)) = YearTotal(4)                   '本币实收本月合计
  1007.         If TempForCur <> XtSCurrCode Then
  1008.             .TextMatrix(jsqte, Sydz("006", GridStr(), Szzls)) = YearTotal(1)               '原币应收本月合计
  1009.             .TextMatrix(jsqte, Sydz("008", GridStr(), Szzls)) = YearTotal(3)               '原币实收本月合计
  1010.             If BbNcye <> 0 Then
  1011.                 .TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = Abs(YbNcye)            '原币期末余额
  1012.             End If
  1013.         End If
  1014.         
  1015.         '输出借贷方向
  1016.         If BbNcye <> 0 Then
  1017.             If BbNcye < 0 Then                                                             '借贷方向
  1018.                 .TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "贷"
  1019.             Else
  1020.                 .TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "借"
  1021.             End If
  1022.         Else
  1023.             .TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = "平"
  1024.         End If
  1025.         If BbNcye <> 0 Then
  1026.             .TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = Abs(BbNcye)                 '本币期末余额
  1027.         End If
  1028.         
  1029.         '设置本年累计的颜色
  1030.         .Cell(flexcpBackColor, jsqte, 0, , CxbbGrid.Cols - 1) = "&H00C0E0FF"
  1031.         
  1032.     End With
  1033.     
  1034. End Sub
  1035. '根据单据类型显示单据信息
  1036. Private Sub CxbbGrid_DblClick()                                              '用户双击网格调入相应单据
  1037.     Dim RecTemp As New ADODB.Recordset               '临时使用动态集
  1038.     
  1039.     '当第一次查询结果为空时,判断总记录行是否与固定行数相同,如相同则不能显示单据(双表头出现此情况)
  1040.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then
  1041.         Exit Sub
  1042.     End If
  1043.     
  1044.     '非数据行或者单据号为空退出
  1045.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("003", GridStr(), Szzls))) = "" Then
  1046.         Exit Sub
  1047.     End If
  1048.     
  1049.     '根据查询结果显示相应的单据
  1050.     Select Case Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("002", GridStr(), Szzls)))
  1051.         
  1052.         Case "其他应收单", "代垫费用单"
  1053.             Sqlstr = "SELECT OtherBillId,BillItemCode From RP_OtherBill Where BillCode='" & CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("003", GridStr(), Szzls)) & "'"
  1054.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1055.             With RecTemp
  1056.                 If .EOF Then
  1057.                     Tsxx = "此单据已被其他用户删除!"
  1058.                     Call Xtxxts(Tsxx, 0, 4)
  1059.                     Exit Sub
  1060.                 Else
  1061.                     '调入单据处理窗体
  1062.                     If Trim(.Fields!BillItemCode) = "21" Then
  1063.                         
  1064.                         '调入代垫费用单
  1065.                         With ArNote_FrmFareBill
  1066.                             '填充查询单据标识
  1067.                             XT_BillID = Val(RecTemp.Fields!OtherBillId)
  1068.                         
  1069.                             '设置单据处理为明细联查查询(修改)状态
  1070.                             Xtcdcs = "3"
  1071.                             .Show 1
  1072.                         End With
  1073.                     
  1074.                     ElseIf Trim(.Fields!BillItemCode) = "20" Then
  1075.                         
  1076.                         '调入其他应收单
  1077.                         With ArNote_FrmOtherBill
  1078.                             '填充查询单据标识
  1079.                             XT_BillID = Val(RecTemp.Fields!OtherBillId)
  1080.                         
  1081.                             '设置单据处理为列表查询(修改)状态
  1082.                             Xtcdcs = "3"
  1083.                             .Show 1
  1084.                         End With
  1085.                     End If
  1086.                 End If
  1087.             End With
  1088.         
  1089.         Case "到款单", "退款单", "预收单"
  1090.         
  1091.             Sqlstr = "SELECT CloseBillID From RP_CloseBill Where BillCode='" & CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("003", GridStr(), Szzls)) & "'"
  1092.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1093.             With RecTemp
  1094.                 If .EOF Then
  1095.                     Tsxx = "此结算单已被其他用户删除!"
  1096.                     Call Xtxxts(Tsxx, 0, 4)
  1097.                     Exit Sub
  1098.                 Else
  1099.                     '调入单据处理窗体
  1100.                     With SK_FrmJsdcl
  1101.                         '填充查询单据标识
  1102.                         XT_BillID = Val(RecTemp.Fields!CloseBillId)
  1103.                         
  1104.                         '设置单据处理为列表查询(修改)状态
  1105.                         Xtcdcs = "3"
  1106.                         .Show 1
  1107.                     End With
  1108.                 End If
  1109.             End With
  1110.         
  1111.         Case "普通发票"
  1112.             
  1113.             Sqlstr = "SELECT InvoiceBillMainID,returnflag From Xs_InvoiceBillMain Where InvoiceCode='" & CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("003", GridStr(), Szzls)) & "'"
  1114.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1115.             With RecTemp
  1116.                 If .EOF Then
  1117.                     Tsxx = "此发票已被其他用户删除!"
  1118.                     Call Xtxxts(Tsxx, 0, 4)
  1119.                     Exit Sub
  1120.                 Else
  1121.                     XT_BillID = Val(RecTemp.Fields!InvoiceBillMainID)       '填充查询单据标识
  1122.                     Xtcdcs = "3"                                            '设置单据处理为列表查询(修改)状态
  1123.                     '调入单据处理窗体
  1124.                     If Trim(.Fields("returnflag")) Then
  1125.                         Xtcdcsfz = Str_QueryCondi & " and returnflag = 1"
  1126.                         Xs_I_RedInvoice.Show 1
  1127.                     Else
  1128.                         Xtcdcsfz = Str_QueryCondi & " and returnflag = 0"
  1129.                         Xs_I_InvoiceBill.Show 1
  1130.                     End If
  1131.                 End If
  1132.             End With
  1133.         
  1134.         Case "专用发票"
  1135.             
  1136.             Sqlstr = "SELECT InvoiceBillMainID,returnflag From Xs_InvoiceBillMain Where InvoiceCode='" & CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("003", GridStr(), Szzls)) & "'"
  1137.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1138.             With RecTemp
  1139.                 If .EOF Then
  1140.                     Tsxx = "此发票已被其他用户删除!"
  1141.                     Call Xtxxts(Tsxx, 0, 4)
  1142.                     Exit Sub
  1143.                 Else
  1144.                     XT_BillID = Val(RecTemp.Fields!InvoiceBillMainID)       '填充查询单据标识
  1145.                     Xtcdcs = "3"                                            '设置单据处理为列表查询(修改)状态
  1146.                     '调入单据处理窗体
  1147.                     If Trim(.Fields("returnflag")) Then
  1148.                         Xtcdcsfz = Str_QueryCondi & " and returnflag = 1"
  1149.                         Xs_I_UseRedInvoice.Show 1
  1150.                     Else
  1151.                         Xtcdcsfz = Str_QueryCondi & " and returnflag = 0"
  1152.                         Xs_I_UseInvoice.Show 1
  1153.                     End If
  1154.                 End If
  1155.             End With
  1156.         Case Else
  1157.             Exit Sub
  1158.     
  1159.     End Select
  1160. End Sub
  1161. '[>>===================以下为根据实际业务需要自定义过程区域=============================<<]
  1162. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1163.     
  1164.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1165.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1166.     Bbxbtgs = 2                                          '报 表 小 标 题 行 数
  1167.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1168.     
  1169.     ReDim Bbxbt(1 To Bbxbtgs)
  1170.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1171.     If Bbbwhgs <> 0 Then
  1172.         ReDim Bbbwh(1 To Bbbwhgs)
  1173.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1174.     End If
  1175.     
  1176.     Bbzbt = ReportTitle
  1177.     Bbxbt(1) = Space(2) + Fun_FormatOutPut(Lab_Cust, 40) + Fun_FormatOutPut(Lab_Foreign, 20)
  1178.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1179.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1180.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1181.     If Not bbylte Then
  1182.         Unload DY_Tybbyldy
  1183.     End If
  1184. End Sub