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

企业管理

开发平台:

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_InvoicePt_list 
  5.    Caption         =   "普通发票列表"
  6.    ClientHeight    =   7845
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   11805
  10.    HelpContextID   =   1107003
  11.    Icon            =   "采购系统_普通发票查询列表.frx":0000
  12.    LinkTopic       =   "Form1"
  13.    MDIChild        =   -1  'True
  14.    ScaleHeight     =   7845
  15.    ScaleWidth      =   11805
  16.    WindowState     =   2  'Maximized
  17.    Begin VB.Timer Timer1 
  18.       Enabled         =   0   'False
  19.       Interval        =   1
  20.       Left            =   7620
  21.       Top             =   90
  22.    End
  23.    Begin VB.PictureBox Pic_Title 
  24.       BackColor       =   &H00FFFFFF&
  25.       Height          =   825
  26.       Left            =   0
  27.       Picture         =   "采购系统_普通发票查询列表.frx":1042
  28.       ScaleHeight     =   765
  29.       ScaleWidth      =   11715
  30.       TabIndex        =   1
  31.       Top             =   570
  32.       Width           =   11775
  33.       Begin VB.Label Lab_Title 
  34.          BackColor       =   &H80000018&
  35.          BackStyle       =   0  'Transparent
  36.          Caption         =   "普通发票列表"
  37.          BeginProperty Font 
  38.             Name            =   "宋体"
  39.             Size            =   12
  40.             Charset         =   134
  41.             Weight          =   700
  42.             Underline       =   0   'False
  43.             Italic          =   0   'False
  44.             Strikethrough   =   0   'False
  45.          EndProperty
  46.          ForeColor       =   &H00000000&
  47.          Height          =   300
  48.          Index           =   4
  49.          Left            =   480
  50.          TabIndex        =   2
  51.          Top             =   210
  52.          Width           =   2715
  53.       End
  54.    End
  55.    Begin MSComctlLib.Toolbar GsToolbar 
  56.       Height          =   525
  57.       Left            =   9330
  58.       TabIndex        =   0
  59.       Top             =   30
  60.       Width           =   2475
  61.       _ExtentX        =   4366
  62.       _ExtentY        =   926
  63.       ButtonWidth     =   1455
  64.       ButtonHeight    =   926
  65.       Appearance      =   1
  66.       Style           =   1
  67.       ImageList       =   "ImageList2"
  68.       _Version        =   393216
  69.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  70.          NumButtons      =   3
  71.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  72.             Caption         =   "保存格式"
  73.             Key             =   "bcgs"
  74.             ImageKey        =   "bcgs"
  75.          EndProperty
  76.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  77.             Caption         =   "默认列宽"
  78.             Key             =   "hfmrgs"
  79.             ImageKey        =   "mrlk"
  80.          EndProperty
  81.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  82.             Caption         =   "显示项目"
  83.             Key             =   "szxsxm"
  84.             ImageKey        =   "xsxm"
  85.          EndProperty
  86.       EndProperty
  87.    End
  88.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  89.       Height          =   7545
  90.       Left            =   0
  91.       TabIndex        =   3
  92.       Top             =   1470
  93.       Width           =   11775
  94.       _cx             =   5080
  95.       _cy             =   5080
  96.       Appearance      =   1
  97.       BorderStyle     =   1
  98.       Enabled         =   -1  'True
  99.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  100.          Name            =   "宋体"
  101.          Size            =   9
  102.          Charset         =   134
  103.          Weight          =   400
  104.          Underline       =   0   'False
  105.          Italic          =   0   'False
  106.          Strikethrough   =   0   'False
  107.       EndProperty
  108.       MousePointer    =   0
  109.       BackColor       =   16777215
  110.       ForeColor       =   -2147483640
  111.       BackColorFixed  =   13826538
  112.       ForeColorFixed  =   -2147483630
  113.       BackColorSel    =   -2147483635
  114.       ForeColorSel    =   -2147483634
  115.       BackColorBkg    =   -2147483636
  116.       BackColorAlternate=   16777215
  117.       GridColor       =   -2147483633
  118.       GridColorFixed  =   -2147483632
  119.       TreeColor       =   -2147483632
  120.       FloodColor      =   192
  121.       SheetBorder     =   -2147483642
  122.       FocusRect       =   1
  123.       HighLight       =   1
  124.       AllowSelection  =   -1  'True
  125.       AllowBigSelection=   -1  'True
  126.       AllowUserResizing=   0
  127.       SelectionMode   =   0
  128.       GridLines       =   1
  129.       GridLinesFixed  =   2
  130.       GridLineWidth   =   1
  131.       Rows            =   50
  132.       Cols            =   10
  133.       FixedRows       =   1
  134.       FixedCols       =   1
  135.       RowHeightMin    =   0
  136.       RowHeightMax    =   0
  137.       ColWidthMin     =   0
  138.       ColWidthMax     =   0
  139.       ExtendLastCol   =   0   'False
  140.       FormatString    =   ""
  141.       ScrollTrack     =   0   'False
  142.       ScrollBars      =   3
  143.       ScrollTips      =   0   'False
  144.       MergeCells      =   0
  145.       MergeCompare    =   0
  146.       AutoResize      =   -1  'True
  147.       AutoSizeMode    =   0
  148.       AutoSearch      =   0
  149.       AutoSearchDelay =   2
  150.       MultiTotals     =   -1  'True
  151.       SubtotalPosition=   1
  152.       OutlineBar      =   0
  153.       OutlineCol      =   0
  154.       Ellipsis        =   0
  155.       ExplorerBar     =   0
  156.       PicturesOver    =   0   'False
  157.       FillStyle       =   0
  158.       RightToLeft     =   0   'False
  159.       PictureType     =   0
  160.       TabBehavior     =   0
  161.       OwnerDraw       =   0
  162.       Editable        =   0
  163.       ShowComboButton =   1
  164.       WordWrap        =   0   'False
  165.       TextStyle       =   0
  166.       TextStyleFixed  =   0
  167.       OleDragMode     =   0
  168.       OleDropMode     =   0
  169.       DataMode        =   0
  170.       VirtualData     =   -1  'True
  171.       DataMember      =   ""
  172.       ComboSearch     =   3
  173.       AutoSizeMouse   =   -1  'True
  174.       FrozenRows      =   0
  175.       FrozenCols      =   0
  176.       AllowUserFreezing=   0
  177.       BackColorFrozen =   0
  178.       ForeColorFrozen =   0
  179.       WallPaperAlignment=   9
  180.       AccessibleName  =   ""
  181.       AccessibleDescription=   ""
  182.       AccessibleValue =   ""
  183.       AccessibleRole  =   24
  184.       Begin MSComctlLib.ImageList ImageList2 
  185.          Left            =   0
  186.          Top             =   0
  187.          _ExtentX        =   1005
  188.          _ExtentY        =   1005
  189.          BackColor       =   -2147483643
  190.          ImageWidth      =   16
  191.          ImageHeight     =   16
  192.          MaskColor       =   12632256
  193.          _Version        =   393216
  194.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  195.             NumListImages   =   40
  196.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  197.                Picture         =   "采购系统_普通发票查询列表.frx":1DF82
  198.                Key             =   "sz"
  199.             EndProperty
  200.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  201.                Picture         =   "采购系统_普通发票查询列表.frx":1E31C
  202.                Key             =   "dy"
  203.             EndProperty
  204.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  205.                Picture         =   "采购系统_普通发票查询列表.frx":1E6B6
  206.                Key             =   "yl"
  207.             EndProperty
  208.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  209.                Picture         =   "采购系统_普通发票查询列表.frx":1EA50
  210.                Key             =   "xg"
  211.             EndProperty
  212.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  213.                Picture         =   "采购系统_普通发票查询列表.frx":1EDEA
  214.                Key             =   "zh"
  215.             EndProperty
  216.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  217.                Picture         =   "采购系统_普通发票查询列表.frx":1F184
  218.                Key             =   "sh"
  219.             EndProperty
  220.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  221.                Picture         =   "采购系统_普通发票查询列表.frx":1F51E
  222.                Key             =   "bc"
  223.             EndProperty
  224.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  225.                Picture         =   "采购系统_普通发票查询列表.frx":1F8B8
  226.                Key             =   "fq"
  227.             EndProperty
  228.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  229.                Picture         =   "采购系统_普通发票查询列表.frx":1FC52
  230.                Key             =   "bz"
  231.             EndProperty
  232.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  233.                Picture         =   "采购系统_普通发票查询列表.frx":1FFEC
  234.                Key             =   "tc"
  235.             EndProperty
  236.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  237.                Picture         =   "采购系统_普通发票查询列表.frx":20386
  238.                Key             =   "bcgs"
  239.             EndProperty
  240.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  241.                Picture         =   "采购系统_普通发票查询列表.frx":20720
  242.                Key             =   "mrlk"
  243.             EndProperty
  244.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  245.                Picture         =   "采购系统_普通发票查询列表.frx":20ABA
  246.                Key             =   "xsxm"
  247.             EndProperty
  248.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  249.                Picture         =   "采购系统_普通发票查询列表.frx":20E54
  250.                Key             =   "first"
  251.             EndProperty
  252.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  253.                Picture         =   "采购系统_普通发票查询列表.frx":211EE
  254.                Key             =   "prev"
  255.             EndProperty
  256.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  257.                Picture         =   "采购系统_普通发票查询列表.frx":21588
  258.                Key             =   "next"
  259.             EndProperty
  260.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  261.                Picture         =   "采购系统_普通发票查询列表.frx":21922
  262.                Key             =   "last"
  263.             EndProperty
  264.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  265.                Picture         =   "采购系统_普通发票查询列表.frx":21CBC
  266.                Key             =   "xx"
  267.             EndProperty
  268.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  269.                Picture         =   "采购系统_普通发票查询列表.frx":22056
  270.                Key             =   "define"
  271.             EndProperty
  272.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  273.                Picture         =   "采购系统_普通发票查询列表.frx":223F0
  274.                Key             =   "exec"
  275.             EndProperty
  276.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  277.                Picture         =   "采购系统_普通发票查询列表.frx":2278A
  278.                Key             =   "xz"
  279.             EndProperty
  280.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  281.                Picture         =   "采购系统_普通发票查询列表.frx":22B24
  282.                Key             =   "sc"
  283.             EndProperty
  284.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  285.                Picture         =   "采购系统_普通发票查询列表.frx":22EBE
  286.                Key             =   "sx"
  287.             EndProperty
  288.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  289.                Picture         =   "采购系统_普通发票查询列表.frx":23258
  290.                Key             =   "cx"
  291.             EndProperty
  292.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  293.                Picture         =   "采购系统_普通发票查询列表.frx":235F2
  294.                Key             =   "zd"
  295.             EndProperty
  296.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  297.                Picture         =   "采购系统_普通发票查询列表.frx":2398C
  298.                Key             =   "dz"
  299.             EndProperty
  300.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  301.                Picture         =   "采购系统_普通发票查询列表.frx":23D26
  302.                Key             =   "ph"
  303.             EndProperty
  304.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  305.                Picture         =   "采购系统_普通发票查询列表.frx":240C0
  306.                Key             =   "fz"
  307.             EndProperty
  308.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  309.                Picture         =   "采购系统_普通发票查询列表.frx":2445A
  310.                Key             =   "dw"
  311.             EndProperty
  312.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  313.                Picture         =   "采购系统_普通发票查询列表.frx":247F4
  314.                Key             =   "hf"
  315.             EndProperty
  316.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  317.                Picture         =   "采购系统_普通发票查询列表.frx":24B8E
  318.                Key             =   "pz"
  319.             EndProperty
  320.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  321.                Picture         =   "采购系统_普通发票查询列表.frx":24F28
  322.                Key             =   "check"
  323.             EndProperty
  324.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  325.                Picture         =   "采购系统_普通发票查询列表.frx":252C2
  326.                Key             =   "qs"
  327.             EndProperty
  328.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  329.                Picture         =   "采购系统_普通发票查询列表.frx":2565C
  330.                Key             =   "fullcheck"
  331.             EndProperty
  332.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  333.                Picture         =   "采购系统_普通发票查询列表.frx":259F6
  334.                Key             =   "qq"
  335.             EndProperty
  336.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  337.                Picture         =   "采购系统_普通发票查询列表.frx":25D90
  338.                Key             =   "bcw"
  339.             EndProperty
  340.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  341.                Picture         =   "采购系统_普通发票查询列表.frx":2612A
  342.                Key             =   "ye"
  343.             EndProperty
  344.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  345.                Picture         =   "采购系统_普通发票查询列表.frx":264C4
  346.                Key             =   ""
  347.             EndProperty
  348.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  349.                Picture         =   "采购系统_普通发票查询列表.frx":2685E
  350.                Key             =   "frist"
  351.             EndProperty
  352.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  353.                Picture         =   "采购系统_普通发票查询列表.frx":26BF8
  354.                Key             =   "dj"
  355.             EndProperty
  356.          EndProperty
  357.       End
  358.    End
  359.    Begin MSComctlLib.Toolbar SzToolbar 
  360.       Align           =   1  'Align Top
  361.       Height          =   555
  362.       Left            =   0
  363.       TabIndex        =   4
  364.       Top             =   0
  365.       Width           =   11805
  366.       _ExtentX        =   20823
  367.       _ExtentY        =   979
  368.       ButtonWidth     =   820
  369.       ButtonHeight    =   926
  370.       AllowCustomize  =   0   'False
  371.       Appearance      =   1
  372.       Style           =   1
  373.       ImageList       =   "ImageList1"
  374.       _Version        =   393216
  375.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  376.          NumButtons      =   12
  377.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  378.             Caption         =   "设置"
  379.             Key             =   "ymsz"
  380.             ImageKey        =   "sz"
  381.          EndProperty
  382.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  383.             Caption         =   "打印"
  384.             Key             =   "dy"
  385.             ImageKey        =   "dy"
  386.          EndProperty
  387.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  388.             Caption         =   "预览"
  389.             Key             =   "yl"
  390.             ImageKey        =   "yl"
  391.          EndProperty
  392.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  393.             Style           =   3
  394.          EndProperty
  395.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  396.             Caption         =   "查询"
  397.             Key             =   "cx"
  398.             ImageKey        =   "cx"
  399.          EndProperty
  400.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  401.             Caption         =   "单据"
  402.             Key             =   "Bill"
  403.             ImageKey        =   "pz"
  404.          EndProperty
  405.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  406.             Style           =   3
  407.          EndProperty
  408.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  409.             Caption         =   "新增"
  410.             Key             =   "xz"
  411.             ImageKey        =   "xz"
  412.          EndProperty
  413.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  414.             Caption         =   "删除"
  415.             Key             =   "sc"
  416.             ImageKey        =   "sc"
  417.          EndProperty
  418.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  419.             Style           =   3
  420.          EndProperty
  421.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  422.             Caption         =   "帮助"
  423.             Key             =   "bz"
  424.             ImageKey        =   "bz"
  425.          EndProperty
  426.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  427.             Caption         =   "退出"
  428.             Key             =   "fh"
  429.             ImageKey        =   "tc"
  430.          EndProperty
  431.       EndProperty
  432.       BorderStyle     =   1
  433.       Begin MSComctlLib.ImageList ImageList1 
  434.          Left            =   6990
  435.          Top             =   30
  436.          _ExtentX        =   1005
  437.          _ExtentY        =   1005
  438.          BackColor       =   -2147483643
  439.          ImageWidth      =   16
  440.          ImageHeight     =   16
  441.          MaskColor       =   12632256
  442.          _Version        =   393216
  443.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  444.             NumListImages   =   32
  445.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  446.                Picture         =   "采购系统_普通发票查询列表.frx":26F92
  447.                Key             =   "sz"
  448.             EndProperty
  449.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  450.                Picture         =   "采购系统_普通发票查询列表.frx":2732C
  451.                Key             =   "dy"
  452.             EndProperty
  453.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  454.                Picture         =   "采购系统_普通发票查询列表.frx":276C6
  455.                Key             =   "yl"
  456.             EndProperty
  457.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  458.                Picture         =   "采购系统_普通发票查询列表.frx":27A60
  459.                Key             =   "xg"
  460.             EndProperty
  461.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  462.                Picture         =   "采购系统_普通发票查询列表.frx":27DFA
  463.                Key             =   "zh"
  464.             EndProperty
  465.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  466.                Picture         =   "采购系统_普通发票查询列表.frx":28194
  467.                Key             =   "sh"
  468.             EndProperty
  469.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  470.                Picture         =   "采购系统_普通发票查询列表.frx":2852E
  471.                Key             =   "bc"
  472.             EndProperty
  473.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  474.                Picture         =   "采购系统_普通发票查询列表.frx":288C8
  475.                Key             =   "fq"
  476.             EndProperty
  477.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  478.                Picture         =   "采购系统_普通发票查询列表.frx":28C62
  479.                Key             =   "bz"
  480.             EndProperty
  481.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  482.                Picture         =   "采购系统_普通发票查询列表.frx":28FFC
  483.                Key             =   "tc"
  484.             EndProperty
  485.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  486.                Picture         =   "采购系统_普通发票查询列表.frx":29396
  487.                Key             =   "bcgs"
  488.             EndProperty
  489.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  490.                Picture         =   "采购系统_普通发票查询列表.frx":29730
  491.                Key             =   "mrlk"
  492.             EndProperty
  493.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  494.                Picture         =   "采购系统_普通发票查询列表.frx":29ACA
  495.                Key             =   "xsxm"
  496.             EndProperty
  497.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  498.                Picture         =   "采购系统_普通发票查询列表.frx":29E64
  499.                Key             =   "first"
  500.             EndProperty
  501.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  502.                Picture         =   "采购系统_普通发票查询列表.frx":2A1FE
  503.                Key             =   "prev"
  504.             EndProperty
  505.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  506.                Picture         =   "采购系统_普通发票查询列表.frx":2A598
  507.                Key             =   "next"
  508.             EndProperty
  509.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  510.                Picture         =   "采购系统_普通发票查询列表.frx":2A932
  511.                Key             =   "last"
  512.             EndProperty
  513.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  514.                Picture         =   "采购系统_普通发票查询列表.frx":2ACCC
  515.                Key             =   "xx"
  516.             EndProperty
  517.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  518.                Picture         =   "采购系统_普通发票查询列表.frx":2B066
  519.                Key             =   "define"
  520.             EndProperty
  521.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  522.                Picture         =   "采购系统_普通发票查询列表.frx":2B400
  523.                Key             =   "exec"
  524.             EndProperty
  525.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  526.                Picture         =   "采购系统_普通发票查询列表.frx":2B79A
  527.                Key             =   "xz"
  528.             EndProperty
  529.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  530.                Picture         =   "采购系统_普通发票查询列表.frx":2BB34
  531.                Key             =   "sc"
  532.             EndProperty
  533.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  534.                Picture         =   "采购系统_普通发票查询列表.frx":2BECE
  535.                Key             =   "sx"
  536.             EndProperty
  537.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  538.                Picture         =   "采购系统_普通发票查询列表.frx":2C268
  539.                Key             =   "cx"
  540.             EndProperty
  541.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  542.                Picture         =   "采购系统_普通发票查询列表.frx":2C602
  543.                Key             =   "zd"
  544.             EndProperty
  545.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  546.                Picture         =   "采购系统_普通发票查询列表.frx":2C99C
  547.                Key             =   "dz"
  548.             EndProperty
  549.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  550.                Picture         =   "采购系统_普通发票查询列表.frx":2CD36
  551.                Key             =   "ph"
  552.             EndProperty
  553.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  554.                Picture         =   "采购系统_普通发票查询列表.frx":2D0D0
  555.                Key             =   "fz"
  556.             EndProperty
  557.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  558.                Picture         =   "采购系统_普通发票查询列表.frx":2D46A
  559.                Key             =   "dw"
  560.             EndProperty
  561.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  562.                Picture         =   "采购系统_普通发票查询列表.frx":2D804
  563.                Key             =   "hf"
  564.             EndProperty
  565.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  566.                Picture         =   "采购系统_普通发票查询列表.frx":2DB9E
  567.                Key             =   "pz"
  568.             EndProperty
  569.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  570.                Picture         =   "采购系统_普通发票查询列表.frx":2DF38
  571.                Key             =   "check"
  572.             EndProperty
  573.          EndProperty
  574.       End
  575.    End
  576. End
  577. Attribute VB_Name = "Cg_InvoicePt_list"
  578. Attribute VB_GlobalNameSpace = False
  579. Attribute VB_Creatable = False
  580. Attribute VB_PredeclaredId = True
  581. Attribute VB_Exposed = False
  582. '**************************************************************************
  583. '*    模 块 名 称 :普通发票列表
  584. '*    功 能 描 述 :
  585. '*    程序员姓名  :周化江
  586. '*    最后修改人  :周化江
  587. '*    最后修改时间:2001/10/06
  588. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  589. '**************************************************************************
  590. Dim ReportTitle As String                '报表主标题
  591. Dim Str_QueryCondi As String             '用户录入查询条件
  592. Dim Rec_BillID As New ADODB.Recordset    '用户查询单据ID动态集
  593. Dim Str_RightEdit As String              '单据编辑(新增、修改、删除)权限索引
  594. '以下为固定使用变量
  595. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  596. Dim GridCode As String                   '显示网格网格代码
  597. Dim GridInf() As Variant                 '整个网格设置信息
  598. Dim Tsxx As String                       '系统提示信息
  599. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  600. Dim Sjhgd As Double                      '网格数据行高度
  601. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  602. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  603. Dim GridStr()  As String                 '网格列信息(字符型)
  604. Dim GridInt() As Integer                 '网格列信息(整型)
  605. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  606. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  607.     On Error Resume Next
  608.     With CxbbGrid
  609.         .Width = Me.Width - 160
  610.         .Height = Me.Height - .Top - 400
  611.     End With
  612.     With Pic_Title
  613.         .Width = Me.Width - 160
  614.     End With
  615.     
  616.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  617. End Sub
  618. Private Sub Form_Load()                                                   '窗体装入
  619.   
  620.     '调入打印页面设置窗体
  621.     ReportTitle = "普通发票列表"
  622.     XtReportCode = "Cg_InvoiceList_Pt"
  623.     Load Dyymctbl
  624.           
  625.     '单据编辑(新增、修改、删除)权限索引
  626.     Str_RightEdit = "Cg_pfpinput_edit"
  627.     
  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_Pt"
  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 = 3
  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 = 3
  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=0 ) "
  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.InvoiceDate,a.InvoiceNum,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.             CxbbGrid.TextMatrix(jsqte, 2) = .Fields("InvoiceKind")
  804.             If .Fields("InvoiceKind") = 0 Then
  805.                 int_zhengfu = 1
  806.             Else
  807.                 int_zhengfu = -1
  808.                 CxbbGrid.Cell(flexcpForeColor, jsqte, Qslz, jsqte, CxbbGrid.Cols - 1) = &HFF&
  809.             End If
  810.             
  811.             CxbbGrid.TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = Format(.Fields("InvoiceDate"), "yyyy-mm-dd")            '发票日期
  812.             CxbbGrid.TextMatrix(jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("InvoiceNum") & "")                        '发票号
  813.             CxbbGrid.TextMatrix(jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("InvoiceNumZs") & "")                      '原发票号
  814.             CxbbGrid.TextMatrix(jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("InvoiceName") & "")                       '发票类型
  815.             CxbbGrid.TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("SupplierName") & "")                      '供应商名称
  816.             CxbbGrid.TextMatrix(jsqte, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("DeptName") & "")                          '部门名称
  817.             CxbbGrid.TextMatrix(jsqte, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("PersonName") & "")                        '业务员
  818.             CxbbGrid.TextMatrix(jsqte, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("OrderFormNum") & "")                      '订单号
  819.             CxbbGrid.TextMatrix(jsqte, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("PurTypeName") & "")                       '采购类型
  820.             CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("SSName") & "")                            '结算方式
  821.             CxbbGrid.TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("Payname") & "")                           '付款条件
  822.             CxbbGrid.TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = Trim(.Fields("TransferWayName") & "")                   '运输方式
  823.             CxbbGrid.TextMatrix(jsqte, Sydz("013", GridStr(), Szzls)) = Trim(.Fields("ForeignCurrName") & "")                   '货币名称
  824.             CxbbGrid.TextMatrix(jsqte, Sydz("014", GridStr(), Szzls)) = IIf(IsNull(.Fields("AccRate")) Or .Fields("AccRate") = 0, "", .Fields("AccRate").Value)     '汇率
  825.             CxbbGrid.TextMatrix(jsqte, Sydz("015", GridStr(), Szzls)) = Trim(.Fields("ChargeDeptName") & "")                    '费用单位
  826.             CxbbGrid.TextMatrix(jsqte, Sydz("016", GridStr(), Szzls)) = Trim(.Fields("Remark") & "")                            '备注
  827.             CxbbGrid.TextMatrix(jsqte, Sydz("017", GridStr(), Szzls)) = Trim(.Fields("Maker") & "")                             '制单人
  828.             CxbbGrid.TextMatrix(jsqte, Sydz("018", GridStr(), Szzls)) = Trim(.Fields("Checker") & "")                           '审核人
  829.             CxbbGrid.TextMatrix(jsqte, Sydz("019", GridStr(), Szzls)) = Format(.Fields("BanlanceDate"), "yyyy-mm-dd")           '结算日期
  830.             CxbbGrid.TextMatrix(jsqte, Sydz("021", GridStr(), Szzls)) = Trim(.Fields("MNumber") & "")                           '物料编码
  831.             CxbbGrid.TextMatrix(jsqte, Sydz("022", GridStr(), Szzls)) = Trim(.Fields("MName") & "")                             '物料名称
  832.             CxbbGrid.TextMatrix(jsqte, Sydz("023", GridStr(), Szzls)) = Trim(.Fields("Model") & "")                             '规格型号
  833.             CxbbGrid.TextMatrix(jsqte, Sydz("024", GridStr(), Szzls)) = Trim(.Fields("PurUnitName") & "")                       '计量单位
  834.             CxbbGrid.TextMatrix(jsqte, Sydz("025", GridStr(), Szzls)) = IIf(IsNull(.Fields("Quantity")) Or .Fields("Quantity") = 0, "", (int_zhengfu) * .Fields("Quantity").Value)      '数量
  835.             CxbbGrid.TextMatrix(jsqte, Sydz("026", GridStr(), Szzls)) = IIf(IsNull(.Fields("PriceYb")) Or .Fields("PriceYb") = 0, "", .Fields("PriceYb").Value)                         '单价(原币)
  836.             CxbbGrid.TextMatrix(jsqte, Sydz("027", GridStr(), Szzls)) = IIf(IsNull(.Fields("MoneyYb")) Or .Fields("MoneyYb") = 0, "", (int_zhengfu) * .Fields("MoneyYb").Value)         '金额(原币)
  837.             CxbbGrid.TextMatrix(jsqte, Sydz("028", GridStr(), Szzls)) = IIf(IsNull(.Fields("PriceBb")) Or .Fields("PriceBb") = 0, "", .Fields("PriceBb").Value)                         '单价(本币)
  838.             CxbbGrid.TextMatrix(jsqte, Sydz("029", GridStr(), Szzls)) = IIf(IsNull(.Fields("MoneyBb")) Or .Fields("MoneyBb") = 0, "", (int_zhengfu) * .Fields("MoneyBb").Value)         '金额(本币)
  839.             CxbbGrid.TextMatrix(jsqte, Sydz("020", GridStr(), Szzls)) = Trim(.Fields("PurSortName") & "")                       '采购物料分类
  840.             '<<]
  841.             '设置数据行高度(Fixed)
  842.             CxbbGrid.RowHeight(jsqte) = Sjhgd
  843.      
  844.             '动态集指针加1,同时将计数器加1(Fixed)
  845.             .MoveNext
  846.             jsqte = jsqte + 1
  847.         Loop
  848.     End With
  849.     ']以上为用户自定义部分
  850. End Sub
  851. Private Sub CxbbGrid_DblClick()                                              '用户双击网格调入相应单据
  852.     
  853.     Dim RecTemp As New ADODB.Recordset               '临时使用动态集
  854.     
  855.     '当第一次查询结果为空时,判断总记录行是否与固定行数相同,如相同则出现错误(双表头出现此情况)
  856.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then
  857.         Exit Sub
  858.     End If
  859.     
  860.     '非数据行退出
  861.     If CxbbGrid.Row < CxbbGrid.FixedRows Or S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  862.         Exit Sub
  863.     End If
  864.     Sqlstr = "SELECT InvoiceMainID From Cg_InvoiceMain Where InvoiceMainID=" & S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  865.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  866.     With RecTemp
  867.         If .EOF Then
  868.             Tsxx = "此发票已被其他用户删除!"
  869.             Call Xtxxts(Tsxx, 0, 4)
  870.             Exit Sub
  871.         Else
  872.             '调入单据处理窗体
  873.             With Cg_InvoiceBill
  874.                 
  875.                 '填充查询单据标识
  876.                 XT_BillID = CxbbGrid.TextMatrix(CxbbGrid.Row, 0)
  877.                 Xtcdcsfz = Str_QueryCondi
  878.                 If S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 2)) = 0 Then
  879.                      .InvoiceType = 3  '普通发票标识
  880.                 ElseIf S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 2)) = 1 Then
  881.                      .InvoiceType = 5
  882.                 End If
  883.                 '设置单据处理为列表查询(修改)状态
  884.                 Xtcdcs = "2"
  885.                 .Show 1
  886.             End With
  887.             If Xtfhcs = "1" Then
  888.                 Tsxx = "发票发生变化,是否刷新发票列表?"
  889.                 yhAnswer = Xtxxts(Tsxx, 2, 2)
  890.                 If yhAnswer = 1 Then
  891.                     Xt_Wait.Show
  892.                     Xt_Wait.Refresh
  893.    
  894.                     '加快显示速度
  895.                     CxbbGrid.Redraw = False
  896.  
  897.                     '生成查询结果
  898.                     Call Sub_Query(1)
  899.    
  900.                     CxbbGrid.Redraw = True
  901.                     Xt_Wait.Hide
  902.                 End If
  903.             End If
  904.         End If
  905.     End With
  906. End Sub
  907. Private Sub Sub_AddBill()                                              '新增单据
  908.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  909.     If Not Security_Log(Str_RightEdit, Xtczybm, 1) Then
  910.         Exit Sub
  911.     End If
  912.     With Cg_InvoiceBill
  913.    
  914.         '设置单据处理为填制单据状态
  915.          Xtcdcs = "1"
  916.         .InvoiceType = 3  '期初普通发票标识
  917.         .Show 1
  918.     End With
  919.        
  920.     If Xtfhcs = "1" Then
  921.         Tsxx = "发票发生变化,是否刷新发票列表?"
  922.         yhAnswer = Xtxxts(Tsxx, 2, 2)
  923.         If yhAnswer = 1 Then
  924.             Xt_Wait.Show
  925.             Xt_Wait.Refresh
  926.    
  927.             '加快显示速度
  928.             CxbbGrid.Redraw = False
  929.  
  930.             '生成查询结果
  931.             Call Sub_Query(1)
  932.    
  933.             CxbbGrid.Redraw = True
  934.             Xt_Wait.Hide
  935.         End If
  936.     End If
  937.    
  938. End Sub
  939. Private Sub Sub_DeleteBill()                                            '删除选中当前发票
  940.     
  941.     Dim YAnswer As Integer
  942.     Dim Lng_BillID As Long           '单据标识
  943.     If CxbbGrid.Cell(flexcpForeColor, CxbbGrid.Row, Qslz, CxbbGrid.Row, CxbbGrid.Cols - 1) = &HFF& Then
  944.         '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  945.         If Not Security_Log("Cg_hfpinput_edit", Xtczybm, 1) Then
  946.             Exit Sub
  947.         End If
  948.     Else
  949.         '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  950.         If Not Security_Log(Str_RightEdit, Xtczybm, 1) Then
  951.             Exit Sub
  952.         End If
  953.     End If
  954.     
  955.     '当第一次查询结果为空时,判断总记录行是否与固定行数相同,如相同则出现错误(双表头出现此情况)
  956.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then
  957.         Exit Sub
  958.     End If
  959.         
  960.     '非数据行退出
  961.     If CxbbGrid.Row < CxbbGrid.FixedRows Or S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  962.         Exit Sub
  963.     End If
  964.   
  965.     Tsxx = "请确认是否删除当前发票?"
  966.     yhAnswer = Xtxxts(Tsxx, 2, 2)
  967.   
  968.     If yhAnswer = 1 Then
  969.         '1.判断当前发票是否允许删除
  970.         If Not Fun_AllowDelete Then
  971.             Exit Sub
  972.         End If
  973.   
  974.         '2.删除单据所有内容
  975.         Lng_BillID = S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  976.         On Error GoTo Swcwcl
  977.         Cw_DataEnvi.DataConnect.BeginTrans
  978.         Cw_DataEnvi.DataConnect.Execute ("Delete Cg_InvoiceSub Where InvoiceMainID=" & Lng_BillID)         '删除单据子表内容
  979.         Cw_DataEnvi.DataConnect.Execute ("Delete Cg_InvoiceMain Where InvoiceMainID=" & Lng_BillID)        '删除单据主表内容
  980.         Cw_DataEnvi.DataConnect.CommitTrans
  981.       
  982.         '删除网格中单据数据
  983.         jsqte = CxbbGrid.FixedRows
  984.         Do While jsqte <= CxbbGrid.Rows - 1
  985.             If S2N(CxbbGrid.TextMatrix(jsqte, 0)) = Lng_BillID Then
  986.                 CxbbGrid.RemoveItem (jsqte)
  987.             Else
  988.                 jsqte = jsqte + 1
  989.             End If
  990.         Loop
  991.     Else
  992.         Exit Sub
  993.     End If
  994.     Exit Sub
  995. Swcwcl:
  996.     Cw_DataEnvi.DataConnect.RollbackTrans
  997.     Tsxx = "删除发票过程中出现未知错误,程序自动恢复删除前状态!"
  998.     Call Xtxxts(Tsxx, 0, 1)
  999.     Exit Sub
  1000.   
  1001. End Sub
  1002. Private Function Fun_AllowDelete() As Boolean                                        '判断当前单据是否允许删除
  1003.   
  1004.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1005.     Dim Sqlstr As String                   '查询字符串
  1006.     Dim Lng_BillID As Long                 '单据ID
  1007.     Lng_BillID = S2N(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1008.     Sqlstr = "Select Checker ,ltrim(rtrim(isnull(ChalkitupMan,''))) as ChalkitupMan ,BanlanceDate From Cg_InvoiceMain Where InvoiceMainID=" & Lng_BillID
  1009.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1010.     With RecTemp
  1011.         If Not .EOF Then
  1012.             If Trim(.Fields("Checker") & "") <> "" Then
  1013.                 Tsxx = "该单据已审核确认,不能删除!"
  1014.                 Call Xtxxts(Tsxx, 0, 4)
  1015.                 Exit Function
  1016.             End If
  1017.             If Trim("" & .Fields("BanlanceDate")) <> "" Then
  1018.                 Tsxx = "该单据已结算,不能删除!"
  1019.                 Call Xtxxts(Tsxx, 0, 4)
  1020.                 Exit Function
  1021.             End If
  1022.             If Trim(.Fields("ChalkitupMan") & "") <> "" Then
  1023.                 Tsxx = "该单据已记帐,不能删除!"
  1024.                 Call Xtxxts(Tsxx, 0, 4)
  1025.                 Exit Function
  1026.             End If
  1027.         End If
  1028.     End With
  1029.     Fun_AllowDelete = True
  1030.   
  1031. End Function
  1032. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1033.     
  1034.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1035.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1036.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1037.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1038.     ReDim Bbxbt(1 To Bbxbtgs)
  1039.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1040.     If Bbbwhgs <> 0 Then
  1041.         ReDim Bbbwh(1 To Bbbwhgs)
  1042.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1043.     End If
  1044.     Bbzbt = ReportTitle
  1045.     Bbxbt(1) = ""
  1046.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1047.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1048.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1049.     If Not bbylte Then
  1050.         Unload DY_Tybbyldy
  1051.     End If
  1052. End Sub