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

企业管理

开发平台:

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 YH_FrmZddz 
  5.    Caption         =   "自动对帐"
  6.    ClientHeight    =   6930
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   9570
  10.    HelpContextID   =   5103
  11.    Icon            =   "银行_自动对帐.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    LinkTopic       =   "Form1"
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   6930
  16.    ScaleWidth      =   9570
  17.    Begin VB.PictureBox Pic_Title 
  18.       BackColor       =   &H00FFFFFF&
  19.       Height          =   1065
  20.       Left            =   30
  21.       Picture         =   "银行_自动对帐.frx":1042
  22.       ScaleHeight     =   1005
  23.       ScaleWidth      =   11820
  24.       TabIndex        =   0
  25.       Top             =   600
  26.       Width           =   11880
  27.       Begin VB.Label Label4 
  28.          Appearance      =   0  'Flat
  29.          BackColor       =   &H80000005&
  30.          BorderStyle     =   1  'Fixed Single
  31.          ForeColor       =   &H80000008&
  32.          Height          =   180
  33.          Index           =   2
  34.          Left            =   10365
  35.          TabIndex        =   15
  36.          Top             =   240
  37.          Width           =   390
  38.       End
  39.       Begin VB.Label Lab_Bill 
  40.          Appearance      =   0  'Flat
  41.          AutoSize        =   -1  'True
  42.          BackColor       =   &H80000005&
  43.          BackStyle       =   0  'Transparent
  44.          Caption         =   "未勾对"
  45.          ForeColor       =   &H00000000&
  46.          Height          =   180
  47.          Index           =   1
  48.          Left            =   10815
  49.          TabIndex        =   14
  50.          Top             =   240
  51.          Width           =   540
  52.       End
  53.       Begin VB.Label Label4 
  54.          Appearance      =   0  'Flat
  55.          BackColor       =   &H00E9FC61&
  56.          BorderStyle     =   1  'Fixed Single
  57.          ForeColor       =   &H80000008&
  58.          Height          =   180
  59.          Index           =   0
  60.          Left            =   9240
  61.          TabIndex        =   13
  62.          Top             =   247
  63.          Width           =   390
  64.       End
  65.       Begin VB.Label Lab_Bill 
  66.          Appearance      =   0  'Flat
  67.          AutoSize        =   -1  'True
  68.          BackColor       =   &H80000005&
  69.          BackStyle       =   0  'Transparent
  70.          Caption         =   "已勾对"
  71.          ForeColor       =   &H00000000&
  72.          Height          =   180
  73.          Index           =   0
  74.          Left            =   9675
  75.          TabIndex        =   12
  76.          Top             =   247
  77.          Width           =   540
  78.       End
  79.       Begin VB.Label Label3 
  80.          AutoSize        =   -1  'True
  81.          BackStyle       =   0  'Transparent
  82.          Height          =   180
  83.          Left            =   1560
  84.          TabIndex        =   6
  85.          Top             =   750
  86.          Width           =   90
  87.       End
  88.       Begin VB.Label Label2 
  89.          Appearance      =   0  'Flat
  90.          AutoSize        =   -1  'True
  91.          BackColor       =   &H80000005&
  92.          BackStyle       =   0  'Transparent
  93.          Caption         =   "银行科目:"
  94.          ForeColor       =   &H80000008&
  95.          Height          =   180
  96.          Left            =   690
  97.          TabIndex        =   5
  98.          Top             =   750
  99.          Width           =   810
  100.       End
  101.       Begin VB.Label CxjgLabel 
  102.          AutoSize        =   -1  'True
  103.          BackStyle       =   0  'Transparent
  104.          ForeColor       =   &H00FF0000&
  105.          Height          =   379
  106.          Index           =   2
  107.          Left            =   3512
  108.          TabIndex        =   2
  109.          Top             =   1674
  110.          Width           =   166
  111.       End
  112.       Begin VB.Label tsLabel 
  113.          AutoSize        =   -1  'True
  114.          BackColor       =   &H80000018&
  115.          BackStyle       =   0  'Transparent
  116.          Caption         =   "银行自动对帐"
  117.          BeginProperty Font 
  118.             Name            =   "宋体"
  119.             Size            =   14.25
  120.             Charset         =   134
  121.             Weight          =   700
  122.             Underline       =   0   'False
  123.             Italic          =   0   'False
  124.             Strikethrough   =   0   'False
  125.          EndProperty
  126.          ForeColor       =   &H00000000&
  127.          Height          =   285
  128.          Index           =   4
  129.          Left            =   360
  130.          TabIndex        =   1
  131.          Top             =   180
  132.          Width           =   1800
  133.       End
  134.    End
  135.    Begin MSComctlLib.Toolbar SzToolbar 
  136.       Align           =   1  'Align Top
  137.       Height          =   555
  138.       Left            =   0
  139.       TabIndex        =   3
  140.       Top             =   0
  141.       Width           =   9570
  142.       _ExtentX        =   16880
  143.       _ExtentY        =   979
  144.       ButtonWidth     =   820
  145.       ButtonHeight    =   926
  146.       AllowCustomize  =   0   'False
  147.       Appearance      =   1
  148.       Style           =   1
  149.       ImageList       =   "ImageList1"
  150.       _Version        =   393216
  151.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  152.          NumButtons      =   13
  153.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  154.             Caption         =   "对帐"
  155.             Key             =   "dz"
  156.             ImageKey        =   "dz"
  157.          EndProperty
  158.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  159.             Caption         =   "取消"
  160.             Key             =   "qx"
  161.             ImageKey        =   "fq"
  162.          EndProperty
  163.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  164.             Style           =   3
  165.          EndProperty
  166.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  167.             Caption         =   "过滤"
  168.             Key             =   "gl"
  169.             ImageKey        =   "cx"
  170.          EndProperty
  171.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  172.             Caption         =   "对照"
  173.             Key             =   "dz1"
  174.             ImageKey        =   "pk"
  175.             Style           =   1
  176.          EndProperty
  177.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  178.             Style           =   3
  179.          EndProperty
  180.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  181.             Caption         =   "检查"
  182.             Key             =   "jc"
  183.             ImageKey        =   "pd"
  184.          EndProperty
  185.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  186.             Caption         =   "核销"
  187.             Key             =   "hx"
  188.             ImageKey        =   "exec"
  189.          EndProperty
  190.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  191.             Style           =   3
  192.          EndProperty
  193.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  194.             Caption         =   "选择"
  195.             Key             =   "sel"
  196.             ImageIndex      =   19
  197.          EndProperty
  198.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  199.             Style           =   3
  200.          EndProperty
  201.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  202.             Caption         =   "帮助"
  203.             Key             =   "bz"
  204.             ImageKey        =   "bz"
  205.          EndProperty
  206.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  207.             Caption         =   "退出"
  208.             Key             =   "tc"
  209.             ImageKey        =   "tc"
  210.          EndProperty
  211.       EndProperty
  212.       BorderStyle     =   1
  213.       Begin MSComctlLib.ImageList ImageList1 
  214.          Left            =   4740
  215.          Top             =   0
  216.          _ExtentX        =   1005
  217.          _ExtentY        =   1005
  218.          BackColor       =   -2147483643
  219.          ImageWidth      =   16
  220.          ImageHeight     =   16
  221.          MaskColor       =   12632256
  222.          _Version        =   393216
  223.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  224.             NumListImages   =   34
  225.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  226.                Picture         =   "银行_自动对帐.frx":35106
  227.                Key             =   "sz"
  228.             EndProperty
  229.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  230.                Picture         =   "银行_自动对帐.frx":354A0
  231.                Key             =   "dy"
  232.             EndProperty
  233.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  234.                Picture         =   "银行_自动对帐.frx":3583A
  235.                Key             =   "yl"
  236.             EndProperty
  237.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  238.                Picture         =   "银行_自动对帐.frx":35BD4
  239.                Key             =   "xg"
  240.             EndProperty
  241.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  242.                Picture         =   "银行_自动对帐.frx":35F6E
  243.                Key             =   "zh"
  244.             EndProperty
  245.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  246.                Picture         =   "银行_自动对帐.frx":36308
  247.                Key             =   "sh"
  248.             EndProperty
  249.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  250.                Picture         =   "银行_自动对帐.frx":366A2
  251.                Key             =   "bc"
  252.             EndProperty
  253.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  254.                Picture         =   "银行_自动对帐.frx":36A3C
  255.                Key             =   "fq"
  256.             EndProperty
  257.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  258.                Picture         =   "银行_自动对帐.frx":36DD6
  259.                Key             =   "bz"
  260.             EndProperty
  261.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  262.                Picture         =   "银行_自动对帐.frx":37170
  263.                Key             =   "tc"
  264.             EndProperty
  265.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  266.                Picture         =   "银行_自动对帐.frx":3750A
  267.                Key             =   "bcgs"
  268.             EndProperty
  269.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  270.                Picture         =   "银行_自动对帐.frx":378A4
  271.                Key             =   "mrlk"
  272.             EndProperty
  273.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  274.                Picture         =   "银行_自动对帐.frx":37C3E
  275.                Key             =   "xsxm"
  276.             EndProperty
  277.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  278.                Picture         =   "银行_自动对帐.frx":37FD8
  279.                Key             =   "first"
  280.             EndProperty
  281.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  282.                Picture         =   "银行_自动对帐.frx":38372
  283.                Key             =   "prev"
  284.             EndProperty
  285.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  286.                Picture         =   "银行_自动对帐.frx":3870C
  287.                Key             =   "next"
  288.             EndProperty
  289.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  290.                Picture         =   "银行_自动对帐.frx":38AA6
  291.                Key             =   "last"
  292.             EndProperty
  293.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  294.                Picture         =   "银行_自动对帐.frx":38E40
  295.                Key             =   "xx"
  296.             EndProperty
  297.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  298.                Picture         =   "银行_自动对帐.frx":391DA
  299.                Key             =   "define"
  300.             EndProperty
  301.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  302.                Picture         =   "银行_自动对帐.frx":39574
  303.                Key             =   "exec"
  304.             EndProperty
  305.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  306.                Picture         =   "银行_自动对帐.frx":3990E
  307.                Key             =   "xz"
  308.             EndProperty
  309.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  310.                Picture         =   "银行_自动对帐.frx":39CA8
  311.                Key             =   "sc"
  312.             EndProperty
  313.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  314.                Picture         =   "银行_自动对帐.frx":3A042
  315.                Key             =   "sx"
  316.             EndProperty
  317.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  318.                Picture         =   "银行_自动对帐.frx":3A3DC
  319.                Key             =   "cx"
  320.             EndProperty
  321.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  322.                Picture         =   "银行_自动对帐.frx":3A776
  323.                Key             =   "zd"
  324.             EndProperty
  325.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  326.                Picture         =   "银行_自动对帐.frx":3AB10
  327.                Key             =   "dz"
  328.             EndProperty
  329.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  330.                Picture         =   "银行_自动对帐.frx":3AEAA
  331.                Key             =   "ph"
  332.             EndProperty
  333.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  334.                Picture         =   "银行_自动对帐.frx":3B244
  335.                Key             =   "fz"
  336.             EndProperty
  337.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  338.                Picture         =   "银行_自动对帐.frx":3B5DE
  339.                Key             =   "dw"
  340.             EndProperty
  341.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  342.                Picture         =   "银行_自动对帐.frx":3B978
  343.                Key             =   "hf"
  344.             EndProperty
  345.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  346.                Picture         =   "银行_自动对帐.frx":3BD12
  347.                Key             =   "pz"
  348.             EndProperty
  349.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  350.                Picture         =   "银行_自动对帐.frx":3C0AC
  351.                Key             =   "check"
  352.             EndProperty
  353.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  354.                Picture         =   "银行_自动对帐.frx":3C446
  355.                Key             =   "pd"
  356.             EndProperty
  357.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  358.                Picture         =   "银行_自动对帐.frx":3C7E0
  359.                Key             =   "pk"
  360.             EndProperty
  361.          EndProperty
  362.       End
  363.       Begin MSComctlLib.Toolbar N 
  364.          Height          =   540
  365.          Left            =   10185
  366.          TabIndex        =   4
  367.          Top             =   0
  368.          Width           =   1680
  369.          _ExtentX        =   2963
  370.          _ExtentY        =   953
  371.          ButtonWidth     =   1455
  372.          ButtonHeight    =   953
  373.          AllowCustomize  =   0   'False
  374.          Appearance      =   1
  375.          Style           =   1
  376.          ImageList       =   "ImageList1"
  377.          _Version        =   393216
  378.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  379.             NumButtons      =   2
  380.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  381.                Caption         =   "保存格式"
  382.                Key             =   "bcgs"
  383.                ImageKey        =   "bcgs"
  384.             EndProperty
  385.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  386.                Caption         =   "默认格式"
  387.                Key             =   "hfmrgs"
  388.                ImageKey        =   "mrlk"
  389.             EndProperty
  390.          EndProperty
  391.       End
  392.    End
  393.    Begin VB.Frame Frame2 
  394.       Height          =   5925
  395.       Left            =   30
  396.       TabIndex        =   7
  397.       Top             =   1620
  398.       Width           =   11895
  399.       Begin VB.Frame Frame3 
  400.          Height          =   5925
  401.          Left            =   6300
  402.          TabIndex        =   11
  403.          Top             =   0
  404.          Width           =   30
  405.       End
  406.       Begin VB.Frame Frame1 
  407.          Height          =   90
  408.          Left            =   0
  409.          TabIndex        =   10
  410.          Top             =   510
  411.          Width           =   11805
  412.       End
  413.       Begin VSFlex8Ctl.VSFlexGrid vsFlexGrid1 
  414.          Height          =   5235
  415.          Left            =   80
  416.          TabIndex        =   16
  417.          Top             =   630
  418.          Width           =   6195
  419.          _cx             =   5080
  420.          _cy             =   5080
  421.          Appearance      =   1
  422.          BorderStyle     =   1
  423.          Enabled         =   -1  'True
  424.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  425.             Name            =   "宋体"
  426.             Size            =   9
  427.             Charset         =   134
  428.             Weight          =   400
  429.             Underline       =   0   'False
  430.             Italic          =   0   'False
  431.             Strikethrough   =   0   'False
  432.          EndProperty
  433.          MousePointer    =   0
  434.          BackColor       =   16777215
  435.          ForeColor       =   -2147483640
  436.          BackColorFixed  =   -2147483638
  437.          ForeColorFixed  =   -2147483630
  438.          BackColorSel    =   16777215
  439.          ForeColorSel    =   -2147483640
  440.          BackColorBkg    =   -2147483636
  441.          BackColorAlternate=   16777215
  442.          GridColor       =   -2147483633
  443.          GridColorFixed  =   -2147483632
  444.          TreeColor       =   -2147483632
  445.          FloodColor      =   192
  446.          SheetBorder     =   -2147483642
  447.          FocusRect       =   1
  448.          HighLight       =   1
  449.          AllowSelection  =   0   'False
  450.          AllowBigSelection=   0   'False
  451.          AllowUserResizing=   0
  452.          SelectionMode   =   0
  453.          GridLines       =   1
  454.          GridLinesFixed  =   2
  455.          GridLineWidth   =   1
  456.          Rows            =   5000
  457.          Cols            =   20
  458.          FixedRows       =   1
  459.          FixedCols       =   0
  460.          RowHeightMin    =   0
  461.          RowHeightMax    =   0
  462.          ColWidthMin     =   0
  463.          ColWidthMax     =   0
  464.          ExtendLastCol   =   0   'False
  465.          FormatString    =   ""
  466.          ScrollTrack     =   0   'False
  467.          ScrollBars      =   3
  468.          ScrollTips      =   0   'False
  469.          MergeCells      =   0
  470.          MergeCompare    =   0
  471.          AutoResize      =   -1  'True
  472.          AutoSizeMode    =   0
  473.          AutoSearch      =   0
  474.          AutoSearchDelay =   2
  475.          MultiTotals     =   -1  'True
  476.          SubtotalPosition=   1
  477.          OutlineBar      =   0
  478.          OutlineCol      =   0
  479.          Ellipsis        =   0
  480.          ExplorerBar     =   0
  481.          PicturesOver    =   0   'False
  482.          FillStyle       =   0
  483.          RightToLeft     =   0   'False
  484.          PictureType     =   0
  485.          TabBehavior     =   0
  486.          OwnerDraw       =   0
  487.          Editable        =   0
  488.          ShowComboButton =   1
  489.          WordWrap        =   -1  'True
  490.          TextStyle       =   0
  491.          TextStyleFixed  =   0
  492.          OleDragMode     =   0
  493.          OleDropMode     =   0
  494.          DataMode        =   0
  495.          VirtualData     =   -1  'True
  496.          DataMember      =   ""
  497.          ComboSearch     =   3
  498.          AutoSizeMouse   =   -1  'True
  499.          FrozenRows      =   0
  500.          FrozenCols      =   0
  501.          AllowUserFreezing=   0
  502.          BackColorFrozen =   0
  503.          ForeColorFrozen =   0
  504.          WallPaperAlignment=   9
  505.          AccessibleName  =   ""
  506.          AccessibleDescription=   ""
  507.          AccessibleValue =   ""
  508.          AccessibleRole  =   24
  509.       End
  510.       Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  511.          Height          =   5235
  512.          Left            =   6360
  513.          TabIndex        =   17
  514.          Top             =   630
  515.          Width           =   5475
  516.          _cx             =   5080
  517.          _cy             =   5080
  518.          Appearance      =   1
  519.          BorderStyle     =   1
  520.          Enabled         =   -1  'True
  521.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  522.             Name            =   "宋体"
  523.             Size            =   9
  524.             Charset         =   134
  525.             Weight          =   400
  526.             Underline       =   0   'False
  527.             Italic          =   0   'False
  528.             Strikethrough   =   0   'False
  529.          EndProperty
  530.          MousePointer    =   0
  531.          BackColor       =   -2147483643
  532.          ForeColor       =   -2147483640
  533.          BackColorFixed  =   12632256
  534.          ForeColorFixed  =   -2147483630
  535.          BackColorSel    =   16777215
  536.          ForeColorSel    =   -2147483640
  537.          BackColorBkg    =   -2147483636
  538.          BackColorAlternate=   -2147483643
  539.          GridColor       =   -2147483633
  540.          GridColorFixed  =   -2147483632
  541.          TreeColor       =   -2147483632
  542.          FloodColor      =   192
  543.          SheetBorder     =   -2147483642
  544.          FocusRect       =   1
  545.          HighLight       =   1
  546.          AllowSelection  =   0   'False
  547.          AllowBigSelection=   0   'False
  548.          AllowUserResizing=   0
  549.          SelectionMode   =   0
  550.          GridLines       =   1
  551.          GridLinesFixed  =   2
  552.          GridLineWidth   =   1
  553.          Rows            =   5000
  554.          Cols            =   20
  555.          FixedRows       =   1
  556.          FixedCols       =   0
  557.          RowHeightMin    =   0
  558.          RowHeightMax    =   0
  559.          ColWidthMin     =   0
  560.          ColWidthMax     =   0
  561.          ExtendLastCol   =   0   'False
  562.          FormatString    =   ""
  563.          ScrollTrack     =   0   'False
  564.          ScrollBars      =   3
  565.          ScrollTips      =   0   'False
  566.          MergeCells      =   0
  567.          MergeCompare    =   0
  568.          AutoResize      =   -1  'True
  569.          AutoSizeMode    =   0
  570.          AutoSearch      =   0
  571.          AutoSearchDelay =   2
  572.          MultiTotals     =   -1  'True
  573.          SubtotalPosition=   1
  574.          OutlineBar      =   0
  575.          OutlineCol      =   0
  576.          Ellipsis        =   0
  577.          ExplorerBar     =   0
  578.          PicturesOver    =   0   'False
  579.          FillStyle       =   0
  580.          RightToLeft     =   0   'False
  581.          PictureType     =   0
  582.          TabBehavior     =   0
  583.          OwnerDraw       =   0
  584.          Editable        =   0
  585.          ShowComboButton =   1
  586.          WordWrap        =   -1  'True
  587.          TextStyle       =   0
  588.          TextStyleFixed  =   0
  589.          OleDragMode     =   0
  590.          OleDropMode     =   0
  591.          DataMode        =   0
  592.          VirtualData     =   -1  'True
  593.          DataMember      =   ""
  594.          ComboSearch     =   3
  595.          AutoSizeMouse   =   -1  'True
  596.          FrozenRows      =   0
  597.          FrozenCols      =   0
  598.          AllowUserFreezing=   0
  599.          BackColorFrozen =   0
  600.          ForeColorFrozen =   0
  601.          WallPaperAlignment=   9
  602.          AccessibleName  =   ""
  603.          AccessibleDescription=   ""
  604.          AccessibleValue =   ""
  605.          AccessibleRole  =   24
  606.       End
  607.       Begin VB.Label Label5 
  608.          AutoSize        =   -1  'True
  609.          Caption         =   "银行对帐单"
  610.          BeginProperty Font 
  611.             Name            =   "宋体"
  612.             Size            =   12
  613.             Charset         =   134
  614.             Weight          =   700
  615.             Underline       =   0   'False
  616.             Italic          =   0   'False
  617.             Strikethrough   =   0   'False
  618.          EndProperty
  619.          Height          =   240
  620.          Left            =   8370
  621.          TabIndex        =   9
  622.          Top             =   180
  623.          Width           =   1275
  624.       End
  625.       Begin VB.Label Label4 
  626.          AutoSize        =   -1  'True
  627.          Caption         =   "单位日记帐"
  628.          BeginProperty Font 
  629.             Name            =   "宋体"
  630.             Size            =   12
  631.             Charset         =   134
  632.             Weight          =   700
  633.             Underline       =   0   'False
  634.             Italic          =   0   'False
  635.             Strikethrough   =   0   'False
  636.          EndProperty
  637.          Height          =   240
  638.          Index           =   1
  639.          Left            =   1950
  640.          TabIndex        =   8
  641.          Top             =   180
  642.          Width           =   1275
  643.       End
  644.    End
  645. End
  646. Attribute VB_Name = "YH_FrmZddz"
  647. Attribute VB_GlobalNameSpace = False
  648. Attribute VB_Creatable = False
  649. Attribute VB_PredeclaredId = True
  650. Attribute VB_Exposed = False
  651. '*************************************************************
  652. '*    模 块 名 称 :银行自动对帐
  653. '*    功 能 描 述 建立和管理银行自动对帐数据
  654. '*    程序员姓名  : xjl
  655. '*    最后修改人  : xjl
  656. '*    最后修改时间:2000/11/07
  657. '*    备        注:
  658. '*************************************************************
  659. '以下为固定使用变量(网格)
  660. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  661. Dim GridCode As String                   '显示网格网格代码
  662. Dim GridInf() As Variant                 '整个网格设置信息
  663. Dim Tsxx As String                       '系统提示信息
  664. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  665. Dim Sjhgd As Double                      '网格数据行高度
  666. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  667. Dim GridStr()  As String                 '网格列信息(字符型)
  668. Dim GridInt() As Integer                 '网格列信息(整型)
  669. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  670. Dim Rowjsq As Integer
  671. Dim Str_RightEdit As String              '编辑权限索引
  672. '银行对帐单手工选中标志
  673. Private Sub CxbbGrid_DblClick()
  674.     Dim RecTemp As New ADODB.Recordset
  675.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  676.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True, False) Then
  677.         Exit Sub
  678.     End If
  679.     
  680.     With CxbbGrid
  681.         If .Rows > 1 Then
  682.             If RecTemp.State = 1 Then RecTemp.Close
  683.             RecTemp.Open "Select * from cwzz_bankbill where BankBillID='" & .TextMatrix(.Row, 6) & "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  684.             If RecTemp.EOF = False Then
  685.                 If RecTemp.Fields("bcheckflag") = True Then
  686.                     RecTemp.Fields("bcheckflag") = 0
  687.                     RecTemp.Fields("handworkflag") = 0
  688.                     RecTemp.Update
  689.                 Else
  690.                     RecTemp.Fields("bcheckflag") = 1
  691.                     RecTemp.Fields("handworkflag") = 1
  692.                     RecTemp.Update
  693.                 End If
  694.                 If .TextMatrix(.Row, 5) = "" Then
  695.                     .TextMatrix(.Row, 5) = "√"
  696.                     .Cell(flexcpBackColor, .Row, 0, .Row, .Cols - 1) = Label4(0).BackColor
  697.                     CxbbGrid.BackColorSel = Label4(0).BackColor
  698.                 Else
  699.                     .TextMatrix(.Row, 5) = ""
  700.                     .Cell(flexcpBackColor, .Row, 0, .Row, .Cols - 1) = Label4(2).BackColor
  701.                     CxbbGrid.BackColorSel = Label4(2).BackColor
  702.                 End If
  703.             End If
  704.         End If
  705.     End With
  706. End Sub
  707. '控制网格颜色
  708. Private Sub CXBBGrid_EnterCell()
  709.     If CxbbGrid.Cell(flexcpBackColor, CxbbGrid.Row) = Label4(0).BackColor Then
  710.         CxbbGrid.BackColorSel = Label4(0).BackColor
  711.     Else
  712.         CxbbGrid.BackColorSel = Label4(2).BackColor
  713.     End If
  714. End Sub
  715. '窗体载入
  716. Sub Form_Load()
  717.     '定以网格列
  718.     Dim I As Integer
  719.     '隐藏选择对话框
  720.     YH_FrmXzkm.Hide
  721.     '调入打印页面设置窗体
  722.     Label3.Caption = YH_FrmXzkm.Combo1.Text
  723.     XtReportCode = "Cwzz_Zddz"
  724.     
  725.     '调入网格(银行)
  726.     GridCode = "Cwzz_yhzddz"
  727.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  728.     Qslz = GridInf(1)
  729.     Sjhgd = GridInf(2)
  730.     Sfxshjwg = GridInf(7)
  731.     Szzls = CxbbGrid.Cols - 1
  732.     
  733.     '设置网格属性
  734.     With vsFlexGrid1
  735.         .Cols = 9
  736.         .FormatString = "凭证日期|票据日期|结算方式|票号|方向|金额|两清|凭证号数|摘要" '格式网格
  737.         For I = 0 To .Cols - 1
  738.             .Rows = 1
  739.             .FixedAlignment(I) = flexAlignCenterCenter
  740.             .ColWidth(I) = 1000
  741.             .RowHeight(0) = 450
  742.         Next I
  743.         .ColWidth(6) = 500
  744.         .ColWidth(7) = 800
  745.         .ColWidth(4) = 400
  746.         .ColWidth(3) = 500
  747.         .ColAlignment(5) = flexAlignRightCenter
  748.     End With
  749.     With CxbbGrid
  750.         .ColAlignment(4) = flexAlignRightCenter
  751.     End With
  752.     
  753.     '显示网格数据
  754.     Call Sub_ShowBill
  755.     Rowjsq = CxbbGrid.Rows
  756.     
  757.     '调整标题位置
  758.     SetTitlePos tsLabel(4)
  759.     
  760.     Str_RightEdit = "Cwzz_yhzddz_Edit"
  761.     
  762. End Sub
  763. Private Sub Form_Resize()
  764.     On Error Resume Next
  765.     '横线条
  766.     Frame1.Width = Me.Width - 160
  767.     Frame1.Height = 90
  768.     
  769.     '竖线条
  770.     Frame3.Left = Me.Width / 2 + 270
  771.     Frame3.Height = Me.Height - Frame2.Top - 400
  772.     Frame3.Width = 30
  773.     
  774.     'Frame窗体
  775.     With Frame2
  776.         .Width = Me.Width - 150
  777.         .Height = Me.Height - .Top - 400
  778.     End With
  779.     
  780.     'CxbbGrid网格
  781.     With CxbbGrid
  782.         CxbbGrid.Left = Me.Width / 2 + 350
  783.         .Width = Me.Width / 2 - 550
  784.         .Height = Me.Height - Frame2.Top - .Top - 440
  785.     End With
  786.     
  787.     'vsFlexGrid1网格
  788.     With vsFlexGrid1
  789.         .Width = Me.Width / 2 + 160
  790.         .Height = Me.Height - Frame2.Top - .Top - 440
  791.     End With
  792.     
  793.     '横幅
  794.     With Pic_Title
  795.         .Width = Me.Width - 160
  796.     End With
  797.     
  798.     '工具条
  799.     N.Left = Me.Width - N.Width - 160
  800. End Sub
  801. '退出
  802. Private Sub Form_Unload(Cancel As Integer)
  803.     Glo_Variable.Unload_TF = True
  804.     Unload YH_FrmXzkm
  805.     '卸载过滤条件
  806.     Unload YH_FrmGltj
  807. End Sub
  808. Private Sub N_ButtonClick(ByVal Button As MSComctlLib.Button)
  809.     Select Case Button.Key
  810.     Case "bcgs"                                          '保存表格格式
  811.         Call Bcwggs(CxbbGrid, GridCode, GridStr())
  812.     Case "hfmrgs"                                        '恢复默认格式
  813.         Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  814.     Case "szxsxm"                                        '设置显示项目
  815.         Call Szxsxm(CxbbGrid, GridCode)
  816.     End Select
  817. End Sub
  818. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  819.     Select Case Button.Key
  820.     Case "dz"                                      '对帐
  821.         
  822.         '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  823.         If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  824.             Exit Sub
  825.         End If
  826.         YH_FrmDztj.HelpContextID = "0115004"
  827.         YH_FrmDztj.Show 1
  828.         CxbbGrid.Clear 1
  829.         vsFlexGrid1.Clear 1
  830.         Call Sub_ShowBill
  831.     Case "qx"                                      '取消对帐
  832.         
  833.         '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  834.         If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  835.             Exit Sub
  836.         End If
  837.         Cw_DataEnvi.DataConnect.Execute ("update cwzz_bankbill set bcheckflag=0,HandWorkFlag=0 where bdelete=0")
  838.         Cw_DataEnvi.DataConnect.Execute ("update cwzz_accvouchmain set checkflag=0")
  839.         Cw_DataEnvi.DataConnect.Execute ("update cwzz_accvouchsub set bcheckflag=0,HandWorkFlag=0 where bdelete=0")
  840.         Cw_DataEnvi.DataConnect.Execute ("update cwzz_rjznotcheck set bcheckflag=0,HandWorkFlag=0 where bdelete=0")
  841.         CxbbGrid.Clear 1
  842.         vsFlexGrid1.Clear 1
  843.         Call Sub_ShowBill
  844.     Case "gl"                                      '过滤
  845.         YH_FrmGltj.Tag = "Z"
  846.         YH_FrmGltj.HelpContextID = "0115004"
  847.         YH_FrmGltj.Show 1
  848.     Case "jc"                                      '检查
  849.         YH_FrmDzjc.HelpContextID = "0115004"
  850.         YH_FrmDzjc.Show 1
  851.     Case "dz1"                                     '对照
  852.         If CxbbGrid.Rows = Rowjsq Then
  853.             CxbbGrid.Rows = 1
  854.         Else
  855.             CxbbGrid.Clear 1
  856.             vsFlexGrid1.Clear 1
  857.             Call Sub_ShowBill
  858.         End If
  859.     Case "bz"                                       '帮助
  860.         Call F1bz
  861.     Case "tc"                                       '退出
  862.         Unload Me
  863.     Case "sel"
  864.         Glo_Variable.Unload_TF = False
  865.         YH_FrmXzkm.HelpContextID = "0115004"
  866.         YH_FrmXzkm.Show 1
  867.     Case "hx"                                       '核销银行帐
  868.         '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  869.         If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  870.             Exit Sub
  871.         End If
  872.         Call HxYhz
  873.         Call Sub_ShowBill
  874.     End Select
  875. End Sub
  876. '显示所有未达帐项
  877. Private Sub Sub_ShowBill()
  878.     Dim RecTemp As New ADODB.Recordset
  879.     Dim Recfind As New ADODB.Recordset
  880.     Dim Rowjsq As Integer
  881.     CxbbGrid.Rows = 1
  882.     vsFlexGrid1.Rows = 1
  883.     '显示期初未达
  884.     '显示银行对帐单
  885.     Sqlstr = "select * from cwzz_bankbill where rectype=1 and bdelete=0 and ccode='" & Val(Label3.Caption) & "'order by billdate"
  886.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  887.     Rowjsq = 1
  888.     Do While Not RecTemp.EOF
  889.         If RecTemp.Fields("bdelete") = True Then
  890.         End If
  891.         With CxbbGrid
  892.             .Cols = 7
  893.             If Rowjsq > .Rows - 1 Then
  894.                 .AddItem ""
  895.                 .RowHeight(.Rows - 1) = 350
  896.             End If
  897.             .TextMatrix(Rowjsq, 0) = RecTemp.Fields("billdate")
  898.             Sqlstr = "select * from Gy_settlement where sscode='" & RecTemp.Fields("sscode") & "'"
  899.             Set Recfind = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  900.             If Recfind.EOF = False Then
  901.                 .TextMatrix(Rowjsq, 1) = Recfind.Fields("ssname")
  902.             End If
  903.             .TextMatrix(Rowjsq, 2) = RecTemp.Fields("billno")
  904.             If Val(RecTemp.Fields("Dfje")) <> 0 Then
  905.                 .TextMatrix(Rowjsq, 3) = "借"
  906.                 .TextMatrix(Rowjsq, 4) = Format(RecTemp.Fields("Dfje"), "#,###.00")
  907.             Else
  908.                 .TextMatrix(Rowjsq, 3) = "贷"
  909.                 .TextMatrix(Rowjsq, 4) = Format(RecTemp.Fields("Jfje"), "#,###.00")
  910.             End If
  911.             .TextMatrix(Rowjsq, 6) = RecTemp.Fields("BankBillID")
  912.             .ColHidden(6) = True
  913.             If RecTemp.Fields("bcheckflag") = True Then
  914.                 If Trim(RecTemp.Fields("handworkflag")) = True Then
  915.                     .TextMatrix(Rowjsq, 5) = "√"
  916.                 Else
  917.                     .TextMatrix(Rowjsq, 5) = "○"
  918.                 End If
  919.                 .Cell(flexcpBackColor, Rowjsq, 0, Rowjsq, .Cols - 1) = Label4(0).BackColor
  920.             End If
  921.             Rowjsq = Rowjsq + 1
  922.         End With
  923.         RecTemp.MoveNext
  924.     Loop
  925.     
  926.     '显示银行对帐单
  927.     Sqlstr = "select * from cwzz_bankbill where rectype=2 and bdelete=0 and ccode='" & Val(Label3.Caption) & "'order by billdate"
  928.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  929.     Do While Not RecTemp.EOF
  930.         If RecTemp.Fields("bdelete") = True Then
  931.         End If
  932.         With CxbbGrid
  933.             .Cols = 7
  934.             If Rowjsq > .Rows - 1 Then
  935.                 .AddItem ""
  936.                 .RowHeight(.Rows - 1) = 350
  937.             End If
  938.             .TextMatrix(Rowjsq, 0) = RecTemp.Fields("billdate")
  939.             Sqlstr = "select * from Gy_settlement where sscode='" & RecTemp.Fields("sscode") & "'"
  940.             Set Recfind = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  941.             If Recfind.EOF = False Then
  942.                 .TextMatrix(Rowjsq, 1) = Recfind.Fields("ssname")
  943.             End If
  944.             .TextMatrix(Rowjsq, 2) = RecTemp.Fields("billno")
  945.             If Val(RecTemp.Fields("jfje")) <> 0 Then
  946.                 .TextMatrix(Rowjsq, 3) = "借"
  947.                 .TextMatrix(Rowjsq, 4) = Format(RecTemp.Fields("jfje"), "#,###.00")
  948.             Else
  949.                 .TextMatrix(Rowjsq, 3) = "贷"
  950.                 .TextMatrix(Rowjsq, 4) = Format(RecTemp.Fields("dfje"), "#,###.00")
  951.             End If
  952.             .TextMatrix(Rowjsq, 6) = RecTemp.Fields("BankBillID")
  953.             .ColHidden(6) = True
  954.             If RecTemp.Fields("bcheckflag") = True Then
  955.                 If Trim(RecTemp.Fields("handworkflag")) = True Then
  956.                     .TextMatrix(Rowjsq, 5) = "√"
  957.                 Else
  958.                     .TextMatrix(Rowjsq, 5) = "○"
  959.                 End If
  960.                 .Cell(flexcpBackColor, Rowjsq, 0, Rowjsq, .Cols - 1) = Label4(0).BackColor
  961.             End If
  962.             Rowjsq = Rowjsq + 1
  963.         End With
  964.         RecTemp.MoveNext
  965.     Loop
  966.     
  967.     '显示单位日记帐
  968.     Sqlstr = "select * from cwzz_rjznotcheck where rectype=1 and bdelete=0 and ccode='" & Val(Label3.Caption) & "'order by ddate"
  969.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  970.     Rowjsq = 1
  971.     Do While Not RecTemp.EOF()
  972.         With vsFlexGrid1
  973.             .Cols = 10
  974.             If Rowjsq > .Rows - 1 Then
  975.                 .AddItem ""
  976.                 .RowHeight(.Rows - 1) = 350
  977.             End If
  978.             .TextMatrix(Rowjsq, 0) = RecTemp.Fields("ddate")
  979.             If IsNull(RecTemp.Fields("billdate")) = False Then
  980.                 .TextMatrix(Rowjsq, 1) = RecTemp.Fields("billdate")
  981.             End If
  982.             .TextMatrix(Rowjsq, 3) = RecTemp.Fields("billno")
  983.             Sqlstr = "select * from gy_settlement where sscode='" & RecTemp.Fields("sscode") & "'"
  984.             Set Recfind = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  985.             If Recfind.EOF = False Then
  986.                 .TextMatrix(Rowjsq, 2) = Recfind.Fields("ssname")
  987.             End If
  988.             If Val(RecTemp.Fields("jfje")) <> 0 Then
  989.                 .TextMatrix(Rowjsq, 4) = "借"
  990.                 .TextMatrix(Rowjsq, 5) = Format(RecTemp.Fields("jfje"), "#,####.00")
  991.             Else
  992.                 .TextMatrix(Rowjsq, 4) = "贷"
  993.                 .TextMatrix(Rowjsq, 5) = Format(RecTemp.Fields("dfje"), "#,####.00")
  994.             End If
  995.             .TextMatrix(Rowjsq, 7) = Trim(RecTemp.Fields("vouchclasscode")) & "-" & Trim(RecTemp.Fields("vouchno"))
  996.             If IsNull(RecTemp.Fields("digest")) = False Then
  997.                 .TextMatrix(Rowjsq, 8) = RecTemp.Fields("digest")
  998.             End If
  999.             .TextMatrix(Rowjsq, 9) = RecTemp.Fields("RjzNotCheckID")
  1000.             .ColHidden(9) = True
  1001.             If RecTemp.Fields("bcheckflag") = True Then
  1002.                 If RecTemp.Fields("handworkflag") = True Then
  1003.                     .TextMatrix(Rowjsq, 6) = "√"
  1004.                 Else
  1005.                     .TextMatrix(Rowjsq, 6) = "○"
  1006.                 End If
  1007.                 .Cell(flexcpBackColor, Rowjsq, 0, Rowjsq, .Cols - 1) = Label4(0).BackColor
  1008.             End If
  1009.             Rowjsq = Rowjsq + 1
  1010.         End With
  1011.         RecTemp.MoveNext
  1012.     Loop
  1013.     
  1014.     '显示凭证日记帐
  1015.     Sqlstr = "select * from Cwzz_V_AccVouch where ccode='" & Val(Label3.Caption) & "'and bdelete=0  " _
  1016.     & "And convert(char(8),Ddate,112) >= " _
  1017.     & "(Select Convert(char(8),ddate,112) From cwzz_rjznotcheck Where rectype=0 And  " _
  1018.     & "Ccode='" & Val(Label3.Caption) & "') And Convert(Char(6),Ddate,112)<= " _
  1019.     & "(select Convert(Char(6),max(qsrq),112) from gy_kjrlb where cwzzjzbz='1')  Order By DDate"
  1020.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1021.     Do While Not RecTemp.EOF()
  1022.         With vsFlexGrid1
  1023.             .Cols = 10
  1024.             If Rowjsq > .Rows - 1 Then
  1025.                 .AddItem ""
  1026.                 .RowHeight(.Rows - 1) = 350
  1027.             End If
  1028.             .TextMatrix(Rowjsq, 0) = RecTemp.Fields("ddate")
  1029.             If IsNull(RecTemp.Fields("billdate")) = False Then
  1030.                 .TextMatrix(Rowjsq, 1) = RecTemp.Fields("billdate")
  1031.             End If
  1032.             .TextMatrix(Rowjsq, 3) = RecTemp.Fields("billno") & ""
  1033.             Sqlstr = "select * from gy_settlement where sscode='" & RecTemp.Fields("sscode") & "'"
  1034.             Set Recfind = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1035.             If Recfind.EOF = False Then
  1036.                 .TextMatrix(Rowjsq, 2) = Recfind.Fields("ssname") & ""
  1037.             End If
  1038.             If Val(RecTemp.Fields("jfje")) <> 0 Then
  1039.                 .TextMatrix(Rowjsq, 4) = "借"
  1040.                 .TextMatrix(Rowjsq, 5) = Format(RecTemp.Fields("jfje"), "#,####.00")
  1041.             Else
  1042.                 .TextMatrix(Rowjsq, 4) = "贷"
  1043.                 .TextMatrix(Rowjsq, 5) = Format(RecTemp.Fields("dfje"), "#,####.00")
  1044.             End If
  1045.             .TextMatrix(Rowjsq, 7) = Trim(RecTemp.Fields("vouchclasscode")) & "-" & Trim(RecTemp.Fields("vouchno"))
  1046.             .TextMatrix(Rowjsq, 8) = RecTemp.Fields("digest") & ""
  1047.             .TextMatrix(Rowjsq, 9) = RecTemp.Fields("SerialID") & ""
  1048.             If RecTemp.Fields("bcheckflag") = True Then
  1049.                 If RecTemp.Fields("handworkflag") = True Then
  1050.                     .TextMatrix(Rowjsq, 6) = "√"
  1051.                 Else
  1052.                     .TextMatrix(Rowjsq, 6) = "○"
  1053.                 End If
  1054.                 .Cell(flexcpBackColor, Rowjsq, 0, Rowjsq, .Cols - 1) = Label4(0).BackColor
  1055.             End If
  1056.             Rowjsq = Rowjsq + 1
  1057.         End With
  1058.         RecTemp.MoveNext
  1059.     Loop
  1060. End Sub
  1061. '双击选择银行企业的手工对帐
  1062. Private Sub vsFlexGrid1_DblClick()
  1063.     Dim RecTemp As New ADODB.Recordset
  1064.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  1065.     If Not Security_Log(Str_RightEdit, Xtczybm, 1, True, False) Then
  1066.         Exit Sub
  1067.     End If
  1068.     
  1069.     With vsFlexGrid1                                                        '添加银行对帐单手工对帐标志
  1070.         If .Rows > 1 Then
  1071.             If RecTemp.State = 1 Then RecTemp.Close
  1072.             If .TextMatrix(.Row, 4) = "借" Then
  1073.                 RecTemp.Open "select * from cwzz_rjznotcheck where RjzNotCheckID='" & .TextMatrix(.Row, 9) & "'and jfje=" & Val(Format(.TextMatrix(.Row, 5), "0.00")), Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1074.             Else
  1075.                 RecTemp.Open "select * from cwzz_rjznotcheck where RjzNotCheckID='" & .TextMatrix(.Row, 9) & "'and dfje=" & Val(Format(.TextMatrix(.Row, 5), "0.00")), Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1076.             End If
  1077.             If RecTemp.EOF = False Then
  1078.                 If RecTemp.Fields("bcheckflag") = True Then
  1079.                     RecTemp.Fields("bcheckflag") = 0
  1080.                     RecTemp.Fields("handworkflag") = 0
  1081.                     RecTemp.Update
  1082.                 Else
  1083.                     RecTemp.Fields("bcheckflag") = 1
  1084.                     RecTemp.Fields("handworkflag") = 1
  1085.                     RecTemp.Update
  1086.                 End If
  1087.             Else
  1088.                 If RecTemp.State = 1 Then RecTemp.Close                             '添加企业日记账手工对帐标志
  1089.                 If .TextMatrix(.Row, 4) = "借" Then
  1090.                     RecTemp.Open "select * from cwzz_accvouchsub where SerialID='" & .TextMatrix(.Row, 9) & "'and jfje=" & Val(Format(.TextMatrix(.Row, 5), "0.00")), Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1091.                 Else
  1092.                     RecTemp.Open "select * from cwzz_accvouchsub where SerialID='" & .TextMatrix(.Row, 9) & "'and dfje=" & Val(Format(.TextMatrix(.Row, 5), "0.00")), Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1093.                 End If
  1094.                 If RecTemp.EOF = False Then
  1095.                     If RecTemp.Fields("bcheckflag") = True Then
  1096.                         RecTemp.Fields("bcheckflag") = 0
  1097.                         RecTemp.Fields("handworkflag") = 0
  1098.                         RecTemp.Update
  1099.                     Else
  1100.                         RecTemp.Fields("bcheckflag") = 1
  1101.                         RecTemp.Fields("handworkflag") = 1
  1102.                         RecTemp.Update
  1103.                     End If
  1104.                 End If
  1105.             End If
  1106.             If .TextMatrix(.Row, 6) = "" Then                                         '添加颜色
  1107.                 .TextMatrix(.Row, 6) = "√"
  1108.                 .Cell(flexcpBackColor, .Row, 0, .Row, .Cols - 1) = Label4(0).BackColor
  1109.                 .BackColorSel = Label4(0).BackColor
  1110.             Else
  1111.                 .TextMatrix(.Row, 6) = ""
  1112.                 .Cell(flexcpBackColor, .Row, 0, .Row, .Cols - 1) = Label4(2).BackColor
  1113.                 .BackColorSel = Label4(2).BackColor
  1114.             End If
  1115.         End If
  1116.     End With
  1117. End Sub
  1118. '核销银行帐
  1119. Sub HxYhz()
  1120.     Dim Msg As String
  1121.     Dim DWYE, YHYE, DWJF, DWDF, YHJF, YHDF As Currency
  1122.     Dim RecTemp As New ADODB.Recordset
  1123.     Dim RecDir As New ADODB.Recordset
  1124.     Dim SQL_Str As String
  1125.     '是否是银行帐户
  1126.     SQL_Str = "Select * From CWZZ_ACCCODE Where Cproperty='银行' And EndFlag=1 and  Ccode='" & Val(Label3.Caption) & "'"
  1127.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1128.     If RecTemp.EOF Then
  1129.         MsgBox "科目编码输入有误!", vbOKOnly + 16, "百利/ERP5.0-财务总帐"
  1130.         Combo1.SetFocus
  1131.         Exit Sub
  1132.     End If
  1133.     
  1134.     '此帐户的余额是否平衡
  1135.     DWYE = 0
  1136.     YHYE = 0
  1137.     '单位帐面余额
  1138.     SQL_Str = "SELECT SUM(JFJE)-SUM(DFJE) From Cwzz_RjzNotCheck Where RecType=0 And Ccode='" & Val(Label3.Caption) & "'"
  1139.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1140.     If Not IsNull(RecTemp(0)) Then
  1141.         DWYE = RecTemp(0)
  1142.     End If
  1143.     
  1144.     SQL_Str = "Select SUM(JFJE)-SUM(DFJE) From Cwzz_V_AccVouch where Ccode='" & Val(Label3.Caption) & "' " _
  1145.     & "And Convert(Char(8),Ddate,112)>=(Select Convert(Char(8),Ddate,112) From " _
  1146.     & "Cwzz_RjzNotCheck Where RecType=0 And Ccode='" & Val(Label3.Caption) & "') " _
  1147.     & "And Convert(Char(6),Ddate,112)<=(select Convert(Char(6),max(qsrq),112) from gy_kjrlb where cwzzjzbz='1')"
  1148.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1149.     If Not IsNull(RecTemp(0)) Then
  1150.         DWYE = DWYE + RecTemp(0)
  1151.     End If
  1152.     
  1153.     '银行帐面余额
  1154.     SQL_Str = "SELECT SUM(DFJE)-SUM(JFJE) From Cwzz_BankBill Where (RecType=0) And Ccode='" & Val(Label3.Caption) & "'"
  1155.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1156.     If Not IsNull(RecTemp(0)) Then
  1157.         YHYE = RecTemp(0)
  1158.     End If
  1159.     
  1160.     SQL_Str = "SELECT SUM(DFJE)-SUM(JFJE) From Cwzz_BankBill Where (RecType=2) And Ccode='" & Val(Label3.Caption) & "'"
  1161.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1162.     If Not IsNull(RecTemp(0)) Then
  1163.         YHYE = YHYE + RecTemp(0)
  1164.     End If
  1165.     
  1166.     '银行调整后余额=银行帐面余额+(企业己收银行未收-企业己付银行未付)
  1167.     SQL_Str = "SELECT SUM(JFJE)-SUM(DFJE) From Cwzz_RjzNotCheck Where RecType=1 And BDelete=0 And Ccode='" & Val(Label3.Caption) & "'"
  1168.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1169.     If Not IsNull(RecTemp(0)) Then
  1170.         YHYE = YHYE + RecTemp(0)
  1171.     End If
  1172.     
  1173.     SQL_Str = "Select SUM(JFJE)-SUM(DFJE) From Cwzz_V_AccVouch where Ccode='" & Val(Label3.Caption) & "' " _
  1174.     & "And Convert(Char(8),Ddate,112)>=(Select Convert(Char(8),Ddate,112) From " _
  1175.     & "Cwzz_RjzNotCheck Where RecType=0 And Ccode='" & Val(Label3.Caption) & "') And BDelete=0 " _
  1176.     & "And Convert(Char(6),Ddate,112)<=(select Convert(Char(6),max(qsrq),112) from gy_kjrlb where cwzzjzbz='1')"
  1177.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1178.     If Not IsNull(RecTemp(0)) Then
  1179.         YHYE = YHYE + RecTemp(0)
  1180.     End If
  1181.     
  1182.     '单位调整后余额=银行帐面余额+(银行己收企业未收-银行己付企业未付)
  1183.     SQL_Str = "SELECT SUM(JFJE)-SUM(DFJE) From Cwzz_BankBill Where RecType=1 And BDelete=0 And Ccode='" & Val(Label3.Caption) & "'"
  1184.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1185.     If Not IsNull(RecTemp(0)) Then
  1186.         DWYE = DWYE + RecTemp(0)
  1187.     End If
  1188.     
  1189.     SQL_Str = "SELECT SUM(DFJE)-SUM(JFJE) From Cwzz_BankBill Where RecType=2 And BDelete=0 And Ccode='" & Val(Label3.Caption) & "'"
  1190.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1191.     If Not IsNull(RecTemp(0)) Then
  1192.         DWYE = DWYE + RecTemp(0)
  1193.     End If
  1194.     
  1195.     If DWYE <> YHYE Then
  1196.         MsgBox "《" + Label3.Caption + "》帐户调整余额不平,不能进行核销", 16, "百利/ERP5.0-财务总帐"
  1197.         Exit Sub
  1198.     End If
  1199.     '判断己勾对的帐是否平衡
  1200.     DWJF = 0
  1201.     DWDF = 0
  1202.     YHJF = 0
  1203.     YHDF = 0
  1204.     '银行对帐单
  1205.     SQL_Str = " Select sum(jfje),sum(dfje) From Cwzz_BankBill Where bcheckflag=1 And BDelete='0' And RecType='1' "
  1206.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1207.     If Not IsNull(RecTemp(0)) Then
  1208.         YHDF = RecTemp(0)
  1209.     End If
  1210.     If Not IsNull(RecTemp(1)) Then
  1211.         YHJF = RecTemp(1)
  1212.     End If
  1213.     
  1214.     SQL_Str = " Select sum(jfje),sum(dfje) From Cwzz_BankBill Where bcheckflag=1 And BDelete='0' And RecType='2'"
  1215.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1216.     If Not IsNull(RecTemp(0)) Then
  1217.         YHJF = YHJF + RecTemp(0)
  1218.     End If
  1219.     If Not IsNull(RecTemp(1)) Then
  1220.         YHDF = YHDF + RecTemp(1)
  1221.     End If
  1222.     
  1223.     '单位日记帐
  1224.     SQL_Str = " Select sum(jfje),sum(dfje) From cwzz_accvouchsub Where bcheckflag=1 And BDelete='0'"
  1225.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1226.     If Not IsNull(RecTemp(0)) Then
  1227.         DWJF = RecTemp(0)
  1228.     End If
  1229.     If Not IsNull(RecTemp(1)) Then
  1230.         DWDF = RecTemp(1)
  1231.     End If
  1232.     
  1233.     SQL_Str = " Select sum(jfje),sum(dfje) From Cwzz_RjzNotCheck Where bcheckflag=1 And BDelete='0'"
  1234.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQL_Str)
  1235.     If Not IsNull(RecTemp(0)) Then
  1236.         DWJF = DWJF + RecTemp(0)
  1237.     End If
  1238.     If Not IsNull(RecTemp(1)) Then
  1239.         DWDF = DWDF + RecTemp(1)
  1240.     End If
  1241.     
  1242.     If DWJF = YHDF And DWDF = YHJF Then
  1243.     Else
  1244.         If DWDF = DWJF Then
  1245.         Else
  1246.             MsgBox "银行自动对帐数据不平衡,不能进行核销。", 16, "百利/ERP5.0-财务总帐"
  1247.             Exit Sub
  1248.         End If
  1249.     End If
  1250.     
  1251.     '判断是否有可核销的数据
  1252.     Sqlstr = "Select Count(*) From Cwzz_BankBill Where BCheckFlag='1' And BDelete='0'"
  1253.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1254.     If RecTemp.Fields(0) <= 0 Then
  1255.         MsgBox "没有可核销的数据!", vbOKOnly + 64, "百利/ERP5.0-财务总帐"
  1256.         Exit Sub
  1257.     End If
  1258.     
  1259.     On Error GoTo Err:
  1260.     Cw_DataEnvi.DataConnect.BeginTrans
  1261.     Msg = MsgBox("你要核销银行已经对帐的数据吗?", vbYesNo)
  1262.     If Msg = vbYes Then
  1263.         '核销银行帐
  1264.         If RecTemp.State = 1 Then RecTemp.Close
  1265.         RecTemp.Open "select * from cwzz_bankbill where bcheckflag=1", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1266.         Do While Not RecTemp.EOF()
  1267.             RecTemp.Fields("bdelete") = 1
  1268.             RecTemp.Update
  1269.             RecTemp.MoveNext
  1270.         Loop
  1271.         '核销日记帐
  1272.         If RecTemp.State = 1 Then RecTemp.Close
  1273.         RecTemp.Open "select * from cwzz_accvouchsub where bcheckflag=1", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1274.         Do While Not RecTemp.EOF()
  1275.             RecTemp.Fields("bdelete") = 1
  1276.             RecTemp.Update
  1277.             RecTemp.MoveNext
  1278.         Loop
  1279.         '核销单位未达帐
  1280.         If RecTemp.State = 1 Then RecTemp.Close
  1281.         RecTemp.Open "select * from Cwzz_RjzNotCheck where bcheckflag=1", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1282.         Do While Not RecTemp.EOF()
  1283.             RecTemp.Fields("bdelete") = 1
  1284.             RecTemp.Update
  1285.             RecTemp.MoveNext
  1286.         Loop
  1287.         '核销结算方式相同,票号相同,金额相反的数据
  1288.         Sqlstr = "Select * From CWZZ_V_BILL"
  1289.         Set RecDir = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1290.         Do While Not RecDir.EOF()
  1291.             If RecTemp.State = 1 Then RecTemp.Close
  1292.             Sqlstr = "Select * From cwzz_accvouchsub Where SerialID=" + CStr(RecDir.Fields("SerialID")) + " Or SerialID=" + CStr(RecDir.Fields("B_Id")) + ""
  1293.             RecTemp.Open Sqlstr, Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1294.             Do While Not RecTemp.EOF
  1295.                 RecTemp.Fields("BCheckFlag") = 1
  1296.                 RecTemp.Fields("bdelete") = 1
  1297.                 RecTemp.Update
  1298.                 RecTemp.MoveNext
  1299.             Loop
  1300.             RecDir.MoveNext
  1301.         Loop
  1302.         MsgBox "核销完毕!", 64, "百利/ERP5.0-财务总帐"
  1303.     End If
  1304.     Cw_DataEnvi.DataConnect.CommitTrans
  1305. Err:
  1306.     Cw_DataEnvi.DataConnect.RollbackTrans
  1307. End Sub
  1308. '控制网格颜色
  1309. Private Sub vsFlexGrid1_RowColChange()
  1310.     If vsFlexGrid1.Cell(flexcpBackColor, vsFlexGrid1.Row) = Label4(0).BackColor Then
  1311.         vsFlexGrid1.BackColorSel = Label4(0).BackColor
  1312.     Else
  1313.         vsFlexGrid1.BackColorSel = Label4(2).BackColor
  1314.     End If
  1315. End Sub