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

企业管理

开发平台:

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_FlowAnalysis 
  5.    Caption         =   "货物流向分析"
  6.    ClientHeight    =   8595
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11820
  10.    HelpContextID   =   5001
  11.    Icon            =   "货物流向查询结果.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    LinkTopic       =   "Form1"
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   8595
  16.    ScaleWidth      =   11820
  17.    WindowState     =   2  'Maximized
  18.    Begin MSComctlLib.Toolbar GsToolbar 
  19.       Height          =   525
  20.       Left            =   10065
  21.       TabIndex        =   3
  22.       Top             =   30
  23.       Width           =   1740
  24.       _ExtentX        =   3069
  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.             Object.Visible         =   0   'False
  46.             Caption         =   "显示项目"
  47.             Key             =   "szxsxm"
  48.             ImageKey        =   "xsxm"
  49.          EndProperty
  50.       EndProperty
  51.    End
  52.    Begin VB.PictureBox Pic_Title 
  53.       BackColor       =   &H00FFFFFF&
  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           =   1530
  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":1FAC4
  278.                Key             =   "sz"
  279.             EndProperty
  280.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  281.                Picture         =   "货物流向查询结果.frx":1FE5E
  282.                Key             =   "dy"
  283.             EndProperty
  284.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  285.                Picture         =   "货物流向查询结果.frx":201F8
  286.                Key             =   "yl"
  287.             EndProperty
  288.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  289.                Picture         =   "货物流向查询结果.frx":20592
  290.                Key             =   "xg"
  291.             EndProperty
  292.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  293.                Picture         =   "货物流向查询结果.frx":2092C
  294.                Key             =   "zh"
  295.             EndProperty
  296.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  297.                Picture         =   "货物流向查询结果.frx":20CC6
  298.                Key             =   "sh"
  299.             EndProperty
  300.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  301.                Picture         =   "货物流向查询结果.frx":21060
  302.                Key             =   "bc"
  303.             EndProperty
  304.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  305.                Picture         =   "货物流向查询结果.frx":213FA
  306.                Key             =   "fq"
  307.             EndProperty
  308.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  309.                Picture         =   "货物流向查询结果.frx":21794
  310.                Key             =   "bz"
  311.             EndProperty
  312.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  313.                Picture         =   "货物流向查询结果.frx":21B2E
  314.                Key             =   "tc"
  315.             EndProperty
  316.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  317.                Picture         =   "货物流向查询结果.frx":21EC8
  318.                Key             =   "bcgs"
  319.             EndProperty
  320.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  321.                Picture         =   "货物流向查询结果.frx":22262
  322.                Key             =   "mrlk"
  323.             EndProperty
  324.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  325.                Picture         =   "货物流向查询结果.frx":225FC
  326.                Key             =   "xsxm"
  327.             EndProperty
  328.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  329.                Picture         =   "货物流向查询结果.frx":22996
  330.                Key             =   "first"
  331.             EndProperty
  332.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  333.                Picture         =   "货物流向查询结果.frx":22D30
  334.                Key             =   "prev"
  335.             EndProperty
  336.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  337.                Picture         =   "货物流向查询结果.frx":230CA
  338.                Key             =   "next"
  339.             EndProperty
  340.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  341.                Picture         =   "货物流向查询结果.frx":23464
  342.                Key             =   "last"
  343.             EndProperty
  344.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  345.                Picture         =   "货物流向查询结果.frx":237FE
  346.                Key             =   "xx"
  347.             EndProperty
  348.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  349.                Picture         =   "货物流向查询结果.frx":23B98
  350.                Key             =   "define"
  351.             EndProperty
  352.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  353.                Picture         =   "货物流向查询结果.frx":23F32
  354.                Key             =   "exec"
  355.             EndProperty
  356.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  357.                Picture         =   "货物流向查询结果.frx":242CC
  358.                Key             =   "xz"
  359.             EndProperty
  360.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  361.                Picture         =   "货物流向查询结果.frx":24666
  362.                Key             =   "sc"
  363.             EndProperty
  364.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  365.                Picture         =   "货物流向查询结果.frx":24A00
  366.                Key             =   "sx"
  367.             EndProperty
  368.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  369.                Picture         =   "货物流向查询结果.frx":24D9A
  370.                Key             =   "cx"
  371.             EndProperty
  372.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  373.                Picture         =   "货物流向查询结果.frx":25134
  374.                Key             =   "zd"
  375.             EndProperty
  376.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  377.                Picture         =   "货物流向查询结果.frx":254CE
  378.                Key             =   "dz"
  379.             EndProperty
  380.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  381.                Picture         =   "货物流向查询结果.frx":25868
  382.                Key             =   "ph"
  383.             EndProperty
  384.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  385.                Picture         =   "货物流向查询结果.frx":25C02
  386.                Key             =   "fz"
  387.             EndProperty
  388.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  389.                Picture         =   "货物流向查询结果.frx":25F9C
  390.                Key             =   "dw"
  391.             EndProperty
  392.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  393.                Picture         =   "货物流向查询结果.frx":26336
  394.                Key             =   "hf"
  395.             EndProperty
  396.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  397.                Picture         =   "货物流向查询结果.frx":266D0
  398.                Key             =   "pz"
  399.             EndProperty
  400.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  401.                Picture         =   "货物流向查询结果.frx":26A6A
  402.                Key             =   "check"
  403.             EndProperty
  404.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  405.                Picture         =   "货物流向查询结果.frx":26E04
  406.                Key             =   "qs"
  407.             EndProperty
  408.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  409.                Picture         =   "货物流向查询结果.frx":2719E
  410.                Key             =   "fullcheck"
  411.             EndProperty
  412.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  413.                Picture         =   "货物流向查询结果.frx":27538
  414.                Key             =   "qq"
  415.             EndProperty
  416.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  417.                Picture         =   "货物流向查询结果.frx":278D2
  418.                Key             =   "bcw"
  419.             EndProperty
  420.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  421.                Picture         =   "货物流向查询结果.frx":27C6C
  422.                Key             =   "ye"
  423.             EndProperty
  424.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  425.                Picture         =   "货物流向查询结果.frx":28006
  426.                Key             =   ""
  427.             EndProperty
  428.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  429.                Picture         =   "货物流向查询结果.frx":283A0
  430.                Key             =   "frist"
  431.             EndProperty
  432.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  433.                Picture         =   "货物流向查询结果.frx":2873A
  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             =   "tx"
  484.             ImageKey        =   "tb"
  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   =   33
  529.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  530.                Picture         =   "货物流向查询结果.frx":28AD4
  531.                Key             =   "sz"
  532.             EndProperty
  533.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  534.                Picture         =   "货物流向查询结果.frx":28E6E
  535.                Key             =   "dy"
  536.             EndProperty
  537.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  538.                Picture         =   "货物流向查询结果.frx":29208
  539.                Key             =   "yl"
  540.             EndProperty
  541.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  542.                Picture         =   "货物流向查询结果.frx":295A2
  543.                Key             =   "xg"
  544.             EndProperty
  545.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  546.                Picture         =   "货物流向查询结果.frx":2993C
  547.                Key             =   "zh"
  548.             EndProperty
  549.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  550.                Picture         =   "货物流向查询结果.frx":29CD6
  551.                Key             =   "sh"
  552.             EndProperty
  553.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  554.                Picture         =   "货物流向查询结果.frx":2A070
  555.                Key             =   "bc"
  556.             EndProperty
  557.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  558.                Picture         =   "货物流向查询结果.frx":2A40A
  559.                Key             =   "fq"
  560.             EndProperty
  561.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  562.                Picture         =   "货物流向查询结果.frx":2A7A4
  563.                Key             =   "bz"
  564.             EndProperty
  565.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  566.                Picture         =   "货物流向查询结果.frx":2AB3E
  567.                Key             =   "tc"
  568.             EndProperty
  569.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  570.                Picture         =   "货物流向查询结果.frx":2AED8
  571.                Key             =   "bcgs"
  572.             EndProperty
  573.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  574.                Picture         =   "货物流向查询结果.frx":2B272
  575.                Key             =   "mrlk"
  576.             EndProperty
  577.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  578.                Picture         =   "货物流向查询结果.frx":2B60C
  579.                Key             =   "xsxm"
  580.             EndProperty
  581.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  582.                Picture         =   "货物流向查询结果.frx":2B9A6
  583.                Key             =   "first"
  584.             EndProperty
  585.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  586.                Picture         =   "货物流向查询结果.frx":2BD40
  587.                Key             =   "prev"
  588.             EndProperty
  589.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  590.                Picture         =   "货物流向查询结果.frx":2C0DA
  591.                Key             =   "next"
  592.             EndProperty
  593.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  594.                Picture         =   "货物流向查询结果.frx":2C474
  595.                Key             =   "last"
  596.             EndProperty
  597.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  598.                Picture         =   "货物流向查询结果.frx":2C80E
  599.                Key             =   "xx"
  600.             EndProperty
  601.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  602.                Picture         =   "货物流向查询结果.frx":2CBA8
  603.                Key             =   "define"
  604.             EndProperty
  605.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  606.                Picture         =   "货物流向查询结果.frx":2CF42
  607.                Key             =   "exec"
  608.             EndProperty
  609.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  610.                Picture         =   "货物流向查询结果.frx":2D2DC
  611.                Key             =   "xz"
  612.             EndProperty
  613.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  614.                Picture         =   "货物流向查询结果.frx":2D676
  615.                Key             =   "sc"
  616.             EndProperty
  617.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  618.                Picture         =   "货物流向查询结果.frx":2DA10
  619.                Key             =   "sx"
  620.             EndProperty
  621.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  622.                Picture         =   "货物流向查询结果.frx":2DDAA
  623.                Key             =   "cx"
  624.             EndProperty
  625.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  626.                Picture         =   "货物流向查询结果.frx":2E144
  627.                Key             =   "zd"
  628.             EndProperty
  629.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  630.                Picture         =   "货物流向查询结果.frx":2E4DE
  631.                Key             =   "dz"
  632.             EndProperty
  633.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  634.                Picture         =   "货物流向查询结果.frx":2E878
  635.                Key             =   "ph"
  636.             EndProperty
  637.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  638.                Picture         =   "货物流向查询结果.frx":2EC12
  639.                Key             =   "fz"
  640.             EndProperty
  641.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  642.                Picture         =   "货物流向查询结果.frx":2EFAC
  643.                Key             =   "dw"
  644.             EndProperty
  645.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  646.                Picture         =   "货物流向查询结果.frx":2F346
  647.                Key             =   "hf"
  648.             EndProperty
  649.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  650.                Picture         =   "货物流向查询结果.frx":2F6E0
  651.                Key             =   "pz"
  652.             EndProperty
  653.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  654.                Picture         =   "货物流向查询结果.frx":2FA7A
  655.                Key             =   "check"
  656.             EndProperty
  657.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  658.                Picture         =   "货物流向查询结果.frx":2FE14
  659.                Key             =   "tb"
  660.             EndProperty
  661.          EndProperty
  662.       End
  663.    End
  664. End
  665. Attribute VB_Name = "Xs_A_FlowAnalysis"
  666. Attribute VB_GlobalNameSpace = False
  667. Attribute VB_Creatable = False
  668. Attribute VB_PredeclaredId = True
  669. Attribute VB_Exposed = False
  670. '**************************************************************************
  671. '*    模 块 名 称 :货物流向分析
  672. '*    功 能 描 述 :
  673. '*    程序员姓名  :李建伟
  674. '*    最后修改人  :李建伟
  675. '*    最后修改时间:2001/10/06
  676. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  677. '**************************************************************************
  678. Dim ReportTitle As String                '报表主标题
  679. Dim Str_QueryCondi As String             '用户录入查询条件
  680. Dim Rec_BillID As New ADODB.Recordset    '用户查询单据ID动态集
  681. Dim TempOrder As String                  '查询排序
  682. '以下为固定使用变量
  683. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  684. Dim GridCode As String                   '显示网格网格代码
  685. Dim GridInf() As Variant                 '整个网格设置信息
  686. Dim Tsxx As String                       '系统提示信息
  687. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  688. Dim Sjhgd As Double                      '网格数据行高度
  689. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  690. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  691. Dim GridStr()  As String                 '网格列信息(字符型)
  692. Dim GridInt() As Integer                 '网格列信息(整型)
  693. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  694. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  695.     On Error Resume Next
  696.     With CxbbGrid
  697.         .Width = Me.Width - 160
  698.         .Height = Me.Height - .Top - 400
  699.     End With
  700.     With Pic_Title
  701.         .Width = Me.Width - 160
  702.     End With
  703.     
  704.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  705. End Sub
  706. Private Sub Form_Load()                                                   '窗体装入
  707.   
  708.     '调入打印页面设置窗体
  709.     ReportTitle = "货物流向分析"
  710.     XtReportCode = "Xs_A_FlowAnalysis"
  711.     Load Dyymctbl
  712.       
  713.     '调整标题栏及网格、格式工具条位置(Fixed)
  714.     Pic_Title.Left = 40
  715.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  716.     CxbbGrid.Left = Pic_Title.Left
  717.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  718.      
  719.     '调 入 网 格(Fixed)
  720.     GridCode = "Xs_A_FlowAnalysis"
  721.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  722.       
  723.     Qslz = GridInf(1)
  724.     Sjhgd = GridInf(2)
  725.     Sfxshjwg = GridInf(7)
  726.     Szzls = CxbbGrid.Cols - 1
  727. End Sub
  728. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  729.     '卸载条件窗体
  730.     Xs_A_FlowAnalysisQuery.UnloadCheck.Value = 1
  731.     Unload Xs_A_FlowAnalysisQuery
  732.     
  733.     '卸载打印页面设置窗体
  734.     Unload Dyymctbl
  735. End Sub
  736. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  737.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  738. End Sub
  739. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)                '网格格式调整(Fixed)
  740.   
  741.     Select Case Button.Key
  742.         Case "bcgs"                                          '保存表格格式
  743.             Call Bcwggs(CxbbGrid, GridCode, GridStr())
  744.         Case "hfmrgs"                                        '恢复默认格式
  745.             Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  746.         Case "szxsxm"                                        '设置显示项目
  747.             Call Szxsxm(CxbbGrid, GridCode)
  748.     End Select
  749. End Sub
  750. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  751.     
  752.     Select Case Button.Key
  753.         Case "ymsz"                                          '页面设置
  754.             Dyymctbl.Show 1
  755.         Case "yl"                                            '预 览
  756.             Call bbyl(True)
  757.         Case "dy"                                            '打 印
  758.             Call bbyl(False)
  759.         Case "cx"                                            '查 询
  760.             Xs_A_FlowAnalysisQuery.Show 1
  761.         Case "tx"                                          '单 据
  762.             Call Txfxbb(CxbbGrid, "Xs_CxbbGrid")
  763.         Case "xz"                                            '新 增
  764.             Call Sub_AddBill
  765.         Case "sc"                                            '删 除
  766.             Call Sub_DeleteBill
  767.         Case "bz"                                            '帮 助
  768.             Call F1bz
  769.         Case "fh"                                            '退 出
  770.            Unload Me
  771.     End Select
  772. End Sub
  773. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  774.     
  775.     Timer1.Enabled = False
  776.     Xt_Wait.Show
  777.     Xt_Wait.Refresh
  778.    
  779.     '加快显示速度
  780.     CxbbGrid.Redraw = False
  781.  
  782.     '生成查询结果
  783.     Call Sub_Query(0)
  784.    
  785.     CxbbGrid.Redraw = True
  786.     
  787.     Xt_Wait.Hide
  788. End Sub
  789. Private Sub Sub_Query(Int_QueryType As Integer)                                     '生成查询结果(Define)
  790.     
  791.     '过程参数:Int_QueryType 0-"点确定按钮"查询  1-"刷新"查询
  792.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  793.     Dim Coljsq As Long                          '网格列计数器
  794.     Dim Jsqte As Long                           '临时动态计数器
  795.     
  796.     Dim TInvQuantity As Single                  '总的销售数量
  797.     Dim TInvMoney As Single                     '总的销售额
  798.     Dim TConQuantity As Single                  '总的发货数量
  799.     Dim TConMoney As Single                     '总的发货额
  800.     Dim TRec_Query As New ADODB.Recordset
  801.     Dim TSqlStr As String
  802.     '以下为自定义部分[
  803.  
  804.     If Int_QueryType = 0 Then   '0-"点确定按钮"查询
  805.         With Xs_A_FlowAnalysisQuery
  806.             Lbl(0).Caption = "部门:" & Trim(.LrText(2).Text)
  807.             Lbl(1).Caption = "行业:" & Trim(.LrText(3))
  808.             Lbl(2).Caption = "销售员:" & Trim(.LrText(5))
  809.             Lbl(3).Caption = "地区:" & Trim(.LrText(7))
  810.             Lbl(6).Caption = "货物编码:" & Trim(.LrText(4))
  811.             If Trim(.LrText(0)) <> "" Then
  812.                 If Trim(.LrText(1)) <> "" Then
  813.                     Lbl(4).Caption = "日期:" & Trim(.LrText(0)) & "—" & Trim(.LrText(1))
  814.                 Else
  815.                     Lbl(4).Caption = "日期:" & Trim(.LrText(0))
  816.                 End If
  817.             End If
  818.             Lbl(5).Caption = "销售类型:" & Trim(.LrText(6))
  819.             '生成查询条件
  820.             Str_QueryCondi = " where 1=1 "
  821.             For Jsqte = 1 To 9
  822.                 Select Case Jsqte
  823.                     Case 1  '查询日期范围(起始)
  824.                         If Trim(.LrText(0).Text) <> "" Then
  825.                             Str_QueryCondi = Str_QueryCondi & " And AnalysisDate>=' " & Trim(.LrText(0).Text) & "'"
  826.                         End If
  827.                     Case 2  '查询日期范围(终止)
  828.                         If Trim(.LrText(1).Text) <> "" Then
  829.                             Str_QueryCondi = Str_QueryCondi & " And AnalysisDate<= ' " & Trim(.LrText(1).Text) & "'"
  830.                         End If
  831.                     Case 3  '部门名称
  832.                         If Trim(.LrText(2).Text) <> "" Then
  833.                             Str_QueryCondi = Str_QueryCondi & " and DeptCode = '" & Trim(.LrText(2).Tag) & "'"
  834.                         End If
  835.                     Case 4  '行业
  836.                         If Trim(.LrText(3).Text) <> "" Then
  837.                             Str_QueryCondi = Str_QueryCondi & " and TradeCode like  '" & Trim(.LrText(3).Tag) & "%'"
  838.                         End If
  839.                     Case 5  '存货编码
  840.                         If Trim(.LrText(4).Text) <> "" Then
  841.                             Str_QueryCondi = Str_QueryCondi & " and WareCode = '" & Trim(.LrText(4).Text) & "'"
  842.                         End If
  843.                     Case 6  '销售员
  844.                         If Trim(.LrText(5).Text) <> "" Then
  845.                             Str_QueryCondi = Str_QueryCondi & " and PersonCode = '" & Trim(.LrText(5).Tag) & "'"
  846.                         End If
  847.                     Case 7  '销售类型
  848.                         If Trim(.LrText(6).Text) <> "" Then
  849.                             Str_QueryCondi = Str_QueryCondi & " and SellTypeCode = '" & Trim(.LrText(6).Tag) & "'"
  850.                         End If
  851.                     Case 8  '地区
  852.                         If Trim(.LrText(7).Text) <> "" Then
  853.                             Str_QueryCondi = Str_QueryCondi & " and AreaCode like '" & Trim(.LrText(7).Tag) & "%'"
  854.                         End If
  855.                     Case 9   '分析项目
  856.                         CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = True
  857.                         CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = True
  858.                         CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = True
  859.                         TempOrder = ""
  860.                         If .Opt_Check(0).Value Then
  861.                             CxbbGrid.ColHidden(Sydz("001", GridStr(), Szzls)) = False
  862.                             Sqlstr = "SELECT AreaName,Sum(InvQuantity) InvQuantity,Sum(InvMoney) InvMoney,Sum(ConQuantity) ConQuantity,Sum(ConMoney) ConMoney from Xs_V_FlowAnalysis " & Str_QueryCondi & " Group by AreaName Order By AreaName "
  863.                         ElseIf .Opt_Check(1).Value Then
  864.                             CxbbGrid.ColHidden(Sydz("002", GridStr(), Szzls)) = False
  865.                             Sqlstr = "SELECT TradeName,Sum(InvQuantity) InvQuantity,Sum(InvMoney) InvMoney,Sum(ConQuantity) ConQuantity,Sum(ConMoney) ConMoney from Xs_V_FlowAnalysis " & Str_QueryCondi & " Group by TradeName Order By TradeName "
  866.                         ElseIf .Opt_Check(2).Value Then
  867.                             CxbbGrid.ColHidden(Sydz("003", GridStr(), Szzls)) = False
  868.                             Sqlstr = "SELECT CusName,Sum(InvQuantity) InvQuantity,Sum(InvMoney) InvMoney,Sum(ConQuantity) ConQuantity,Sum(ConMoney) ConMoney from Xs_V_FlowAnalysis " & Str_QueryCondi & " Group by CusName Order By CusName "
  869.                         End If
  870.                 End Select
  871.             Next Jsqte
  872.         End With
  873.     Else
  874.         '1-"刷新"查询
  875.         If Str_QueryCondi = "" Then
  876.             Str_QueryCondi = " where 1=2 "
  877.         End If
  878.     End If
  879.     TSqlStr = "SELECT Sum(InvQuantity) InvQuantity,Sum(InvMoney) InvMoney,Sum(ConQuantity) ConQuantity,Sum(ConMoney) ConMoney from Xs_V_FlowAnalysis " & Str_QueryCondi
  880.     Set TRec_Query = Cw_DataEnvi.DataConnect.Execute(TSqlStr)
  881.     TInvQuantity = Val(Trim(TRec_Query.Fields("InvQuantity") & ""))
  882.     TConQuantity = Val(Trim(TRec_Query.Fields("conQuantity") & ""))
  883.     TInvMoney = Val(Trim(TRec_Query.Fields("InvMoney") & ""))
  884.     TConMoney = Val(Trim(TRec_Query.Fields("Conmoney") & ""))
  885.     TRec_Query.Close
  886.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  887.     With Rec_Query
  888.         CxbbGrid.Rows = CxbbGrid.FixedRows
  889.         Jsqte = CxbbGrid.FixedRows
  890.         Do While Not .EOF
  891.             If Val(Trim(.Fields("ConMoney") & "")) = 0 And Val(Trim(.Fields("ConMoney") & "")) = 0 And Val(Trim(.Fields("InvQuantity") & "")) = 0 And Val(Trim(.Fields("InvMoney") & "")) = 0 Then
  892.             Else
  893.                CxbbGrid.AddItem ""
  894.                '[>>自定义填充内容
  895.                If Xs_A_FlowAnalysisQuery.Opt_Check(0) Then
  896.                    CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("AreaName") & "")                                                          '地区
  897.                ElseIf Xs_A_FlowAnalysisQuery.Opt_Check(1) Then
  898.                    CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("TradeName") & "")                                                         '行业
  899.                ElseIf Xs_A_FlowAnalysisQuery.Opt_Check(2) Then
  900.                    CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("CusName") & "")                                                           '客户
  901.                End If
  902.                If Val(Trim(.Fields("ConQuantity") & "")) <> 0 Then
  903.                    CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("ConQuantity") & "")                                                       '发货数量
  904.                    If TConQuantity <> 0 Then
  905.                        CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Format(Val(Trim(.Fields("ConQuantity") & "")) / TConQuantity * 100, "0.00")        '发货数量%
  906.                    End If
  907.                End If
  908.                If Val(Trim(.Fields("ConMoney") & "")) <> 0 Then
  909.                    CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("ConMoney") & "")                                                          '发货金额(本币)
  910.                    If TConMoney <> 0 Then
  911.                        CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Format(Val(Trim(.Fields("ConMoney") & "")) / TConMoney * 100, "0.00")               '发货金额(本币)%
  912.                    End If
  913.                End If
  914.                If Val(Trim(.Fields("InvQuantity") & "")) <> 0 Then
  915.                    CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("InvQuantity") & "")                                                       '销售数量(本币)
  916.                    If TInvQuantity <> 0 Then
  917.                        CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Format(Val(Trim(.Fields("InvQuantity") & "")) / TInvQuantity * 100, "0.00")         '销售数量(本币)%
  918.                    End If
  919.                End If
  920.                If Val(Trim(.Fields("InvMoney") & "")) <> 0 Then
  921.                    CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("InvMoney") & "")                                                          '销售金额(本币)
  922.                    If TInvMoney <> 0 Then
  923.                        CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Format(Val(Trim(.Fields("InvMoney") & "")) / TInvMoney * 100, "0.00")               '销售金额(本币)%
  924.                    End If
  925.                End If
  926.                
  927.                '<<]
  928.                '设置数据行高度(Fixed)
  929.                CxbbGrid.RowHeight(Jsqte) = Sjhgd
  930.         
  931.                '动态集指针加1,同时将计数器加1(Fixed)
  932.                 Jsqte = Jsqte + 1
  933.             End If
  934.             .MoveNext
  935.         Loop
  936.     End With
  937.     '合计
  938.     CxbbGrid.AddItem ""
  939.     CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("001", GridStr(), Szzls)) = "合计"
  940.     CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("002", GridStr(), Szzls)) = "合计"
  941.     CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("003", GridStr(), Szzls)) = "合计"
  942.     
  943.     For Coljsq = Qslz To CxbbGrid.Cols - 1
  944.         Call Sjhj(Coljsq)
  945.     Next Coljsq
  946.     If CxbbGrid.Rows <> 2 Then
  947.         If CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("005", GridStr(), Szzls)) <> "" Then
  948.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("005", GridStr(), Szzls)) = "100.00"
  949.         End If
  950.         If CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("007", GridStr(), Szzls)) <> "" Then
  951.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("007", GridStr(), Szzls)) = "100.00"
  952.         End If
  953.         If CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("009", GridStr(), Szzls)) <> "" Then
  954.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("009", GridStr(), Szzls)) = "100.00"
  955.         End If
  956.         If CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("011", GridStr(), Szzls)) <> "" Then
  957.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("011", GridStr(), Szzls)) = "100.00"
  958.         End If
  959.     End If
  960.     ']以上为用户自定义部分
  961. End Sub
  962. Private Sub Sjhj(Hjwgl As Long)                                         '网格列数据合计
  963.     
  964.     Dim Hjjg As Double
  965.     If Not GridBoolean(Hjwgl, 4) Then
  966.         Exit Sub
  967.     End If
  968.     With CxbbGrid
  969.         Hjjg = 0
  970.         For Jsqte = .FixedRows To .Rows - 2
  971.                 If Trim(.TextMatrix(Jsqte, Hjwgl)) <> "" Then
  972.                     Hjjg = Hjjg + Val(.TextMatrix(Jsqte, Hjwgl))
  973.                 End If
  974.         Next Jsqte
  975.         If GridBoolean(Hjwgl, 5) And Hjjg = 0 Then
  976.             CxbbGrid.TextMatrix(.Rows - 1, Hjwgl) = ""
  977.         Else
  978.             CxbbGrid.TextMatrix(.Rows - 1, Hjwgl) = Hjjg
  979.         End If
  980.     End With
  981. End Sub
  982. Private Sub Sub_AddBill()                                              '新增单据
  983.    
  984.     With Xs_O_OrderBill
  985.    
  986.         '设置单据处理为填制单据状态
  987. ''        .Lab_Djclzt.Caption = "1"
  988.          Xtcdcs = "1"
  989.         .Show 1
  990.     End With
  991.        
  992.     If Xtfhcs = "1" Then
  993.         Tsxx = "销售订单发生变化,是否刷新销售订单列表?"
  994.         Yhanswer = Xtxxts(Tsxx, 2, 2)
  995.         If Yhanswer = 1 Then
  996.             Xt_Wait.Show
  997.             Xt_Wait.Refresh
  998.    
  999.             '加快显示速度
  1000.             CxbbGrid.Redraw = False
  1001.  
  1002.             '生成查询结果
  1003.             Call Sub_Query(1)
  1004.    
  1005.             CxbbGrid.Redraw = True
  1006.             Xt_Wait.Hide
  1007.         End If
  1008.     End If
  1009.    
  1010. End Sub
  1011. Private Sub Sub_DeleteBill()                                            '删除选中当前销售订单
  1012.     
  1013.     Dim YAnswer As Integer
  1014.     Dim Lng_BillID As Long           '单据标识
  1015.   
  1016.     '非数据行退出
  1017.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  1018.         Exit Sub
  1019.     End If
  1020.   
  1021.     Tsxx = "请确认是否删除当前销售订单?"
  1022.     Yhanswer = Xtxxts(Tsxx, 2, 2)
  1023.   
  1024.     If Yhanswer = 1 Then
  1025.         '1.判断当前销售订单是否允许删除
  1026.         If Not Fun_AllowDelete Then
  1027.             Exit Sub
  1028.         End If
  1029.   
  1030.         '2.删除单据所有内容
  1031.         Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1032.         On Error GoTo Swcwcl
  1033.         Cw_DataEnvi.DataConnect.BeginTrans
  1034.         Cw_DataEnvi.DataConnect.Execute ("Delete XS_OrderBillMain Where OrderBillMainId=" & Lng_BillID)        '删除单据主表内容
  1035.         Cw_DataEnvi.DataConnect.Execute ("Delete XS_OrderBillSub Where OrderBillMainId=" & Lng_BillID)         '删除单据子表内容
  1036.         Cw_DataEnvi.DataConnect.CommitTrans
  1037.       
  1038.         '删除网格中单据数据
  1039.         Jsqte = CxbbGrid.FixedRows
  1040.         Do While Jsqte <= CxbbGrid.Rows - 1
  1041.             If Val(CxbbGrid.TextMatrix(Jsqte, 0)) = Lng_BillID Then
  1042.                 CxbbGrid.RemoveItem (CxbbGrid.Row)
  1043.             Else
  1044.                 Jsqte = Jsqte + 1
  1045.             End If
  1046.         Loop
  1047.     Else
  1048.         Exit Sub
  1049.     End If
  1050.     Exit Sub
  1051. Swcwcl:
  1052.     Cw_DataEnvi.DataConnect.RollbackTrans
  1053.     Tsxx = "删除销售订单过程中出现未知错误,程序自动恢复删除前状态!"
  1054.     Call Xtxxts(Tsxx, 0, 1)
  1055.     Exit Sub
  1056.   
  1057. End Sub
  1058. Private Function Fun_AllowDelete() As Boolean                                        '判断当前单据是否允许删除
  1059.   
  1060.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1061.     Dim Sqlstr As String                   '查询字符串
  1062.     Dim Lng_BillID As Long                 '单据ID
  1063.   
  1064.     Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1065.     Sqlstr = "Select Checker From XS_OrderBillMain Where OrderBillMainId=" & Lng_BillID
  1066.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1067.     With RecTemp
  1068.         If Not .EOF Then
  1069.             If Trim(.Fields("Checker") & "") <> "" Then
  1070.                 Tsxx = "该销售订单已审核确认,不能删除!"
  1071.                 Call Xtxxts(Tsxx, 0, 4)
  1072.                 Exit Function
  1073.             End If
  1074.             End If
  1075.     End With
  1076.     Fun_AllowDelete = True
  1077.   
  1078. End Function
  1079. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1080.     
  1081.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1082.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1083.     Bbxbtgs = 2                                          '报 表 小 标 题 行 数
  1084.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1085.     ReDim Bbxbt(1 To Bbxbtgs)
  1086.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1087.     If Bbbwhgs <> 0 Then
  1088.         ReDim Bbbwh(1 To Bbbwhgs)
  1089.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1090.     End If
  1091.     Bbzbt = ReportTitle
  1092.     Bbxbt(1) = Space(2) + Fun_FormatOutPut(Trim(Lbl(4).Caption), 30)
  1093.     Bbxbt(1) = Bbxbt(1) + Fun_FormatOutPut(Trim(Lbl(0).Caption), 25)
  1094.     Bbxbt(1) = Bbxbt(1) + Fun_FormatOutPut(Trim(Lbl(5).Caption), 20)
  1095.     Bbxbt(1) = Bbxbt(1) + Fun_FormatOutPut(Trim(Lbl(2).Caption), 20)
  1096.     Bbxbt(2) = Space(2) + Fun_FormatOutPut(Trim(Lbl(1).Caption), 30)
  1097.     Bbxbt(2) = Bbxbt(2) + Fun_FormatOutPut(Trim(Lbl(3).Caption), 25)
  1098.     Bbxbt(2) = Bbxbt(2) + Fun_FormatOutPut(Trim(Lbl(6).Caption), 20)
  1099.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1100.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1101.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1102.     If Not bbylte Then
  1103.         Unload DY_Tybbyldy
  1104.     End If
  1105. End Sub