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

企业管理

开发平台:

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