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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{65A39231-6133-11D1-BAA2-444553540000}#1.0#0"; "vslight6.OCX"
  3. Object = "{C5DE3F80-3376-11D2-BAA4-04F205C10000}#1.0#0"; "Vsflex6d.ocx"
  4. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  5. Begin VB.Form Cg_InvoiceQCPT_List 
  6.    Caption         =   "期初普通发票列表"
  7.    ClientHeight    =   8595
  8.    ClientLeft      =   315
  9.    ClientTop       =   390
  10.    ClientWidth     =   11820
  11.    HelpContextID   =   5001
  12.    Icon            =   "采购系统_发票类型设置.frx":0000
  13.    KeyPreview      =   -1  'True
  14.    LinkTopic       =   "Form1"
  15.    MDIChild        =   -1  'True
  16.    ScaleHeight     =   8595
  17.    ScaleWidth      =   11820
  18.    WindowState     =   2  'Maximized
  19.    Begin MSComctlLib.Toolbar GsToolbar 
  20.       Height          =   540
  21.       Left            =   9330
  22.       TabIndex        =   3
  23.       Top             =   30
  24.       Width           =   2475
  25.       _ExtentX        =   4366
  26.       _ExtentY        =   953
  27.       ButtonWidth     =   1455
  28.       ButtonHeight    =   953
  29.       Appearance      =   1
  30.       Style           =   1
  31.       ImageList       =   "ImageList2"
  32.       _Version        =   393216
  33.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  34.          NumButtons      =   3
  35.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  36.             Caption         =   "保存格式"
  37.             Key             =   "bcgs"
  38.             ImageKey        =   "bcgs"
  39.          EndProperty
  40.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  41.             Caption         =   "默认列宽"
  42.             Key             =   "hfmrgs"
  43.             ImageKey        =   "mrlk"
  44.          EndProperty
  45.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  46.             Caption         =   "显示项目"
  47.             Key             =   "szxsxm"
  48.             ImageKey        =   "xsxm"
  49.          EndProperty
  50.       EndProperty
  51.    End
  52.    Begin VB.PictureBox Pic_Title 
  53.       Height          =   825
  54.       Left            =   0
  55.       Picture         =   "采购系统_发票查询列表.frx":08CA
  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 VSFlex6DAOCtl.vsFlexGrid CxbbGrid 
  90.       Height          =   7545
  91.       Left            =   0
  92.       TabIndex        =   0
  93.       Top             =   1470
  94.       Width           =   11775
  95.       _ExtentX        =   20770
  96.       _ExtentY        =   13309
  97.       _ConvInfo       =   1
  98.       Appearance      =   1
  99.       BorderStyle     =   1
  100.       Enabled         =   -1  'True
  101.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  102.          Name            =   "宋体"
  103.          Size            =   9
  104.          Charset         =   134
  105.          Weight          =   400
  106.          Underline       =   0   'False
  107.          Italic          =   0   'False
  108.          Strikethrough   =   0   'False
  109.       EndProperty
  110.       MousePointer    =   0
  111.       BackColor       =   16777215
  112.       ForeColor       =   -2147483640
  113.       BackColorFixed  =   13826538
  114.       ForeColorFixed  =   -2147483630
  115.       BackColorSel    =   -2147483635
  116.       ForeColorSel    =   -2147483634
  117.       BackColorBkg    =   -2147483636
  118.       BackColorAlternate=   16777215
  119.       GridColor       =   -2147483633
  120.       GridColorFixed  =   -2147483632
  121.       TreeColor       =   -2147483632
  122.       FloodColor      =   192
  123.       SheetBorder     =   -2147483642
  124.       FocusRect       =   1
  125.       HighLight       =   1
  126.       AllowSelection  =   -1  'True
  127.       AllowBigSelection=   -1  'True
  128.       AllowUserResizing=   0
  129.       SelectionMode   =   0
  130.       GridLines       =   1
  131.       GridLinesFixed  =   2
  132.       GridLineWidth   =   1
  133.       Rows            =   50
  134.       Cols            =   10
  135.       FixedRows       =   1
  136.       FixedCols       =   1
  137.       RowHeightMin    =   0
  138.       RowHeightMax    =   0
  139.       ColWidthMin     =   0
  140.       ColWidthMax     =   0
  141.       ExtendLastCol   =   0   'False
  142.       FormatString    =   ""
  143.       ScrollTrack     =   0   'False
  144.       ScrollBars      =   3
  145.       ScrollTips      =   0   'False
  146.       MergeCells      =   0
  147.       MergeCompare    =   0
  148.       AutoResize      =   -1  'True
  149.       AutoSizeMode    =   0
  150.       AutoSearch      =   0
  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   'False
  164.       ShowComboButton =   -1  'True
  165.       WordWrap        =   0   'False
  166.       TextStyle       =   0
  167.       TextStyleFixed  =   0
  168.       OleDragMode     =   0
  169.       OleDropMode     =   0
  170.       DataMode        =   0
  171.       VirtualData     =   -1  'True
  172.       Begin MSComctlLib.ImageList ImageList2 
  173.          Left            =   0
  174.          Top             =   0
  175.          _ExtentX        =   1005
  176.          _ExtentY        =   1005
  177.          BackColor       =   -2147483643
  178.          ImageWidth      =   16
  179.          ImageHeight     =   16
  180.          MaskColor       =   12632256
  181.          _Version        =   393216
  182.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  183.             NumListImages   =   40
  184.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  185.                Picture         =   "采购系统_发票查询列表.frx":3498E
  186.                Key             =   "sz"
  187.             EndProperty
  188.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  189.                Picture         =   "采购系统_发票查询列表.frx":34D28
  190.                Key             =   "dy"
  191.             EndProperty
  192.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  193.                Picture         =   "采购系统_发票查询列表.frx":350C2
  194.                Key             =   "yl"
  195.             EndProperty
  196.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  197.                Picture         =   "采购系统_发票查询列表.frx":3545C
  198.                Key             =   "xg"
  199.             EndProperty
  200.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  201.                Picture         =   "采购系统_发票查询列表.frx":357F6
  202.                Key             =   "zh"
  203.             EndProperty
  204.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  205.                Picture         =   "采购系统_发票查询列表.frx":35B90
  206.                Key             =   "sh"
  207.             EndProperty
  208.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  209.                Picture         =   "采购系统_发票查询列表.frx":35F2A
  210.                Key             =   "bc"
  211.             EndProperty
  212.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  213.                Picture         =   "采购系统_发票查询列表.frx":362C4
  214.                Key             =   "fq"
  215.             EndProperty
  216.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  217.                Picture         =   "采购系统_发票查询列表.frx":3665E
  218.                Key             =   "bz"
  219.             EndProperty
  220.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  221.                Picture         =   "采购系统_发票查询列表.frx":369F8
  222.                Key             =   "tc"
  223.             EndProperty
  224.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  225.                Picture         =   "采购系统_发票查询列表.frx":36D92
  226.                Key             =   "bcgs"
  227.             EndProperty
  228.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  229.                Picture         =   "采购系统_发票查询列表.frx":3712C
  230.                Key             =   "mrlk"
  231.             EndProperty
  232.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  233.                Picture         =   "采购系统_发票查询列表.frx":374C6
  234.                Key             =   "xsxm"
  235.             EndProperty
  236.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  237.                Picture         =   "采购系统_发票查询列表.frx":37860
  238.                Key             =   "first"
  239.             EndProperty
  240.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  241.                Picture         =   "采购系统_发票查询列表.frx":37BFA
  242.                Key             =   "prev"
  243.             EndProperty
  244.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  245.                Picture         =   "采购系统_发票查询列表.frx":37F94
  246.                Key             =   "next"
  247.             EndProperty
  248.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  249.                Picture         =   "采购系统_发票查询列表.frx":3832E
  250.                Key             =   "last"
  251.             EndProperty
  252.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  253.                Picture         =   "采购系统_发票查询列表.frx":386C8
  254.                Key             =   "xx"
  255.             EndProperty
  256.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  257.                Picture         =   "采购系统_发票查询列表.frx":38A62
  258.                Key             =   "define"
  259.             EndProperty
  260.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  261.                Picture         =   "采购系统_发票查询列表.frx":38DFC
  262.                Key             =   "exec"
  263.             EndProperty
  264.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  265.                Picture         =   "采购系统_发票查询列表.frx":39196
  266.                Key             =   "xz"
  267.             EndProperty
  268.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  269.                Picture         =   "采购系统_发票查询列表.frx":39530
  270.                Key             =   "sc"
  271.             EndProperty
  272.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  273.                Picture         =   "采购系统_发票查询列表.frx":398CA
  274.                Key             =   "sx"
  275.             EndProperty
  276.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  277.                Picture         =   "采购系统_发票查询列表.frx":39C64
  278.                Key             =   "cx"
  279.             EndProperty
  280.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  281.                Picture         =   "采购系统_发票查询列表.frx":39FFE
  282.                Key             =   "zd"
  283.             EndProperty
  284.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  285.                Picture         =   "采购系统_发票查询列表.frx":3A398
  286.                Key             =   "dz"
  287.             EndProperty
  288.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  289.                Picture         =   "采购系统_发票查询列表.frx":3A732
  290.                Key             =   "ph"
  291.             EndProperty
  292.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  293.                Picture         =   "采购系统_发票查询列表.frx":3AACC
  294.                Key             =   "fz"
  295.             EndProperty
  296.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  297.                Picture         =   "采购系统_发票查询列表.frx":3AE66
  298.                Key             =   "dw"
  299.             EndProperty
  300.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  301.                Picture         =   "采购系统_发票查询列表.frx":3B200
  302.                Key             =   "hf"
  303.             EndProperty
  304.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  305.                Picture         =   "采购系统_发票查询列表.frx":3B59A
  306.                Key             =   "pz"
  307.             EndProperty
  308.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  309.                Picture         =   "采购系统_发票查询列表.frx":3B934
  310.                Key             =   "check"
  311.             EndProperty
  312.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  313.                Picture         =   "采购系统_发票查询列表.frx":3BCCE
  314.                Key             =   "qs"
  315.             EndProperty
  316.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  317.                Picture         =   "采购系统_发票查询列表.frx":3C068
  318.                Key             =   "fullcheck"
  319.             EndProperty
  320.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  321.                Picture         =   "采购系统_发票查询列表.frx":3C402
  322.                Key             =   "qq"
  323.             EndProperty
  324.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  325.                Picture         =   "采购系统_发票查询列表.frx":3C79C
  326.                Key             =   "bcw"
  327.             EndProperty
  328.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  329.                Picture         =   "采购系统_发票查询列表.frx":3CB36
  330.                Key             =   "ye"
  331.             EndProperty
  332.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  333.                Picture         =   "采购系统_发票查询列表.frx":3CED0
  334.                Key             =   ""
  335.             EndProperty
  336.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  337.                Picture         =   "采购系统_发票查询列表.frx":3D26A
  338.                Key             =   "frist"
  339.             EndProperty
  340.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  341.                Picture         =   "采购系统_发票查询列表.frx":3D604
  342.                Key             =   "dj"
  343.             EndProperty
  344.          EndProperty
  345.       End
  346.    End
  347.    Begin MSComctlLib.Toolbar SzToolbar 
  348.       Align           =   1  'Align Top
  349.       Height          =   555
  350.       Left            =   0
  351.       TabIndex        =   4
  352.       Top             =   0
  353.       Width           =   11820
  354.       _ExtentX        =   20849
  355.       _ExtentY        =   979
  356.       ButtonWidth     =   820
  357.       ButtonHeight    =   926
  358.       AllowCustomize  =   0   'False
  359.       Appearance      =   1
  360.       Style           =   1
  361.       ImageList       =   "ImageList1"
  362.       _Version        =   393216
  363.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  364.          NumButtons      =   12
  365.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  366.             Caption         =   "设置"
  367.             Key             =   "ymsz"
  368.             ImageKey        =   "sz"
  369.          EndProperty
  370.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  371.             Caption         =   "打印"
  372.             Key             =   "dy"
  373.             ImageKey        =   "dy"
  374.          EndProperty
  375.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  376.             Caption         =   "预览"
  377.             Key             =   "yl"
  378.             ImageKey        =   "yl"
  379.          EndProperty
  380.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  381.             Style           =   3
  382.          EndProperty
  383.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  384.             Caption         =   "查询"
  385.             Key             =   "cx"
  386.             ImageKey        =   "cx"
  387.          EndProperty
  388.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  389.             Caption         =   "单据"
  390.             Key             =   "Bill"
  391.             ImageKey        =   "pz"
  392.          EndProperty
  393.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  394.             Style           =   3
  395.          EndProperty
  396.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  397.             Caption         =   "新增"
  398.             Key             =   "xz"
  399.             ImageKey        =   "xz"
  400.          EndProperty
  401.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  402.             Caption         =   "删除"
  403.             Key             =   "sc"
  404.             ImageKey        =   "sc"
  405.          EndProperty
  406.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  407.             Style           =   3
  408.          EndProperty
  409.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  410.             Caption         =   "帮助"
  411.             Key             =   "bz"
  412.             ImageKey        =   "bz"
  413.          EndProperty
  414.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  415.             Caption         =   "退出"
  416.             Key             =   "fh"
  417.             ImageKey        =   "tc"
  418.          EndProperty
  419.       EndProperty
  420.       BorderStyle     =   1
  421.       Begin MSComctlLib.ImageList ImageList1 
  422.          Left            =   6990
  423.          Top             =   30
  424.          _ExtentX        =   1005
  425.          _ExtentY        =   1005
  426.          BackColor       =   -2147483643
  427.          ImageWidth      =   16
  428.          ImageHeight     =   16
  429.          MaskColor       =   12632256
  430.          _Version        =   393216
  431.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  432.             NumListImages   =   32
  433.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  434.                Picture         =   "采购系统_发票查询列表.frx":3D99E
  435.                Key             =   "sz"
  436.             EndProperty
  437.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  438.                Picture         =   "采购系统_发票查询列表.frx":3DD38
  439.                Key             =   "dy"
  440.             EndProperty
  441.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  442.                Picture         =   "采购系统_发票查询列表.frx":3E0D2
  443.                Key             =   "yl"
  444.             EndProperty
  445.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  446.                Picture         =   "采购系统_发票查询列表.frx":3E46C
  447.                Key             =   "xg"
  448.             EndProperty
  449.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  450.                Picture         =   "采购系统_发票查询列表.frx":3E806
  451.                Key             =   "zh"
  452.             EndProperty
  453.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  454.                Picture         =   "采购系统_发票查询列表.frx":3EBA0
  455.                Key             =   "sh"
  456.             EndProperty
  457.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  458.                Picture         =   "采购系统_发票查询列表.frx":3EF3A
  459.                Key             =   "bc"
  460.             EndProperty
  461.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  462.                Picture         =   "采购系统_发票查询列表.frx":3F2D4
  463.                Key             =   "fq"
  464.             EndProperty
  465.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  466.                Picture         =   "采购系统_发票查询列表.frx":3F66E
  467.                Key             =   "bz"
  468.             EndProperty
  469.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  470.                Picture         =   "采购系统_发票查询列表.frx":3FA08
  471.                Key             =   "tc"
  472.             EndProperty
  473.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  474.                Picture         =   "采购系统_发票查询列表.frx":3FDA2
  475.                Key             =   "bcgs"
  476.             EndProperty
  477.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  478.                Picture         =   "采购系统_发票查询列表.frx":4013C
  479.                Key             =   "mrlk"
  480.             EndProperty
  481.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  482.                Picture         =   "采购系统_发票查询列表.frx":404D6
  483.                Key             =   "xsxm"
  484.             EndProperty
  485.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  486.                Picture         =   "采购系统_发票查询列表.frx":40870
  487.                Key             =   "first"
  488.             EndProperty
  489.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  490.                Picture         =   "采购系统_发票查询列表.frx":40C0A
  491.                Key             =   "prev"
  492.             EndProperty
  493.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  494.                Picture         =   "采购系统_发票查询列表.frx":40FA4
  495.                Key             =   "next"
  496.             EndProperty
  497.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  498.                Picture         =   "采购系统_发票查询列表.frx":4133E
  499.                Key             =   "last"
  500.             EndProperty
  501.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  502.                Picture         =   "采购系统_发票查询列表.frx":416D8
  503.                Key             =   "xx"
  504.             EndProperty
  505.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  506.                Picture         =   "采购系统_发票查询列表.frx":41A72
  507.                Key             =   "define"
  508.             EndProperty
  509.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  510.                Picture         =   "采购系统_发票查询列表.frx":41E0C
  511.                Key             =   "exec"
  512.             EndProperty
  513.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  514.                Picture         =   "采购系统_发票查询列表.frx":421A6
  515.                Key             =   "xz"
  516.             EndProperty
  517.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  518.                Picture         =   "采购系统_发票查询列表.frx":42540
  519.                Key             =   "sc"
  520.             EndProperty
  521.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  522.                Picture         =   "采购系统_发票查询列表.frx":428DA
  523.                Key             =   "sx"
  524.             EndProperty
  525.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  526.                Picture         =   "采购系统_发票查询列表.frx":42C74
  527.                Key             =   "cx"
  528.             EndProperty
  529.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  530.                Picture         =   "采购系统_发票查询列表.frx":4300E
  531.                Key             =   "zd"
  532.             EndProperty
  533.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  534.                Picture         =   "采购系统_发票查询列表.frx":433A8
  535.                Key             =   "dz"
  536.             EndProperty
  537.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  538.                Picture         =   "采购系统_发票查询列表.frx":43742
  539.                Key             =   "ph"
  540.             EndProperty
  541.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  542.                Picture         =   "采购系统_发票查询列表.frx":43ADC
  543.                Key             =   "fz"
  544.             EndProperty
  545.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  546.                Picture         =   "采购系统_发票查询列表.frx":43E76
  547.                Key             =   "dw"
  548.             EndProperty
  549.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  550.                Picture         =   "采购系统_发票查询列表.frx":44210
  551.                Key             =   "hf"
  552.             EndProperty
  553.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  554.                Picture         =   "采购系统_发票查询列表.frx":445AA
  555.                Key             =   "pz"
  556.             EndProperty
  557.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  558.                Picture         =   "采购系统_发票查询列表.frx":44944
  559.                Key             =   "check"
  560.             EndProperty
  561.          EndProperty
  562.       End
  563.    End
  564. End
  565. Attribute VB_Name = "Cg_InvoiceQCPT_List"
  566. Attribute VB_GlobalNameSpace = False
  567. Attribute VB_Creatable = False
  568. Attribute VB_PredeclaredId = True
  569. Attribute VB_Exposed = False
  570. '**************************************************************************
  571. '*    模 块 名 称 :发票列表
  572. '*    功 能 描 述 :
  573. '*    程序员姓名  :张建忠
  574. '*    最后修改人  :张建忠
  575. '*    最后修改时间:2001/10/06
  576. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  577. '**************************************************************************
  578. Dim ReportTitle As String                '报表主标题
  579. Dim Str_QueryCondi As String             '用户录入查询条件
  580. Dim Rec_BillID As New ADODB.Recordset    '用户查询单据ID动态集
  581. '以下为固定使用变量
  582. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  583. Dim GridCode As String                   '显示网格网格代码
  584. Dim GridInf() As Variant                 '整个网格设置信息
  585. Dim Tsxx As String                       '系统提示信息
  586. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  587. Dim Sjhgd As Double                      '网格数据行高度
  588. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  589. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  590. Dim GridStr()  As String                 '网格列信息(字符型)
  591. Dim GridInt() As Integer                 '网格列信息(整型)
  592. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  593. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  594.     On Error Resume Next
  595.     With CxbbGrid
  596.         .Width = Me.Width - 160
  597.         .Height = Me.Height - .Top - 400
  598.     End With
  599.     With Pic_Title
  600.         .Width = Me.Width - 160
  601.     End With
  602.     
  603.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  604. End Sub
  605. Private Sub Form_Load()                                                   '窗体装入
  606.   
  607.     '调入打印页面设置窗体
  608.     ReportTitle = "发票列表"
  609.     XtReportCode = "Xs_Ddlb"
  610.     Load Dyymctbl
  611.       
  612.     '调整标题栏及网格、格式工具条位置(Fixed)
  613.     Pic_Title.Left = 40
  614.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  615.     CxbbGrid.Left = Pic_Title.Left
  616.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  617.      
  618.     '调 入 网 格(Fixed)
  619.     GridCode = "Xs_Ddlb"
  620.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  621.       
  622.     Qslz = GridInf(1)
  623.     Sjhgd = GridInf(2)
  624.     Sfxshjwg = GridInf(7)
  625.     Szzls = CxbbGrid.Cols - 1
  626. End Sub
  627. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  628.     '卸载条件窗体
  629.     Cg_InvoiceQuery.UnloadCheck.Value = 1
  630.     Unload Cg_InvoiceQuery
  631.     
  632.     '卸载打印页面设置窗体
  633.     Unload Dyymctbl
  634. End Sub
  635. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  636.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  637. End Sub
  638. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)                '网格格式调整(Fixed)
  639.   
  640.     Select Case Button.Key
  641.         Case "bcgs"                                          '保存表格格式
  642.             Call Bcwggs(CxbbGrid, GridCode, GridStr())
  643.         Case "hfmrgs"                                        '恢复默认格式
  644.             Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  645.         Case "szxsxm"                                        '设置显示项目
  646.             Call Szxsxm(CxbbGrid, GridCode)
  647.     End Select
  648. End Sub
  649. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  650.     
  651.     Select Case Button.Key
  652.         Case "ymsz"                                          '页面设置
  653.             Dyymctbl.Show 1
  654.         Case "yl"                                            '预 览
  655.             Call bbyl(True)
  656.         Case "dy"                                            '打 印
  657.             Call bbyl(False)
  658.         Case "cx"                                            '查 询
  659.             Cg_InvoiceQuery.InvoiceType = 1
  660.             Cg_InvoiceQuery.Show 1
  661.         Case "Bill"                                          '单 据
  662.             Call CxbbGrid_DblClick
  663.         Case "xz"                                            '新 增
  664.             Call Sub_AddBill
  665.         Case "sc"                                            '删 除
  666.             Call Sub_DeleteBill
  667.         Case "bz"                                            '帮 助
  668.             Call F1bz
  669.         Case "fh"                                            '退 出
  670.            Unload Me
  671.     End Select
  672. End Sub
  673. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  674.     
  675.     Timer1.Enabled = False
  676.     Xt_Wait.Show
  677.     Xt_Wait.Refresh
  678.    
  679.     '加快显示速度
  680.     CxbbGrid.Redraw = False
  681.  
  682.     '生成查询结果
  683.     Call Sub_Query(0)
  684.    
  685.     CxbbGrid.Redraw = True
  686.     
  687.     Xt_Wait.Hide
  688. End Sub
  689. Private Sub Sub_Query(Int_QueryType As Integer)                                     '生成查询结果(Define)
  690.     
  691.     '过程参数:Int_QueryType 0-"点确定按钮"查询  1-"刷新"查询
  692.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  693.     Dim Coljsq As Long                          '网格列计数器
  694.     Dim jsqte As Integer                        '临时动态计数器
  695.     Dim varOption  As Control
  696. '以下为自定义部分[
  697.      Dim Number As Long
  698. '''    Select Case Me.InvoiceType
  699. '''        Case 1
  700. '''            str_SqlInvoiceType = " and ( PeriodStarFlag = 1  and InvoiceSort=0 ) "
  701. '''        Case 2
  702. '''            str_SqlInvoiceType = " and ( PeriodStarFlag = 1  and InvoiceSort=1 ) "
  703. '''        Case 3
  704. '''            str_SqlInvoiceType = " and ( PeriodStarFlag = 0  and InvoiceSort=0 and InvoiceKind=0) "
  705. '''        Case 4
  706. '''            str_SqlInvoiceType = " and ( PeriodStarFlag = 0  and InvoiceSort=1 and InvoiceKind=0) "
  707. '''        Case 5
  708. '''            str_SqlInvoiceType = " and ( PeriodStarFlag = 0  and InvoiceSort=0 and InvoiceKind=1) "
  709. '''        Case 6
  710. '''            str_SqlInvoiceType = " and ( PeriodStarFlag = 0  and InvoiceSort=1 and InvoiceKind=1) "
  711. '''    End Select
  712.     If Int_QueryType = 0 Then   '0-"点确定按钮"查询
  713.         With Cg_InvoiceQuery
  714.             '生成查询条件
  715.             Str_QueryCondi = " where (a.PeriodStarFlag = 1  and a.InvoiceSort=0) "
  716.             For jsqte = 1 To 12
  717.                 Select Case jsqte
  718.                     Case 1  '年份
  719.                         If Trim(.LrText(0).Text) <> "" Then
  720.                             Str_QueryCondi = Str_QueryCondi & " And a.KjYear=" & Val(Trim(.LrText(0).Text))
  721.                         End If
  722.                     Case 2  '会计期间
  723.                         If Trim(.LrText(1).Text) <> "" Then
  724.                             Str_QueryCondi = Str_QueryCondi & " And a.Period= " & Val(Trim(.LrText(1).Text))
  725.                         End If
  726.                     Case 3  '查询日期范围(起始)
  727.                         If Trim(.LrText(2).Text) <> "" Then
  728.                             Str_QueryCondi = Str_QueryCondi & " And a.InvoiceDate>=convert(datetime,'" & Trim(.LrText(2).Text) & "')"
  729.                         End If
  730.                     Case 4  '查询日期范围(终止)
  731.                         If Trim(.LrText(3).Text) <> "" Then
  732.                             Str_QueryCondi = Str_QueryCondi & " And a.InvoiceDate<= convert(datetime,'" & Trim(.LrText(3).Text) & "')"
  733.                         End If
  734.                     Case 5  '收料单号(Like)
  735.                         If Trim(.LrText(4).Text) <> "" Then
  736.                             Str_QueryCondi = Str_QueryCondi & " And a.InvoiceNum like '%" & Trim(.LrText(4).Text) & "%'"
  737.                         End If
  738.                     Case 6   '物料分类
  739.                         If Trim(.LrText(6).Text) <> "" Then
  740.                             Str_QueryCondi = Str_QueryCondi & " and PurSortCode like '" & Trim(.LrText(6).Tag) & "%'"
  741.                         End If
  742.                     Case 7   '物料编码
  743.                         If Trim(.LrText(7).Text) <> "" Then
  744.                             Str_QueryCondi = Str_QueryCondi & " and MNumber = '" & Trim(.LrText(7).Tag) & "'"
  745.                         End If
  746.                     Case 8  '订单号
  747.                         If Trim(.LrText(8).Tag) <> "" Then
  748.                             Str_QueryCondi = Str_QueryCondi & " and a.OrderFormMainID = convert(int,'" & Trim(.LrText(8).Tag) & "')"
  749.                         End If
  750.                     Case 9  '供应商
  751.                         If Trim(.LrText(5).Text) <> "" Then
  752.                             Str_QueryCondi = Str_QueryCondi & " and (a.SupplierCode like  '%" & Trim(.LrText(5).Text) & "%' or a.SupplierName like  '%" & Trim(.LrText(5).Text) & "%')"
  753.                         End If
  754.                     Case 10  '部门
  755.                         If Trim(.LrText(9).Tag) <> "" Then
  756.                             Str_QueryCondi = Str_QueryCondi & " and a.DeptCode = '" & Trim(.LrText(8).Tag) & "'"
  757.                         End If
  758.                     Case 11  '业务员
  759.                         If Trim(.LrText(10).Tag) <> "" Then
  760.                             Str_QueryCondi = Str_QueryCondi & " and a.PersonCode = '" & Trim(.LrText(8).Tag) & "'"
  761.                         End If
  762.                     Case 12  '结算方式
  763.                         If Trim(.LrText(11).Tag) <> "" Then
  764.                             Str_QueryCondi = Str_QueryCondi & " and a.SSCode = '" & Trim(.LrText(8).Tag) & "'"
  765.                         End If
  766.                     
  767.                 End Select
  768.             Next jsqte
  769.             For Each varOption In .Controls
  770.                 If TypeName(varOption) = "OptionButton" Then
  771.                     If varOption.Value = True Then
  772.                        Sqlstr = Sqlstr & varOption.Tag
  773.                     End If
  774.                 End If
  775.             Next
  776.         End With
  777.     Else
  778.         '1-"刷新"查询
  779.         If Str_QueryCondi = "" Then
  780.             Str_QueryCondi = " where (a.PeriodStarFlag = 1  and a.InvoiceSort=0)  "
  781.         End If
  782.     End If
  783.      
  784.     Sqlstr = "select * from Cg_V_InvoiceBill  a " & Str_QueryCondi & " Order By a.InvoiceDate,a.InvoiceNum,a.InvoiceSubID"
  785.     
  786.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  787.     With Rec_Query
  788.        CxbbGrid.Rows = CxbbGrid.FixedRows
  789.        jsqte = CxbbGrid.FixedRows
  790.        Do While Not .EOF
  791.           If jsqte >= CxbbGrid.Rows Then
  792.              CxbbGrid.AddItem ""
  793.           End If
  794.                '[>>自定义填充内容
  795.             CxbbGrid.TextMatrix(jsqte, 0) = .Fields("InvoiceMainID")                                                 '收料通知单ID(主要用来查询定位用)
  796.             
  797.             If CxbbGrid.TextMatrix(jsqte, 0) <> CxbbGrid.TextMatrix(jsqte - 1, 0) Then
  798.                Number = Number + 1
  799.                CxbbGrid.TextMatrix(jsqte, 3) = Number
  800.             Else
  801.                CxbbGrid.TextMatrix(jsqte, 3) = CxbbGrid.TextMatrix(jsqte - 1, 3)
  802.             End If
  803.       '如果为同一张单据则不再输出制单日期和凭证号
  804. ''       If Trim(CxbbGrid.TextMatrix(jsqte - 1, 0)) <> Trim(Str(.Fields("InvoiceMainID"))) Then
  805.             CxbbGrid.TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = Format(.Fields("InvoiceDate"), "yyyy-mm-dd")
  806.             CxbbGrid.TextMatrix(jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("InvoiceNum") & "")
  807.             CxbbGrid.TextMatrix(jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("InvoiceNumZs") & "")
  808.             CxbbGrid.TextMatrix(jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("InvoiceName") & "")
  809.             CxbbGrid.TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("SupplierName") & "")
  810.             CxbbGrid.TextMatrix(jsqte, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("DeptName") & "")
  811.             CxbbGrid.TextMatrix(jsqte, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("PersonName") & "")
  812.             CxbbGrid.TextMatrix(jsqte, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("OrderFormNum") & "")
  813.             CxbbGrid.TextMatrix(jsqte, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("PurTypeName") & "")
  814.             CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("SSName") & "")
  815.             
  816.             CxbbGrid.TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("Payname") & "")
  817.             CxbbGrid.TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = Trim(.Fields("TransferWayName") & "")
  818.             CxbbGrid.TextMatrix(jsqte, Sydz("013", GridStr(), Szzls)) = Trim(.Fields("ForeignCurrName") & "")
  819.             CxbbGrid.TextMatrix(jsqte, Sydz("014", GridStr(), Szzls)) = IIf(IsNull(.Fields("AccRate")) Or .Fields("AccRate") = 0, "", .Fields("AccRate").Value)
  820.             CxbbGrid.TextMatrix(jsqte, Sydz("015", GridStr(), Szzls)) = Trim(.Fields("ChargeDeptName") & "")
  821.                         
  822.             CxbbGrid.TextMatrix(jsqte, Sydz("016", GridStr(), Szzls)) = Trim(.Fields("Remark") & "")
  823.             CxbbGrid.TextMatrix(jsqte, Sydz("017", GridStr(), Szzls)) = Trim(.Fields("Maker") & "")
  824.             CxbbGrid.TextMatrix(jsqte, Sydz("018", GridStr(), Szzls)) = Trim(.Fields("Checker") & "")
  825.             CxbbGrid.TextMatrix(jsqte, Sydz("019", GridStr(), Szzls)) = Format(.Fields("BanlanceDate"), "yyyy-mm-dd") 'Trim(.Fields("BanlanceDate") & "") 'remonstrate
  826. ''      End If
  827.             CxbbGrid.TextMatrix(jsqte, Sydz("021", GridStr(), Szzls)) = Trim(.Fields("MNumber") & "")
  828.             CxbbGrid.TextMatrix(jsqte, Sydz("022", GridStr(), Szzls)) = Trim(.Fields("MName") & "")
  829.             CxbbGrid.TextMatrix(jsqte, Sydz("023", GridStr(), Szzls)) = Trim(.Fields("Model") & "")
  830.             CxbbGrid.TextMatrix(jsqte, Sydz("024", GridStr(), Szzls)) = Trim(.Fields("PurUnitName") & "")
  831.             CxbbGrid.TextMatrix(jsqte, Sydz("025", GridStr(), Szzls)) = IIf(IsNull(.Fields("Quantity")) Or .Fields("Quantity") = 0, "", .Fields("Quantity").Value)
  832.             CxbbGrid.TextMatrix(jsqte, Sydz("026", GridStr(), Szzls)) = IIf(IsNull(.Fields("PriceYb")) Or .Fields("PriceYb") = 0, "", .Fields("PriceYb").Value)
  833.             CxbbGrid.TextMatrix(jsqte, Sydz("027", GridStr(), Szzls)) = IIf(IsNull(.Fields("MoneyYb")) Or .Fields("MoneyYb") = 0, "", .Fields("MoneyYb").Value)
  834.             CxbbGrid.TextMatrix(jsqte, Sydz("028", GridStr(), Szzls)) = IIf(IsNull(.Fields("PriceBb")) Or .Fields("PriceBb") = 0, "", .Fields("PriceBb").Value)
  835.             CxbbGrid.TextMatrix(jsqte, Sydz("029", GridStr(), Szzls)) = IIf(IsNull(.Fields("MoneyBb")) Or .Fields("MoneyBb") = 0, "", .Fields("MoneyBb").Value)
  836.             CxbbGrid.TextMatrix(jsqte, Sydz("020", GridStr(), Szzls)) = Trim(.Fields("PurSortName") & "")
  837.             '<<]
  838.             '设置数据行高度(Fixed)
  839.             CxbbGrid.RowHeight(jsqte) = Sjhgd
  840.      
  841.             '动态集指针加1,同时将计数器加1(Fixed)
  842.             .MoveNext
  843.             jsqte = jsqte + 1
  844.         Loop
  845.     End With
  846. ''''''''''
  847. ''''''''''''''''''''''''''''''''''''remonstrate 加
  848. ''''''''''    If Not CxbbGrid.Rows > CxbbGrid.FixedRows Then Exit Sub
  849. ''''''''''
  850. ''''''''''    '判断是否输出合计
  851. '''''''''''    If Qcsj_Frmqcsjcxtj.Chk_Sum.Value = 1 Then
  852. ''''''''''       CxbbGrid.BackColorAlternate = &H80000005
  853. ''''''''''       CxbbGrid.Subtotal flexSTSum, 0, Sydz("020", GridStr(), Szzls), , &HF7F3EC, , , "合计"
  854. ''''''''''       CxbbGrid.Subtotal flexSTSum, 0, Sydz("022", GridStr(), Szzls), , &HF7F3EC, , , "合计"
  855. '''''''''''       CxbbGrid.ExplorerBar = flexExMove
  856. '''''''''''    Else
  857. '''''''''''       CxbbGrid.BackColorAlternate = &HF7F3EC
  858. '''''''''''       CxbbGrid.ExplorerBar = flexExSortAndMove
  859. '''''''''''    End If
  860. ''''''''''
  861. ''''''''''    '调整网格
  862. ''''''''''    For jsqte = CxbbGrid.FixedRows To CxbbGrid.Rows - 1
  863. ''''''''''      CxbbGrid.RowHeight(jsqte) = Sjhgd
  864. ''''''''''      If CxbbGrid.TextMatrix(jsqte, 0) = "合计" Then
  865. ''''''''''         CxbbGrid.TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = "  合计"
  866. ''''''''''         CxbbGrid.TextMatrix(jsqte, 0) = CxbbGrid.TextMatrix(jsqte - 1, 0)
  867. ''''''''''      End If
  868. ''''''''''    Next jsqte
  869. ''''''''''    ']以上为用户自定义部分
  870. End Sub
  871. Private Sub CxbbGrid_DblClick()                                              '用户双击网格调入相应单据
  872.     
  873.     Dim Rectemp As New ADODB.Recordset               '临时使用动态集
  874.     '非数据行退出
  875.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  876.         Exit Sub
  877.     End If
  878.     Sqlstr = "SELECT InvoiceMainID From Cg_InvoiceMain Where InvoiceMainID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  879.     Set Rectemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  880.     With Rectemp
  881.         If .EOF Then
  882.             Tsxx = "此发票已被其他用户删除!"
  883.             Call Xtxxts(Tsxx, 0, 4)
  884.             Exit Sub
  885.         Else
  886.             '调入单据处理窗体
  887.             With cg_invloiceBill
  888.                 
  889.                 '填充查询单据标识
  890.                 XT_BillID = CxbbGrid.TextMatrix(CxbbGrid.Row, 0)
  891.                 Xtcdcsfz = Str_QueryCondi
  892.                 .InvoiceType = 1  '期初普通发票标识
  893.                 '设置单据处理为列表查询(修改)状态
  894.                 Xtcdcs = "2"
  895.                 .Show 1
  896.             End With
  897.             If Xtfhcs = "1" Then
  898.                 Tsxx = "发票发生变化,是否刷新发票列表?"
  899.                 yhAnswer = Xtxxts(Tsxx, 2, 2)
  900.                 If yhAnswer = 1 Then
  901.                     Xt_Wait.Show
  902.                     Xt_Wait.Refresh
  903.    
  904.                     '加快显示速度
  905.                     CxbbGrid.Redraw = False
  906.  
  907.                     '生成查询结果
  908.                     Call Sub_Query(1)
  909.    
  910.                     CxbbGrid.Redraw = True
  911.                     Xt_Wait.Hide
  912.                 End If
  913.             End If
  914.         End If
  915.     End With
  916. End Sub
  917. Private Sub Sub_AddBill()                                              '新增单据
  918.    
  919.     With cg_invloiceBill
  920.    
  921.         '设置单据处理为填制单据状态
  922.         Xtcdcs = "1"
  923.         .InvoiceType = 1  '期初普通发票标识
  924.         .Show 1
  925.     End With
  926.        
  927.     If Xtfhcs = "1" Then
  928.         Tsxx = "发票发生变化,是否刷新发票列表?"
  929.         yhAnswer = Xtxxts(Tsxx, 2, 2)
  930.         If yhAnswer = 1 Then
  931.             Xt_Wait.Show
  932.             Xt_Wait.Refresh
  933.    
  934.             '加快显示速度
  935.             CxbbGrid.Redraw = False
  936.  
  937.             '生成查询结果
  938.             Call Sub_Query(1)
  939.    
  940.             CxbbGrid.Redraw = True
  941.             Xt_Wait.Hide
  942.         End If
  943.     End If
  944.    
  945. End Sub
  946. Private Sub Sub_DeleteBill()                                            '删除选中当前发票
  947.     
  948.     Dim YAnswer As Integer
  949.     Dim Lng_BillID As Long           '单据标识
  950.   
  951.     '非数据行退出
  952.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  953.         Exit Sub
  954.     End If
  955.   
  956.     Tsxx = "请确认是否删除当前发票?"
  957.     yhAnswer = Xtxxts(Tsxx, 2, 2)
  958.   
  959.     If yhAnswer = 1 Then
  960.         '1.判断当前发票是否允许删除
  961.         If Not Fun_AllowDelete Then
  962.             Exit Sub
  963.         End If
  964.   
  965.         '2.删除单据所有内容
  966.         Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  967.         On Error GoTo Swcwcl
  968.         Cw_DataEnvi.DataConnect.BeginTrans
  969.         Cw_DataEnvi.DataConnect.Execute ("Delete Cg_PurPlanSub Where InvoiceMainID=" & Lng_BillID)         '删除单据子表内容
  970.         Cw_DataEnvi.DataConnect.Execute ("Delete Cg_InvoiceMain Where InvoiceMainID=" & Lng_BillID)        '删除单据主表内容
  971.         Cw_DataEnvi.DataConnect.CommitTrans
  972.       
  973.         '删除网格中单据数据
  974.         jsqte = CxbbGrid.FixedRows
  975.         Do While jsqte <= CxbbGrid.Rows - 1
  976.             If Val(CxbbGrid.TextMatrix(jsqte, 0)) = Lng_BillID Then
  977.                 CxbbGrid.RemoveItem (CxbbGrid.Row)
  978.             Else
  979.                 jsqte = jsqte + 1
  980.             End If
  981.         Loop
  982.     Else
  983.         Exit Sub
  984.     End If
  985.     Exit Sub
  986. Swcwcl:
  987.     Cw_DataEnvi.DataConnect.RollbackTrans
  988.     Tsxx = "删除发票过程中出现未知错误,程序自动恢复删除前状态!"
  989.     Call Xtxxts(Tsxx, 0, 1)
  990.     Exit Sub
  991.   
  992. End Sub
  993. Private Function Fun_AllowDelete() As Boolean                                        '判断当前单据是否允许删除
  994.   
  995.     Dim Rectemp As New ADODB.Recordset     '临时使用动态集
  996.     Dim Sqlstr As String                   '查询字符串
  997.     Dim Lng_BillID As Long                 '单据ID
  998.     Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  999.     Sqlstr = "Select Checker ,ltrim(rtrim(isnull(ChalkitupMan,''))) as ChalkitupMan ,BanlanceDate From Cg_InvoiceMain Where InvoiceMainID=" & Lng_BillID
  1000.     Set Rectemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1001.     With Rectemp
  1002.         If Not .EOF Then
  1003.             If Trim(.Fields("Checker") & "") <> "" Then
  1004.                 Tsxx = "该单据已审核确认,不能删除!"
  1005.                 Call Xtxxts(Tsxx, 0, 4)
  1006.                 Exit Function
  1007.             End If
  1008.             If Trim("" & .Fields("BanlanceDate")) <> "" Then
  1009.                 Tsxx = "该单据已结算,不能删除!"
  1010.                 Call Xtxxts(Tsxx, 0, 4)
  1011.                 Exit Function
  1012.             End If
  1013.         End If
  1014.     End With
  1015.     Fun_AllowDelete = True
  1016.   
  1017. End Function
  1018. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1019.     
  1020.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1021.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1022.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1023.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1024.     ReDim Bbxbt(1 To Bbxbtgs)
  1025.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1026.     If Bbbwhgs <> 0 Then
  1027.         ReDim Bbbwh(1 To Bbbwhgs)
  1028.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1029.     End If
  1030.     Bbzbt = ReportTitle
  1031.     Bbxbt(1) = ""
  1032.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1033.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1034.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1035.     If Not bbylte Then
  1036.         Unload DY_Tybbyldy
  1037.     End If
  1038. End Sub