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

企业管理

开发平台:

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 Cg_InvoiceZy_List 
  5.    Caption         =   "增值税发票列表"
  6.    ClientHeight    =   8595
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11820
  10.    HelpContextID   =   1107006
  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      =   12
  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             =   "xz"
  412.             ImageKey        =   "xz"
  413.          EndProperty
  414.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  415.             Caption         =   "删除"
  416.             Key             =   "sc"
  417.             ImageKey        =   "sc"
  418.          EndProperty
  419.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  420.             Style           =   3
  421.          EndProperty
  422.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  423.             Caption         =   "帮助"
  424.             Key             =   "bz"
  425.             ImageKey        =   "bz"
  426.          EndProperty
  427.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  428.             Caption         =   "退出"
  429.             Key             =   "fh"
  430.             ImageKey        =   "tc"
  431.          EndProperty
  432.       EndProperty
  433.       BorderStyle     =   1
  434.       Begin MSComctlLib.ImageList ImageList1 
  435.          Left            =   6990
  436.          Top             =   30
  437.          _ExtentX        =   1005
  438.          _ExtentY        =   1005
  439.          BackColor       =   -2147483643
  440.          ImageWidth      =   16
  441.          ImageHeight     =   16
  442.          MaskColor       =   12632256
  443.          _Version        =   393216
  444.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  445.             NumListImages   =   32
  446.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  447.                Picture         =   "采购系统_专用发票查询列表.frx":26F92
  448.                Key             =   "sz"
  449.             EndProperty
  450.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  451.                Picture         =   "采购系统_专用发票查询列表.frx":2732C
  452.                Key             =   "dy"
  453.             EndProperty
  454.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  455.                Picture         =   "采购系统_专用发票查询列表.frx":276C6
  456.                Key             =   "yl"
  457.             EndProperty
  458.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  459.                Picture         =   "采购系统_专用发票查询列表.frx":27A60
  460.                Key             =   "xg"
  461.             EndProperty
  462.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  463.                Picture         =   "采购系统_专用发票查询列表.frx":27DFA
  464.                Key             =   "zh"
  465.             EndProperty
  466.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  467.                Picture         =   "采购系统_专用发票查询列表.frx":28194
  468.                Key             =   "sh"
  469.             EndProperty
  470.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  471.                Picture         =   "采购系统_专用发票查询列表.frx":2852E
  472.                Key             =   "bc"
  473.             EndProperty
  474.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  475.                Picture         =   "采购系统_专用发票查询列表.frx":288C8
  476.                Key             =   "fq"
  477.             EndProperty
  478.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  479.                Picture         =   "采购系统_专用发票查询列表.frx":28C62
  480.                Key             =   "bz"
  481.             EndProperty
  482.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  483.                Picture         =   "采购系统_专用发票查询列表.frx":28FFC
  484.                Key             =   "tc"
  485.             EndProperty
  486.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  487.                Picture         =   "采购系统_专用发票查询列表.frx":29396
  488.                Key             =   "bcgs"
  489.             EndProperty
  490.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  491.                Picture         =   "采购系统_专用发票查询列表.frx":29730
  492.                Key             =   "mrlk"
  493.             EndProperty
  494.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  495.                Picture         =   "采购系统_专用发票查询列表.frx":29ACA
  496.                Key             =   "xsxm"
  497.             EndProperty
  498.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  499.                Picture         =   "采购系统_专用发票查询列表.frx":29E64
  500.                Key             =   "first"
  501.             EndProperty
  502.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  503.                Picture         =   "采购系统_专用发票查询列表.frx":2A1FE
  504.                Key             =   "prev"
  505.             EndProperty
  506.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  507.                Picture         =   "采购系统_专用发票查询列表.frx":2A598
  508.                Key             =   "next"
  509.             EndProperty
  510.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  511.                Picture         =   "采购系统_专用发票查询列表.frx":2A932
  512.                Key             =   "last"
  513.             EndProperty
  514.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  515.                Picture         =   "采购系统_专用发票查询列表.frx":2ACCC
  516.                Key             =   "xx"
  517.             EndProperty
  518.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  519.                Picture         =   "采购系统_专用发票查询列表.frx":2B066
  520.                Key             =   "define"
  521.             EndProperty
  522.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  523.                Picture         =   "采购系统_专用发票查询列表.frx":2B400
  524.                Key             =   "exec"
  525.             EndProperty
  526.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  527.                Picture         =   "采购系统_专用发票查询列表.frx":2B79A
  528.                Key             =   "xz"
  529.             EndProperty
  530.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  531.                Picture         =   "采购系统_专用发票查询列表.frx":2BB34
  532.                Key             =   "sc"
  533.             EndProperty
  534.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  535.                Picture         =   "采购系统_专用发票查询列表.frx":2BECE
  536.                Key             =   "sx"
  537.             EndProperty
  538.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  539.                Picture         =   "采购系统_专用发票查询列表.frx":2C268
  540.                Key             =   "cx"
  541.             EndProperty
  542.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  543.                Picture         =   "采购系统_专用发票查询列表.frx":2C602
  544.                Key             =   "zd"
  545.             EndProperty
  546.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  547.                Picture         =   "采购系统_专用发票查询列表.frx":2C99C
  548.                Key             =   "dz"
  549.             EndProperty
  550.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  551.                Picture         =   "采购系统_专用发票查询列表.frx":2CD36
  552.                Key             =   "ph"
  553.             EndProperty
  554.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  555.                Picture         =   "采购系统_专用发票查询列表.frx":2D0D0
  556.                Key             =   "fz"
  557.             EndProperty
  558.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  559.                Picture         =   "采购系统_专用发票查询列表.frx":2D46A
  560.                Key             =   "dw"
  561.             EndProperty
  562.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  563.                Picture         =   "采购系统_专用发票查询列表.frx":2D804
  564.                Key             =   "hf"
  565.             EndProperty
  566.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  567.                Picture         =   "采购系统_专用发票查询列表.frx":2DB9E
  568.                Key             =   "pz"
  569.             EndProperty
  570.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  571.                Picture         =   "采购系统_专用发票查询列表.frx":2DF38
  572.                Key             =   "check"
  573.             EndProperty
  574.          EndProperty
  575.       End
  576.    End
  577. End
  578. Attribute VB_Name = "Cg_InvoiceZy_List"
  579. Attribute VB_GlobalNameSpace = False
  580. Attribute VB_Creatable = False
  581. Attribute VB_PredeclaredId = True
  582. Attribute VB_Exposed = False
  583. '**************************************************************************
  584. '*    模 块 名 称 :专用发票列表
  585. '*    功 能 描 述 :
  586. '*    程序员姓名  :周化江
  587. '*    最后修改人  :周化江
  588. '*    最后修改时间:2001/10/06
  589. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  590. '**************************************************************************
  591. Dim ReportTitle As String                '报表主标题
  592. Dim Str_QueryCondi As String             '用户录入查询条件
  593. Dim Rec_BillID As New ADODB.Recordset    '用户查询单据ID动态集
  594. Dim Str_RightEdit As String                     '单据编辑(新增、修改、删除)权限索引
  595. '以下为固定使用变量
  596. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  597. Dim GridCode As String                   '显示网格网格代码
  598. Dim GridInf() As Variant                 '整个网格设置信息
  599. Dim Tsxx As String                       '系统提示信息
  600. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  601. Dim Sjhgd As Double                      '网格数据行高度
  602. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  603. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  604. Dim GridStr()  As String                 '网格列信息(字符型)
  605. Dim GridInt() As Integer                 '网格列信息(整型)
  606. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  607. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  608.     On Error Resume Next
  609.     With CxbbGrid
  610.         .Width = Me.Width - 160
  611.         .Height = Me.Height - .Top - 400
  612.     End With
  613.     With Pic_Title
  614.         .Width = Me.Width - 160
  615.     End With
  616.     
  617.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  618. End Sub
  619. Private Sub Form_Load()                                                   '窗体装入
  620.   
  621.     '调入打印页面设置窗体
  622.     ReportTitle = "增值税发票列表"
  623.     XtReportCode = "Cg_InvoiceList_Zy"
  624.     Load Dyymctbl
  625.           
  626.     '单据编辑(新增、修改、删除)权限索引
  627.     Str_RightEdit = "Cg_zfpinput_edit"
  628.         
  629.     '调整标题栏及网格、格式工具条位置(Fixed)
  630.     Pic_Title.Left = 40
  631.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  632.     CxbbGrid.Left = Pic_Title.Left
  633.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  634.      
  635.     '调 入 网 格(Fixed)
  636.     GridCode = "Cg_InvoiceList_Zy"
  637.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  638.       
  639.     Qslz = GridInf(1)
  640.     Sjhgd = GridInf(2)
  641.     Sfxshjwg = GridInf(7)
  642.     Szzls = CxbbGrid.Cols - 1
  643. End Sub
  644. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  645.     '卸载条件窗体
  646.     Cg_InvoiceQuery.InvoiceType = 4
  647.     Cg_InvoiceQuery.Timer3.Enabled = True
  648.     Cg_InvoiceQuery.UnloadCheck.Value = 1
  649.     Unload Cg_InvoiceQuery
  650.     
  651.     '卸载打印页面设置窗体
  652.     Unload Dyymctbl
  653. End Sub
  654. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  655.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  656. End Sub
  657. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)                '网格格式调整(Fixed)
  658.   
  659.     Select Case Button.Key
  660.         Case "bcgs"                                          '保存表格格式
  661.             Call Bcwggs(CxbbGrid, GridCode, GridStr())
  662.         Case "hfmrgs"                                        '恢复默认格式
  663.             Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  664.         Case "szxsxm"                                        '设置显示项目
  665.             Call Szxsxm(CxbbGrid, GridCode)
  666.     End Select
  667. End Sub
  668. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  669.     
  670.     Select Case Button.Key
  671.         Case "ymsz"                                          '页面设置
  672.             Dyymctbl.Show 1
  673.         Case "yl"                                            '预 览
  674.             Call bbyl(True)
  675.         Case "dy"                                            '打 印
  676.             Call bbyl(False)
  677.         Case "cx"                                            '查 询
  678.             Cg_InvoiceQuery.InvoiceType = 4
  679.             
  680.             Cg_InvoiceQuery.Show 1
  681.         Case "Bill"                                          '单 据
  682.             Call CxbbGrid_DblClick
  683.         Case "xz"                                            '新 增
  684.             Call Sub_AddBill
  685.         Case "sc"                                            '删 除
  686.             Call Sub_DeleteBill
  687.         Case "bz"                                            '帮 助
  688.             Call F1bz
  689.         Case "fh"                                            '退 出
  690.            Unload Me
  691.     End Select
  692. End Sub
  693. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  694.     
  695.     Timer1.Enabled = False
  696.     Xt_Wait.Show
  697.     Xt_Wait.Refresh
  698.    
  699.     '加快显示速度
  700.     CxbbGrid.Redraw = False
  701.  
  702.     '生成查询结果
  703.     Call Sub_Query(0)
  704.    
  705.     CxbbGrid.Redraw = True
  706.     
  707.     Xt_Wait.Hide
  708. End Sub
  709. Private Sub Sub_Query(Int_QueryType As Integer)                                     '生成查询结果(Define)
  710.     
  711.     '过程参数:Int_QueryType 0-"点确定按钮"查询  1-"刷新"查询
  712.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  713.     Dim Coljsq As Long                          '网格列计数器
  714.     Dim jsqte As Long                           '临时动态计数器
  715.     Dim varOption  As Control
  716.     Dim int_zhengfu As Integer
  717.     '以下为自定义部分[
  718.     If Int_QueryType = 0 Then   '0-"点确定按钮"查询
  719.         With Cg_InvoiceQuery
  720.             '生成查询条件
  721.             Str_QueryCondi = " where (a.PeriodStarFlag = 0  and a.InvoiceSort=1) "
  722.             For jsqte = 1 To 12
  723.                 Select Case jsqte
  724.                     Case 1  '年份
  725.                         If Trim(.LrText(0).Text) <> "" Then
  726.                             Str_QueryCondi = Str_QueryCondi & " And a.KjYear=" & S2N(Trim(.LrText(0).Text))
  727.                         End If
  728.                     Case 2  '会计期间
  729.                         If Trim(.LrText(1).Text) <> "" Then
  730.                             Str_QueryCondi = Str_QueryCondi & " And a.Period= " & S2N(Trim(.LrText(1).Text))
  731.                         End If
  732.                     Case 3  '查询日期范围(起始)
  733.                         If Trim(.LrText(2).Text) <> "" Then
  734.                             Str_QueryCondi = Str_QueryCondi & " And a.InvoiceDate>=convert(datetime,'" & Trim(.LrText(2).Text) & "')"
  735.                         End If
  736.                     Case 4  '查询日期范围(终止)
  737.                         If Trim(.LrText(3).Text) <> "" Then
  738.                             Str_QueryCondi = Str_QueryCondi & " And a.InvoiceDate<= convert(datetime,'" & Trim(.LrText(3).Text) & "')"
  739.                         End If
  740.                     Case 5  '收料单号(Like)
  741.                         If Trim(.LrText(4).Text) <> "" Then
  742.                             Str_QueryCondi = Str_QueryCondi & " And a.InvoiceNum like '%" & Trim(.LrText(4).Text) & "%'"
  743.                         End If
  744.                     Case 6   '物料分类
  745.                         If Trim(.LrText(6).Text) <> "" Then
  746.                             Str_QueryCondi = Str_QueryCondi & " and a.PurSortCode like '" & Trim(.LrText(6).Tag) & "%'"
  747.                         End If
  748.                     Case 7   '物料编码
  749.                         If Trim(.LrText(7).Text) <> "" Then
  750.                             Str_QueryCondi = Str_QueryCondi & " and a.MNumber = '" & Trim(.LrText(7).Tag) & "'"
  751.                         End If
  752.                     Case 8  '订单号
  753.                         If Trim(.LrText(8).Tag) <> "" Then
  754.                             Str_QueryCondi = Str_QueryCondi & " and a.OrderFormMainID = convert(int,'" & Trim(.LrText(8).Tag) & "')"
  755.                         End If
  756.                     Case 9  '供应商
  757.                         If Trim(.LrText(5).Text) <> "" Then
  758.                             Str_QueryCondi = Str_QueryCondi & " and (a.SupplierCode like  '%" & Trim(.LrText(5).Text) & "%' or a.SupplierName like  '%" & Trim(.LrText(5).Text) & "%')"
  759.                         End If
  760.                     Case 10  '部门
  761.                         If Trim(.LrText(9).Tag) <> "" Then
  762.                             Str_QueryCondi = Str_QueryCondi & " and a.DeptCode = '" & Trim(.LrText(9).Tag) & "'"
  763.                         End If
  764.                     Case 11  '业务员
  765.                         If Trim(.LrText(10).Tag) <> "" Then
  766.                             Str_QueryCondi = Str_QueryCondi & " and a.PersonCode = '" & Trim(.LrText(10).Tag) & "'"
  767.                         End If
  768.                     Case 12  '结算方式
  769.                         If Trim(.LrText(11).Tag) <> "" Then
  770.                             Str_QueryCondi = Str_QueryCondi & " and a.SSCode = '" & Trim(.LrText(11).Tag) & "'"
  771.                         End If
  772.                     
  773.                 End Select
  774.             Next jsqte
  775.             For Each varOption In .Controls
  776.                 If TypeName(varOption) = "OptionButton" Then
  777.                     If varOption.Value = True Then
  778.                        Str_QueryCondi = Str_QueryCondi & varOption.Tag
  779.                     End If
  780.                 End If
  781.             Next
  782.         End With
  783.     Else
  784.         '1-"刷新"查询
  785.         If Str_QueryCondi = "" Then
  786.             Str_QueryCondi = " where (a.PeriodStarFlag = 1  and a.InvoiceSort=0)  "
  787.         End If
  788.     End If
  789.      
  790.     Sqlstr = "select * from Cg_V_InvoiceBill  a " & Str_QueryCondi & " Order By InvoiceMainID,a.InvoiceSubID"
  791.     
  792.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  793.    
  794.     With Rec_Query
  795.         CxbbGrid.Rows = CxbbGrid.FixedRows
  796.         jsqte = CxbbGrid.FixedRows
  797.         Do While Not .EOF
  798.             If jsqte >= CxbbGrid.Rows Then
  799.                 CxbbGrid.AddItem ""
  800.             End If
  801.             '[>>自定义填充内容
  802.             CxbbGrid.TextMatrix(jsqte, 0) = .Fields("InvoiceMainID")                                                 '发票ID(主要用来查询定位用)
  803.             
  804.             CxbbGrid.TextMatrix(jsqte, 2) = .Fields("InvoiceKind")
  805.             If .Fields("InvoiceKind") = 0 Then
  806.                 int_zhengfu = 1
  807.             Else
  808.                 int_zhengfu = -1
  809.                 CxbbGrid.Cell(flexcpForeColor, jsqte, Qslz, jsqte, CxbbGrid.Cols - 1) = &HFF&
  810.             End If
  811.          
  812.             CxbbGrid.TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = Format(.Fields("InvoiceDate"), "yyyy-mm-dd")                '发票日期
  813.             CxbbGrid.TextMatrix(jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("InvoiceNum") & "")                            '发票号码
  814.             CxbbGrid.TextMatrix(jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("InvoiceNumZs") & "")                          '原发票号
  815.             CxbbGrid.TextMatrix(jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("InvoiceName") & "")                           '发票类型
  816.             CxbbGrid.TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("SupplierName") & "")                          '供应商名称
  817.             CxbbGrid.TextMatrix(jsqte, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("DeptName") & "")                              '部门名称
  818.             CxbbGrid.TextMatrix(jsqte, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("PersonName") & "")                            '业务员
  819.             CxbbGrid.TextMatrix(jsqte, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("OrderFormNum") & "")                          '订单号
  820.             CxbbGrid.TextMatrix(jsqte, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("PurTypeName") & "")                           '采购类型
  821.             CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("SSName") & "")                                '结算方式
  822.             CxbbGrid.TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("Payname") & "")                               '付款条件
  823.             CxbbGrid.TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = Trim(.Fields("TransferWayName") & "")                       '运输方式
  824.             CxbbGrid.TextMatrix(jsqte, Sydz("013", GridStr(), Szzls)) = Trim(.Fields("ForeignCurrName") & "")                       '货币名称
  825.             CxbbGrid.TextMatrix(jsqte, Sydz("014", GridStr(), Szzls)) = IIf(IsNull(.Fields("AccRate")) Or .Fields("AccRate") = 0, "", .Fields("AccRate").Value) '汇率
  826.             CxbbGrid.TextMatrix(jsqte, Sydz("015", GridStr(), Szzls)) = Trim(.Fields("ChargeDeptName") & "")                        '费用单位
  827.             CxbbGrid.TextMatrix(jsqte, Sydz("016", GridStr(), Szzls)) = Trim(.Fields("Remark") & "")                                '备注
  828.             CxbbGrid.TextMatrix(jsqte, Sydz("017", GridStr(), Szzls)) = Trim(.Fields("Maker") & "")                                 '制单人
  829.             CxbbGrid.TextMatrix(jsqte, Sydz("018", GridStr(), Szzls)) = Trim(.Fields("Checker") & "")                               '审核人
  830.             CxbbGrid.TextMatrix(jsqte, Sydz("019", GridStr(), Szzls)) = Format(.Fields("BanlanceDate"), "yyyy-mm-dd")               '结算日期
  831.             CxbbGrid.TextMatrix(jsqte, Sydz("021", GridStr(), Szzls)) = Trim(.Fields("MNumber") & "")                               '物料编码
  832.             CxbbGrid.TextMatrix(jsqte, Sydz("022", GridStr(), Szzls)) = Trim(.Fields("MName") & "")                                 '物料名称
  833.             CxbbGrid.TextMatrix(jsqte, Sydz("023", GridStr(), Szzls)) = Trim(.Fields("Model") & "")                                 '规格型号
  834.             CxbbGrid.TextMatrix(jsqte, Sydz("024", GridStr(), Szzls)) = Trim(.Fields("PurUnitName") & "")                           '计量单位
  835.             CxbbGrid.TextMatrix(jsqte, Sydz("025", GridStr(), Szzls)) = IIf(IsNull(.Fields("TaxRate")) Or .Fields("TaxRate") = 0, "", .Fields("TaxRate").Value)                                 '税率
  836.             CxbbGrid.TextMatrix(jsqte, Sydz("026", GridStr(), Szzls)) = IIf(IsNull(.Fields("Quantity")) Or .Fields("Quantity") = 0, "", (int_zhengfu) * .Fields("Quantity").Value)              '数量
  837.             CxbbGrid.TextMatrix(jsqte, Sydz("027", GridStr(), Szzls)) = IIf(IsNull(.Fields("PriceYb")) Or .Fields("PriceYb") = 0, "", .Fields("PriceYb").Value)                                 '单价(原币)
  838.             CxbbGrid.TextMatrix(jsqte, Sydz("028", GridStr(), Szzls)) = IIf(IsNull(.Fields("MoneyYb")) Or .Fields("MoneyYb") = 0, "", (int_zhengfu) * .Fields("MoneyYb").Value)                 '金额(原币)
  839.             CxbbGrid.TextMatrix(jsqte, Sydz("029", GridStr(), Szzls)) = IIf(IsNull(.Fields("TaxMoneyYb")) Or .Fields("TaxMoneyYb") = 0, "", (int_zhengfu) * .Fields("TaxMoneyYb").Value)        '税额(原币)
  840.             CxbbGrid.TextMatrix(jsqte, Sydz("030", GridStr(), Szzls)) = IIf(IsNull(.Fields("TotalMoneyYb")) Or .Fields("TotalMoneyYb") = 0, "", (int_zhengfu) * .Fields("TotalMoneyYb").Value)  '价税合计(原币)
  841.             CxbbGrid.TextMatrix(jsqte, Sydz("031", GridStr(), Szzls)) = IIf(IsNull(.Fields("PriceBb")) Or .Fields("PriceBb") = 0, "", .Fields("PriceBb").Value)                                 '单价(本币)
  842.             CxbbGrid.TextMatrix(jsqte, Sydz("032", GridStr(), Szzls)) = IIf(IsNull(.Fields("MoneyBb")) Or .Fields("MoneyBb") = 0, "", (int_zhengfu) * .Fields("MoneyBb").Value)                 '金额(本币)
  843.             CxbbGrid.TextMatrix(jsqte, Sydz("033", GridStr(), Szzls)) = IIf(IsNull(.Fields("TaxMoneyBb")) Or .Fields("TaxMoneyBb") = 0, "", (int_zhengfu) * .Fields("TaxMoneyBb").Value)        '税额(本币)
  844.             CxbbGrid.TextMatrix(jsqte, Sydz("034", GridStr(), Szzls)) = IIf(IsNull(.Fields("TotalMoneyBb")) Or .Fields("TotalMoneyBb") = 0, "", (int_zhengfu) * .Fields("TotalMoneyBb").Value)  '价税合计(本币)
  845.             CxbbGrid.TextMatrix(jsqte, Sydz("020", GridStr(), Szzls)) = Trim(.Fields("PurSortName") & "")                            '采购物料分类
  846.             '<<]
  847.             '设置数据行高度(Fixed)
  848.             CxbbGrid.RowHeight(jsqte) = Sjhgd
  849.      
  850.             '动态集指针加1,同时将计数器加1(Fixed)
  851.             .MoveNext
  852.             jsqte = jsqte + 1
  853.         Loop
  854.     End With
  855.     ']以上为用户自定义部分
  856. End Sub
  857. Private Sub CxbbGrid_DblClick()                                              '用户双击网格调入相应单据
  858.     
  859.     Dim RecTemp As New ADODB.Recordset               '临时使用动态集
  860.     
  861.     '当第一次查询结果为空时,判断总记录行是否与固定行数相同,如相同则出现错误(双表头出现此情况)
  862.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then
  863.         Exit Sub
  864.     End If
  865.     
  866.     '非数据行退出
  867.     If CxbbGrid.Row < CxbbGrid.FixedRows Or S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  868.         Exit Sub
  869.     End If
  870.     Sqlstr = "SELECT InvoiceMainID From Cg_InvoiceMain Where InvoiceMainID=" & S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  871.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  872.     With RecTemp
  873.         If .EOF Then
  874.             Tsxx = "此发票已被其他用户删除!"
  875.             Call Xtxxts(Tsxx, 0, 4)
  876.             Exit Sub
  877.         Else
  878.             '调入单据处理窗体
  879.             With Cg_InvoiceBill
  880.                 
  881.                 '填充查询单据标识
  882.                 XT_BillID = CxbbGrid.TextMatrix(CxbbGrid.Row, 0)
  883.                 Xtcdcsfz = Str_QueryCondi
  884.                 If S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 2)) = 0 Then
  885.                     .InvoiceType = 4  '专用发票标识
  886.                 ElseIf S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 2)) = 1 Then
  887.                     .InvoiceType = 6  '专用发票标识
  888.                 End If
  889.                 
  890.                 '设置单据处理为列表查询(修改)状态
  891.                 Xtcdcs = "2"
  892.                 .Show 1
  893.             End With
  894.             If Xtfhcs = "1" Then
  895.                 Tsxx = "发票发生变化,是否刷新发票列表?"
  896.                 yhAnswer = Xtxxts(Tsxx, 2, 2)
  897.                 If yhAnswer = 1 Then
  898.                     Xt_Wait.Show
  899.                     Xt_Wait.Refresh
  900.    
  901.                     '加快显示速度
  902.                     CxbbGrid.Redraw = False
  903.  
  904.                     '生成查询结果
  905.                     Call Sub_Query(1)
  906.    
  907.                     CxbbGrid.Redraw = True
  908.                     Xt_Wait.Hide
  909.                 End If
  910.             End If
  911.         End If
  912.     End With
  913. End Sub
  914. Private Sub Sub_AddBill()                                              '新增单据
  915.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  916.     If Not Security_Log(Str_RightEdit, Xtczybm, 1) Then
  917.         Exit Sub
  918.     End If
  919.     
  920.     With Cg_InvoiceBill
  921.    
  922.         '设置单据处理为填制单据状态
  923.          Xtcdcs = "1"
  924.         .InvoiceType = 4  '专用发票标识
  925.         .Show 1
  926.     End With
  927.        
  928.     If Xtfhcs = "1" Then
  929.         Tsxx = "发票发生变化,是否刷新发票列表?"
  930.         yhAnswer = Xtxxts(Tsxx, 2, 2)
  931.         If yhAnswer = 1 Then
  932.             Xt_Wait.Show
  933.             Xt_Wait.Refresh
  934.    
  935.             '加快显示速度
  936.             CxbbGrid.Redraw = False
  937.  
  938.             '生成查询结果
  939.             Call Sub_Query(1)
  940.    
  941.             CxbbGrid.Redraw = True
  942.             Xt_Wait.Hide
  943.         End If
  944.     End If
  945.    
  946. End Sub
  947. Private Sub Sub_DeleteBill()                                            '删除选中当前发票
  948.     
  949.     Dim YAnswer As Integer
  950.     Dim Lng_BillID As Long           '单据标识
  951.     If CxbbGrid.Cell(flexcpForeColor, CxbbGrid.Row, Qslz, CxbbGrid.Row, CxbbGrid.Cols - 1) = &HFF& Then
  952.         '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  953.         If Not Security_Log("Cg_hzfpinput_edit", Xtczybm, 1) Then
  954.             Exit Sub
  955.         End If
  956.     Else
  957.         '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  958.         If Not Security_Log(Str_RightEdit, Xtczybm, 1) Then
  959.             Exit Sub
  960.         End If
  961.     End If
  962.     
  963.     '当第一次查询结果为空时,判断总记录行是否与固定行数相同,如相同则出现错误(双表头出现此情况)
  964.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then
  965.         Exit Sub
  966.     End If
  967.         
  968.     '非数据行退出
  969.     If CxbbGrid.Row < CxbbGrid.FixedRows Or S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  970.         Exit Sub
  971.     End If
  972.   
  973.     Tsxx = "请确认是否删除当前发票?"
  974.     yhAnswer = Xtxxts(Tsxx, 2, 2)
  975.   
  976.     If yhAnswer = 1 Then
  977.         '1.判断当前发票是否允许删除
  978.         If Not Fun_AllowDelete Then
  979.             Exit Sub
  980.         End If
  981.   
  982.         '2.删除单据所有内容
  983.         Lng_BillID = S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  984.         On Error GoTo Swcwcl
  985.         Cw_DataEnvi.DataConnect.BeginTrans
  986.         Cw_DataEnvi.DataConnect.Execute ("Delete Cg_InvoiceSub Where InvoiceMainID=" & Lng_BillID)         '删除单据子表内容
  987.         Cw_DataEnvi.DataConnect.Execute ("Delete Cg_InvoiceMain Where InvoiceMainID=" & Lng_BillID)        '删除单据主表内容
  988.         Cw_DataEnvi.DataConnect.CommitTrans
  989.       
  990.         '删除网格中单据数据
  991.         jsqte = CxbbGrid.FixedRows
  992.         Do While jsqte <= CxbbGrid.Rows - 1
  993.             If S2N(CxbbGrid.TextMatrix(jsqte, 0)) = Lng_BillID Then
  994.                 CxbbGrid.RemoveItem (jsqte)
  995.             Else
  996.                 jsqte = jsqte + 1
  997.             End If
  998.         Loop
  999.     Else
  1000.         Exit Sub
  1001.     End If
  1002.     Exit Sub
  1003. Swcwcl:
  1004.     Cw_DataEnvi.DataConnect.RollbackTrans
  1005.     Tsxx = "删除发票过程中出现未知错误,程序自动恢复删除前状态!"
  1006.     Call Xtxxts(Tsxx, 0, 1)
  1007.     Exit Sub
  1008.   
  1009. End Sub
  1010. Private Function Fun_AllowDelete() As Boolean                                        '判断当前单据是否允许删除
  1011.   
  1012.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1013.     Dim Sqlstr As String                   '查询字符串
  1014.     Dim Lng_BillID As Long                 '单据ID
  1015.     Lng_BillID = S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1016.     Sqlstr = "Select Checker ,ltrim(rtrim(isnull(ChalkitupMan,''))) as ChalkitupMan ,BanlanceDate From Cg_InvoiceMain Where InvoiceMainID=" & Lng_BillID
  1017.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1018.     With RecTemp
  1019.         If Not .EOF Then
  1020.             If Trim(.Fields("Checker") & "") <> "" Then
  1021.                 Tsxx = "该单据已审核确认,不能删除!"
  1022.                 Call Xtxxts(Tsxx, 0, 4)
  1023.                 Exit Function
  1024.             End If
  1025.             If Trim("" & .Fields("BanlanceDate")) <> "" Then
  1026.                 Tsxx = "该单据已结算,不能删除!"
  1027.                 Call Xtxxts(Tsxx, 0, 4)
  1028.                 Exit Function
  1029.             End If
  1030.             If Trim(.Fields("ChalkitupMan") & "") <> "" Then
  1031.                 Tsxx = "该单据已记帐,不能删除!"
  1032.                 Call Xtxxts(Tsxx, 0, 4)
  1033.                 Exit Function
  1034.             End If
  1035.         End If
  1036.     End With
  1037.     Fun_AllowDelete = True
  1038.   
  1039. End Function
  1040. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1041.     
  1042.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1043.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1044.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1045.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1046.     ReDim Bbxbt(1 To Bbxbtgs)
  1047.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1048.     If Bbbwhgs <> 0 Then
  1049.         ReDim Bbbwh(1 To Bbbwhgs)
  1050.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1051.     End If
  1052.     Bbzbt = ReportTitle
  1053.     Bbxbt(1) = ""
  1054.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1055.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1056.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1057.     If Not bbylte Then
  1058.         Unload DY_Tybbyldy
  1059.     End If
  1060. End Sub