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

企业管理

开发平台:

Visual Basic

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