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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  4. Begin VB.Form KF_FrmInoutSum 
  5.    Caption         =   "收发类别汇总表"
  6.    ClientHeight    =   8595
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11820
  10.    HelpContextID   =   1219003
  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.       BackColor       =   &H00FFFFFF&
  53.       Height          =   1050
  54.       Left            =   0
  55.       Picture         =   "统计分析_收发类别汇总.frx":1042
  56.       ScaleHeight     =   990
  57.       ScaleWidth      =   11715
  58.       TabIndex        =   1
  59.       Top             =   570
  60.       Width           =   11775
  61.       Begin VB.Label Label1 
  62.          AutoSize        =   -1  'True
  63.          BackStyle       =   0  'Transparent
  64.          Caption         =   "仓库名称:"
  65.          Height          =   195
  66.          Left            =   3450
  67.          TabIndex        =   6
  68.          Top             =   720
  69.          Width           =   765
  70.       End
  71.       Begin VB.Label Label2 
  72.          AutoSize        =   -1  'True
  73.          BackStyle       =   0  'Transparent
  74.          Caption         =   "日期范围:"
  75.          Height          =   195
  76.          Left            =   8340
  77.          TabIndex        =   5
  78.          Top             =   735
  79.          Width           =   765
  80.       End
  81.       Begin VB.Label Label3 
  82.          AutoSize        =   -1  'True
  83.          BackStyle       =   0  'Transparent
  84.          Caption         =   "仓库编码:"
  85.          Height          =   195
  86.          Left            =   675
  87.          TabIndex        =   4
  88.          Top             =   720
  89.          Width           =   765
  90.       End
  91.       Begin VB.Label Lab_Title 
  92.          BackColor       =   &H80000018&
  93.          BackStyle       =   0  'Transparent
  94.          Caption         =   "收发类别汇总表"
  95.          BeginProperty Font 
  96.             Name            =   "宋体"
  97.             Size            =   12
  98.             Charset         =   134
  99.             Weight          =   700
  100.             Underline       =   0   'False
  101.             Italic          =   0   'False
  102.             Strikethrough   =   0   'False
  103.          EndProperty
  104.          ForeColor       =   &H00000000&
  105.          Height          =   300
  106.          Index           =   4
  107.          Left            =   480
  108.          TabIndex        =   2
  109.          Top             =   210
  110.          Width           =   2715
  111.       End
  112.    End
  113.    Begin VB.Timer Timer1 
  114.       Enabled         =   0   'False
  115.       Interval        =   1
  116.       Left            =   7620
  117.       Top             =   90
  118.    End
  119.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  120.       Height          =   7365
  121.       Left            =   0
  122.       TabIndex        =   0
  123.       Top             =   1650
  124.       Width           =   11775
  125.       _cx             =   5080
  126.       _cy             =   5080
  127.       Appearance      =   1
  128.       BorderStyle     =   1
  129.       Enabled         =   -1  'True
  130.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  131.          Name            =   "宋体"
  132.          Size            =   9
  133.          Charset         =   134
  134.          Weight          =   400
  135.          Underline       =   0   'False
  136.          Italic          =   0   'False
  137.          Strikethrough   =   0   'False
  138.       EndProperty
  139.       MousePointer    =   0
  140.       BackColor       =   16777215
  141.       ForeColor       =   -2147483640
  142.       BackColorFixed  =   13826538
  143.       ForeColorFixed  =   -2147483630
  144.       BackColorSel    =   -2147483635
  145.       ForeColorSel    =   -2147483634
  146.       BackColorBkg    =   -2147483636
  147.       BackColorAlternate=   16777215
  148.       GridColor       =   -2147483633
  149.       GridColorFixed  =   -2147483632
  150.       TreeColor       =   -2147483632
  151.       FloodColor      =   192
  152.       SheetBorder     =   -2147483642
  153.       FocusRect       =   1
  154.       HighLight       =   1
  155.       AllowSelection  =   -1  'True
  156.       AllowBigSelection=   -1  'True
  157.       AllowUserResizing=   0
  158.       SelectionMode   =   0
  159.       GridLines       =   1
  160.       GridLinesFixed  =   2
  161.       GridLineWidth   =   1
  162.       Rows            =   50
  163.       Cols            =   10
  164.       FixedRows       =   1
  165.       FixedCols       =   1
  166.       RowHeightMin    =   0
  167.       RowHeightMax    =   0
  168.       ColWidthMin     =   0
  169.       ColWidthMax     =   0
  170.       ExtendLastCol   =   0   'False
  171.       FormatString    =   ""
  172.       ScrollTrack     =   0   'False
  173.       ScrollBars      =   3
  174.       ScrollTips      =   0   'False
  175.       MergeCells      =   0
  176.       MergeCompare    =   0
  177.       AutoResize      =   -1  'True
  178.       AutoSizeMode    =   0
  179.       AutoSearch      =   0
  180.       AutoSearchDelay =   2
  181.       MultiTotals     =   -1  'True
  182.       SubtotalPosition=   1
  183.       OutlineBar      =   0
  184.       OutlineCol      =   0
  185.       Ellipsis        =   0
  186.       ExplorerBar     =   0
  187.       PicturesOver    =   0   'False
  188.       FillStyle       =   0
  189.       RightToLeft     =   0   'False
  190.       PictureType     =   0
  191.       TabBehavior     =   0
  192.       OwnerDraw       =   0
  193.       Editable        =   0
  194.       ShowComboButton =   1
  195.       WordWrap        =   0   'False
  196.       TextStyle       =   0
  197.       TextStyleFixed  =   0
  198.       OleDragMode     =   0
  199.       OleDropMode     =   0
  200.       DataMode        =   0
  201.       VirtualData     =   -1  'True
  202.       DataMember      =   ""
  203.       ComboSearch     =   3
  204.       AutoSizeMouse   =   -1  'True
  205.       FrozenRows      =   0
  206.       FrozenCols      =   0
  207.       AllowUserFreezing=   0
  208.       BackColorFrozen =   0
  209.       ForeColorFrozen =   0
  210.       WallPaperAlignment=   9
  211.       AccessibleName  =   ""
  212.       AccessibleDescription=   ""
  213.       AccessibleValue =   ""
  214.       AccessibleRole  =   24
  215.       Begin MSComctlLib.ImageList ImageList2 
  216.          Left            =   0
  217.          Top             =   0
  218.          _ExtentX        =   1005
  219.          _ExtentY        =   1005
  220.          BackColor       =   -2147483643
  221.          ImageWidth      =   16
  222.          ImageHeight     =   16
  223.          MaskColor       =   12632256
  224.          _Version        =   393216
  225.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  226.             NumListImages   =   40
  227.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  228.                Picture         =   "统计分析_收发类别汇总.frx":1FAC4
  229.                Key             =   "sz"
  230.             EndProperty
  231.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  232.                Picture         =   "统计分析_收发类别汇总.frx":1FE5E
  233.                Key             =   "dy"
  234.             EndProperty
  235.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  236.                Picture         =   "统计分析_收发类别汇总.frx":201F8
  237.                Key             =   "yl"
  238.             EndProperty
  239.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  240.                Picture         =   "统计分析_收发类别汇总.frx":20592
  241.                Key             =   "xg"
  242.             EndProperty
  243.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  244.                Picture         =   "统计分析_收发类别汇总.frx":2092C
  245.                Key             =   "zh"
  246.             EndProperty
  247.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  248.                Picture         =   "统计分析_收发类别汇总.frx":20CC6
  249.                Key             =   "sh"
  250.             EndProperty
  251.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  252.                Picture         =   "统计分析_收发类别汇总.frx":21060
  253.                Key             =   "bc"
  254.             EndProperty
  255.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  256.                Picture         =   "统计分析_收发类别汇总.frx":213FA
  257.                Key             =   "fq"
  258.             EndProperty
  259.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  260.                Picture         =   "统计分析_收发类别汇总.frx":21794
  261.                Key             =   "bz"
  262.             EndProperty
  263.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  264.                Picture         =   "统计分析_收发类别汇总.frx":21B2E
  265.                Key             =   "tc"
  266.             EndProperty
  267.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  268.                Picture         =   "统计分析_收发类别汇总.frx":21EC8
  269.                Key             =   "bcgs"
  270.             EndProperty
  271.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  272.                Picture         =   "统计分析_收发类别汇总.frx":22262
  273.                Key             =   "mrlk"
  274.             EndProperty
  275.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  276.                Picture         =   "统计分析_收发类别汇总.frx":225FC
  277.                Key             =   "xsxm"
  278.             EndProperty
  279.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  280.                Picture         =   "统计分析_收发类别汇总.frx":22996
  281.                Key             =   "first"
  282.             EndProperty
  283.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  284.                Picture         =   "统计分析_收发类别汇总.frx":22D30
  285.                Key             =   "prev"
  286.             EndProperty
  287.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  288.                Picture         =   "统计分析_收发类别汇总.frx":230CA
  289.                Key             =   "next"
  290.             EndProperty
  291.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  292.                Picture         =   "统计分析_收发类别汇总.frx":23464
  293.                Key             =   "last"
  294.             EndProperty
  295.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  296.                Picture         =   "统计分析_收发类别汇总.frx":237FE
  297.                Key             =   "xx"
  298.             EndProperty
  299.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  300.                Picture         =   "统计分析_收发类别汇总.frx":23B98
  301.                Key             =   "define"
  302.             EndProperty
  303.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  304.                Picture         =   "统计分析_收发类别汇总.frx":23F32
  305.                Key             =   "exec"
  306.             EndProperty
  307.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  308.                Picture         =   "统计分析_收发类别汇总.frx":242CC
  309.                Key             =   "xz"
  310.             EndProperty
  311.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  312.                Picture         =   "统计分析_收发类别汇总.frx":24666
  313.                Key             =   "sc"
  314.             EndProperty
  315.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  316.                Picture         =   "统计分析_收发类别汇总.frx":24A00
  317.                Key             =   "sx"
  318.             EndProperty
  319.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  320.                Picture         =   "统计分析_收发类别汇总.frx":24D9A
  321.                Key             =   "cx"
  322.             EndProperty
  323.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  324.                Picture         =   "统计分析_收发类别汇总.frx":25134
  325.                Key             =   "zd"
  326.             EndProperty
  327.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  328.                Picture         =   "统计分析_收发类别汇总.frx":254CE
  329.                Key             =   "dz"
  330.             EndProperty
  331.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  332.                Picture         =   "统计分析_收发类别汇总.frx":25868
  333.                Key             =   "ph"
  334.             EndProperty
  335.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  336.                Picture         =   "统计分析_收发类别汇总.frx":25C02
  337.                Key             =   "fz"
  338.             EndProperty
  339.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  340.                Picture         =   "统计分析_收发类别汇总.frx":25F9C
  341.                Key             =   "dw"
  342.             EndProperty
  343.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  344.                Picture         =   "统计分析_收发类别汇总.frx":26336
  345.                Key             =   "hf"
  346.             EndProperty
  347.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  348.                Picture         =   "统计分析_收发类别汇总.frx":266D0
  349.                Key             =   "pz"
  350.             EndProperty
  351.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  352.                Picture         =   "统计分析_收发类别汇总.frx":26A6A
  353.                Key             =   "check"
  354.             EndProperty
  355.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  356.                Picture         =   "统计分析_收发类别汇总.frx":26E04
  357.                Key             =   "qs"
  358.             EndProperty
  359.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  360.                Picture         =   "统计分析_收发类别汇总.frx":2719E
  361.                Key             =   "fullcheck"
  362.             EndProperty
  363.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  364.                Picture         =   "统计分析_收发类别汇总.frx":27538
  365.                Key             =   "qq"
  366.             EndProperty
  367.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  368.                Picture         =   "统计分析_收发类别汇总.frx":278D2
  369.                Key             =   "bcw"
  370.             EndProperty
  371.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  372.                Picture         =   "统计分析_收发类别汇总.frx":27C6C
  373.                Key             =   "ye"
  374.             EndProperty
  375.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  376.                Picture         =   "统计分析_收发类别汇总.frx":28006
  377.                Key             =   ""
  378.             EndProperty
  379.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  380.                Picture         =   "统计分析_收发类别汇总.frx":283A0
  381.                Key             =   "frist"
  382.             EndProperty
  383.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  384.                Picture         =   "统计分析_收发类别汇总.frx":2873A
  385.                Key             =   "dj"
  386.             EndProperty
  387.          EndProperty
  388.       End
  389.    End
  390.    Begin MSComctlLib.ImageList ImageList1 
  391.       Left            =   7110
  392.       Top             =   0
  393.       _ExtentX        =   1005
  394.       _ExtentY        =   1005
  395.       BackColor       =   -2147483643
  396.       ImageWidth      =   16
  397.       ImageHeight     =   16
  398.       MaskColor       =   12632256
  399.       _Version        =   393216
  400.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  401.          NumListImages   =   17
  402.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  403.             Picture         =   "统计分析_收发类别汇总.frx":28AD4
  404.             Key             =   "sz"
  405.          EndProperty
  406.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  407.             Picture         =   "统计分析_收发类别汇总.frx":28E6E
  408.             Key             =   "dy"
  409.          EndProperty
  410.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  411.             Picture         =   "统计分析_收发类别汇总.frx":29208
  412.             Key             =   "yl"
  413.          EndProperty
  414.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  415.             Picture         =   "统计分析_收发类别汇总.frx":295A2
  416.             Key             =   "cx"
  417.          EndProperty
  418.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  419.             Picture         =   "统计分析_收发类别汇总.frx":2993C
  420.             Key             =   "dj"
  421.          EndProperty
  422.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  423.             Picture         =   "统计分析_收发类别汇总.frx":29CD6
  424.             Key             =   "sx"
  425.          EndProperty
  426.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  427.             Picture         =   "统计分析_收发类别汇总.frx":2A070
  428.             Key             =   "first"
  429.          EndProperty
  430.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  431.             Picture         =   "统计分析_收发类别汇总.frx":2A40A
  432.             Key             =   "prev"
  433.          EndProperty
  434.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  435.             Picture         =   "统计分析_收发类别汇总.frx":2A7A4
  436.             Key             =   "next"
  437.          EndProperty
  438.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  439.             Picture         =   "统计分析_收发类别汇总.frx":2AB3E
  440.             Key             =   "last"
  441.          EndProperty
  442.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  443.             Picture         =   "统计分析_收发类别汇总.frx":2AED8
  444.             Key             =   "bz"
  445.          EndProperty
  446.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  447.             Picture         =   "统计分析_收发类别汇总.frx":2B272
  448.             Key             =   "tc"
  449.          EndProperty
  450.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  451.             Picture         =   "统计分析_收发类别汇总.frx":2B60C
  452.             Key             =   "bcgs"
  453.          EndProperty
  454.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  455.             Picture         =   "统计分析_收发类别汇总.frx":2B9A6
  456.             Key             =   "mrlk"
  457.          EndProperty
  458.          BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  459.             Picture         =   "统计分析_收发类别汇总.frx":2BD40
  460.             Key             =   "xsxm"
  461.          EndProperty
  462.          BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  463.             Picture         =   "统计分析_收发类别汇总.frx":2C0DA
  464.             Key             =   "mx"
  465.          EndProperty
  466.          BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  467.             Picture         =   "统计分析_收发类别汇总.frx":2C474
  468.             Key             =   "hz"
  469.          EndProperty
  470.       EndProperty
  471.    End
  472.    Begin MSComctlLib.Toolbar SzToolbar 
  473.       Align           =   1  'Align Top
  474.       Height          =   555
  475.       Left            =   0
  476.       TabIndex        =   7
  477.       Top             =   0
  478.       Width           =   11820
  479.       _ExtentX        =   20849
  480.       _ExtentY        =   979
  481.       ButtonWidth     =   820
  482.       ButtonHeight    =   926
  483.       AllowCustomize  =   0   'False
  484.       Appearance      =   1
  485.       Style           =   1
  486.       ImageList       =   "ImageList1"
  487.       _Version        =   393216
  488.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  489.          NumButtons      =   17
  490.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  491.             Caption         =   "设置"
  492.             Key             =   "ymsz"
  493.             ImageKey        =   "sz"
  494.          EndProperty
  495.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  496.             Caption         =   "打印"
  497.             Key             =   "dy"
  498.             ImageKey        =   "dy"
  499.          EndProperty
  500.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  501.             Caption         =   "预览"
  502.             Key             =   "yl"
  503.             ImageKey        =   "yl"
  504.          EndProperty
  505.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  506.             Style           =   3
  507.          EndProperty
  508.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  509.             Caption         =   "查询"
  510.             Key             =   "cx"
  511.             ImageKey        =   "cx"
  512.          EndProperty
  513.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  514.             Object.Visible         =   0   'False
  515.             Caption         =   "刷新"
  516.             Key             =   "sx"
  517.             ImageKey        =   "sx"
  518.          EndProperty
  519.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  520.             Style           =   3
  521.          EndProperty
  522.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  523.             Caption         =   "汇总"
  524.             Key             =   "Sum"
  525.             ImageKey        =   "hz"
  526.          EndProperty
  527.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  528.             Enabled         =   0   'False
  529.             Caption         =   "明细"
  530.             Key             =   "List"
  531.             ImageKey        =   "mx"
  532.          EndProperty
  533.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  534.             Style           =   3
  535.          EndProperty
  536.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  537.             Caption         =   "首张"
  538.             Key             =   "first"
  539.             ImageKey        =   "first"
  540.          EndProperty
  541.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  542.             Caption         =   "上张"
  543.             Key             =   "prev"
  544.             ImageKey        =   "prev"
  545.          EndProperty
  546.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  547.             Caption         =   "下张"
  548.             Key             =   "next"
  549.             ImageKey        =   "next"
  550.          EndProperty
  551.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  552.             Caption         =   "末张"
  553.             Key             =   "last"
  554.             ImageKey        =   "last"
  555.          EndProperty
  556.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  557.             Style           =   3
  558.          EndProperty
  559.          BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  560.             Caption         =   "帮助"
  561.             Key             =   "bz"
  562.             ImageKey        =   "bz"
  563.          EndProperty
  564.          BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  565.             Caption         =   "退出"
  566.             Key             =   "fh"
  567.             ImageKey        =   "tc"
  568.          EndProperty
  569.       EndProperty
  570.       BorderStyle     =   1
  571.    End
  572. End
  573. Attribute VB_Name = "KF_FrmInoutSum"
  574. Attribute VB_GlobalNameSpace = False
  575. Attribute VB_Creatable = False
  576. Attribute VB_PredeclaredId = True
  577. Attribute VB_Exposed = False
  578. '**************************************************************************
  579. '*    模 块 名 称 :收发类别汇总
  580. '*    功 能 描 述 :
  581. '*    程序员姓名  :赵宇光
  582. '*    最后修改人  :张万成
  583. '*    最后修改时间:2001/12/14
  584. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  585. '**************************************************************************
  586. Dim ReportTitle As String                '报表主标题
  587. '以下为固定使用变量
  588. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  589. Dim GridCode As String                   '显示网格网格代码
  590. Dim GridInf() As Variant                 '整个网格设置信息
  591. Dim Tsxx As String                       '系统提示信息
  592. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  593. Dim Sjhgd As Double                      '网格数据行高度
  594. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  595. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  596. Dim GridStr()  As String                 '网格列信息(字符型)
  597. Dim GridInt() As Integer                 '网格列信息(整型)
  598. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  599. Dim Xtyear As Integer, Period As Integer
  600. Dim Rec_WH As New Recordset
  601. Dim Str_Class1 As String
  602. Dim Str_Class2 As String
  603. Dim Str_Mate As String
  604. Dim Str_OpType As String
  605. Dim fixIn As Integer, fixOut As Integer
  606. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  607.     On Error Resume Next
  608.     With CxbbGrid
  609.         .Width = Me.Width - 160
  610.         .Height = Me.Height - .Top - 400
  611.     End With
  612.     With Pic_Title
  613.         .Width = Me.Width - 160
  614.     End With
  615.     
  616.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  617. End Sub
  618. Private Sub Form_Load()                                                   '窗体装入
  619.   
  620.     '调入打印页面设置窗体
  621.     ReportTitle = "收发类别汇总表"
  622.     XtReportCode = "kf_inoutSum"
  623.     Load Dyymctbl
  624.       
  625.     '调整标题栏及网格、格式工具条位置(Fixed)
  626.     Pic_Title.Left = 40
  627.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  628.     CxbbGrid.Left = Pic_Title.Left
  629.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  630.      
  631.     '调 入 网 格(Fixed)
  632.     GridCode = "kf_inoutSum"
  633.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  634.       
  635.     Qslz = GridInf(1)
  636.     Sjhgd = GridInf(2)
  637.     Sfxshjwg = GridInf(7)
  638.     Szzls = CxbbGrid.Cols - 1
  639. End Sub
  640. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  641.     '卸载条件窗体
  642.     KF_FrmInoutSumQuery.UnloadCheck.Value = 1
  643.     Unload KF_FrmInoutSumQuery
  644.     
  645.     '卸载打印页面设置窗体
  646.     Unload Dyymctbl
  647. End Sub
  648. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  649.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  650. End Sub
  651. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)                '网格格式调整(Fixed)
  652.   
  653.     Select Case Button.Key
  654.         Case "bcgs"                                          '保存表格格式
  655.             Call Bcwggs(CxbbGrid, GridCode, GridStr())
  656.         Case "hfmrgs"                                        '恢复默认格式
  657.             Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  658.         Case "szxsxm"                                        '设置显示项目
  659.             Call Szxsxm(CxbbGrid, GridCode)
  660.     End Select
  661. End Sub
  662. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  663. Select Case Button.Key
  664.     Case "ymsz"                                          '页面设置
  665.         Dyymctbl.Show 1
  666.     Case "yl"                                            '预 览
  667.         Call bbyl(True)
  668.     Case "dy"                                            '打 印
  669.         Call bbyl(False)
  670.     Case "cx"                                            '查 询
  671.         KF_FrmInoutSumQuery.Show 1
  672.     Case "Sum"                                           '汇总
  673.         Call HuiZong
  674.         SzToolbar.Buttons("Sum").Enabled = False
  675.         SzToolbar.Buttons("List").Enabled = True
  676.     Case "List"                                           '明细
  677.         SzToolbar.Buttons("List").Enabled = False
  678.         SzToolbar.Buttons("Sum").Enabled = True
  679.         If Rec_WH.State = 1 Then
  680.             If Rec_WH.RecordCount <> 0 Then
  681.                 If Rec_WH.EOF Then
  682.                     Rec_WH.MoveLast
  683.                 ElseIf Rec_WH.BOF Then
  684.                     Rec_WH.MoveFirst
  685.                 End If
  686.                 Call Show_Tab(Rec_WH)
  687.             End If
  688.         End If
  689.     Case "first"
  690.         Call First
  691.     Case "last"
  692.         Call Last
  693.     Case "prev"
  694.         Call Prev
  695.     Case "next"
  696.         Call Sub_next
  697.     Case "sx"                                            '刷 新
  698.         If Rec_WH.State = 1 Then
  699.           If Rec_WH.RecordCount <> 0 Then
  700.             If Rec_WH.EOF Then
  701.                 Rec_WH.MoveLast
  702.             ElseIf Rec_WH.BOF Then
  703.                 Rec_WH.MoveFirst
  704.             End If
  705.             Call Sub_Query
  706.           End If
  707.         End If
  708.     Case "bz"                                            '帮 助
  709.         Call F1bz
  710.     Case "fh"                                            '退 出
  711.         Unload Me
  712. End Select
  713. End Sub
  714. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  715.     
  716.     Timer1.Enabled = False
  717.     Xt_Wait.Show
  718.     Xt_Wait.Refresh
  719.    
  720.     '加快显示速度
  721.     '生成查询结果
  722.     Call Sub_Query
  723.     
  724.     Xt_Wait.Hide
  725. End Sub
  726. Private Sub Sub_Query()                                    '生成查询结果
  727.     Dim Sqlstr As String                        '查询字符串
  728.     Dim Coljsq As Long                          '网格列计数器
  729.     Dim jsqte As Long                        '临时动态计数器
  730.     Dim Str_WH As String
  731.     Dim str_WH1 As String
  732.     Dim Str_QueryCondi As String             '用户录入查询条件
  733.  '以下为用户自定义部分[
  734.      Str_QueryCondi = ""
  735.      Str_Mate = ""
  736.      With KF_FrmInoutSumQuery
  737.     
  738.          Str_Class1 = "select distinct inoutclassname from kf_v_inoutclass where inoutflag=1"
  739.          Str_Class2 = "select distinct inoutclassname from kf_v_inoutclass where inoutflag=0"
  740.          Str_WH = "select distinct whcode,whname from KF_V_InOutClass   where 1=1 "
  741.          str_WH1 = "select distinct whcode,whname from KF_V_ledger   where 1=1 "
  742.          
  743.          For jsqte = 1 To 5
  744.             Select Case jsqte
  745.               
  746.                Case 1  '会计期间
  747.                 If Trim(.Combo_Kjqj2.Text) <> "" Then
  748.                     Xtyear = Val(Mid(Trim(.Combo_Kjqj2.Text), 1, 4))
  749.                     Period = Val(Mid(Trim(.Combo_Kjqj2.Text), 6))
  750.                     Str_QueryCondi = Str_QueryCondi & " and kjyear=" & Xtyear & " and Period between " & Val(Mid(Trim(.Combo_Kjqj1.Text), 6)) & " and " & Period
  751.                 End If
  752.               
  753.               Case 2   '仓库
  754.                  If Trim(.LrText(0).Text) <> "" Then
  755.                     Str_QueryCondi = Str_QueryCondi & " and whcode='" & Trim(.LrText(0).Tag) & "'"
  756.                  End If
  757.              
  758.               Case 3   '物料分类
  759.                 If Trim(.LrText(1).Text) <> "" Then
  760.                     Str_QueryCondi = Str_QueryCondi & " and invsortcode LIKE '" & Trim(.LrText(1).Tag) & "%'"
  761.                     Str_Mate = " and invsortcode LIKE '" & Trim(.LrText(1).Tag) & "%'"
  762.                 End If
  763.                 
  764.               Case 4   '物料编码
  765.                 If Trim(.LrText(2).Tag) <> "" Then
  766.                     Str_QueryCondi = Str_QueryCondi & " and mnumber='" & Trim(.LrText(2).Tag) & "'"
  767.                     Str_Mate = " and mnumber='" & Trim(.LrText(2).Tag) & "'"
  768.                 End If
  769.               Case 5
  770.                 If Trim(.LrText(3).Text & "") <> "" Then
  771.                     Str_Mate = " AND InOutClassName='" & Trim(.LrText(3).Text) & "'"
  772.                 End If
  773.             End Select
  774.         Next jsqte
  775.      End With
  776.     Str_WH = Str_WH & Str_QueryCondi & Str_OpType
  777.     str_WH1 = str_WH1 & Str_QueryCondi
  778.     Str_Class1 = Str_Class1 & Str_QueryCondi & Str_OpType
  779.     Str_Class2 = Str_Class2 & Str_QueryCondi & Str_OpType
  780.  
  781.     Set Rec_WH = Cw_DataEnvi.DataConnect.Execute(Str_WH)
  782.     
  783.     If Not Rec_WH.EOF Then
  784.         Rec_WH.MoveFirst
  785.         Call Show_Tab(Rec_WH)
  786.     Else
  787.         Label3 = "仓库编码: " & KF_FrmInoutSumQuery.LrText(0).Text
  788.         Label1 = "仓库名称: " & KF_FrmInoutSumQuery.LrText(0).Tag
  789.         Label2 = "日期范围: " & Trim(KF_FrmInoutSumQuery.Combo_Kjqj1.Text) & "----" & Trim(KF_FrmInoutSumQuery.Combo_Kjqj2.Text)
  790.         
  791.         CxbbGrid.Clear 1
  792.         CxbbGrid.Rows = CxbbGrid.FixedRows
  793.         fixIn = 0
  794.         finout = 0
  795.     End If
  796. End Sub
  797. Private Sub FillGrid(str1 As String, str2 As String)
  798.     Dim Rec_Class1 As New Recordset
  799.     Set Rec_Class1 = Cw_DataEnvi.DataConnect.Execute(str1 & " and whcode='" & Trim(Rec_WH.Fields("whcode")) & "'")
  800.     Dim Rec_Class2 As New Recordset
  801.     Set Rec_Class2 = Cw_DataEnvi.DataConnect.Execute(str2 & " and whcode='" & Trim(Rec_WH.Fields("whcode")) & "'")
  802.      
  803.     fixIn = Rec_Class1.RecordCount
  804.     fixOut = Rec_Class2.RecordCount
  805.      With CxbbGrid
  806.         .BackColorFixed = &H8000000F    'Dbl_BackColorFixed                           '固定行背景色 ('&H80000018)
  807.         .Cols = Qslz + 8 + Rec_Class1.RecordCount + Rec_Class2.RecordCount
  808.         .AllowUserResizing = flexResizeBoth
  809.         .SelectionMode = flexSelectionByRow
  810.         .ExplorerBar = flexExNone                                  '网格列是否可移动及排序
  811.         .ScrollTips = True
  812.         .WordWrap = True
  813.         
  814.         For jsq = Qslz To .Cols - 1
  815.             .ColHidden(jsq) = False
  816.         Next jsq
  817.         
  818.         '填 充 网 格 标 题
  819.         For Rowjsq = 0 To .FixedRows - 1
  820.             .MergeRow(Rowjsq) = True
  821.             .RowHeight(Rowjsq) = Sjhgd * 1.8
  822.             .TextMatrix(Rowjsq, Qslz) = "物料编码"
  823.             .TextMatrix(Rowjsq, Qslz + 1) = "物料名称"
  824.             .TextMatrix(Rowjsq, Qslz + 2) = "规格型号"
  825.             .TextMatrix(Rowjsq, Qslz + 3) = "计量单位"
  826.             Coljsq = Qslz + 4
  827.             If Not Rec_Class1.EOF Then
  828.                 Rec_Class1.MoveFirst
  829.                 For Coljsq = (Qslz + 4) To (.Cols - 5 - Rec_Class2.RecordCount)
  830.                     .TextMatrix(Rowjsq, Coljsq) = Trim(Rec_Class1.Fields("inoutclassname")) & "数量"
  831.                     .ColWidth(Coljsq) = Sjhgd * 6
  832.                     Rec_Class1.MoveNext
  833.                 Next Coljsq
  834.             End If
  835.             .TextMatrix(Rowjsq, Coljsq) = "无入库类别数量"
  836.             .TextMatrix(Rowjsq, Coljsq + 1) = "合计入库数量"
  837.             If Not Rec_Class2.EOF Then
  838.                 Rec_Class2.MoveFirst
  839.                 For Coljsq = (Qslz + 6 + Rec_Class1.RecordCount) To (.Cols - 3)
  840.                     .TextMatrix(Rowjsq, Coljsq) = Trim(Rec_Class2.Fields("inoutclassname")) & "数量"
  841.                     .ColWidth(Coljsq) = Sjhgd * 6
  842.                     Rec_Class2.MoveNext
  843.                 Next Coljsq
  844.             End If
  845.             .TextMatrix(Rowjsq, (.Cols - 2)) = "无出库类别数量"
  846.             .TextMatrix(Rowjsq, (.Cols - 1)) = "合计出库数量"
  847.         Next Rowjsq
  848.         
  849.         '数 据 网 格 高 度
  850.         For Rowjsq = .FixedRows To .Rows - 1
  851.             .RowHeight(Rowjsq) = Sjhgd
  852.         Next Rowjsq
  853.         
  854.         '定 义 录 入 字 段 属 性
  855.         For Coljsq = (Qslz + 3) To .Cols - 1
  856.             .MergeCol(Coljsq) = True
  857.             .ColAlignment(Coljsq) = flexAlignRightTop
  858.             .FixedAlignment(Coljsq) = flexAlignGeneral
  859.         Next Coljsq
  860.         For Coljsq = 0 To .Cols - 1
  861.             If .TextMatrix(0, Coljsq) = "合计入库数量" Or .TextMatrix(0, Coljsq) = "合计出库数量" Then
  862.                 .ColWidth(Coljsq) = Sjhgd * 6
  863.             End If
  864.         Next Coljsq
  865.         .ColWidth(.Cols - 1) = Sjhgd * 6
  866.         .ColWidth(.Cols - 2) = Sjhgd * 6
  867.     End With
  868. End Sub
  869. Private Sub Show_Tab(Rec_Temp As Recordset)
  870.     Dim Str_QC As String
  871.     Dim rec_start As New Recordset
  872.     Dim In_Count As Double
  873.     Dim Out_Count As Double
  874.     Dim Str_Bill As String
  875.     Dim Rec_Mate As Recordset
  876.     Dim str_temp As String
  877.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  878.     
  879.     Call FillGrid(Str_Class1, Str_Class2)
  880.     Label3 = "仓库编码: " & Trim(Rec_Temp.Fields("whcode"))
  881.     Label1 = "仓库名称: " & Trim(Rec_Temp.Fields("whname"))
  882.     Label2 = "日期范围: " & Trim(KF_FrmInoutSumQuery.Combo_Kjqj1.Text) & "----" & Trim(KF_FrmInoutSumQuery.Combo_Kjqj2.Text)
  883.     
  884.     CxbbGrid.Redraw = False
  885.     CxbbGrid.Rows = CxbbGrid.FixedRows
  886.         jsqte = CxbbGrid.Rows
  887.             Str_Bill = "select a.* " & _
  888.                         "from (SELECT SUM(factreceiptquan)AS In_count,SUM(factissuequan)AS Out_count,mnumber,inoutclasscode, " & _
  889.                         "(select inoutclassname from gy_inoutclass where inoutclasscode=KF_V_InOutClass.inoutclasscode)as inoutclassname , " & _
  890.                         "(select mname from gy_material where mnumber=KF_V_InOutClass.mnumber)as mname,(select model from gy_material where KF_V_InOutClass.mnumber=gy_material.mnumber) as model, " & _
  891.                         "(select primaryunitname from gy_material where KF_V_InOutClass.mnumber=gy_material.mnumber) as primaryunitname From KF_V_InOutClass " & _
  892.                         "where whcode='" & Trim(Rec_Temp.Fields("whcode")) & "'  and kjyear=" & Xtyear & " and period between " & Val(Mid(Trim(KF_FrmInoutSumQuery.Combo_Kjqj1.Text), 6)) & " and " & Val(Mid(Trim(KF_FrmInoutSumQuery.Combo_Kjqj2.Text), 6)) & Str_Mate & "  GROUP BY mnumber, inoutclasscode)a order by mnumber"
  893.             
  894.             Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Str_Bill)
  895.             Dim Sum_In As Double, Sum_Out As Double
  896.             Sum_In = 0
  897.             Sum_Out = 0
  898.             If Not Rec_Query.EOF Then
  899.                 Rec_Query.MoveFirst
  900.                 CxbbGrid.AddItem ""
  901.                 CxbbGrid.TextMatrix(jsqte, Qslz) = Trim(Rec_Query.Fields("mnumber"))                    '物料编码
  902.                 CxbbGrid.TextMatrix(jsqte, Qslz + 1) = Trim(Rec_Query.Fields("mname"))                  '物料名称
  903.                 CxbbGrid.TextMatrix(jsqte, Qslz + 2) = Trim(Rec_Query.Fields("model"))                  '规格型号
  904.                 CxbbGrid.TextMatrix(jsqte, Qslz + 3) = Trim(Rec_Query.Fields("primaryunitname"))        '计量单位
  905.                 CxbbGrid.RowHeight(jsqte) = Sjhgd
  906.                 Do While Not Rec_Query.EOF
  907.                     If Trim(Rec_Query.Fields("mnumber")) = Trim(CxbbGrid.TextMatrix(jsqte, Qslz)) Then  '将行转换成列
  908.                         If IsNull(Rec_Query.Fields("inoutclassname")) Then
  909.                             If Val(Rec_Query.Fields("In_count") & "") <> 0 Then
  910.                                 CxbbGrid.ColHidden(CxbbGrid.Cols - fixOut - 4) = False
  911.                                 CxbbGrid.TextMatrix(jsqte, (CxbbGrid.Cols - fixOut - 4)) = Val(Rec_Query.Fields("In_count") & "")        '入库数量
  912.                                 Sum_In = Sum_In + Val(Rec_Query.Fields("In_count") & "")
  913.                             End If
  914.                             
  915.                             If Val(Rec_Query.Fields("out_count") & "") <> 0 Then
  916.                                 CxbbGrid.ColHidden(CxbbGrid.Cols - 2) = False
  917.                                 CxbbGrid.TextMatrix(jsqte, (CxbbGrid.Cols - 2)) = Val(Rec_Query.Fields("Out_count") & "")                '出库数量
  918.                                 Sum_Out = Sum_Out + Val(Rec_Query.Fields("Out_count") & "")
  919.                             End If
  920.                         End If
  921.                             For Coljsq = (Qslz + 4) To CxbbGrid.Cols - 2
  922.                                 If Trim(Rec_Query.Fields("inoutclassname")) & "数量" = Trim(CxbbGrid.TextMatrix(0, Coljsq)) Then
  923.                                     If Val(Rec_Query.Fields("In_count") & "") <> 0 Then
  924.                                         CxbbGrid.TextMatrix(jsqte, Coljsq) = Val(Rec_Query.Fields("In_count") & "")                       '入库数量
  925.                                         Sum_In = Sum_In + Val(Rec_Query.Fields("In_count"))
  926.                                     Else
  927.                                         CxbbGrid.TextMatrix(jsqte, Coljsq) = Val(Rec_Query.Fields("Out_count") & "")                     '出库数量
  928.                                         Sum_Out = Sum_Out + Val(Rec_Query.Fields("Out_count") & "")
  929.                                     End If
  930.                                 End If
  931.                             Next
  932.                             CxbbGrid.TextMatrix(jsqte, CxbbGrid.Cols - 1) = Sum_Out
  933.                             CxbbGrid.TextMatrix(jsqte, (CxbbGrid.Cols - fixOut - 3)) = Sum_In
  934.                             Rec_Query.MoveNext
  935.                     Else
  936.                         Sum_In = 0
  937.                         Sum_Out = 0
  938.                         jsqte = jsqte + 1
  939.                         CxbbGrid.AddItem ""
  940.                         CxbbGrid.TextMatrix(jsqte, Qslz) = Trim(Rec_Query.Fields("mnumber"))                    '物料编码
  941.                         CxbbGrid.TextMatrix(jsqte, Qslz + 1) = Trim(Rec_Query.Fields("mname"))                  '物料名称
  942.                         CxbbGrid.TextMatrix(jsqte, Qslz + 2) = Trim(Rec_Query.Fields("model"))                  '规格型号
  943.                         CxbbGrid.TextMatrix(jsqte, Qslz + 3) = Trim(Rec_Query.Fields("primaryunitname"))        '计量单位
  944.                         CxbbGrid.RowHeight(jsqte) = Sjhgd
  945.                         If IsNull(Rec_Query.Fields("inoutclassname")) Then
  946.                             If Val(Rec_Query.Fields("In_count") & "") <> 0 Then
  947.                                 CxbbGrid.ColHidden(CxbbGrid.Cols - fixOut - 4) = False
  948.                                 CxbbGrid.TextMatrix(jsqte, (CxbbGrid.Cols - fixOut - 4)) = Val(Rec_Query.Fields("In_count") & "")            '入库数量
  949.                                 Sum_In = Sum_In + Val(Rec_Query.Fields("In_count"))
  950.                             End If
  951.                             
  952.                             If Val(Rec_Query.Fields("out_count")) <> 0 Then
  953.                                 CxbbGrid.ColHidden(CxbbGrid.Cols - 2) = False
  954.                                 CxbbGrid.TextMatrix(jsqte, (CxbbGrid.Cols - 2)) = Val(Rec_Query.Fields("Out_count") & "")                     '出库数量
  955.                                 Sum_Out = Sum_Out + Val(Rec_Query.Fields("Out_count"))
  956.                             End If
  957.                         End If
  958.                             For Coljsq = (Qslz + 4) To CxbbGrid.Cols - 2
  959.                                 If Trim(Rec_Query.Fields("inoutclassname")) & "数量" = Trim(CxbbGrid.TextMatrix(0, Coljsq)) Then
  960.                                     If Val(Rec_Query.Fields("In_count") & "") <> 0 Then
  961.                                         CxbbGrid.TextMatrix(jsqte, Coljsq) = Val(Rec_Query.Fields("In_count") & "")                          '入库数量
  962.                                         Sum_In = Sum_In + Val(Rec_Query.Fields("In_count") & "")
  963.                                     Else
  964.                                         CxbbGrid.TextMatrix(jsqte, Coljsq) = Val(Rec_Query.Fields("Out_count") & "")                         '出库数量
  965.                                         Sum_Out = Sum_Out + Val(Rec_Query.Fields("Out_count") & "")
  966.                                     End If
  967.                                 End If
  968.                             Next
  969.                             CxbbGrid.TextMatrix(jsqte, CxbbGrid.Cols - 1) = Sum_Out
  970.                             CxbbGrid.TextMatrix(jsqte, (CxbbGrid.Cols - fixOut - 3)) = Sum_In
  971.                             Rec_Query.MoveNext
  972.                     End If
  973.                 Loop
  974.             End If
  975.             
  976.     Call SLGSH
  977.     CxbbGrid.Redraw = True
  978.     If Not SzToolbar.Buttons("Sum").Enabled Then
  979.         Call HuiZong
  980.     End If
  981.     
  982. End Sub
  983. Private Sub SLGSH()             '数据格式化
  984.     With CxbbGrid
  985.         For hjsq = .FixedRows To .Rows - 1
  986.             For ljsq = Qslz + 4 To .Cols - 1
  987.                 .TextMatrix(hjsq, ljsq) = Format(Trim(.TextMatrix(hjsq, ljsq)), "#,##0." + String(Xtslxsws, "0"))
  988.                 
  989.                 If Val(.TextMatrix(hjsq, ljsq)) = 0 Then
  990.                     .TextMatrix(hjsq, ljsq) = ""
  991.                 End If
  992.             Next ljsq
  993.         Next hjsq
  994.     End With
  995. End Sub
  996. Private Sub HuiZong()           '汇总数据
  997.     With CxbbGrid
  998.         If fixIn > 0 Then
  999.             For jsq = (Qslz + 4) To (Qslz + 4 + fixIn)
  1000.                 .ColHidden(jsq) = True
  1001.             Next
  1002.         End If
  1003.         If fixOut > 0 Then
  1004.             For jsq = (Qslz + 6 + fixIn) To (.Cols - 2)
  1005.                 .ColHidden(jsq) = True
  1006.             Next
  1007.         End If
  1008.     
  1009.     End With
  1010. End Sub
  1011. Private Sub First()
  1012.     If Rec_WH.State = 1 Then
  1013.         If Rec_WH.RecordCount > 0 Then
  1014.             Rec_WH.MoveFirst
  1015.             Call Show_Tab(Rec_WH)
  1016.         End If
  1017.     End If
  1018. End Sub
  1019. Private Sub Last()
  1020.     If Rec_WH.State = 1 Then
  1021.         If Rec_WH.RecordCount > 0 Then
  1022.             Rec_WH.MoveLast
  1023.             Call Show_Tab(Rec_WH)
  1024.         End If
  1025.     End If
  1026. End Sub
  1027. Private Sub Prev()
  1028.     If Rec_WH.State = 1 Then
  1029.         If Rec_WH.RecordCount > 0 Then
  1030.             If Rec_WH.EOF Then
  1031.                 Rec_WH.MovePrevious
  1032.             End If
  1033.             If Not Rec_WH.BOF Then
  1034.                 Rec_WH.MovePrevious
  1035.                 If Not Rec_WH.BOF Then
  1036.                     Call Show_Tab(Rec_WH)
  1037.                 End If
  1038.             End If
  1039.         End If
  1040.     End If
  1041. End Sub
  1042. Private Sub Sub_next()
  1043.     If Rec_WH.State = 1 Then
  1044.         If Rec_WH.RecordCount > 0 Then
  1045.             If Rec_WH.BOF Then
  1046.                 Rec_WH.MoveNext
  1047.             End If
  1048.             If Not Rec_WH.EOF Then
  1049.                 Rec_WH.MoveNext
  1050.                 If Not Rec_WH.EOF Then
  1051.                     Call Show_Tab(Rec_WH)
  1052.                 End If
  1053.             End If
  1054.         End If
  1055.     End If
  1056. End Sub
  1057. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1058.     
  1059.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1060.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1061.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1062.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1063.     ReDim Bbxbt(1 To Bbxbtgs)
  1064.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1065.     If Bbbwhgs <> 0 Then
  1066.         ReDim Bbbwh(1 To Bbbwhgs)
  1067.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1068.     End If
  1069.     Bbzbt = ReportTitle
  1070.     Bbxbt(1) = ""
  1071.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1072.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1073.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1074.     If Not bbylte Then
  1075.         Unload DY_Tybbyldy
  1076.     End If
  1077. End Sub