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

企业管理

开发平台:

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