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

企业管理

开发平台:

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 FK_FrmNoteList 
  5.    Caption         =   "应付票据列表"
  6.    ClientHeight    =   8595
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11820
  10.    HelpContextID   =   5001
  11.    Icon            =   "应付票据_应付票据查询结果.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    LinkTopic       =   "Form1"
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   8595
  16.    ScaleWidth      =   11820
  17.    WindowState     =   2  'Maximized
  18.    Begin MSComctlLib.Toolbar GsToolbar 
  19.       Height          =   525
  20.       Left            =   9330
  21.       TabIndex        =   3
  22.       Top             =   30
  23.       Width           =   2475
  24.       _ExtentX        =   4366
  25.       _ExtentY        =   926
  26.       ButtonWidth     =   1455
  27.       ButtonHeight    =   926
  28.       Appearance      =   1
  29.       Style           =   1
  30.       ImageList       =   "ImageList2"
  31.       _Version        =   393216
  32.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  33.          NumButtons      =   3
  34.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  35.             Caption         =   "保存格式"
  36.             Key             =   "bcgs"
  37.             ImageKey        =   "bcgs"
  38.          EndProperty
  39.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  40.             Caption         =   "默认列宽"
  41.             Key             =   "hfmrgs"
  42.             ImageKey        =   "mrlk"
  43.          EndProperty
  44.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  45.             Caption         =   "显示项目"
  46.             Key             =   "szxsxm"
  47.             ImageKey        =   "xsxm"
  48.          EndProperty
  49.       EndProperty
  50.    End
  51.    Begin VB.PictureBox Pic_Title 
  52.       BackColor       =   &H00FFFFFF&
  53.       Height          =   825
  54.       Left            =   0
  55.       Picture         =   "应付票据_应付票据查询结果.frx":1042
  56.       ScaleHeight     =   765
  57.       ScaleWidth      =   11715
  58.       TabIndex        =   1
  59.       Top             =   570
  60.       Width           =   11775
  61.       Begin MSComctlLib.ImageList ImageList1 
  62.          Left            =   8370
  63.          Top             =   0
  64.          _ExtentX        =   1005
  65.          _ExtentY        =   1005
  66.          BackColor       =   -2147483643
  67.          ImageWidth      =   16
  68.          ImageHeight     =   16
  69.          MaskColor       =   12632256
  70.          _Version        =   393216
  71.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  72.             NumListImages   =   41
  73.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  74.                Picture         =   "应付票据_应付票据查询结果.frx":1DF82
  75.                Key             =   "sz"
  76.             EndProperty
  77.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  78.                Picture         =   "应付票据_应付票据查询结果.frx":1E31C
  79.                Key             =   "dy"
  80.             EndProperty
  81.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  82.                Picture         =   "应付票据_应付票据查询结果.frx":1E6B6
  83.                Key             =   "yl"
  84.             EndProperty
  85.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  86.                Picture         =   "应付票据_应付票据查询结果.frx":1EA50
  87.                Key             =   "xg"
  88.             EndProperty
  89.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  90.                Picture         =   "应付票据_应付票据查询结果.frx":1EDEA
  91.                Key             =   "zh"
  92.             EndProperty
  93.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  94.                Picture         =   "应付票据_应付票据查询结果.frx":1F184
  95.                Key             =   "sh"
  96.             EndProperty
  97.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  98.                Picture         =   "应付票据_应付票据查询结果.frx":1F51E
  99.                Key             =   "bc"
  100.             EndProperty
  101.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  102.                Picture         =   "应付票据_应付票据查询结果.frx":1F8B8
  103.                Key             =   "fq"
  104.             EndProperty
  105.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  106.                Picture         =   "应付票据_应付票据查询结果.frx":1FC52
  107.                Key             =   "bz"
  108.             EndProperty
  109.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  110.                Picture         =   "应付票据_应付票据查询结果.frx":1FFEC
  111.                Key             =   "tc"
  112.             EndProperty
  113.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  114.                Picture         =   "应付票据_应付票据查询结果.frx":20386
  115.                Key             =   "bcgs"
  116.             EndProperty
  117.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  118.                Picture         =   "应付票据_应付票据查询结果.frx":20720
  119.                Key             =   "mrlk"
  120.             EndProperty
  121.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  122.                Picture         =   "应付票据_应付票据查询结果.frx":20ABA
  123.                Key             =   "xsxm"
  124.             EndProperty
  125.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  126.                Picture         =   "应付票据_应付票据查询结果.frx":20E54
  127.                Key             =   "first"
  128.             EndProperty
  129.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  130.                Picture         =   "应付票据_应付票据查询结果.frx":211EE
  131.                Key             =   "prev"
  132.             EndProperty
  133.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  134.                Picture         =   "应付票据_应付票据查询结果.frx":21588
  135.                Key             =   "next"
  136.             EndProperty
  137.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  138.                Picture         =   "应付票据_应付票据查询结果.frx":21922
  139.                Key             =   "last"
  140.             EndProperty
  141.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  142.                Picture         =   "应付票据_应付票据查询结果.frx":21CBC
  143.                Key             =   "xx"
  144.             EndProperty
  145.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  146.                Picture         =   "应付票据_应付票据查询结果.frx":22056
  147.                Key             =   "define"
  148.             EndProperty
  149.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  150.                Picture         =   "应付票据_应付票据查询结果.frx":223F0
  151.                Key             =   "exec"
  152.             EndProperty
  153.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  154.                Picture         =   "应付票据_应付票据查询结果.frx":2278A
  155.                Key             =   "xz"
  156.             EndProperty
  157.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  158.                Picture         =   "应付票据_应付票据查询结果.frx":22B24
  159.                Key             =   "sc"
  160.             EndProperty
  161.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  162.                Picture         =   "应付票据_应付票据查询结果.frx":22EBE
  163.                Key             =   "sx"
  164.             EndProperty
  165.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  166.                Picture         =   "应付票据_应付票据查询结果.frx":23258
  167.                Key             =   "cx"
  168.             EndProperty
  169.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  170.                Picture         =   "应付票据_应付票据查询结果.frx":235F2
  171.                Key             =   "zd"
  172.             EndProperty
  173.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  174.                Picture         =   "应付票据_应付票据查询结果.frx":2398C
  175.                Key             =   "dz"
  176.             EndProperty
  177.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  178.                Picture         =   "应付票据_应付票据查询结果.frx":23D26
  179.                Key             =   "ph"
  180.             EndProperty
  181.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  182.                Picture         =   "应付票据_应付票据查询结果.frx":240C0
  183.                Key             =   "fz"
  184.             EndProperty
  185.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  186.                Picture         =   "应付票据_应付票据查询结果.frx":2445A
  187.                Key             =   "dw"
  188.             EndProperty
  189.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  190.                Picture         =   "应付票据_应付票据查询结果.frx":247F4
  191.                Key             =   "shsh"
  192.             EndProperty
  193.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  194.                Picture         =   "应付票据_应付票据查询结果.frx":24B8E
  195.                Key             =   "shqs"
  196.             EndProperty
  197.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  198.                Picture         =   "应付票据_应付票据查询结果.frx":24F28
  199.                Key             =   "quanxuan"
  200.             EndProperty
  201.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  202.                Picture         =   "应付票据_应付票据查询结果.frx":252C2
  203.                Key             =   "quanqi"
  204.             EndProperty
  205.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  206.                Picture         =   "应付票据_应付票据查询结果.frx":2565C
  207.                Key             =   "Endorse"
  208.             EndProperty
  209.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  210.                Picture         =   "应付票据_应付票据查询结果.frx":259F6
  211.                Key             =   "Cancel"
  212.             EndProperty
  213.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  214.                Picture         =   "应付票据_应付票据查询结果.frx":25D90
  215.                Key             =   "Discount"
  216.             EndProperty
  217.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  218.                Picture         =   "应付票据_应付票据查询结果.frx":2612A
  219.                Key             =   "Encash"
  220.             EndProperty
  221.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  222.                Picture         =   "应付票据_应付票据查询结果.frx":264C4
  223.                Key             =   "TurnOut"
  224.             EndProperty
  225.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  226.                Picture         =   "应付票据_应付票据查询结果.frx":2685E
  227.                Key             =   "pz"
  228.             EndProperty
  229.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  230.                Picture         =   "应付票据_应付票据查询结果.frx":26BF8
  231.                Key             =   "quansh"
  232.             EndProperty
  233.             BeginProperty ListImage41 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  234.                Picture         =   "应付票据_应付票据查询结果.frx":26F92
  235.                Key             =   "bill"
  236.             EndProperty
  237.          EndProperty
  238.       End
  239.       Begin VB.Label Lab_Color 
  240.          Appearance      =   0  'Flat
  241.          BackColor       =   &H00FFFFFF&
  242.          BorderStyle     =   1  'Fixed Single
  243.          ForeColor       =   &H80000008&
  244.          Height          =   195
  245.          Index           =   0
  246.          Left            =   9540
  247.          TabIndex        =   7
  248.          Top             =   120
  249.          Width           =   195
  250.       End
  251.       Begin VB.Label Label1 
  252.          Appearance      =   0  'Flat
  253.          BackColor       =   &H80000005&
  254.          BackStyle       =   0  'Transparent
  255.          Caption         =   "未审核"
  256.          ForeColor       =   &H80000008&
  257.          Height          =   195
  258.          Index           =   1
  259.          Left            =   9780
  260.          TabIndex        =   6
  261.          Top             =   120
  262.          Width           =   795
  263.       End
  264.       Begin VB.Label Lab_Color 
  265.          Appearance      =   0  'Flat
  266.          BackColor       =   &H00C0E0FF&
  267.          BorderStyle     =   1  'Fixed Single
  268.          ForeColor       =   &H80000008&
  269.          Height          =   195
  270.          Index           =   1
  271.          Left            =   9540
  272.          TabIndex        =   5
  273.          Top             =   450
  274.          Width           =   195
  275.       End
  276.       Begin VB.Label Label1 
  277.          Appearance      =   0  'Flat
  278.          BackColor       =   &H80000005&
  279.          BackStyle       =   0  'Transparent
  280.          Caption         =   "审  核"
  281.          ForeColor       =   &H80000008&
  282.          Height          =   195
  283.          Index           =   3
  284.          Left            =   9780
  285.          TabIndex        =   4
  286.          Top             =   450
  287.          Width           =   795
  288.       End
  289.       Begin VB.Label Lab_Title 
  290.          AutoSize        =   -1  'True
  291.          BackColor       =   &H80000018&
  292.          BackStyle       =   0  'Transparent
  293.          Caption         =   "应付票据列表"
  294.          BeginProperty Font 
  295.             Name            =   "宋体"
  296.             Size            =   12
  297.             Charset         =   134
  298.             Weight          =   700
  299.             Underline       =   0   'False
  300.             Italic          =   0   'False
  301.             Strikethrough   =   0   'False
  302.          EndProperty
  303.          ForeColor       =   &H00000000&
  304.          Height          =   240
  305.          Index           =   4
  306.          Left            =   510
  307.          TabIndex        =   2
  308.          Top             =   210
  309.          Width           =   1530
  310.       End
  311.    End
  312.    Begin VB.Timer Timer1 
  313.       Enabled         =   0   'False
  314.       Interval        =   1
  315.       Left            =   8970
  316.       Top             =   630
  317.    End
  318.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  319.       Height          =   7545
  320.       Left            =   30
  321.       TabIndex        =   0
  322.       Top             =   1470
  323.       Width           =   11775
  324.       _cx             =   5080
  325.       _cy             =   5080
  326.       Appearance      =   1
  327.       BorderStyle     =   1
  328.       Enabled         =   -1  'True
  329.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  330.          Name            =   "宋体"
  331.          Size            =   9
  332.          Charset         =   134
  333.          Weight          =   400
  334.          Underline       =   0   'False
  335.          Italic          =   0   'False
  336.          Strikethrough   =   0   'False
  337.       EndProperty
  338.       MousePointer    =   0
  339.       BackColor       =   16777215
  340.       ForeColor       =   -2147483640
  341.       BackColorFixed  =   13826538
  342.       ForeColorFixed  =   -2147483630
  343.       BackColorSel    =   -2147483635
  344.       ForeColorSel    =   -2147483634
  345.       BackColorBkg    =   -2147483636
  346.       BackColorAlternate=   16777215
  347.       GridColor       =   -2147483633
  348.       GridColorFixed  =   -2147483632
  349.       TreeColor       =   -2147483632
  350.       FloodColor      =   192
  351.       SheetBorder     =   -2147483642
  352.       FocusRect       =   1
  353.       HighLight       =   1
  354.       AllowSelection  =   -1  'True
  355.       AllowBigSelection=   -1  'True
  356.       AllowUserResizing=   0
  357.       SelectionMode   =   0
  358.       GridLines       =   1
  359.       GridLinesFixed  =   2
  360.       GridLineWidth   =   1
  361.       Rows            =   50
  362.       Cols            =   10
  363.       FixedRows       =   1
  364.       FixedCols       =   1
  365.       RowHeightMin    =   0
  366.       RowHeightMax    =   0
  367.       ColWidthMin     =   0
  368.       ColWidthMax     =   0
  369.       ExtendLastCol   =   0   'False
  370.       FormatString    =   ""
  371.       ScrollTrack     =   0   'False
  372.       ScrollBars      =   3
  373.       ScrollTips      =   0   'False
  374.       MergeCells      =   0
  375.       MergeCompare    =   0
  376.       AutoResize      =   -1  'True
  377.       AutoSizeMode    =   0
  378.       AutoSearch      =   0
  379.       AutoSearchDelay =   2
  380.       MultiTotals     =   -1  'True
  381.       SubtotalPosition=   1
  382.       OutlineBar      =   0
  383.       OutlineCol      =   0
  384.       Ellipsis        =   0
  385.       ExplorerBar     =   0
  386.       PicturesOver    =   0   'False
  387.       FillStyle       =   0
  388.       RightToLeft     =   0   'False
  389.       PictureType     =   0
  390.       TabBehavior     =   0
  391.       OwnerDraw       =   0
  392.       Editable        =   0
  393.       ShowComboButton =   1
  394.       WordWrap        =   0   'False
  395.       TextStyle       =   0
  396.       TextStyleFixed  =   0
  397.       OleDragMode     =   0
  398.       OleDropMode     =   0
  399.       DataMode        =   0
  400.       VirtualData     =   -1  'True
  401.       DataMember      =   ""
  402.       ComboSearch     =   3
  403.       AutoSizeMouse   =   -1  'True
  404.       FrozenRows      =   0
  405.       FrozenCols      =   0
  406.       AllowUserFreezing=   0
  407.       BackColorFrozen =   0
  408.       ForeColorFrozen =   0
  409.       WallPaperAlignment=   9
  410.       AccessibleName  =   ""
  411.       AccessibleDescription=   ""
  412.       AccessibleValue =   ""
  413.       AccessibleRole  =   24
  414.       Begin MSComctlLib.ImageList ImageList2 
  415.          Left            =   0
  416.          Top             =   0
  417.          _ExtentX        =   1005
  418.          _ExtentY        =   1005
  419.          BackColor       =   -2147483643
  420.          ImageWidth      =   16
  421.          ImageHeight     =   16
  422.          MaskColor       =   12632256
  423.          _Version        =   393216
  424.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  425.             NumListImages   =   40
  426.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  427.                Picture         =   "应付票据_应付票据查询结果.frx":2732C
  428.                Key             =   "sz"
  429.             EndProperty
  430.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  431.                Picture         =   "应付票据_应付票据查询结果.frx":276C6
  432.                Key             =   "dy"
  433.             EndProperty
  434.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  435.                Picture         =   "应付票据_应付票据查询结果.frx":27A60
  436.                Key             =   "yl"
  437.             EndProperty
  438.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  439.                Picture         =   "应付票据_应付票据查询结果.frx":27DFA
  440.                Key             =   "xg"
  441.             EndProperty
  442.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  443.                Picture         =   "应付票据_应付票据查询结果.frx":28194
  444.                Key             =   "zh"
  445.             EndProperty
  446.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  447.                Picture         =   "应付票据_应付票据查询结果.frx":2852E
  448.                Key             =   "sh"
  449.             EndProperty
  450.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  451.                Picture         =   "应付票据_应付票据查询结果.frx":288C8
  452.                Key             =   "bc"
  453.             EndProperty
  454.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  455.                Picture         =   "应付票据_应付票据查询结果.frx":28C62
  456.                Key             =   "fq"
  457.             EndProperty
  458.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  459.                Picture         =   "应付票据_应付票据查询结果.frx":28FFC
  460.                Key             =   "bz"
  461.             EndProperty
  462.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  463.                Picture         =   "应付票据_应付票据查询结果.frx":29396
  464.                Key             =   "tc"
  465.             EndProperty
  466.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  467.                Picture         =   "应付票据_应付票据查询结果.frx":29730
  468.                Key             =   "bcgs"
  469.             EndProperty
  470.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  471.                Picture         =   "应付票据_应付票据查询结果.frx":29ACA
  472.                Key             =   "mrlk"
  473.             EndProperty
  474.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  475.                Picture         =   "应付票据_应付票据查询结果.frx":29E64
  476.                Key             =   "xsxm"
  477.             EndProperty
  478.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  479.                Picture         =   "应付票据_应付票据查询结果.frx":2A1FE
  480.                Key             =   "first"
  481.             EndProperty
  482.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  483.                Picture         =   "应付票据_应付票据查询结果.frx":2A598
  484.                Key             =   "prev"
  485.             EndProperty
  486.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  487.                Picture         =   "应付票据_应付票据查询结果.frx":2A932
  488.                Key             =   "next"
  489.             EndProperty
  490.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  491.                Picture         =   "应付票据_应付票据查询结果.frx":2ACCC
  492.                Key             =   "last"
  493.             EndProperty
  494.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  495.                Picture         =   "应付票据_应付票据查询结果.frx":2B066
  496.                Key             =   "xx"
  497.             EndProperty
  498.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  499.                Picture         =   "应付票据_应付票据查询结果.frx":2B400
  500.                Key             =   "define"
  501.             EndProperty
  502.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  503.                Picture         =   "应付票据_应付票据查询结果.frx":2B79A
  504.                Key             =   "exec"
  505.             EndProperty
  506.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  507.                Picture         =   "应付票据_应付票据查询结果.frx":2BB34
  508.                Key             =   "xz"
  509.             EndProperty
  510.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  511.                Picture         =   "应付票据_应付票据查询结果.frx":2BECE
  512.                Key             =   "sc"
  513.             EndProperty
  514.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  515.                Picture         =   "应付票据_应付票据查询结果.frx":2C268
  516.                Key             =   "sx"
  517.             EndProperty
  518.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  519.                Picture         =   "应付票据_应付票据查询结果.frx":2C602
  520.                Key             =   "cx"
  521.             EndProperty
  522.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  523.                Picture         =   "应付票据_应付票据查询结果.frx":2C99C
  524.                Key             =   "zd"
  525.             EndProperty
  526.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  527.                Picture         =   "应付票据_应付票据查询结果.frx":2CD36
  528.                Key             =   "dz"
  529.             EndProperty
  530.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  531.                Picture         =   "应付票据_应付票据查询结果.frx":2D0D0
  532.                Key             =   "ph"
  533.             EndProperty
  534.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  535.                Picture         =   "应付票据_应付票据查询结果.frx":2D46A
  536.                Key             =   "fz"
  537.             EndProperty
  538.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  539.                Picture         =   "应付票据_应付票据查询结果.frx":2D804
  540.                Key             =   "dw"
  541.             EndProperty
  542.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  543.                Picture         =   "应付票据_应付票据查询结果.frx":2DB9E
  544.                Key             =   "hf"
  545.             EndProperty
  546.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  547.                Picture         =   "应付票据_应付票据查询结果.frx":2DF38
  548.                Key             =   "pz"
  549.             EndProperty
  550.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  551.                Picture         =   "应付票据_应付票据查询结果.frx":2E2D2
  552.                Key             =   "check"
  553.             EndProperty
  554.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  555.                Picture         =   "应付票据_应付票据查询结果.frx":2E66C
  556.                Key             =   "qs"
  557.             EndProperty
  558.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  559.                Picture         =   "应付票据_应付票据查询结果.frx":2EA06
  560.                Key             =   "fullcheck"
  561.             EndProperty
  562.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  563.                Picture         =   "应付票据_应付票据查询结果.frx":2EDA0
  564.                Key             =   "qq"
  565.             EndProperty
  566.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  567.                Picture         =   "应付票据_应付票据查询结果.frx":2F13A
  568.                Key             =   "bcw"
  569.             EndProperty
  570.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  571.                Picture         =   "应付票据_应付票据查询结果.frx":2F4D4
  572.                Key             =   "ye"
  573.             EndProperty
  574.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  575.                Picture         =   "应付票据_应付票据查询结果.frx":2F86E
  576.                Key             =   ""
  577.             EndProperty
  578.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  579.                Picture         =   "应付票据_应付票据查询结果.frx":2FC08
  580.                Key             =   "frist"
  581.             EndProperty
  582.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  583.                Picture         =   "应付票据_应付票据查询结果.frx":2FFA2
  584.                Key             =   "dj"
  585.             EndProperty
  586.          EndProperty
  587.       End
  588.    End
  589.    Begin MSComctlLib.Toolbar SzToolbar 
  590.       Align           =   1  'Align Top
  591.       Height          =   555
  592.       Left            =   0
  593.       TabIndex        =   8
  594.       Top             =   0
  595.       Width           =   11820
  596.       _ExtentX        =   20849
  597.       _ExtentY        =   979
  598.       ButtonWidth     =   820
  599.       ButtonHeight    =   926
  600.       AllowCustomize  =   0   'False
  601.       Appearance      =   1
  602.       Style           =   1
  603.       ImageList       =   "ImageList1"
  604.       _Version        =   393216
  605.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  606.          NumButtons      =   21
  607.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  608.             Caption         =   "设置"
  609.             Key             =   "ymsz"
  610.             ImageKey        =   "sz"
  611.          EndProperty
  612.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  613.             Caption         =   "打印"
  614.             Key             =   "dy"
  615.             ImageKey        =   "dy"
  616.          EndProperty
  617.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  618.             Caption         =   "预览"
  619.             Key             =   "yl"
  620.             ImageKey        =   "yl"
  621.          EndProperty
  622.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  623.             Style           =   3
  624.          EndProperty
  625.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  626.             Caption         =   "查询"
  627.             Key             =   "cx"
  628.             ImageKey        =   "cx"
  629.          EndProperty
  630.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  631.             Caption         =   "单据"
  632.             Key             =   "bill"
  633.             ImageKey        =   "bill"
  634.          EndProperty
  635.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  636.             Style           =   3
  637.          EndProperty
  638.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  639.             Caption         =   "新增"
  640.             Key             =   "xz"
  641.             ImageKey        =   "xz"
  642.          EndProperty
  643.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  644.             Caption         =   "删除"
  645.             Key             =   "sc"
  646.             ImageKey        =   "sc"
  647.          EndProperty
  648.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  649.             Style           =   3
  650.          EndProperty
  651.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  652.             Caption         =   "审核"
  653.             Key             =   "shsh"
  654.             ImageKey        =   "shsh"
  655.          EndProperty
  656.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  657.             Style           =   3
  658.          EndProperty
  659.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  660.             Caption         =   "付款"
  661.             Key             =   "Encash"
  662.             ImageKey        =   "Encash"
  663.          EndProperty
  664.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  665.             Object.Visible         =   0   'False
  666.             Caption         =   "背书"
  667.             Key             =   "Endorse"
  668.             ImageKey        =   "Endorse"
  669.          EndProperty
  670.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  671.             Object.Visible         =   0   'False
  672.             Caption         =   "转出"
  673.             Key             =   "TurnOut"
  674.             ImageKey        =   "TurnOut"
  675.          EndProperty
  676.          BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  677.             Object.Visible         =   0   'False
  678.             Caption         =   "贴现"
  679.             Key             =   "Discount"
  680.             ImageKey        =   "Discount"
  681.          EndProperty
  682.          BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  683.             Style           =   3
  684.          EndProperty
  685.          BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  686.             Object.Visible         =   0   'False
  687.             Caption         =   "凭证"
  688.             Key             =   "Voucher"
  689.             ImageKey        =   "pz"
  690.          EndProperty
  691.          BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  692.             Object.Visible         =   0   'False
  693.             Style           =   3
  694.          EndProperty
  695.          BeginProperty Button20 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  696.             Caption         =   "帮助"
  697.             Key             =   "bz"
  698.             ImageKey        =   "bz"
  699.          EndProperty
  700.          BeginProperty Button21 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  701.             Caption         =   "退出"
  702.             Key             =   "fh"
  703.             ImageKey        =   "tc"
  704.          EndProperty
  705.       EndProperty
  706.       BorderStyle     =   1
  707.    End
  708. End
  709. Attribute VB_Name = "FK_FrmNoteList"
  710. Attribute VB_GlobalNameSpace = False
  711. Attribute VB_Creatable = False
  712. Attribute VB_PredeclaredId = True
  713. Attribute VB_Exposed = False
  714. '**************************************************************************
  715. '*    模 块 名 称 :应付票据列表
  716. '*    功 能 描 述 :
  717. '*    程序员姓名  :姜冬梅
  718. '*    最后修改人  :姜冬梅
  719. '*    最后修改时间:2001/1/16
  720. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  721. '**************************************************************************
  722. Dim ReportTitle As String                '报表主标题
  723. Dim Str_QueryCondi As String             '用户录入查询条件
  724. Dim Rec_BillID As New ADODB.Recordset    '用户查询单据ID动态集
  725. Dim YbSsTotal As Double                  '原币应付金额
  726. Dim YbInterest As Double                 '原币票面利息
  727. Dim BbSsTotal As Double                  '本币应付金额
  728. Dim Str_Foreign As String                '币别编码
  729. '以下为固定使用变量
  730. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  731. Dim GridCode As String                   '显示网格网格代码
  732. Dim GridInf() As Variant                 '整个网格设置信息
  733. Dim Tsxx As String                       '系统提示信息
  734. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  735. Dim Sjhgd As Double                      '网格数据行高度
  736. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  737. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  738. Dim GridStr()  As String                 '网格列信息(字符型)
  739. Dim GridInt() As Integer                 '网格列信息(整型)
  740. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  741. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  742.     
  743.     On Error Resume Next
  744.     
  745.     With CxbbGrid
  746.         .Width = Me.Width - 160
  747.         .Height = Me.Height - .Top - 400
  748.     End With
  749.     
  750.     With Pic_Title
  751.         .Width = Me.Width - 160
  752.     End With
  753.     
  754.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  755. End Sub
  756. Private Sub Form_Load()                                                   '窗体装入
  757.   
  758.     '调入打印页面设置窗体
  759.     ReportTitle = "应付票据列表"
  760.     XtReportCode = "Ap_NoteList"
  761.     Load Dyymctbl
  762.   
  763.     '调整标题栏及网格、格式工具条位置(Fixed)
  764.     Pic_Title.Left = 40
  765.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  766.     CxbbGrid.Left = Pic_Title.Left
  767.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  768.  
  769.     '调 入 网 格(Fixed)
  770.     GridCode = "Ap_NoteList"
  771.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  772.   
  773.     Qslz = GridInf(1)
  774.     Sjhgd = GridInf(2)
  775.     Sfxshjwg = GridInf(7)
  776.     Szzls = CxbbGrid.Cols - 1
  777. End Sub
  778. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  779.     '卸载条件窗体
  780.     FK_FrmNoteQuery.UnloadCheck.Value = 1
  781.     Unload FK_FrmNoteQuery
  782.     
  783.     '卸载打印页面设置窗体
  784.     Unload Dyymctbl
  785. End Sub
  786. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  787.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  788. End Sub
  789. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)       '网格格式调整(Fixed)
  790.     
  791.     Select Case Button.Key
  792.         Case "bcgs"                                          '保存表格格式
  793.             Call Bcwggs(CxbbGrid, GridCode, GridStr())
  794.         Case "hfmrgs"                                        '恢复默认格式
  795.             Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  796.         Case "szxsxm"                                        '设置显示项目
  797.             Call Szxsxm(CxbbGrid, GridCode)
  798.     End Select
  799. End Sub
  800. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  801.     
  802.     Select Case Button.Key
  803.         Case "ymsz"                                          '页面设置
  804.             Dyymctbl.Show 1
  805.         Case "yl"                                            '预 览
  806.             Call bbyl(True)
  807.         Case "dy"                                            '打 印
  808.             Call bbyl(False)
  809.         Case "cx"                                            '查 询
  810.             FK_FrmNoteQuery.Show 1
  811.         Case "bill"                                          '单 据
  812.             Call CxbbGrid_DblClick
  813.         Case "xz"                                            '新 增
  814.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  815.             If Not Security_Log("Ap_Note_Edit", Xtczybm, 1, True) Then
  816.                 Exit Sub
  817.             End If
  818.             Call Sub_AddBill
  819.         Case "sc"                                            '删 除
  820.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  821.             If Not Security_Log("Ap_Note_Edit", Xtczybm, 1, True) Then
  822.                 Exit Sub
  823.             End If
  824.             Call Sub_DeleteBill
  825.         Case "bz"                                            '帮 助
  826.             Call F1bz
  827.         Case "fh"                                            '退 出
  828.             Unload Me
  829.         Case "shsh"                                          '审 核
  830.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  831.             If Not Security_Log("Ap_Note_Check", Xtczybm, 1, True) Then
  832.                 Exit Sub
  833.             End If
  834.             Call Sub_CheckBill
  835.         Case "Encash"                                        '付款
  836.             Call Sub_NoteEncash
  837.     End Select
  838. End Sub
  839. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  840.     
  841.     Timer1.Enabled = False
  842.     Xt_Wait.Show
  843.     Xt_Wait.Refresh
  844.    
  845.     '加快显示速度
  846.     CxbbGrid.Redraw = False
  847.  
  848.     '生成查询结果
  849.     Call Sub_Query(0)
  850.    
  851.     CxbbGrid.Redraw = True
  852.     
  853.     Xt_Wait.Hide
  854. End Sub
  855. Private Sub Sub_Query(Int_QueryType As Integer)                                     '生成查询结果(Define)
  856.      
  857.     '过程参数:Int_QueryType 0-"点确定按钮"查询  1-"刷新"查询
  858.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  859.     Dim Coljsq As Long                          '网格列计数器
  860.     Dim Jsqte As Integer                        '临时动态计数器
  861.     Dim State As String                         '票据状态
  862.     
  863.     '重新设置合计金额及币别
  864.     Str_Foreign = ""
  865.     YbSsTotal = 0
  866.     YbInterest = 0
  867.     BbSsTotal = 0
  868.     
  869.     '以下为自定义部分[
  870.  
  871.     If Int_QueryType = 0 Then   '0-"点确定按钮"查询
  872.         With FK_FrmNoteQuery
  873.             
  874.             '设置币别编码
  875.             Str_Foreign = Trim(.LrText(3).Tag & "")
  876.             
  877.             '生成查询条件
  878.             Str_QueryCondi = " where 1=1 and RPFlag='Ap' "
  879.          
  880.             For Jsqte = 1 To 12
  881.                 Select Case Jsqte
  882.                     Case 1  '单据日期(起,止)
  883.                         If Trim(.LrText(0).Text) <> "" And Trim(.LrText(1).Text) <> "" Then
  884.                             If Trim(.LrText(0).Text) = Trim(.LrText(1)) Then
  885.                                 Str_QueryCondi = Str_QueryCondi & " and BillDate = '" & CDate(.LrText(0).Text) & "'"
  886.                             Else
  887.                                 Str_QueryCondi = Str_QueryCondi & " and BillDate >= '" & CDate(.LrText(0).Text) & "'"
  888.                                 Str_QueryCondi = Str_QueryCondi & " and BillDate <= '" & CDate(.LrText(1).Text) & "'"
  889.                             End If
  890.                         End If
  891.                         If Trim(.LrText(0).Text) <> "" And Trim(.LrText(1).Text) = "" Then
  892.                             Str_QueryCondi = Str_QueryCondi & " and BillDate >= '" & CDate(.LrText(0).Text) & "'"
  893.                         End If
  894.                         If Trim(.LrText(0).Text) = "" And Trim(.LrText(1).Text) <> "" Then
  895.                             Str_QueryCondi = Str_QueryCondi & " and BillDate <= '" & CDate(.LrText(1).Text) & "'"
  896.                         End If
  897.                         
  898.                     Case 2  '签发日期(起,止)
  899.                         If Trim(.LrText(8).Text) <> "" And Trim(.LrText(9).Text) <> "" Then
  900.                             If Trim(.LrText(8).Text) = Trim(.LrText(9)) Then
  901.                                 Str_QueryCondi = Str_QueryCondi & " and SignDate = '" & CDate(.LrText(8).Text) & "'"
  902.                             Else
  903.                                 Str_QueryCondi = Str_QueryCondi & " and SignDate >= '" & CDate(.LrText(8).Text) & "'"
  904.                                 Str_QueryCondi = Str_QueryCondi & " and SignDate <= '" & CDate(.LrText(9).Text) & "'"
  905.                             End If
  906.                         End If
  907.                         If Trim(.LrText(8).Text) <> "" And Trim(.LrText(9).Text) = "" Then
  908.                             Str_QueryCondi = Str_QueryCondi & " and SignDate >= '" & CDate(.LrText(8).Text) & "'"
  909.                         End If
  910.                         If Trim(.LrText(8).Text) = "" And Trim(.LrText(9).Text) <> "" Then
  911.                             Str_QueryCondi = Str_QueryCondi & " and SignDate <= '" & CDate(.LrText(9).Text) & "'"
  912.                         End If
  913.                         
  914.                     Case 3 '到期日期(起,止)
  915.                         If Trim(.LrText(10).Text) <> "" And Trim(.LrText(11).Text) <> "" Then
  916.                             If Trim(.LrText(10).Text) = Trim(.LrText(11)) Then
  917.                                 Str_QueryCondi = Str_QueryCondi & " and ExpireDate = '" & CDate(.LrText(10).Text) & "'"
  918.                             Else
  919.                                 Str_QueryCondi = Str_QueryCondi & " and ExpireDate >= '" & CDate(.LrText(10).Text) & "'"
  920.                                 Str_QueryCondi = Str_QueryCondi & " and ExpireDate <= '" & CDate(.LrText(11).Text) & "'"
  921.                             End If
  922.                         End If
  923.                         If Trim(.LrText(10).Text) <> "" And Trim(.LrText(11).Text) = "" Then
  924.                             Str_QueryCondi = Str_QueryCondi & " and ExpireDate >= '" & CDate(.LrText(10).Text) & "'"
  925.                         End If
  926.                         If Trim(.LrText(10).Text) = "" And Trim(.LrText(11).Text) <> "" Then
  927.                             Str_QueryCondi = Str_QueryCondi & " and ExpireDate <= '" & CDate(.LrText(11).Text) & "'"
  928.                         End If
  929.                         
  930.                     Case 4  '供应商
  931.                         If Trim(.LrText(2).Text) <> "" Then
  932.                             Str_QueryCondi = Str_QueryCondi & " and PsCode = '" & Trim(.LrText(2).Tag) & "'"
  933.                         End If
  934.                     Case 5  '币别
  935.                         If Trim(.LrText(3).Text) <> "" Then
  936.                             Str_QueryCondi = Str_QueryCondi & " And ForeignCurrCode='" & Trim(.LrText(3).Tag) & "'"
  937.                         End If
  938.                     
  939.                     Case 6 '审核状态
  940.                         If .Opt_Check0(1).Value = True Then '已审核
  941.                             Str_QueryCondi = Str_QueryCondi & " And Checker<>'' "
  942.                         End If
  943.                         
  944.                         If .Opt_Check0(2).Value = True Then  '未审核
  945.                             Str_QueryCondi = Str_QueryCondi & " And Checker='' "
  946.                         End If
  947.                     Case 7 '票据状态
  948.                         If .Opt_Check1(1).Value = True Then '已变动
  949.                             Str_QueryCondi = Str_QueryCondi & " And Fstatus<>'9' "
  950.                         End If
  951.                         
  952.                         If .Opt_Check1(2).Value = True Then  '未变动
  953.                             Str_QueryCondi = Str_QueryCondi & " And Fstatus='9' "
  954.                         End If
  955.                     
  956.                     Case 8  '票面金额
  957.                         If Val(.LrText(6).Text) <> 0 And Val(.LrText(7).Text) <> 0 Then
  958.                             If Val(.LrText(6).Text) = Val(.LrText(7).Text) Then
  959.                                 Str_QueryCondi = Str_QueryCondi & " and (YbSsJe=" & Val(.LrText(6).Text) & ")"
  960.                             Else
  961.                                 Str_QueryCondi = Str_QueryCondi & " and (YbSsJe>=" & Val(.LrText(6).Text) & ")"
  962.                                 Str_QueryCondi = Str_QueryCondi & " and (YbSsJe<=" & Val(.LrText(7).Text) & ")"
  963.                             End If
  964.                         End If
  965.                         If Trim(.LrText(6).Text) <> "" And Trim(.LrText(7).Text) = "" Then
  966.                             Str_QueryCondi = Str_QueryCondi & " and YbSsJe >=" & Val(.LrText(6).Text)
  967.                         End If
  968.                         If Trim(.LrText(6).Text) = "" And Trim(.LrText(7).Text) <> "" Then
  969.                             Str_QueryCondi = Str_QueryCondi & " and YbSsJe <=" & Val(.LrText(7).Text)
  970.                         End If
  971.                     Case 9  '部门
  972.                         If Trim(.LrText(4).Text) <> "" Then
  973.                             Str_QueryCondi = Str_QueryCondi & " And DeptCode= '" & Trim(.LrText(4).Tag) & "'"
  974.                         End If
  975.                     Case 10  '经办人
  976.                         If Trim(.LrText(5).Text) <> "" Then
  977.                             Str_QueryCondi = Str_QueryCondi & " And Personcode= '" & Trim(.LrText(5).Tag) & "'"
  978.                         End If
  979.                     Case 11  '付款单位
  980.                         If Trim(.LrText(12).Text) <> "" Then
  981.                             Str_QueryCondi = Str_QueryCondi & " And Payer= '" & Trim(.LrText(12).Text) & "'"
  982.                         End If
  983.                     Case 12  '制单人
  984.                         If Trim(.Imgcbo_Rygl.Text) <> "" Then
  985.                             Str_QueryCondi = Str_QueryCondi & " And Maker= '" & Trim(.Imgcbo_Rygl.Text) & "'"
  986.                         End If
  987.                 End Select
  988.             Next Jsqte
  989.         End With
  990.     Else
  991.         '1-"刷新"查询
  992.         If Str_QueryCondi = "" Then
  993.             Str_QueryCondi = " where 1=2 "
  994.         End If
  995.     End If
  996.     
  997.     Sqlstr = "SELECT * FROM Ap_v_Note " & Str_QueryCondi & " Order By NoteID"
  998.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  999.     With Rec_Query
  1000.         CxbbGrid.Rows = CxbbGrid.FixedRows
  1001.         Jsqte = CxbbGrid.FixedRows
  1002.         Do While Not .EOF
  1003.             CxbbGrid.AddItem ""
  1004.             
  1005.             '[>>自定义填充内容
  1006.             CxbbGrid.TextMatrix(Jsqte, 0) = .Fields("NoteID")                                                      '应付票据ID(主要用来查询定位用)
  1007.             CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Format(.Fields("BillDate"), "yyyy-mm-dd")  '单据日期
  1008.             CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("NoteCode") & "")             '单据编号
  1009.             Select Case Trim(.Fields("Fstatus"))
  1010.                 Case 9
  1011.                     If Trim(.Fields("StartFlag") & "") = True Then
  1012.                         State = "期初"
  1013.                     Else
  1014.                         State = ""
  1015.                     End If
  1016.                 Case 4
  1017.                     State = "付款"
  1018.             End Select
  1019.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = State                                         '票据状态
  1020.             CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("BillItemName") & "")                 '票据类型
  1021.             CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("SupplierName") & "")            '客户名称
  1022.             CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Format(.Fields("SignDate"), "yyyy-mm-dd")     '签发日期
  1023.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Format(.Fields("ExpireDate"), "yyyy-mm-dd")   '到期日期
  1024.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("Digest") & "")                  '摘要
  1025.             CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("ForeignCurrName") & "")         '币别
  1026.             CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("YbSsJe") & "")                  '原币应付金额
  1027.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = IIf(Val(Trim(.Fields("YbInterest") & "")) = 0, "", Trim(.Fields("YbInterest") & "")) '票面利息
  1028.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Trim(.Fields("AccRate") & "")                 '记帐汇率
  1029.             CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Trim(.Fields("BbSsJe") & "")                  '本币应付金额
  1030.             CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = Trim(.Fields("Payer") & "")                   '付款单位
  1031.             CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = Trim(.Fields("DeptName") & "")                '部门名称
  1032.             CxbbGrid.TextMatrix(Jsqte, Sydz("016", GridStr(), Szzls)) = Trim(.Fields("PersonName") & "")              '经办人
  1033.             CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = Trim(.Fields("Maker") & "")                   '制单人
  1034.             CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = Trim(.Fields("Checker") & "")                 '审核
  1035.             '<<]
  1036.             
  1037.             '设置数据行高度(Fixed)
  1038.             CxbbGrid.RowHeight(Jsqte) = Sjhgd
  1039.             
  1040.             '汇总应付票据金额
  1041.             YbSsTotal = YbSsTotal + .Fields("YbSsJe")
  1042.             YbInterest = YbInterest + .Fields("YbInterest")
  1043.             BbSsTotal = BbSsTotal + .Fields("BbSsJe")
  1044.             
  1045.             
  1046.             If Trim(.Fields("Checker")) <> "" Then                                                                    '审核单据(红色显示)
  1047.                 CxbbGrid.Cell(flexcpBackColor, Jsqte, 0, , CxbbGrid.Cols - 1) = Lab_Color(1).BackColor
  1048.             End If
  1049.             '动态集指针加1,同时将计数器加1(Fixed)
  1050.             .MoveNext
  1051.             Jsqte = Jsqte + 1
  1052.         Loop
  1053.         
  1054.         '添加合计行
  1055.         If YbSsTotal <> 0 Or BbSsTotal <> 0 Then
  1056.            CxbbGrid.AddItem ""
  1057.            CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("005", GridStr(), Szzls)) = "  合  计"
  1058.            If Str_Foreign <> "" Then
  1059.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("010", GridStr(), Szzls)) = YbSsTotal
  1060.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("011", GridStr(), Szzls)) = YbInterest
  1061.            End If
  1062.            CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("013", GridStr(), Szzls)) = BbSsTotal
  1063.            CxbbGrid.Cell(flexcpBackColor, CxbbGrid.Rows - 1, 0, CxbbGrid.Rows - 1, CxbbGrid.Cols - 1) = "&H00F7F3EC"
  1064.         End If
  1065.     End With
  1066.     ']以上为用户自定义部分
  1067. End Sub
  1068. Private Sub CxbbGrid_DblClick()                                              '用户双击网格调入相应单据
  1069.     Dim RecTemp As New ADODB.Recordset               '临时使用动态集
  1070.     
  1071.     '记录行总数与固定行数相等则退出
  1072.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then Exit Sub
  1073.     
  1074.     '非数据行退出
  1075.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  1076.         Exit Sub
  1077.     End If
  1078.     Sqlstr = "SELECT NoteId From RP_Note Where NoteId=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1079.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1080.     With RecTemp
  1081.         If .EOF Then
  1082.             Tsxx = "此应付票据已被其他用户删除!"
  1083.             Call Xtxxts(Tsxx, 0, 4)
  1084.             Exit Sub
  1085.         Else
  1086.             '调入单据处理窗体
  1087.             With FK_FrmNoteIn
  1088.                 
  1089.                 '填充查询单据标识
  1090.                 XT_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1091.                 Xtcdcsfz = Str_QueryCondi
  1092.                 If Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("003", GridStr(), Szzls))) = "期初" Then
  1093.                     TranPara = "期初"
  1094.                 Else
  1095.                     TranPara = ""
  1096.                 End If
  1097.                 '设置单据处理为列表查询(修改)状态
  1098.                 Xtcdcs = "2"
  1099.                 .Show 1
  1100.             End With
  1101.             
  1102.             If Xtfhcs = "1" Then
  1103.                 Tsxx = "应付票据发生变化,是否刷新应付票据单列表?"
  1104.                 yhAnswer = Xtxxts(Tsxx, 2, 2)
  1105.                 If yhAnswer = 1 Then
  1106.                     Xt_Wait.Show
  1107.                     Xt_Wait.Refresh
  1108.                     
  1109.                     '加快显示速度
  1110.                     CxbbGrid.Redraw = False
  1111.                     '生成查询结果
  1112.                     Call Sub_Query(1)
  1113.    
  1114.                     CxbbGrid.Redraw = True
  1115.     
  1116.                     Xt_Wait.Hide
  1117.                 End If
  1118.             End If
  1119.         End If
  1120.     End With
  1121. End Sub
  1122. Private Sub Sub_AddBill()                                              '新增单据
  1123.     
  1124.     With FK_FrmNoteIn
  1125.        
  1126.         '设置单据处理为填制单据状态
  1127.         Xtcdcs = "1"
  1128.          
  1129.         .Show 1
  1130.     End With
  1131.        
  1132.     If Xtfhcs = "1" Then
  1133.         Tsxx = "应付票据发生变化,是否刷新应付票据列表?"
  1134.         yhAnswer = Xtxxts(Tsxx, 2, 2)
  1135.         
  1136.         If yhAnswer = 1 Then
  1137.             Xt_Wait.Show
  1138.             Xt_Wait.Refresh
  1139.             
  1140.             '加快显示速度
  1141.             CxbbGrid.Redraw = False
  1142.             
  1143.             '生成查询结果
  1144.             Call Sub_Query(1)
  1145.             
  1146.             CxbbGrid.Redraw = True
  1147.             Xt_Wait.Hide
  1148.         End If
  1149.     End If
  1150.    
  1151. End Sub
  1152. Private Sub Sub_DeleteBill()                                            '删除选中当前单据
  1153.     
  1154.     Dim YAnswer As Integer
  1155.     Dim Lng_BillID As Long           '单据标识
  1156.     
  1157.     '记录行总数与固定行数相等则退出
  1158.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then Exit Sub
  1159.     '非数据行退出
  1160.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  1161.         Exit Sub
  1162.     End If
  1163.   
  1164.     Tsxx = "请确认是否删除当前应付票据?"
  1165.     yhAnswer = Xtxxts(Tsxx, 2, 2)
  1166.   
  1167.     If yhAnswer = 1 Then
  1168.   
  1169.         '1.判断当前单据是否允许删除
  1170.         If Not Fun_AllowDelete Then
  1171.             Exit Sub
  1172.         End If
  1173.   
  1174.         '2.删除单据所有内容
  1175.         Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1176.       
  1177.         On Error GoTo Swcwcl
  1178.     
  1179.         Cw_DataEnvi.DataConnect.BeginTrans
  1180.         Cw_DataEnvi.DataConnect.Execute ("Delete RP_Note Where NoteID=" & Lng_BillID)        '删除单据内容
  1181.         Cw_DataEnvi.DataConnect.CommitTrans
  1182.         
  1183.         '汇总应付票据金额
  1184.         YbSsTotal = YbSsTotal - CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls))
  1185.         YbInterest = YbInterest - CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls))
  1186.         BbSsTotal = BbSsTotal - CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls))
  1187.       
  1188.         '删除网格中单据数据
  1189.         CxbbGrid.RemoveItem (CxbbGrid.Row)
  1190.         
  1191.         '刷新合计行
  1192.         If YbSsTotal <> 0 Or BbSsTotal <> 0 Then
  1193.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("005", GridStr(), Szzls)) = "  合  计"
  1194.             If Str_Foreign <> "" Then
  1195.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("010", GridStr(), Szzls)) = YbSsTotal
  1196.                 CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("011", GridStr(), Szzls)) = YbInterest
  1197.             End If
  1198.             CxbbGrid.TextMatrix(CxbbGrid.Rows - 1, Sydz("013", GridStr(), Szzls)) = BbSsTotal
  1199.         Else
  1200.             CxbbGrid.RemoveItem (CxbbGrid.Rows - 1)
  1201.         End If
  1202.         
  1203.     Else
  1204.         Exit Sub
  1205.     End If
  1206.   
  1207.     Exit Sub
  1208. Swcwcl:
  1209.     Cw_DataEnvi.DataConnect.RollbackTrans
  1210.     Tsxx = "删除单据过程中出现未知错误,程序自动恢复删除前状态!"
  1211.     Call Xtxxts(Tsxx, 0, 1)
  1212.     Exit Sub
  1213.   
  1214. End Sub
  1215. Private Function Fun_AllowDelete() As Boolean                                        '判断当前单据是否允许删除
  1216.   
  1217.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1218.     Dim Sqlstr As String                   '查询字符串
  1219.     Dim Lng_BillID As Long                 '单据ID
  1220.   
  1221.     Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1222.     Sqlstr = "Select Checker,Fstatus From RP_Note Where NoteID=" & Lng_BillID
  1223.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1224.     With RecTemp
  1225.         If Not .EOF Then
  1226.             If Trim(.Fields("Checker") & "") <> "" Then
  1227.                 Tsxx = "该应付票据已审核确认,不能删除!"
  1228.                 Call Xtxxts(Tsxx, 0, 4)
  1229.                 Exit Function
  1230.             End If
  1231.             End If
  1232.     End With
  1233.     If RecTemp.Fields("Fstatus") <> 9 Then
  1234.         Tsxx = "该票据已发生变动,不能删除!"
  1235.         Call Xtxxts(Tsxx, 0, 4)
  1236.         Exit Function
  1237.     End If
  1238.     Fun_AllowDelete = True
  1239. End Function
  1240. '[>>===================以下为根据实际业务需要自定义过程区域=============================<<]
  1241. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1242.     
  1243.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1244.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1245.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1246.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1247.     
  1248.     ReDim Bbxbt(1 To Bbxbtgs)
  1249.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1250.     If Bbbwhgs <> 0 Then
  1251.         ReDim Bbbwh(1 To Bbbwhgs)
  1252.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1253.     End If
  1254.     
  1255.     Bbzbt = ReportTitle
  1256.     Bbxbt(1) = ""
  1257.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1258.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1259.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1260.     If Not bbylte Then
  1261.         Unload DY_Tybbyldy
  1262.     End If
  1263. End Sub
  1264. Private Function NoteCheck() As Boolean '判断票据是否已经审核并且处于收票状态
  1265.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1266.     Dim Lng_BillID As Integer              '单据ID号
  1267.     
  1268.     '非数据行退出
  1269.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  1270.         Exit Function
  1271.     End If
  1272.     Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1273.     Sqlstr = "Select Fstatus,Checker From Rp_Note Where NoteID='" & Lng_BillID & "'"
  1274.     
  1275.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1276.     '如果票据不是收票状态,不能执行弃审、背书、贴现等操作
  1277.     If RecTemp.Fields("Fstatus") <> 9 Then
  1278.         Tsxx = "该票据已经发生变动,不能执行此操作!"
  1279.         Call Xtxxts(Tsxx, 0, 4)
  1280.         NoteCheck = False
  1281.         Exit Function
  1282.     End If
  1283.     If Trim(RecTemp.Fields("Checker") & "") = "" Then
  1284.         Tsxx = "该单据没有审核,不能执行此操作!"
  1285.         Call Xtxxts(Tsxx, 0, 4)
  1286.         NoteCheck = False
  1287.         Exit Function
  1288.     End If
  1289.     NoteCheck = True
  1290. End Function
  1291. Private Sub Sub_NoteDiscount()  '贴现,'要求票状为收票状态,且单据已审核
  1292.     If NoteCheck = True Then
  1293.         XT_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1294.         Note_FrmNoteDiscount.Show 1
  1295.         If Xtfhcs = "1" Then  '贴现成功'在应付票据中写贴现标志
  1296.             Cw_DataEnvi.DataConnect.Execute ("Update RP_Note set Fstatus=3 where NoteID='" & XT_BillID & "'")
  1297.             CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("003", GridStr(), Szzls)) = "贴现"                                         '票据状态
  1298.         End If
  1299.     End If
  1300. End Sub
  1301. Private Sub Sub_NoteEncash() '兑现,'要求票状为收票状态,且单据已审核
  1302.     If NoteCheck = True Then
  1303.         XT_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1304.         FK_FrmNoteEncash.Show 1
  1305.         If Xtfhcs = "1" Then  '付款成功'在应付票据中写付款标志
  1306.             Cw_DataEnvi.DataConnect.Execute ("Update RP_Note set Fstatus=4 where NoteID='" & XT_BillID & "'")
  1307.             CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("003", GridStr(), Szzls)) = "付款"                                         '票据状态
  1308.         End If
  1309.     End If
  1310. End Sub
  1311. Private Sub Sub_CheckBill()             '审 核
  1312.     Dim RecTemp As New ADODB.Recordset
  1313.     
  1314.     '非数据行退出
  1315.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  1316.         Exit Sub
  1317.     End If
  1318.     XT_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1319.     
  1320.     If Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("003", GridStr(), Szzls))) = "期初" Then   '期初应付票据不必登记应付帐
  1321.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute("Select Checker From RP_Note Where NoteID=" & XT_BillID)
  1322.         If Not RecTemp.EOF Then
  1323.             If Trim(RecTemp.Fields("Checker") & "") <> "" Then
  1324.                 Tsxx = "该单据已审核,不需再次审核!"
  1325.                 Call Xtxxts(Tsxx, 0, 4)
  1326.                 Exit Sub
  1327.             Else
  1328.                 '将单据写入审核标识
  1329.                 Cw_DataEnvi.DataConnect.Execute ("Update Rp_Note Set Checker='" & Xtczy & "' Where NoteID='" & XT_BillID & "'")
  1330.                 '显示系统操作员
  1331.                 CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("018", GridStr(), Szzls)) = Xtczy                                        '票据状态
  1332.             End If
  1333.         End If
  1334.     Else
  1335.         '加记帐过程的过程
  1336.         If Fun_CheckNote(XT_BillID) = True Then          '审核过帐
  1337.     
  1338.             '将单据写入审核标识
  1339.             Cw_DataEnvi.DataConnect.Execute ("Update Rp_Note Set Checker='" & Xtczy & "' Where NoteID='" & XT_BillID & "'")
  1340.     
  1341.             '显示系统操作员
  1342.             CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("018", GridStr(), Szzls)) = Xtczy                                        '票据状态
  1343.         End If
  1344.     End If
  1345. End Sub