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

企业管理

开发平台:

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 Balance_KF_BillList 
  5.    Caption         =   "结算单列表"
  6.    ClientHeight    =   8595
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11820
  10.    HelpContextID   =   1215003
  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 Lab_Title 
  62.          BackColor       =   &H80000018&
  63.          BackStyle       =   0  'Transparent
  64.          Caption         =   "结算单列表"
  65.          BeginProperty Font 
  66.             Name            =   "宋体"
  67.             Size            =   12
  68.             Charset         =   134
  69.             Weight          =   700
  70.             Underline       =   0   'False
  71.             Italic          =   0   'False
  72.             Strikethrough   =   0   'False
  73.          EndProperty
  74.          ForeColor       =   &H00000000&
  75.          Height          =   300
  76.          Index           =   4
  77.          Left            =   480
  78.          TabIndex        =   2
  79.          Top             =   210
  80.          Width           =   2715
  81.       End
  82.    End
  83.    Begin VB.Timer Timer1 
  84.       Enabled         =   0   'False
  85.       Interval        =   1
  86.       Left            =   7620
  87.       Top             =   90
  88.    End
  89.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  90.       Height          =   7545
  91.       Left            =   0
  92.       TabIndex        =   0
  93.       Top             =   1470
  94.       Width           =   11775
  95.       _cx             =   5080
  96.       _cy             =   5080
  97.       Appearance      =   1
  98.       BorderStyle     =   1
  99.       Enabled         =   -1  'True
  100.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  101.          Name            =   "宋体"
  102.          Size            =   9
  103.          Charset         =   134
  104.          Weight          =   400
  105.          Underline       =   0   'False
  106.          Italic          =   0   'False
  107.          Strikethrough   =   0   'False
  108.       EndProperty
  109.       MousePointer    =   0
  110.       BackColor       =   16777215
  111.       ForeColor       =   -2147483640
  112.       BackColorFixed  =   13826538
  113.       ForeColorFixed  =   -2147483630
  114.       BackColorSel    =   -2147483635
  115.       ForeColorSel    =   -2147483634
  116.       BackColorBkg    =   -2147483636
  117.       BackColorAlternate=   16777215
  118.       GridColor       =   -2147483633
  119.       GridColorFixed  =   -2147483632
  120.       TreeColor       =   -2147483632
  121.       FloodColor      =   192
  122.       SheetBorder     =   -2147483642
  123.       FocusRect       =   1
  124.       HighLight       =   1
  125.       AllowSelection  =   -1  'True
  126.       AllowBigSelection=   -1  'True
  127.       AllowUserResizing=   0
  128.       SelectionMode   =   0
  129.       GridLines       =   1
  130.       GridLinesFixed  =   2
  131.       GridLineWidth   =   1
  132.       Rows            =   50
  133.       Cols            =   10
  134.       FixedRows       =   1
  135.       FixedCols       =   1
  136.       RowHeightMin    =   0
  137.       RowHeightMax    =   0
  138.       ColWidthMin     =   0
  139.       ColWidthMax     =   0
  140.       ExtendLastCol   =   0   'False
  141.       FormatString    =   ""
  142.       ScrollTrack     =   0   'False
  143.       ScrollBars      =   3
  144.       ScrollTips      =   0   'False
  145.       MergeCells      =   0
  146.       MergeCompare    =   0
  147.       AutoResize      =   -1  'True
  148.       AutoSizeMode    =   0
  149.       AutoSearch      =   0
  150.       AutoSearchDelay =   2
  151.       MultiTotals     =   -1  'True
  152.       SubtotalPosition=   1
  153.       OutlineBar      =   0
  154.       OutlineCol      =   0
  155.       Ellipsis        =   0
  156.       ExplorerBar     =   0
  157.       PicturesOver    =   0   'False
  158.       FillStyle       =   0
  159.       RightToLeft     =   0   'False
  160.       PictureType     =   0
  161.       TabBehavior     =   0
  162.       OwnerDraw       =   0
  163.       Editable        =   0
  164.       ShowComboButton =   1
  165.       WordWrap        =   0   'False
  166.       TextStyle       =   0
  167.       TextStyleFixed  =   0
  168.       OleDragMode     =   0
  169.       OleDropMode     =   0
  170.       DataMode        =   0
  171.       VirtualData     =   -1  'True
  172.       DataMember      =   ""
  173.       ComboSearch     =   3
  174.       AutoSizeMouse   =   -1  'True
  175.       FrozenRows      =   0
  176.       FrozenCols      =   0
  177.       AllowUserFreezing=   0
  178.       BackColorFrozen =   0
  179.       ForeColorFrozen =   0
  180.       WallPaperAlignment=   9
  181.       AccessibleName  =   ""
  182.       AccessibleDescription=   ""
  183.       AccessibleValue =   ""
  184.       AccessibleRole  =   24
  185.       Begin MSComctlLib.ImageList ImageList2 
  186.          Left            =   0
  187.          Top             =   0
  188.          _ExtentX        =   1005
  189.          _ExtentY        =   1005
  190.          BackColor       =   -2147483643
  191.          ImageWidth      =   16
  192.          ImageHeight     =   16
  193.          MaskColor       =   12632256
  194.          _Version        =   393216
  195.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  196.             NumListImages   =   40
  197.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  198.                Picture         =   "结算_结算单列表.frx":1DF82
  199.                Key             =   "sz"
  200.             EndProperty
  201.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  202.                Picture         =   "结算_结算单列表.frx":1E31C
  203.                Key             =   "dy"
  204.             EndProperty
  205.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  206.                Picture         =   "结算_结算单列表.frx":1E6B6
  207.                Key             =   "yl"
  208.             EndProperty
  209.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  210.                Picture         =   "结算_结算单列表.frx":1EA50
  211.                Key             =   "xg"
  212.             EndProperty
  213.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  214.                Picture         =   "结算_结算单列表.frx":1EDEA
  215.                Key             =   "zh"
  216.             EndProperty
  217.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  218.                Picture         =   "结算_结算单列表.frx":1F184
  219.                Key             =   "sh"
  220.             EndProperty
  221.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  222.                Picture         =   "结算_结算单列表.frx":1F51E
  223.                Key             =   "bc"
  224.             EndProperty
  225.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  226.                Picture         =   "结算_结算单列表.frx":1F8B8
  227.                Key             =   "fq"
  228.             EndProperty
  229.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  230.                Picture         =   "结算_结算单列表.frx":1FC52
  231.                Key             =   "bz"
  232.             EndProperty
  233.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  234.                Picture         =   "结算_结算单列表.frx":1FFEC
  235.                Key             =   "tc"
  236.             EndProperty
  237.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  238.                Picture         =   "结算_结算单列表.frx":20386
  239.                Key             =   "bcgs"
  240.             EndProperty
  241.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  242.                Picture         =   "结算_结算单列表.frx":20720
  243.                Key             =   "mrlk"
  244.             EndProperty
  245.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  246.                Picture         =   "结算_结算单列表.frx":20ABA
  247.                Key             =   "xsxm"
  248.             EndProperty
  249.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  250.                Picture         =   "结算_结算单列表.frx":20E54
  251.                Key             =   "first"
  252.             EndProperty
  253.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  254.                Picture         =   "结算_结算单列表.frx":211EE
  255.                Key             =   "prev"
  256.             EndProperty
  257.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  258.                Picture         =   "结算_结算单列表.frx":21588
  259.                Key             =   "next"
  260.             EndProperty
  261.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  262.                Picture         =   "结算_结算单列表.frx":21922
  263.                Key             =   "last"
  264.             EndProperty
  265.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  266.                Picture         =   "结算_结算单列表.frx":21CBC
  267.                Key             =   "xx"
  268.             EndProperty
  269.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  270.                Picture         =   "结算_结算单列表.frx":22056
  271.                Key             =   "define"
  272.             EndProperty
  273.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  274.                Picture         =   "结算_结算单列表.frx":223F0
  275.                Key             =   "exec"
  276.             EndProperty
  277.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  278.                Picture         =   "结算_结算单列表.frx":2278A
  279.                Key             =   "xz"
  280.             EndProperty
  281.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  282.                Picture         =   "结算_结算单列表.frx":22B24
  283.                Key             =   "sc"
  284.             EndProperty
  285.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  286.                Picture         =   "结算_结算单列表.frx":22EBE
  287.                Key             =   "sx"
  288.             EndProperty
  289.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  290.                Picture         =   "结算_结算单列表.frx":23258
  291.                Key             =   "cx"
  292.             EndProperty
  293.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  294.                Picture         =   "结算_结算单列表.frx":235F2
  295.                Key             =   "zd"
  296.             EndProperty
  297.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  298.                Picture         =   "结算_结算单列表.frx":2398C
  299.                Key             =   "dz"
  300.             EndProperty
  301.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  302.                Picture         =   "结算_结算单列表.frx":23D26
  303.                Key             =   "ph"
  304.             EndProperty
  305.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  306.                Picture         =   "结算_结算单列表.frx":240C0
  307.                Key             =   "fz"
  308.             EndProperty
  309.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  310.                Picture         =   "结算_结算单列表.frx":2445A
  311.                Key             =   "dw"
  312.             EndProperty
  313.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  314.                Picture         =   "结算_结算单列表.frx":247F4
  315.                Key             =   "hf"
  316.             EndProperty
  317.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  318.                Picture         =   "结算_结算单列表.frx":24B8E
  319.                Key             =   "pz"
  320.             EndProperty
  321.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  322.                Picture         =   "结算_结算单列表.frx":24F28
  323.                Key             =   "check"
  324.             EndProperty
  325.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  326.                Picture         =   "结算_结算单列表.frx":252C2
  327.                Key             =   "qs"
  328.             EndProperty
  329.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  330.                Picture         =   "结算_结算单列表.frx":2565C
  331.                Key             =   "fullcheck"
  332.             EndProperty
  333.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  334.                Picture         =   "结算_结算单列表.frx":259F6
  335.                Key             =   "qq"
  336.             EndProperty
  337.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  338.                Picture         =   "结算_结算单列表.frx":25D90
  339.                Key             =   "bcw"
  340.             EndProperty
  341.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  342.                Picture         =   "结算_结算单列表.frx":2612A
  343.                Key             =   "ye"
  344.             EndProperty
  345.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  346.                Picture         =   "结算_结算单列表.frx":264C4
  347.                Key             =   ""
  348.             EndProperty
  349.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  350.                Picture         =   "结算_结算单列表.frx":2685E
  351.                Key             =   "frist"
  352.             EndProperty
  353.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  354.                Picture         =   "结算_结算单列表.frx":26BF8
  355.                Key             =   "dj"
  356.             EndProperty
  357.          EndProperty
  358.       End
  359.    End
  360.    Begin MSComctlLib.Toolbar SzToolbar 
  361.       Align           =   1  'Align Top
  362.       Height          =   555
  363.       Left            =   0
  364.       TabIndex        =   4
  365.       Top             =   0
  366.       Width           =   11820
  367.       _ExtentX        =   20849
  368.       _ExtentY        =   979
  369.       ButtonWidth     =   820
  370.       ButtonHeight    =   926
  371.       AllowCustomize  =   0   'False
  372.       Appearance      =   1
  373.       Style           =   1
  374.       ImageList       =   "ImageList1"
  375.       _Version        =   393216
  376.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  377.          NumButtons      =   11
  378.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  379.             Caption         =   "设置"
  380.             Key             =   "ymsz"
  381.             ImageKey        =   "sz"
  382.          EndProperty
  383.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  384.             Caption         =   "打印"
  385.             Key             =   "dy"
  386.             ImageKey        =   "dy"
  387.          EndProperty
  388.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  389.             Caption         =   "预览"
  390.             Key             =   "yl"
  391.             ImageKey        =   "yl"
  392.          EndProperty
  393.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  394.             Style           =   3
  395.          EndProperty
  396.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  397.             Caption         =   "查询"
  398.             Key             =   "cx"
  399.             ImageKey        =   "cx"
  400.          EndProperty
  401.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  402.             Caption         =   "单据"
  403.             Key             =   "Bill"
  404.             ImageKey        =   "pz"
  405.          EndProperty
  406.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  407.             Style           =   3
  408.          EndProperty
  409.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  410.             Caption         =   "删除"
  411.             Key             =   "sc"
  412.             ImageKey        =   "sc"
  413.          EndProperty
  414.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  415.             Style           =   3
  416.          EndProperty
  417.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  418.             Caption         =   "帮助"
  419.             Key             =   "bz"
  420.             ImageKey        =   "bz"
  421.          EndProperty
  422.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  423.             Caption         =   "退出"
  424.             Key             =   "fh"
  425.             ImageKey        =   "tc"
  426.          EndProperty
  427.       EndProperty
  428.       BorderStyle     =   1
  429.       Begin MSComctlLib.ImageList ImageList1 
  430.          Left            =   6990
  431.          Top             =   30
  432.          _ExtentX        =   1005
  433.          _ExtentY        =   1005
  434.          BackColor       =   -2147483643
  435.          ImageWidth      =   16
  436.          ImageHeight     =   16
  437.          MaskColor       =   12632256
  438.          _Version        =   393216
  439.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  440.             NumListImages   =   32
  441.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  442.                Picture         =   "结算_结算单列表.frx":26F92
  443.                Key             =   "sz"
  444.             EndProperty
  445.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  446.                Picture         =   "结算_结算单列表.frx":2732C
  447.                Key             =   "dy"
  448.             EndProperty
  449.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  450.                Picture         =   "结算_结算单列表.frx":276C6
  451.                Key             =   "yl"
  452.             EndProperty
  453.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  454.                Picture         =   "结算_结算单列表.frx":27A60
  455.                Key             =   "xg"
  456.             EndProperty
  457.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  458.                Picture         =   "结算_结算单列表.frx":27DFA
  459.                Key             =   "zh"
  460.             EndProperty
  461.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  462.                Picture         =   "结算_结算单列表.frx":28194
  463.                Key             =   "sh"
  464.             EndProperty
  465.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  466.                Picture         =   "结算_结算单列表.frx":2852E
  467.                Key             =   "bc"
  468.             EndProperty
  469.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  470.                Picture         =   "结算_结算单列表.frx":288C8
  471.                Key             =   "fq"
  472.             EndProperty
  473.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  474.                Picture         =   "结算_结算单列表.frx":28C62
  475.                Key             =   "bz"
  476.             EndProperty
  477.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  478.                Picture         =   "结算_结算单列表.frx":28FFC
  479.                Key             =   "tc"
  480.             EndProperty
  481.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  482.                Picture         =   "结算_结算单列表.frx":29396
  483.                Key             =   "bcgs"
  484.             EndProperty
  485.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  486.                Picture         =   "结算_结算单列表.frx":29730
  487.                Key             =   "mrlk"
  488.             EndProperty
  489.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  490.                Picture         =   "结算_结算单列表.frx":29ACA
  491.                Key             =   "xsxm"
  492.             EndProperty
  493.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  494.                Picture         =   "结算_结算单列表.frx":29E64
  495.                Key             =   "first"
  496.             EndProperty
  497.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  498.                Picture         =   "结算_结算单列表.frx":2A1FE
  499.                Key             =   "prev"
  500.             EndProperty
  501.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  502.                Picture         =   "结算_结算单列表.frx":2A598
  503.                Key             =   "next"
  504.             EndProperty
  505.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  506.                Picture         =   "结算_结算单列表.frx":2A932
  507.                Key             =   "last"
  508.             EndProperty
  509.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  510.                Picture         =   "结算_结算单列表.frx":2ACCC
  511.                Key             =   "xx"
  512.             EndProperty
  513.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  514.                Picture         =   "结算_结算单列表.frx":2B066
  515.                Key             =   "define"
  516.             EndProperty
  517.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  518.                Picture         =   "结算_结算单列表.frx":2B400
  519.                Key             =   "exec"
  520.             EndProperty
  521.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  522.                Picture         =   "结算_结算单列表.frx":2B79A
  523.                Key             =   "xz"
  524.             EndProperty
  525.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  526.                Picture         =   "结算_结算单列表.frx":2BB34
  527.                Key             =   "sc"
  528.             EndProperty
  529.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  530.                Picture         =   "结算_结算单列表.frx":2BECE
  531.                Key             =   "sx"
  532.             EndProperty
  533.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  534.                Picture         =   "结算_结算单列表.frx":2C268
  535.                Key             =   "cx"
  536.             EndProperty
  537.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  538.                Picture         =   "结算_结算单列表.frx":2C602
  539.                Key             =   "zd"
  540.             EndProperty
  541.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  542.                Picture         =   "结算_结算单列表.frx":2C99C
  543.                Key             =   "dz"
  544.             EndProperty
  545.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  546.                Picture         =   "结算_结算单列表.frx":2CD36
  547.                Key             =   "ph"
  548.             EndProperty
  549.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  550.                Picture         =   "结算_结算单列表.frx":2D0D0
  551.                Key             =   "fz"
  552.             EndProperty
  553.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  554.                Picture         =   "结算_结算单列表.frx":2D46A
  555.                Key             =   "dw"
  556.             EndProperty
  557.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  558.                Picture         =   "结算_结算单列表.frx":2D804
  559.                Key             =   "hf"
  560.             EndProperty
  561.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  562.                Picture         =   "结算_结算单列表.frx":2DB9E
  563.                Key             =   "pz"
  564.             EndProperty
  565.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  566.                Picture         =   "结算_结算单列表.frx":2DF38
  567.                Key             =   "check"
  568.             EndProperty
  569.          EndProperty
  570.       End
  571.    End
  572. End
  573. Attribute VB_Name = "Balance_KF_BillList"
  574. Attribute VB_GlobalNameSpace = False
  575. Attribute VB_Creatable = False
  576. Attribute VB_PredeclaredId = True
  577. Attribute VB_Exposed = False
  578. '**************************************************************************
  579. '*    模 块 名 称 :结算单列表
  580. '*    功 能 描 述 :
  581. '*    程序员姓名  :周化江
  582. '*    最后修改人  :周化江
  583. '*    最后修改时间:2001/10/06
  584. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  585. '**************************************************************************
  586. Dim ReportTitle As String                '报表主标题
  587. Dim Str_QueryCondi As String             '用户录入查询条件
  588. Dim Rec_BillID As New ADODB.Recordset    '用户查询单据ID动态集
  589. Dim Bln_ClrkdKfsc As Boolean
  590. '以下为固定使用变量
  591. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  592. Dim GridCode As String                   '显示网格网格代码
  593. Dim GridInf() As Variant                 '整个网格设置信息
  594. Dim Tsxx As String                       '系统提示信息
  595. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  596. Dim Sjhgd As Double                      '网格数据行高度
  597. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  598. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  599. Dim GridStr()  As String                 '网格列信息(字符型)
  600. Dim GridInt() As Integer                 '网格列信息(整型)
  601. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  602. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  603.     On Error Resume Next
  604.     With CxbbGrid
  605.         .Width = Me.Width - 160
  606.         .Height = Me.Height - .Top - 400
  607.     End With
  608.     With Pic_Title
  609.         .Width = Me.Width - 160
  610.     End With
  611.     
  612.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  613. End Sub
  614. Private Sub Form_Load()                                                   '窗体装入
  615.   
  616.     '调入打印页面设置窗体
  617.     ReportTitle = "结算单列表"
  618.     XtReportCode = "KF_BalanceBillList"
  619.     Load Dyymctbl
  620.       
  621.     '调整标题栏及网格、格式工具条位置(Fixed)
  622.     Pic_Title.Left = 40
  623.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  624.     CxbbGrid.Left = Pic_Title.Left
  625.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  626.      
  627.     '调 入 网 格(Fixed)
  628.     GridCode = "KF_BalanceBillList"
  629.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  630.     Bln_ClrkdKfsc = Fun_ClrkdKfsc ''材料入库单是不是由库房生成
  631.     Qslz = GridInf(1)
  632.     Sjhgd = GridInf(2)
  633.     Sfxshjwg = GridInf(7)
  634.     Szzls = CxbbGrid.Cols - 1
  635. End Sub
  636. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  637.     '卸载条件窗体
  638.     Balance_KF_BillQuery.UnloadCheck.Value = 1
  639.     Unload Balance_KF_BillQuery
  640.     
  641.     '卸载打印页面设置窗体
  642.     Unload Dyymctbl
  643. End Sub
  644. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  645.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  646. End Sub
  647. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)                '网格格式调整(Fixed)
  648.   
  649.     Select Case Button.Key
  650.         Case "bcgs"                                          '保存表格格式
  651.             Call Bcwggs(CxbbGrid, GridCode, GridStr())
  652.         Case "hfmrgs"                                        '恢复默认格式
  653.             Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  654.         Case "szxsxm"                                        '设置显示项目
  655.             Call Szxsxm(CxbbGrid, GridCode)
  656.     End Select
  657. End Sub
  658. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  659.     
  660.     Select Case Button.Key
  661.         Case "ymsz"                                          '页面设置
  662.             Dyymctbl.Show 1
  663.         Case "yl"                                            '预 览
  664.             Call bbyl(True)
  665.         Case "dy"                                            '打 印
  666.             Call bbyl(False)
  667.         Case "cx"                                            '查 询
  668.             Balance_KF_BillQuery.Show 1
  669.         Case "Bill"                                          '单 据
  670.             Call CxbbGrid_DblClick
  671.         Case "xz"                                            '新 增
  672.             Call Sub_AddBill
  673.         Case "sc"                                            '删 除
  674.             Call Sub_DeleteBill
  675.         Case "bz"                                            '帮 助
  676.             Call F1bz
  677.         Case "fh"                                            '退 出
  678.            Unload Me
  679.     End Select
  680. End Sub
  681. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  682.     
  683.     Timer1.Enabled = False
  684.     Xt_Wait.Show
  685.     Xt_Wait.Refresh
  686.    
  687.     '加快显示速度
  688.     CxbbGrid.Redraw = False
  689.  
  690.     '生成查询结果
  691.     Call Sub_Query(0)
  692.    
  693.     CxbbGrid.Redraw = True
  694.     
  695.     Xt_Wait.Hide
  696. End Sub
  697. Private Sub Sub_Query(Int_QueryType As Integer)                                     '生成查询结果(Define)
  698.     
  699.     '过程参数:Int_QueryType 0-"点确定按钮"查询  1-"刷新"查询
  700.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  701.     Dim Coljsq As Long                          '网格列计数器
  702.     Dim jsqte As Long                           '临时动态计数器
  703.     Dim varOption  As Control
  704.     '以下为自定义部分[
  705.      Dim Number As Long
  706.     If Int_QueryType = 0 Then   '0-"点确定按钮"查询
  707.      Str_QueryCondi = "where 1=1"
  708.         With Balance_KF_BillQuery
  709.             For jsqte = 1 To 6
  710.                 Select Case jsqte
  711.                     Case 1  '查询日期范围(起始)
  712.                         If Trim(.LrText(0).Text) <> "" Then
  713.                             Str_QueryCondi = Str_QueryCondi & " And a.BillDate>=convert(datetime,'" & Trim(.LrText(0).Text) & "')"
  714.                         End If
  715.                     Case 2  '查询日期范围(终止)
  716.                         If Trim(.LrText(1).Text) <> "" Then
  717.                             Str_QueryCondi = Str_QueryCondi & " And a.BillDate<= convert(datetime,'" & Trim(.LrText(1).Text) & "')"
  718.                         End If
  719.                     Case 3  '供应商(Like)
  720.                         If Trim(.LrText(3).Text) <> "" Then
  721.                             Str_QueryCondi = Str_QueryCondi & " And ( a.SupplierCode like '%" & Trim(.LrText(3).Text) & "%' or a.SupplierName like '%" & Trim(.LrText(3).Text) & "%')"
  722.                         End If
  723.                     Case 4  '物料分类
  724.                         If Trim(.LrText(4).Text) <> "" Then
  725.                             Str_QueryCondi = Str_QueryCondi & " and a.InvSortcode like '" & Trim(.LrText(4).Tag) & "%'"
  726.                         End If
  727.                     Case 5  '物料
  728.                         If Trim(.LrText(5).Text) <> "" Then
  729.                             Str_QueryCondi = Str_QueryCondi & " and ( a.MNumber like  '%" & Trim(.LrText(5).Text) & "%' or a.MName like '%" & Trim(.LrText(5).Text) & "%' )"
  730.                         End If
  731.                    Case 6
  732.                         If Trim(.LrText(2).Text) <> "" Then
  733.                             Str_QueryCondi = Str_QueryCondi & " And a.BillNum like '%" & Trim(.LrText(2).Text) & "%'"
  734.                         End If
  735.                 End Select
  736.             Next
  737.             For Each varOption In .Controls
  738.                 If TypeName(varOption) = "OptionButton" Then
  739.                     If varOption.Value = True Then
  740.                        Str_QueryCondi = Str_QueryCondi & varOption.Tag
  741.                     End If
  742.                 End If
  743.             Next
  744.         End With
  745.         If Bln_ClrkdKfsc = False Then
  746.         Str_QueryCondi = Str_QueryCondi & " and a.BalanceMainId  in (SELECT BalanceMainId " & _
  747.                                           " From Kf_BalanceRelation " & _
  748.                                            "  WHERE (BalanceMainId NOT IN " & _
  749.                                                      " (SELECT BalanceMainId " & _
  750.                                                     " From Kf_BalanceRelation " & _
  751.                                                     " WHERE (InOutMainId <> 0)) OR " & _
  752.                                                     " InvoiceMainID IN " & _
  753.                                                        " (SELECT NULLIF (InvoiceMainID, 0) " & _
  754.                                                       " From Kf_BalanceRelation " & _
  755.                                                       " WHERE BalanceMainId IN " & _
  756.                                                                 " (SELECT BalanceMainId " & _
  757.                                                                " From Kf_BalanceRelation " & _
  758.                                                                " WHERE InOutMainId IN " & _
  759.                                                                          " (SELECT A.InOutMainId " & _
  760.                                                                         " FROM Gy_InOutMain A INNER JOIN " & _
  761.                                                                               " Gy_InOutSub B ON A.InOutMainId = B.InOutMainId " & _
  762.                                                                         " WHERE (A.BillCode = '1201' OR " & _
  763.                                                                               " A.BillCode = '1211') AND (B.BalanceDate IS NOT NULL) AND " & _
  764.                                                                               " A.WhCode IN " & _
  765.                                                                                   " (SELECT WhCode " & _
  766.                                                                                  " From KF_V_WhLimit " & _
  767.                                                                                  " WHERE czybm = '" & Xtczybm & "'))))) )"
  768.         Else
  769.         Str_QueryCondi = Str_QueryCondi & " and a.BalanceMainId  in (SELECT BalanceMainId " & _
  770.                                                             " From Kf_BalanceRelation " & _
  771.                                                             "  WHERE (InvoiceMainID IN " & _
  772.                                                                        " (SELECT NULLIF (InvoiceMainID, 0) " & _
  773.                                                                       " From Kf_BalanceRelation " & _
  774.                                                                       " WHERE BalanceMainId IN " & _
  775.                                                                                 " (SELECT A.BanlanceId " & _
  776.                                                                                " FROM Gy_InOutMain A " & _
  777.                                                                                " WHERE (A.BillCode = '1212') AND whcode IN " & _
  778.                                                                                          " (SELECT WhCode " & _
  779.                                                                                         " From KF_V_WhLimit " & _
  780.                                                                                         " WHERE czybm = '" & Xtczybm & "')))) )"
  781.       End If
  782.     Else
  783.         '1-"刷新"查询
  784.         If Str_QueryCondi = "" Then
  785.             Str_QueryCondi = " where 1=2  "
  786.         End If
  787.     End If
  788.      
  789.     Sqlstr = "select * from KF_V_Banlance  a " & Str_QueryCondi & " Order By a.BillDate,a.BillNum,a.BalanceSubId"
  790.     
  791.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  792.     With Rec_Query
  793.        CxbbGrid.Rows = CxbbGrid.FixedRows
  794.        jsqte = CxbbGrid.FixedRows
  795.        Do While Not .EOF
  796.           If jsqte >= CxbbGrid.Rows Then
  797.              CxbbGrid.AddItem ""
  798.           End If
  799.                '[>>自定义填充内容
  800.             CxbbGrid.TextMatrix(jsqte, 0) = .Fields("BalanceMainId")                                                 '结算单ID(主要用来查询定位用)
  801.             
  802.             If CxbbGrid.TextMatrix(jsqte, 0) <> CxbbGrid.TextMatrix(jsqte - 1, 0) Then
  803.                Number = Number + 1
  804.                CxbbGrid.TextMatrix(jsqte, 3) = Number
  805.             Else
  806.                CxbbGrid.TextMatrix(jsqte, 3) = CxbbGrid.TextMatrix(jsqte - 1, 3)
  807.             End If
  808.       '如果为同一张单据则不再输出制单日期和凭证号
  809.             CxbbGrid.TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = Format(.Fields("BillDate"), "yyyy-mm-dd")
  810.             CxbbGrid.TextMatrix(jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("OperType") & "")
  811.             CxbbGrid.TextMatrix(jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("BillNum") & "")
  812.             CxbbGrid.TextMatrix(jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("SupplierName") & "")
  813.             CxbbGrid.TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("DeptName") & "")
  814.             CxbbGrid.TextMatrix(jsqte, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("PersonName") & "")
  815.             CxbbGrid.TextMatrix(jsqte, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("Maker") & "")
  816.             CxbbGrid.TextMatrix(jsqte, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("Checker") & "")
  817.             CxbbGrid.TextMatrix(jsqte, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("MNumber") & "")
  818.             CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("MName") & "")
  819.             CxbbGrid.TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("Model") & "")
  820.             CxbbGrid.TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = Trim(.Fields("PrimaryUnitName") & "")
  821.             CxbbGrid.TextMatrix(jsqte, Sydz("013", GridStr(), Szzls)) = IIf(IsNull(.Fields("Quan")) Or .Fields("Quan") = 0, "", .Fields("Quan").Value)
  822.             CxbbGrid.TextMatrix(jsqte, Sydz("014", GridStr(), Szzls)) = IIf(IsNull(.Fields("Price")) Or .Fields("Price") = 0, "", .Fields("Price").Value)
  823.             CxbbGrid.TextMatrix(jsqte, Sydz("015", GridStr(), Szzls)) = IIf(IsNull(.Fields("EMoney")) Or .Fields("EMoney") = 0, "", .Fields("EMoney").Value)
  824.             '<<]
  825.             '设置数据行高度(Fixed)
  826.             CxbbGrid.RowHeight(jsqte) = Sjhgd
  827.      
  828.             '动态集指针加1,同时将计数器加1(Fixed)
  829.             .MoveNext
  830.             jsqte = jsqte + 1
  831.         Loop
  832.     End With
  833. End Sub
  834. Private Sub CxbbGrid_DblClick()                                              '用户双击网格调入相应单据
  835.     
  836.     Dim RecTemp As New ADODB.Recordset               '临时使用动态集
  837.     '当第一次查询结果为空时,判断总记录行是否与固定行数相同,如相同则出现错误(双表头出现此情况)
  838.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then
  839.         Exit Sub
  840.     End If
  841.     '非数据行退出
  842.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  843.         Exit Sub
  844.     End If
  845.     Sqlstr = "SELECT BalanceMainId From Kf_BalanceMain Where BalanceMainId=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  846.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  847.     With RecTemp
  848.         If .EOF Then
  849.             Tsxx = "此结算单已被其他用户删除!"
  850.             Call Xtxxts(Tsxx, 0, 4)
  851.             Exit Sub
  852.         Else
  853.             '调入单据处理窗体
  854.             With Balance_KF_Bill
  855.                 
  856.                 '填充查询单据标识
  857.                 XT_BillID = CxbbGrid.TextMatrix(CxbbGrid.Row, 0)
  858.                 Xtcdcsfz = Str_QueryCondi
  859.                 
  860.                 '设置单据处理为列表查询(修改)状态
  861.                 Xtcdcs = "2"
  862.                 .Show 1
  863.             End With
  864.             If Xtfhcs = "1" Then
  865.                 Tsxx = "结算单发生变化,是否刷新结算单列表?"
  866.                 Yhanswer = Xtxxts(Tsxx, 2, 2)
  867.                 If Yhanswer = 1 Then
  868.                     Xt_Wait.Show
  869.                     Xt_Wait.Refresh
  870.    
  871.                     '加快显示速度
  872.                     CxbbGrid.Redraw = False
  873.  
  874.                     '生成查询结果
  875.                     Call Sub_Query(1)
  876.    
  877.                     CxbbGrid.Redraw = True
  878.                     Xt_Wait.Hide
  879.                 End If
  880.             End If
  881.         End If
  882.     End With
  883. End Sub
  884. Private Sub Sub_AddBill()                                              '新增单据
  885.    
  886.     With Balance_KF_Bill
  887.    
  888.         '设置单据处理为填制单据状态
  889.          Xtcdcs = "1"
  890.         .Show 1
  891.     End With
  892.        
  893.     If Xtfhcs = "1" Then
  894.         Tsxx = "结算单发生变化,是否刷新结算单列表?"
  895.         Yhanswer = Xtxxts(Tsxx, 2, 2)
  896.         If Yhanswer = 1 Then
  897.             Xt_Wait.Show
  898.             Xt_Wait.Refresh
  899.    
  900.             '加快显示速度
  901.             CxbbGrid.Redraw = False
  902.  
  903.             '生成查询结果
  904.             Call Sub_Query(1)
  905.    
  906.             CxbbGrid.Redraw = True
  907.             Xt_Wait.Hide
  908.         End If
  909.     End If
  910.    
  911. End Sub
  912. Private Sub Sub_DeleteBill()                                            '删除选中当前结算单
  913.     
  914.     Dim YAnswer As Integer
  915.     Dim Lng_BillID As Long           '单据标识
  916.     Dim RecTemp As New ADODB.Recordset
  917.     '当第一次查询结果为空时,判断总记录行是否与固定行数相同,如相同则出现错误(双表头出现此情况)
  918.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then
  919.         Exit Sub
  920.     End If
  921.     '非数据行退出
  922.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  923.         Exit Sub
  924.     End If
  925.   
  926.     Tsxx = "请确认是否删除当前结算单?"
  927.     Yhanswer = Xtxxts(Tsxx, 2, 2)
  928.   
  929.     If Yhanswer = 1 Then
  930.         '1.判断当前结算单是否允许删除
  931.         If Not Fun_AllowDelete Then
  932.             Exit Sub
  933.         End If
  934.   
  935.         '2.删除单据所有内容
  936.         Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  937.         On Error GoTo Swcwcl
  938.         tempstr = "SELECT * From Cg_InvoiceMain WHERE  InvoiceMainID IN  (SELECT NULLIF (InvoiceMainID, 0) From Kf_BalanceRelation  Where BalanceMainId = " & Val(Lng_BillID) & ") and apbookflag=1"
  939.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(tempstr)
  940.         If RecTemp.RecordCount <> 0 Then
  941.             Tsxx = "与该单据相关联的采购发票已过帐" & Chr(13) & "不能删除该结算单!"
  942.             Call Xtxxts(Tsxx, 0, 4)
  943.             Exit Sub
  944.         End If
  945.         Cw_DataEnvi.DataConnect.BeginTrans
  946.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute("Kf_Sp_BalanceDelete  " & Lng_BillID)
  947.         If Not RecTemp.EOF Then
  948.             If RecTemp.Fields(0).Value = 0 Then
  949.                     Tsxx = "与该单据相关联的材料入库单已审核" & Chr(13) & "或已记账确认,不能删除该结算单!"
  950.                     Call Xtxxts(Tsxx, 0, 4)
  951.                     Cw_DataEnvi.DataConnect.CommitTrans
  952.                     Exit Sub
  953.             End If
  954.         Else
  955.             Tsxx = "该删除功能出现错误!"
  956.             Call Xtxxts(Tsxx, 0, 4)
  957.             Cw_DataEnvi.DataConnect.CommitTrans
  958.             Exit Sub
  959.         End If
  960.         
  961.         Cw_DataEnvi.DataConnect.CommitTrans
  962.       
  963.         '删除网格中单据数据
  964.         jsqte = CxbbGrid.FixedRows
  965.           Timer1.Enabled = True
  966.     Else
  967.         Exit Sub
  968.     End If
  969.     Exit Sub
  970. Swcwcl:
  971.     Cw_DataEnvi.DataConnect.RollbackTrans
  972.     Tsxx = "删除结算单过程中出现未知错误,程序自动恢复删除前状态!"
  973.     Call Xtxxts(Tsxx, 0, 1)
  974.     Exit Sub
  975.   
  976. End Sub
  977. Private Function Fun_AllowDelete() As Boolean                                        '判断当前单据是否允许删除
  978.   
  979.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  980.     Dim Sqlstr As String                   '查询字符串
  981.     Dim Lng_BillID As Long                 '单据ID
  982.   
  983.     Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  984.     Sqlstr = "Select Checker  From Kf_BalanceMain Where BalanceMainId=" & Lng_BillID
  985.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  986.     With RecTemp
  987.         If Not .EOF Then
  988.             If Trim(.Fields("Checker") & "") <> "" Then
  989.                 Tsxx = "该单据已审核确认,不能删除!"
  990.                 Call Xtxxts(Tsxx, 0, 4)
  991.                 Exit Function
  992.             End If
  993.         End If
  994.     End With
  995.     Fun_AllowDelete = True
  996. End Function
  997. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  998.     
  999.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1000.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1001.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1002.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1003.     ReDim Bbxbt(1 To Bbxbtgs)
  1004.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1005.     If Bbbwhgs <> 0 Then
  1006.         ReDim Bbbwh(1 To Bbbwhgs)
  1007.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1008.     End If
  1009.     Bbzbt = ReportTitle
  1010.     Bbxbt(1) = ""
  1011.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1012.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1013.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1014.     If Not bbylte Then
  1015.         Unload DY_Tybbyldy
  1016.     End If
  1017. End Sub