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