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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{C5DE3F80-3376-11D2-BAA4-04F205C10000}#1.0#0"; "VSFLEX6D.OCX"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  4. Begin VB.Form yh_dzdqclrfrm 
  5.    Caption         =   "对帐单期初录入"
  6.    ClientHeight    =   5235
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   8820
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   5235
  12.    ScaleWidth      =   8820
  13.    StartUpPosition =   2  '屏幕中心
  14.    Begin VB.CommandButton YdCommand1 
  15.       Height          =   289
  16.       Left            =   570
  17.       Picture         =   "银行_对帐单期初录入.frx":0000
  18.       Style           =   1  'Graphical
  19.       TabIndex        =   40
  20.       Top             =   750
  21.       Visible         =   0   'False
  22.       Width           =   285
  23.    End
  24.    Begin VB.CommandButton Ydcommand 
  25.       Height          =   289
  26.       Left            =   0
  27.       Picture         =   "银行_对帐单期初录入.frx":03A2
  28.       Style           =   1  'Graphical
  29.       TabIndex        =   39
  30.       Top             =   0
  31.       Visible         =   0   'False
  32.       Width           =   285
  33.    End
  34.    Begin VB.Frame Frame1 
  35.       BackColor       =   &H80000018&
  36.       Height          =   855
  37.       Left            =   240
  38.       TabIndex        =   14
  39.       Top             =   5910
  40.       Width           =   10215
  41.       Begin VB.Label Lab_Memo 
  42.          Alignment       =   2  'Center
  43.          Appearance      =   0  'Flat
  44.          BackColor       =   &H80000018&
  45.          BorderStyle     =   1  'Fixed Single
  46.          Caption         =   "备 注"
  47.          ForeColor       =   &H80000008&
  48.          Height          =   675
  49.          Index           =   1
  50.          Left            =   30
  51.          TabIndex        =   16
  52.          Top             =   120
  53.          Width           =   285
  54.          WordWrap        =   -1  'True
  55.       End
  56.       Begin VB.Label Lab_Memo 
  57.          Appearance      =   0  'Flat
  58.          BackColor       =   &H80000018&
  59.          BorderStyle     =   1  'Fixed Single
  60.          ForeColor       =   &H00FF0000&
  61.          Height          =   675
  62.          Index           =   0
  63.          Left            =   330
  64.          TabIndex        =   15
  65.          Top             =   120
  66.          Width           =   9825
  67.       End
  68.    End
  69.    Begin VB.ComboBox YdCombo 
  70.       Height          =   300
  71.       Left            =   7170
  72.       Style           =   2  'Dropdown List
  73.       TabIndex        =   9
  74.       Top             =   600
  75.       Visible         =   0   'False
  76.       Width           =   1155
  77.    End
  78.    Begin VB.TextBox LrText 
  79.       Appearance      =   0  'Flat
  80.       ForeColor       =   &H00FF0000&
  81.       Height          =   300
  82.       Index           =   1
  83.       Left            =   5280
  84.       TabIndex        =   8
  85.       Text            =   "1"
  86.       Top             =   1410
  87.       Width           =   1155
  88.    End
  89.    Begin VB.TextBox LrText 
  90.       Appearance      =   0  'Flat
  91.       ForeColor       =   &H00FF0000&
  92.       Height          =   300
  93.       Index           =   0
  94.       Left            =   1530
  95.       TabIndex        =   7
  96.       Text            =   "0"
  97.       Top             =   1440
  98.       Width           =   450
  99.    End
  100.    Begin VB.TextBox LrText 
  101.       Appearance      =   0  'Flat
  102.       ForeColor       =   &H00FF0000&
  103.       Height          =   300
  104.       Index           =   2
  105.       Left            =   8670
  106.       TabIndex        =   6
  107.       Text            =   "2"
  108.       Top             =   1410
  109.       Width           =   1095
  110.    End
  111.    Begin VB.ComboBox Combo_Kjqj 
  112.       ForeColor       =   &H00FF0000&
  113.       Height          =   300
  114.       Left            =   1530
  115.       Style           =   2  'Dropdown List
  116.       TabIndex        =   5
  117.       Top             =   1080
  118.       Width           =   1545
  119.    End
  120.    Begin VB.TextBox LrText 
  121.       Appearance      =   0  'Flat
  122.       ForeColor       =   &H00FF0000&
  123.       Height          =   300
  124.       Index           =   3
  125.       Left            =   2250
  126.       TabIndex        =   4
  127.       Text            =   "3"
  128.       Top             =   1440
  129.       Width           =   795
  130.    End
  131.    Begin VB.CheckBox Chk_Quantity 
  132.       BackColor       =   &H00C9ECFE&
  133.       Caption         =   "科目数量核算则数量不能为零"
  134.       Height          =   285
  135.       Left            =   6330
  136.       TabIndex        =   3
  137.       Top             =   3330
  138.       Value           =   1  'Checked
  139.       Visible         =   0   'False
  140.       Width           =   2685
  141.    End
  142.    Begin VB.Timer Timer1 
  143.       Interval        =   1
  144.       Left            =   9690
  145.       Top             =   150
  146.    End
  147.    Begin VB.CheckBox Chk_DeleteMess 
  148.       BackColor       =   &H00C9ECFE&
  149.       Caption         =   "删除会计分录是否提示"
  150.       Height          =   285
  151.       Left            =   6330
  152.       TabIndex        =   2
  153.       Top             =   3030
  154.       Value           =   1  'Checked
  155.       Visible         =   0   'False
  156.       Width           =   2685
  157.    End
  158.    Begin MSComctlLib.Toolbar Tlb_Action 
  159.       Align           =   1  'Align Top
  160.       Height          =   555
  161.       Left            =   0
  162.       TabIndex        =   0
  163.       Top             =   0
  164.       Width           =   8820
  165.       _ExtentX        =   15558
  166.       _ExtentY        =   979
  167.       ButtonWidth     =   820
  168.       ButtonHeight    =   926
  169.       Wrappable       =   0   'False
  170.       Appearance      =   1
  171.       Style           =   1
  172.       ImageList       =   "ImageList1"
  173.       _Version        =   393216
  174.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  175.          NumButtons      =   33
  176.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  177.             Caption         =   "设置"
  178.             Key             =   "ymsz"
  179.             Object.ToolTipText     =   "打印页面设置"
  180.             ImageKey        =   "ymsz"
  181.          EndProperty
  182.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  183.             Caption         =   "打印"
  184.             Key             =   "dy"
  185.             Object.ToolTipText     =   "打印当前单据或Ctrl+P"
  186.             ImageKey        =   "dy"
  187.          EndProperty
  188.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  189.             Caption         =   "预览"
  190.             Key             =   "yl"
  191.             ImageKey        =   "yl"
  192.          EndProperty
  193.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  194.             Style           =   3
  195.          EndProperty
  196.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  197.             Caption         =   "新增"
  198.             Key             =   "xz"
  199.             Object.ToolTipText     =   "新增加一张单据或F5"
  200.             ImageKey        =   "xz"
  201.          EndProperty
  202.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  203.             Caption         =   "修改"
  204.             Key             =   "xg"
  205.             Object.ToolTipText     =   "修改当前单据或F3"
  206.             ImageKey        =   "xg"
  207.          EndProperty
  208.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  209.             Caption         =   "删除"
  210.             Key             =   "sc"
  211.             Object.ToolTipText     =   "删除当前单据"
  212.             ImageKey        =   "sc"
  213.          EndProperty
  214.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  215.             Key             =   "fgh0"
  216.             Style           =   3
  217.          EndProperty
  218.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  219.             Caption         =   "增行"
  220.             Key             =   "zh"
  221.             Object.ToolTipText     =   "插入一行或Insert"
  222.             ImageKey        =   "zh"
  223.          EndProperty
  224.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  225.             Caption         =   "删行"
  226.             Key             =   "sh"
  227.             Object.ToolTipText     =   "删除当前记录行或Delete"
  228.             ImageKey        =   "sh"
  229.          EndProperty
  230.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  231.             Key             =   "fgh1"
  232.             Style           =   3
  233.          EndProperty
  234.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  235.             Caption         =   "保存"
  236.             Key             =   "bc"
  237.             Object.ToolTipText     =   "保存单据或F6"
  238.             ImageKey        =   "bc"
  239.          EndProperty
  240.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  241.             Caption         =   "放弃"
  242.             Key             =   "fq"
  243.             Object.ToolTipText     =   "放弃此次操作"
  244.             ImageKey        =   "fq"
  245.          EndProperty
  246.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  247.             Key             =   "fgh2"
  248.             Style           =   3
  249.          EndProperty
  250.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  251.             Caption         =   "查询"
  252.             Key             =   "cx"
  253.             ImageKey        =   "cx"
  254.          EndProperty
  255.          BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  256.             Key             =   "fgh3"
  257.             Style           =   3
  258.          EndProperty
  259.          BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  260.             Caption         =   "审核"
  261.             Key             =   "shsh"
  262.             ImageKey        =   "shsh"
  263.          EndProperty
  264.          BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  265.             Caption         =   "弃审"
  266.             Key             =   "shqs"
  267.             ImageKey        =   "fq"
  268.          EndProperty
  269.          BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  270.             Caption         =   "标错"
  271.             Key             =   "shbc"
  272.             ImageKey        =   "shbc"
  273.          EndProperty
  274.          BeginProperty Button20 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  275.             Key             =   "fgh7"
  276.             Style           =   3
  277.          EndProperty
  278.          BeginProperty Button21 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  279.             Caption         =   "余额"
  280.             Key             =   "ye"
  281.             Object.ToolTipText     =   "查询科目最新余额"
  282.             ImageKey        =   "ye"
  283.          EndProperty
  284.          BeginProperty Button22 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  285.             Caption         =   "选项"
  286.             Key             =   "xx"
  287.             Object.ToolTipText     =   "填制凭证选项"
  288.             ImageKey        =   "xx"
  289.          EndProperty
  290.          BeginProperty Button23 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  291.             Key             =   "fgh4"
  292.             Style           =   3
  293.          EndProperty
  294.          BeginProperty Button24 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  295.             Caption         =   "全审"
  296.             Key             =   "qbsh"
  297.             ImageKey        =   "shqs"
  298.          EndProperty
  299.          BeginProperty Button25 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  300.             Caption         =   "全弃"
  301.             Key             =   "qbfq"
  302.             ImageKey        =   "qbfq"
  303.          EndProperty
  304.          BeginProperty Button26 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  305.             Key             =   "fgh6"
  306.             Style           =   3
  307.          EndProperty
  308.          BeginProperty Button27 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  309.             Caption         =   "首张"
  310.             Key             =   "first"
  311.             ImageKey        =   "first"
  312.          EndProperty
  313.          BeginProperty Button28 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  314.             Caption         =   "上张"
  315.             Key             =   "prev"
  316.             ImageKey        =   "prev"
  317.          EndProperty
  318.          BeginProperty Button29 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  319.             Caption         =   "下张"
  320.             Key             =   "next"
  321.             ImageKey        =   "next"
  322.          EndProperty
  323.          BeginProperty Button30 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  324.             Caption         =   "末张"
  325.             Key             =   "last"
  326.             ImageKey        =   "last"
  327.          EndProperty
  328.          BeginProperty Button31 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  329.             Key             =   "fgh5"
  330.             Style           =   3
  331.          EndProperty
  332.          BeginProperty Button32 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  333.             Caption         =   "帮助"
  334.             Key             =   "bz"
  335.             ImageKey        =   "bz"
  336.          EndProperty
  337.          BeginProperty Button33 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  338.             Caption         =   "退出"
  339.             Key             =   "fh"
  340.             ImageKey        =   "fh"
  341.          EndProperty
  342.       EndProperty
  343.       BorderStyle     =   1
  344.    End
  345.    Begin MSComctlLib.ImageList ImageList1 
  346.       Left            =   9090
  347.       Top             =   150
  348.       _ExtentX        =   1005
  349.       _ExtentY        =   1005
  350.       BackColor       =   -2147483643
  351.       ImageWidth      =   16
  352.       ImageHeight     =   16
  353.       MaskColor       =   12632256
  354.       _Version        =   393216
  355.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  356.          NumListImages   =   24
  357.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  358.             Picture         =   "银行_对帐单期初录入.frx":0744
  359.             Key             =   "yl"
  360.          EndProperty
  361.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  362.             Picture         =   "银行_对帐单期初录入.frx":0C88
  363.             Key             =   "dy"
  364.          EndProperty
  365.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  366.             Picture         =   "银行_对帐单期初录入.frx":0D9C
  367.             Key             =   "fq"
  368.          EndProperty
  369.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  370.             Picture         =   "银行_对帐单期初录入.frx":0EB0
  371.             Key             =   "ymsz"
  372.          EndProperty
  373.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  374.             Picture         =   "银行_对帐单期初录入.frx":1604
  375.             Key             =   "xg"
  376.          EndProperty
  377.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  378.             Picture         =   "银行_对帐单期初录入.frx":1A58
  379.             Key             =   "zh"
  380.          EndProperty
  381.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  382.             Picture         =   "银行_对帐单期初录入.frx":20C8
  383.             Key             =   "fh"
  384.          EndProperty
  385.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  386.             Picture         =   "银行_对帐单期初录入.frx":23E4
  387.             Key             =   "xz"
  388.          EndProperty
  389.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  390.             Picture         =   "银行_对帐单期初录入.frx":24F8
  391.             Key             =   "sc"
  392.          EndProperty
  393.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  394.             Picture         =   "银行_对帐单期初录入.frx":260C
  395.             Key             =   "bc"
  396.          EndProperty
  397.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  398.             Picture         =   "银行_对帐单期初录入.frx":2720
  399.             Key             =   "cx"
  400.          EndProperty
  401.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  402.             Picture         =   "银行_对帐单期初录入.frx":2834
  403.             Key             =   "bz"
  404.          EndProperty
  405.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  406.             Picture         =   "银行_对帐单期初录入.frx":2948
  407.             Key             =   "first"
  408.          EndProperty
  409.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  410.             Picture         =   "银行_对帐单期初录入.frx":2A5C
  411.             Key             =   "prev"
  412.          EndProperty
  413.          BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  414.             Picture         =   "银行_对帐单期初录入.frx":2B70
  415.             Key             =   "next"
  416.          EndProperty
  417.          BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  418.             Picture         =   "银行_对帐单期初录入.frx":2C84
  419.             Key             =   "last"
  420.          EndProperty
  421.          BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  422.             Picture         =   "银行_对帐单期初录入.frx":2D98
  423.             Key             =   "sh"
  424.          EndProperty
  425.          BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  426.             Picture         =   "银行_对帐单期初录入.frx":32B4
  427.             Key             =   "ye"
  428.          EndProperty
  429.          BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  430.             Picture         =   "银行_对帐单期初录入.frx":3708
  431.             Key             =   "xx"
  432.          EndProperty
  433.          BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  434.             Picture         =   "银行_对帐单期初录入.frx":3B5C
  435.             Key             =   "shsh"
  436.          EndProperty
  437.          BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  438.             Picture         =   "银行_对帐单期初录入.frx":3FB0
  439.             Key             =   "shbc"
  440.          EndProperty
  441.          BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  442.             Picture         =   "银行_对帐单期初录入.frx":4404
  443.             Key             =   "shqs"
  444.          EndProperty
  445.          BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  446.             Picture         =   "银行_对帐单期初录入.frx":4758
  447.             Key             =   ""
  448.          EndProperty
  449.          BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  450.             Picture         =   "银行_对帐单期初录入.frx":4D4C
  451.             Key             =   "qbfq"
  452.          EndProperty
  453.       EndProperty
  454.    End
  455.    Begin VSFlex6DAOCtl.vsFlexGrid WglrGrid 
  456.       Height          =   4125
  457.       Left            =   240
  458.       TabIndex        =   10
  459.       Top             =   1860
  460.       Width           =   10215
  461.       _ExtentX        =   18018
  462.       _ExtentY        =   7276
  463.       _ConvInfo       =   1
  464.       Appearance      =   1
  465.       BorderStyle     =   1
  466.       Enabled         =   -1  'True
  467.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  468.          Name            =   "宋体"
  469.          Size            =   9
  470.          Charset         =   134
  471.          Weight          =   400
  472.          Underline       =   0   'False
  473.          Italic          =   0   'False
  474.          Strikethrough   =   0   'False
  475.       EndProperty
  476.       MousePointer    =   0
  477.       BackColor       =   -2147483643
  478.       ForeColor       =   -2147483640
  479.       BackColorFixed  =   12640511
  480.       ForeColorFixed  =   -2147483630
  481.       BackColorSel    =   -2147483643
  482.       ForeColorSel    =   -2147483640
  483.       BackColorBkg    =   -2147483624
  484.       BackColorAlternate=   -2147483643
  485.       GridColor       =   -2147483633
  486.       GridColorFixed  =   -2147483632
  487.       TreeColor       =   -2147483632
  488.       FloodColor      =   192
  489.       SheetBorder     =   -2147483642
  490.       FocusRect       =   1
  491.       HighLight       =   1
  492.       AllowSelection  =   0   'False
  493.       AllowBigSelection=   0   'False
  494.       AllowUserResizing=   0
  495.       SelectionMode   =   0
  496.       GridLines       =   1
  497.       GridLinesFixed  =   2
  498.       GridLineWidth   =   1
  499.       Rows            =   5000
  500.       Cols            =   10
  501.       FixedRows       =   1
  502.       FixedCols       =   0
  503.       RowHeightMin    =   0
  504.       RowHeightMax    =   0
  505.       ColWidthMin     =   0
  506.       ColWidthMax     =   0
  507.       ExtendLastCol   =   0   'False
  508.       FormatString    =   ""
  509.       ScrollTrack     =   0   'False
  510.       ScrollBars      =   3
  511.       ScrollTips      =   0   'False
  512.       MergeCells      =   0
  513.       MergeCompare    =   0
  514.       AutoResize      =   -1  'True
  515.       AutoSizeMode    =   0
  516.       AutoSearch      =   0
  517.       MultiTotals     =   -1  'True
  518.       SubtotalPosition=   1
  519.       OutlineBar      =   0
  520.       OutlineCol      =   0
  521.       Ellipsis        =   0
  522.       ExplorerBar     =   0
  523.       PicturesOver    =   0   'False
  524.       FillStyle       =   0
  525.       RightToLeft     =   0   'False
  526.       PictureType     =   0
  527.       TabBehavior     =   0
  528.       OwnerDraw       =   0
  529.       Editable        =   0   'False
  530.       ShowComboButton =   -1  'True
  531.       WordWrap        =   -1  'True
  532.       TextStyle       =   0
  533.       TextStyleFixed  =   0
  534.       OleDragMode     =   0
  535.       OleDropMode     =   0
  536.       DataMode        =   0
  537.       VirtualData     =   -1  'True
  538.       Begin VB.CheckBox Chk_CodeOutput 
  539.          BackColor       =   &H00C9ECFE&
  540.          Caption         =   "打印凭证是否输出科目编码"
  541.          Height          =   255
  542.          Left            =   6060
  543.          TabIndex        =   12
  544.          Top             =   1740
  545.          Visible         =   0   'False
  546.          Width           =   2685
  547.       End
  548.       Begin VB.CheckBox Chk_CheckNext 
  549.          Caption         =   "审核凭证时是否自动跳到下张"
  550.          Height          =   285
  551.          Left            =   6060
  552.          TabIndex        =   11
  553.          Top             =   2070
  554.          Value           =   1  'Checked
  555.          Visible         =   0   'False
  556.          Width           =   2745
  557.       End
  558.       Begin VSFlex6DAOCtl.vsFlexGrid HjGrid 
  559.          Height          =   705
  560.          Left            =   0
  561.          TabIndex        =   13
  562.          Top             =   3270
  563.          Width           =   7545
  564.          _ExtentX        =   13309
  565.          _ExtentY        =   1244
  566.          _ConvInfo       =   1
  567.          Appearance      =   1
  568.          BorderStyle     =   0
  569.          Enabled         =   -1  'True
  570.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  571.             Name            =   "宋体"
  572.             Size            =   9
  573.             Charset         =   134
  574.             Weight          =   400
  575.             Underline       =   0   'False
  576.             Italic          =   0   'False
  577.             Strikethrough   =   0   'False
  578.          EndProperty
  579.          MousePointer    =   0
  580.          BackColor       =   -2147483624
  581.          ForeColor       =   -2147483640
  582.          BackColorFixed  =   -2147483633
  583.          ForeColorFixed  =   -2147483630
  584.          BackColorSel    =   -2147483643
  585.          ForeColorSel    =   -2147483640
  586.          BackColorBkg    =   -2147483624
  587.          BackColorAlternate=   -2147483624
  588.          GridColor       =   -2147483633
  589.          GridColorFixed  =   -2147483632
  590.          TreeColor       =   -2147483632
  591.          FloodColor      =   192
  592.          SheetBorder     =   -2147483642
  593.          FocusRect       =   1
  594.          HighLight       =   1
  595.          AllowSelection  =   0   'False
  596.          AllowBigSelection=   0   'False
  597.          AllowUserResizing=   0
  598.          SelectionMode   =   0
  599.          GridLines       =   1
  600.          GridLinesFixed  =   2
  601.          GridLineWidth   =   1
  602.          Rows            =   5000
  603.          Cols            =   10
  604.          FixedRows       =   1
  605.          FixedCols       =   0
  606.          RowHeightMin    =   0
  607.          RowHeightMax    =   0
  608.          ColWidthMin     =   0
  609.          ColWidthMax     =   0
  610.          ExtendLastCol   =   0   'False
  611.          FormatString    =   ""
  612.          ScrollTrack     =   0   'False
  613.          ScrollBars      =   3
  614.          ScrollTips      =   0   'False
  615.          MergeCells      =   0
  616.          MergeCompare    =   0
  617.          AutoResize      =   -1  'True
  618.          AutoSizeMode    =   0
  619.          AutoSearch      =   0
  620.          MultiTotals     =   -1  'True
  621.          SubtotalPosition=   1
  622.          OutlineBar      =   0
  623.          OutlineCol      =   0
  624.          Ellipsis        =   0
  625.          ExplorerBar     =   0
  626.          PicturesOver    =   0   'False
  627.          FillStyle       =   0
  628.          RightToLeft     =   0   'False
  629.          PictureType     =   0
  630.          TabBehavior     =   0
  631.          OwnerDraw       =   0
  632.          Editable        =   0   'False
  633.          ShowComboButton =   -1  'True
  634.          WordWrap        =   -1  'True
  635.          TextStyle       =   0
  636.          TextStyleFixed  =   0
  637.          OleDragMode     =   0
  638.          OleDropMode     =   0
  639.          DataMode        =   0
  640.          VirtualData     =   -1  'True
  641.       End
  642.    End
  643.    Begin VB.TextBox Ydtext 
  644.       BackColor       =   &H00C0FFFF&
  645.       BorderStyle     =   0  'None
  646.       Height          =   330
  647.       Left            =   7110
  648.       MultiLine       =   -1  'True
  649.       TabIndex        =   1
  650.       Top             =   120
  651.       Visible         =   0   'False
  652.       Width           =   1185
  653.    End
  654.    Begin VB.Shape Shape1 
  655.       BackColor       =   &H00C9ECFE&
  656.       BackStyle       =   1  'Opaque
  657.       Height          =   6585
  658.       Index           =   2
  659.       Left            =   180
  660.       Top             =   720
  661.       Width           =   10455
  662.    End
  663.    Begin VB.Shape Shape1 
  664.       BackColor       =   &H00C9ECFE&
  665.       BackStyle       =   1  'Opaque
  666.       Height          =   6585
  667.       Index           =   1
  668.       Left            =   150
  669.       Top             =   690
  670.       Width           =   10455
  671.    End
  672.    Begin VB.Shape Shape1 
  673.       BackColor       =   &H00C9ECFE&
  674.       BackStyle       =   1  'Opaque
  675.       Height          =   6585
  676.       Index           =   0
  677.       Left            =   120
  678.       Top             =   660
  679.       Width           =   10455
  680.    End
  681.    Begin VB.Label TsLabel 
  682.       BackColor       =   &H80000018&
  683.       BackStyle       =   0  'Transparent
  684.       Caption         =   "记 帐 凭 证"
  685.       BeginProperty Font 
  686.          Name            =   "隶书"
  687.          Size            =   18
  688.          Charset         =   134
  689.          Weight          =   400
  690.          Underline       =   0   'False
  691.          Italic          =   0   'False
  692.          Strikethrough   =   0   'False
  693.       EndProperty
  694.       ForeColor       =   &H00E0E0E0&
  695.       Height          =   330
  696.       Index           =   6
  697.       Left            =   4440
  698.       TabIndex        =   38
  699.       Top             =   750
  700.       Width           =   2265
  701.    End
  702.    Begin VB.Label TsLabel 
  703.       BackColor       =   &H80000018&
  704.       BackStyle       =   0  'Transparent
  705.       Caption         =   "记 帐 凭 证"
  706.       BeginProperty Font 
  707.          Name            =   "隶书"
  708.          Size            =   18
  709.          Charset         =   134
  710.          Weight          =   400
  711.          Underline       =   0   'False
  712.          Italic          =   0   'False
  713.          Strikethrough   =   0   'False
  714.       EndProperty
  715.       ForeColor       =   &H00FF8080&
  716.       Height          =   330
  717.       Index           =   4
  718.       Left            =   4410
  719.       TabIndex        =   37
  720.       Top             =   720
  721.       Width           =   2115
  722.    End
  723.    Begin VB.Line Line1 
  724.       BorderColor     =   &H000000FF&
  725.       Index           =   1
  726.       X1              =   4110
  727.       X2              =   6690
  728.       Y1              =   1215
  729.       Y2              =   1215
  730.    End
  731.    Begin VB.Line Line1 
  732.       BorderColor     =   &H000000FF&
  733.       Index           =   0
  734.       X1              =   4110
  735.       X2              =   6690
  736.       Y1              =   1170
  737.       Y2              =   1170
  738.    End
  739.    Begin VB.Label TsLabel 
  740.       BackStyle       =   0  'Transparent
  741.       Caption         =   "制单日期"
  742.       Height          =   255
  743.       Index           =   1
  744.       Left            =   4470
  745.       TabIndex        =   36
  746.       Top             =   1470
  747.       Width           =   825
  748.    End
  749.    Begin VB.Label TsLabel 
  750.       BackStyle       =   0  'Transparent
  751.       Caption         =   "类别字号"
  752.       Height          =   225
  753.       Index           =   0
  754.       Left            =   750
  755.       TabIndex        =   35
  756.       Top             =   1500
  757.       Width           =   825
  758.    End
  759.    Begin VB.Label TsLabel 
  760.       BackStyle       =   0  'Transparent
  761.       Caption         =   "附单据数"
  762.       Height          =   255
  763.       Index           =   2
  764.       Left            =   7890
  765.       TabIndex        =   34
  766.       Top             =   1470
  767.       Width           =   825
  768.    End
  769.    Begin VB.Label TsLabel 
  770.       BackStyle       =   0  'Transparent
  771.       Caption         =   "制单:"
  772.       Height          =   225
  773.       Index           =   5
  774.       Left            =   8580
  775.       TabIndex        =   33
  776.       Top             =   6900
  777.       Width           =   525
  778.    End
  779.    Begin VB.Label TsLabel 
  780.       BackStyle       =   0  'Transparent
  781.       Caption         =   "审核:"
  782.       Height          =   225
  783.       Index           =   7
  784.       Left            =   6705
  785.       TabIndex        =   32
  786.       Top             =   6900
  787.       Width           =   495
  788.    End
  789.    Begin VB.Label TsLabel 
  790.       BackStyle       =   0  'Transparent
  791.       Caption         =   "记帐:"
  792.       Height          =   225
  793.       Index           =   8
  794.       Left            =   2655
  795.       TabIndex        =   31
  796.       Top             =   6900
  797.       Width           =   645
  798.    End
  799.    Begin VB.Label Lab_Book 
  800.       Appearance      =   0  'Flat
  801.       BackColor       =   &H80000005&
  802.       BackStyle       =   0  'Transparent
  803.       ForeColor       =   &H000000FF&
  804.       Height          =   225
  805.       Left            =   3210
  806.       TabIndex        =   30
  807.       Top             =   6900
  808.       Width           =   735
  809.    End
  810.    Begin VB.Label Lab_Checker 
  811.       Appearance      =   0  'Flat
  812.       BackColor       =   &H80000005&
  813.       BackStyle       =   0  'Transparent
  814.       ForeColor       =   &H000000FF&
  815.       Height          =   225
  816.       Left            =   7260
  817.       TabIndex        =   29
  818.       Top             =   6900
  819.       Width           =   735
  820.    End
  821.    Begin VB.Label Lab_Bill 
  822.       Appearance      =   0  'Flat
  823.       BackColor       =   &H80000005&
  824.       BackStyle       =   0  'Transparent
  825.       ForeColor       =   &H000000FF&
  826.       Height          =   225
  827.       Left            =   9120
  828.       TabIndex        =   28
  829.       Top             =   6870
  830.       Width           =   735
  831.    End
  832.    Begin VB.Label TsLabel 
  833.       BackStyle       =   0  'Transparent
  834.       Caption         =   "会计期间"
  835.       Height          =   255
  836.       Index           =   9
  837.       Left            =   750
  838.       TabIndex        =   27
  839.       Top             =   1140
  840.       Width           =   825
  841.    End
  842.    Begin VB.Label TsLabel 
  843.       BackStyle       =   0  'Transparent
  844.       Caption         =   "字"
  845.       Height          =   195
  846.       Index           =   10
  847.       Left            =   2040
  848.       TabIndex        =   26
  849.       Top             =   1500
  850.       Width           =   255
  851.    End
  852.    Begin VB.Label Lab_OperStatus 
  853.       BackColor       =   &H000080FF&
  854.       Caption         =   "1"
  855.       Height          =   345
  856.       Left            =   8730
  857.       TabIndex        =   25
  858.       Top             =   570
  859.       Visible         =   0   'False
  860.       Width           =   345
  861.    End
  862.    Begin VB.Label Lab_Row 
  863.       Alignment       =   2  'Center
  864.       Appearance      =   0  'Flat
  865.       BackColor       =   &H80000005&
  866.       BackStyle       =   0  'Transparent
  867.       ForeColor       =   &H00FF0000&
  868.       Height          =   225
  869.       Left            =   9030
  870.       TabIndex        =   24
  871.       Top             =   1140
  872.       Width           =   315
  873.    End
  874.    Begin VB.Label TsLabel 
  875.       BackStyle       =   0  'Transparent
  876.       Caption         =   "(第"
  877.       Height          =   255
  878.       Index           =   11
  879.       Left            =   8730
  880.       TabIndex        =   23
  881.       Top             =   1140
  882.       Width           =   315
  883.    End
  884.    Begin VB.Label TsLabel 
  885.       BackStyle       =   0  'Transparent
  886.       Caption         =   "行)"
  887.       Height          =   255
  888.       Index           =   12
  889.       Left            =   9360
  890.       TabIndex        =   22
  891.       Top             =   1140
  892.       Width           =   405
  893.    End
  894.    Begin VB.Label Lab_Pzclzt 
  895.       BackColor       =   &H0000FFFF&
  896.       Caption         =   "1"
  897.       ForeColor       =   &H00808080&
  898.       Height          =   255
  899.       Left            =   8400
  900.       TabIndex        =   21
  901.       Top             =   630
  902.       Visible         =   0   'False
  903.       Width           =   285
  904.    End
  905.    Begin VB.Label TsLabel 
  906.       BackStyle       =   0  'Transparent
  907.       Caption         =   "当前记录"
  908.       Height          =   255
  909.       Index           =   13
  910.       Left            =   7890
  911.       TabIndex        =   20
  912.       Top             =   1140
  913.       Width           =   825
  914.    End
  915.    Begin VB.Label TsLabel 
  916.       BackStyle       =   0  'Transparent
  917.       Caption         =   "会计主管:"
  918.       Height          =   225
  919.       Index           =   3
  920.       Left            =   420
  921.       TabIndex        =   19
  922.       Top             =   6900
  923.       Width           =   855
  924.    End
  925.    Begin VB.Label TsLabel 
  926.       BackStyle       =   0  'Transparent
  927.       Caption         =   "出纳:"
  928.       Height          =   225
  929.       Index           =   14
  930.       Left            =   4680
  931.       TabIndex        =   18
  932.       Top             =   6900
  933.       Width           =   645
  934.    End
  935.    Begin VB.Label Lab_Error 
  936.       Appearance      =   0  'Flat
  937.       BackColor       =   &H80000005&
  938.       BackStyle       =   0  'Transparent
  939.       BorderStyle     =   1  'Fixed Single
  940.       Caption         =   "有错"
  941.       BeginProperty Font 
  942.          Name            =   "隶书"
  943.          Size            =   15.75
  944.          Charset         =   134
  945.          Weight          =   400
  946.          Underline       =   0   'False
  947.          Italic          =   0   'False
  948.          Strikethrough   =   0   'False
  949.       EndProperty
  950.       ForeColor       =   &H000000FF&
  951.       Height          =   360
  952.       Left            =   150
  953.       TabIndex        =   17
  954.       Top             =   690
  955.       Visible         =   0   'False
  956.       Width           =   735
  957.    End
  958. End
  959. Attribute VB_Name = "yh_dzdqclrfrm"
  960. Attribute VB_GlobalNameSpace = False
  961. Attribute VB_Creatable = False
  962. Attribute VB_PredeclaredId = True
  963. Attribute VB_Exposed = False
  964. '*********************************************************************************************************
  965. '*    模 块 名 称 :记帐凭证处理
  966. '*    功 能 描 述 :此功能模块主要完成凭证录入、修改、删除、预览打印等。
  967. '*    程序员姓名  : 张建忠
  968. '*    最后修改人  : 张建忠
  969. '*    最后修改时间:2000/09/23
  970. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  971. '*
  972. '*    1.每次调入外部功能窗体,均要加锁ChangeLock=True,窗体关闭后解锁ChangeLock=false
  973. '*
  974. '*    2.网格列存储内容注解
  975. '*      0-行有效标识 1-结算方式编码 2-结算方式名称 3-票号 4-发生日期 5-数量 6-用户录入单价(显示时自动计算)
  976. '*      7-计量单位 8-外币编码 9-外币名称 10-外币金额 11-汇率 12-部门编码 13-部门名称
  977. '*      14-单位编码 15-单位名称  16-职员编码 17-职员名称 18-项目大类编码 19-项目大类名称
  978. '*      20-项目编码 21-项目名称  22-项目数量 23-项目计量单位 24-经办人
  979. '*
  980. '*      索引对照:001-摘要  002-科目编码 003-科目名称 004-借方金额 005-贷方金额
  981. '*
  982. '*    3.Lab_OperStatus 用此标签来标识单据录入状态(默认值为1) "1"-浏览 "2"-新增 "3"-修改
  983. '*
  984. '*    4.Lab_Pzclzt 用此标签来标识凭证处理状态(默认值为1) "1"-填制凭证 "2"-查询凭证列表 "3"-审核凭证
  985. '*
  986. '*    5.原则:只要单据能够存盘(无论修改或新增)则其必须接受完整性及有效性规则检查
  987. '*
  988. '*********************************************************************************************************
  989.  
  990.  '[以下为根据实际情况设置变量
  991.     Dim Rec_AccVouch As New ADODB.Recordset         '凭证动态集
  992.     Dim Int_AssCount As Integer                     '辅助核算项目总数
  993.     Dim Bln_AssShow() As Boolean                    '辅助核算项目是否显示
  994.     Dim Bln_AssHelp() As Boolean                    '辅助核算项目是否有帮助
  995.     Dim Str_Digest As String                        '最后录入的一条凭证分录的摘要内容
  996.     Dim Bln_BillChange As Boolean                   '标识单据是否发生改动
  997.  ']
  998.  
  999.  '以下为固定使用变量(网格)
  1000.     Dim Cxnrrec As New ADODB.Recordset              '显示查询内容动态集
  1001.     Dim Dyymctbl As New DY_Dyymsz                   '打印页面窗体变量
  1002.     Dim GridCode As String                          '显示网格网格代码
  1003.     Dim GridInf() As Variant                        '整个网格设置信息
  1004.     Dim ReportTitle As String                       '报表主标题
  1005.     Dim Tsxx As String                              '系统提示信息
  1006.     Dim Pmbcsjhs As Long                            '屏幕网格保持数据行数(大于等于1)
  1007.     Dim Fzxwghs As Integer                          '辅助项网格行数(包括合计行)
  1008.     Dim Sfxshjwg As Boolean                         '是否显示合计网格
  1009.     Dim Qslz As Long                                '网格隐藏(非操作显示)列数
  1010.     Dim Sjhgd As Double                             '网格数据行高度
  1011.     Dim GridBoolean() As Boolean                    '网格列信息(布尔型)
  1012.     Dim GridStr()  As String                        '网格列信息(字符型)
  1013.     Dim GridInt() As Integer                        '网格列信息(整型)
  1014.     Dim Sfblbzkd As Boolean                         '是否保留帮助宽度(字段提供帮助时,是否为按钮保留空间)
  1015.     Dim Dqlrwgh As Long                             '当前录入数据网格行
  1016.     Dim Dqlrwgl As Long                             '当前录入数据网格列
  1017.     Dim Dqlkwgh As Long                             '刚刚离开网格行(不一定为录入行)
  1018.     Dim Dqlkwgl As Long                             '刚刚离开网格列
  1019.     Dim Dqtoprow As Long                            '当前录入状态时最上端可视行
  1020.     Dim Dqleftcol As Long                           '当前录入状态时最左端可视列
  1021.     Dim Zdlrqnr As String                           '字段录入修改前内容(用来判断内容是否修改)
  1022.     Dim Wbkbhlock As Boolean                        '文本框改变值锁
  1023.     Dim changelock As Boolean                       '网格行列改变控制锁(用来区别用户改变.程序改变)
  1024.     Dim Gdtlock As Boolean                          '滚动条滚动控制(用来区别用户改变.程序改变)
  1025.     Dim Yxxpdlock As Boolean                        '字段有效性判断锁(内容不修改不需进行字段有效性判断)
  1026.     Dim Hyxxpdlock As Boolean                       '行有效性判断锁(字段内容不修改不需进行行有效性判断)
  1027.     Dim Valilock As Boolean                         '文本框失去焦点是否进行有效性控制(TRUE 为锁定*限用网格录入)
  1028.     Dim Shsfts As Boolean                           '删除记录行是否提示
  1029.     Dim Szzls As Integer                            '网格信息数组最大下标值(网格列数-1)
  1030.     
  1031.  '以下为固定使用变量(文本框)
  1032.     Dim Textvar() As Variant                        '存储变体型文本框信息
  1033.     Dim Textboolean() As Boolean                    '存储布尔型文本框信息
  1034.     Dim Textint() As Integer                        '存储整型文本框信息
  1035.     Dim Textstr() As String                         '存储字符型文本框信息
  1036.     Dim Max_Text_Index As Integer                   '最大录入文本框索引值
  1037.     Dim TextGroupCode As String                     '文本框录入分组编码
  1038.     Dim TextValiLock As Boolean                     '文本框失去焦点是否进行有效性控制判断
  1039.     Dim TextValiJudgeLock() As Boolean              '文本框录入有效性判断控制锁
  1040.     Dim TextChangeLock As Boolean                   '文本框内容变换控制锁
  1041.     Dim Bln_Cancel As Boolean                       '取消按钮信息传递
  1042. Private Sub Form_KeyPress(KeyAscii As Integer)       '控 制 焦 点 转 移
  1043.    Dim jdzygs As Integer
  1044.    jdzygs = 3
  1045.    Select Case KeyAscii
  1046.       Case vbKeyReturn
  1047.            If Kjjdzy(LrbmsFrm, jdzygs) Then
  1048.               KeyAscii = 0
  1049.            End If
  1050.       Case 39           '屏蔽字符"'"
  1051.         KeyAscii = 0
  1052.    End Select
  1053. End Sub
  1054. Private Sub Form_Load()                              '窗 体 装 入
  1055.   '初始化各种锁值
  1056.   
  1057.   changelock = False             '网格行列改变控制锁
  1058.   Gdtlock = False                '滚动条滚动控制
  1059.   Yxxpdlock = True               '字段有效性判断锁
  1060.   Hyxxpdlock = True              '行有效性判断锁
  1061.   Wbkbhlock = False              '文本框内容改变锁
  1062.    
  1063.   '[>>开始 设置辅助核算项目属性
  1064.    Int_AssCount = 13
  1065.    ReDim Bln_AssShow(Int_AssCount - 1)
  1066.    ReDim Bln_AssHelp(Int_AssCount - 1)
  1067.    Bln_AssHelp(0) = True         '结算方式
  1068.    Bln_AssHelp(2) = True         '发生日期
  1069.    Bln_AssHelp(7) = True         '部门
  1070.    Bln_AssHelp(8) = True         '往来单位
  1071.    Bln_AssHelp(9) = True         '个人
  1072.    Bln_AssHelp(10) = True        '项目
  1073.    Bln_AssHelp(12) = True        '经办人
  1074.    
  1075.   '填充会计期间列表框(年度默认为用户选择年度)
  1076.    Call Sub_FillPeriod(Combo_Kjqj, Xtyear, Xtmm)
  1077.      
  1078.   '完毕<<]
  1079.   '报表主标题及报表编码
  1080.   ReportTitle = "记 帐 凭 证"
  1081.   XtReportCode = "c_jzpzcl"
  1082.   Load Dyymctbl
  1083.   '以下为文本框处理程序
  1084.   TextGroupCode = "c_jzpzcl"
  1085.  
  1086.   Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())  '读入文本框录入信息
  1087.   Call Wbkcsh
  1088.   
  1089.   '调 入 网 格
  1090.   GridCode = "c_jzpzcl"          '网格属性编码
  1091.   Call BzWgcsh(WglrGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  1092.   
  1093.   Qslz = GridInf(1)
  1094.   Sjhgd = GridInf(2)
  1095.   Pmbcsjhs = GridInf(3)
  1096.   Fzxwghs = GridInf(4)
  1097.   Sfblbzkd = GridInf(5)
  1098.   Shsfts = GridInf(6)
  1099.   Sfxshjwg = GridInf(7)
  1100.   Szzls = WglrGrid.Cols - 1
  1101.   
  1102.   For Jsqte = WglrGrid.FixedRows To WglrGrid.Rows - 1
  1103.       WglrGrid.RowHeight(Jsqte) = Sjhgd
  1104.   Next Jsqte
  1105.   
  1106.   
  1107.    '[>>置删行是否提示状态
  1108.    If Shsfts Then
  1109.       Chk_DeleteMess.Value = 1
  1110.    Else
  1111.       Chk_DeleteMess.Value = 0
  1112.    End If
  1113.   '<<]
  1114.     
  1115.   '初始化合计网格
  1116.   
  1117.   Call Cshhjwg
  1118.   
  1119.   '单据变动置为False
  1120.   Bln_BillChange = False
  1121.   
  1122.   '装入会计科目编码帮助窗体(为加快参照速度)PZ_FrmKjkmcz
  1123.    Load PZ_FrmKjkmcz
  1124.   
  1125. End Sub
  1126. Private Sub Form_Unload(Cancel As Integer)           '窗体卸载
  1127.    '卸载打印页面窗体
  1128.    Unload Dyymctbl
  1129.    
  1130.    '卸载会计科目编码参照窗体
  1131.    PZ_FrmKjkmcz.UnloadCheck.Value = 1
  1132.    Unload PZ_FrmKjkmcz
  1133.    
  1134.    '判断凭证是否发生变化
  1135.    If Bln_BillChange Then
  1136.       Xtfhcs = "1"
  1137.    Else
  1138.       Xtfhcs = "0"
  1139.    End If
  1140. End Sub
  1141. Private Sub Timer1_Timer()                           '根据不同凭证或单据状态处理不同的数据初始化
  1142.    '关闭定时器
  1143.    Timer1.Enabled = False
  1144.    
  1145.   '调入数据初始化模块
  1146.    Call Sjcsh(Trim(Lab_Pzclzt.Caption))
  1147.    
  1148. End Sub
  1149. Private Sub Sjcsh(Str_Pzclzt As String)              '数据初始化模块(根据实际情况)
  1150.  Dim SQLSTR As String       '查询凭证列表条件
  1151.  '[>>根据实际情况初始化
  1152.   Select Case Str_Pzclzt
  1153.      
  1154.     Case "1"   '填制凭证
  1155.     
  1156.       '设置工具条显示
  1157.       With Tlb_Action
  1158.          .Buttons("first").Visible = False           '首张
  1159.          .Buttons("prev").Visible = False            '上张
  1160.          .Buttons("next").Visible = False            '下张
  1161.          .Buttons("last").Visible = False            '末张
  1162.          .Buttons("fgh5").Visible = False            '分隔行
  1163.          .Buttons("shsh").Visible = False            '审核
  1164.          .Buttons("shqs").Visible = False            '弃审
  1165.          .Buttons("shbc").Visible = False            '标错
  1166.          .Buttons("qbsh").Visible = False            '全审
  1167.          .Buttons("qbfq").Visible = False            '全弃
  1168.          .Buttons("fgh6").Visible = False            '分隔行
  1169.          .Buttons("fgh7").Visible = False            '分隔行
  1170.       End With
  1171.     
  1172.       '日期默认值为用户选择日期
  1173.        LrText(1).Text = Xtrq
  1174.        
  1175.       '设置操作状态为浏览
  1176.        Lab_OperStatus = "1"
  1177.        Call Sub_OperStatus("10")
  1178.        
  1179.     Case "2"   '查询凭证(凭证列表)
  1180.     
  1181.       '设置工具条显示
  1182.       With Tlb_Action
  1183.          .Buttons("cx").Visible = False             '查询
  1184.          .Buttons("fgh3").Visible = False           '分割行
  1185.          .Buttons("xz").Visible = False             '新增
  1186.          .Buttons("sc").Visible = False             '删除
  1187.          .Buttons("shsh").Visible = False           '审核
  1188.          .Buttons("shqs").Visible = False           '弃审
  1189.          .Buttons("shbc").Visible = False           '标错
  1190.          .Buttons("qbsh").Visible = False           '全审
  1191.          .Buttons("qbfq").Visible = False           '全弃
  1192.          .Buttons("fgh6").Visible = False           '分隔行
  1193.          .Buttons("fgh7").Visible = False           '分隔行
  1194.       End With
  1195.       
  1196.       Call Sub_ShowBill
  1197.       
  1198.       '设置操作状态为浏览
  1199.       Lab_OperStatus.Caption = "1"
  1200.       
  1201.       '设置工具条状态
  1202.       Call Sub_OperStatus("11")
  1203.       
  1204.     Case "3"    '审核凭证
  1205.       
  1206.       '设置工具条显示
  1207.       With Tlb_Action
  1208.          .Buttons("xz").Visible = False             '新增
  1209.          .Buttons("xg").Visible = False             '修改
  1210.          .Buttons("sc").Visible = False             '删除
  1211.          .Buttons("fgh0").Visible = False           '分隔行
  1212.          .Buttons("zh").Visible = False             '增行
  1213.          .Buttons("sh").Visible = False             '删行
  1214.          .Buttons("fgh1").Visible = False           '分隔行
  1215.          .Buttons("bc").Visible = False             '保存
  1216.          .Buttons("fq").Visible = False             '放弃
  1217.          .Buttons("fgh2").Visible = False           '分隔行
  1218.          .Buttons("cx").Visible = False             '查询
  1219.          .Buttons("fgh3").Visible = False           '分割行
  1220.       End With
  1221.       
  1222.       Call Sub_ShowBill
  1223.       
  1224.       '设置操作状态为浏览
  1225.       Lab_OperStatus.Caption = "1"
  1226.       
  1227.       '设置工具条状态
  1228.       Call Sub_OperStatus("11")
  1229.       
  1230.   End Select
  1231.   
  1232.  '<<]
  1233.   
  1234.   '重 置 网 格
  1235.    Call Sub_AdjustGrid
  1236.   
  1237. End Sub
  1238. Private Sub Sub_ShowBill()                                          '根据当前单据号显示整张单据内容
  1239.    Dim SQLSTR As String
  1240.    Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1241.    Dim Jsqte  As Long           '临时计数器
  1242.    
  1243.    '[>>计算会计期间
  1244.    Int_Year = Val(Mid(Combo_Kjqj.Text, 1, 4))
  1245.    Int_Period = Val(Mid(Combo_Kjqj.Text, 6, 2))
  1246.    '<<]
  1247.    SQLSTR = "SELECT Cwzz_AccVouch.*,Cwzz_AccCode.Cname,Cwzz_AccCode.Measure,Gy_ForeignCurrency.ForeignCurrName AS ForeignCurrName," & _
  1248.             " Gy_Person.PersonName AS PersonName, Cwzz_Item.ItemName AS ItemName,Cwzz_ItemClass.ItemClassName," & _
  1249.             " Cwzz_Settlement.SSName AS SSName, Gy_Customer.CusName AS CusName,Gy_Department.DeptName as DeptName" & _
  1250.             " FROM Cwzz_AccVouch LEFT OUTER JOIN" & _
  1251.             " Cwzz_AccCode ON" & _
  1252.             " Cwzz_AccVouch.Ccode = Cwzz_AccCode.Ccode LEFT OUTER JOIN" & _
  1253.             " Gy_ForeignCurrency ON" & _
  1254.             " Cwzz_AccVouch.ForeignCurrCode = Gy_ForeignCurrency.ForeignCurrCode LEFT OUTER Join " & _
  1255.             " Gy_Person ON" & _
  1256.             " Cwzz_AccVouch.PersonCode = Gy_Person.PersonCode LEFT OUTER JOIN" & _
  1257.             " Cwzz_Item ON Cwzz_AccVouch.ItemClassCode = Cwzz_Item.ItemClassCode AND" & _
  1258.             " Cwzz_AccVouch.ItemCode = Cwzz_Item.ItemCode LEFT OUTER JOIN Cwzz_ItemClass ON Cwzz_AccVouch.ItemClassCode = Cwzz_ItemClass.ItemClassCode LEFT OUTER JOIN" & _
  1259.             " Gy_Customer ON" & _
  1260.             " Cwzz_AccVouch.CusCode = Gy_Customer.CusCode LEFT OUTER JOIN" & _
  1261.             " Gy_Department ON" & _
  1262.             " Cwzz_AccVouch.DeptCode = Gy_Department.DeptCode LEFT OUTER JOIN" & _
  1263.             " Cwzz_Settlement ON Cwzz_AccVouch.SSCode = Cwzz_Settlement.SSCode" & _
  1264.             " Where Rectype=0 And Year=" & Int_Year & " and Period=" & Int_Period & " And VouchClassCode='" & Trim(LrText(0).Text) & "' And VouchNo=" & Val(LrText(3).Text) & _
  1265.             " ORDER BY I_id "
  1266.          
  1267.       Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
  1268.       
  1269.       With RecTemp
  1270.          
  1271.          WglrGrid.Clear 1
  1272.          
  1273.          If .EOF Then
  1274.             Exit Sub
  1275.          Else
  1276.             WglrGrid.Rows = .RecordCount + WglrGrid.FixedRows
  1277.             
  1278.             '[>>显示单据头
  1279.              TextChangeLock = True
  1280.                
  1281.                If IsDate(.Fields("DDate")) Then
  1282.                   LrText(1).Text = Format(.Fields("Ddate"), "yyyy-mm-dd")                               '制单日期
  1283.                End If
  1284.                   
  1285.                LrText(2).Text = Trim(Str(.Fields("Doc")))                                               '附单据数
  1286.                
  1287.                Lab_Bill.Caption = Trim(.Fields("Bill") & "")                                            '制单人
  1288.                
  1289.                If .Fields("CheckFlag") Then
  1290.                   Lab_Checker.Caption = Trim(.Fields("Checker") & "")                                   '审核人
  1291.                Else
  1292.                   Lab_Checker.Caption = ""
  1293.                End If
  1294.                
  1295.                If .Fields("BookFlag") Then
  1296.                   Lab_Book.Caption = Trim(.Fields("Book") & "")                                         '记帐人
  1297.                Else
  1298.                   Lab_Book.Caption = ""
  1299.                End If
  1300.                
  1301.                If .Fields("ErrorFlag") Then                                                             '是否为有错凭证
  1302.                   Lab_Error.Visible = True
  1303.                Else
  1304.                   Lab_Error.Visible = False
  1305.                End If
  1306.                
  1307.              TextChangeLock = False
  1308.             '<<]
  1309.             
  1310.          End If
  1311.          Jsqte = WglrGrid.FixedRows
  1312.          Do While Not .EOF
  1313.            If Jsqte >= WglrGrid.Rows Then
  1314.               WglrGrid.AddItem ""
  1315.            End If
  1316.            
  1317.            '[>>显示单据分录
  1318.            WglrGrid.TextMatrix(Jsqte, 0) = "*"                                                           '行标识
  1319.            WglrGrid.TextMatrix(Jsqte, 1) = Trim(.Fields("SScode") & "")                                  '结算方式编码
  1320.            WglrGrid.TextMatrix(Jsqte, 2) = Trim(.Fields("SSname") & "")                                  '结算方式名称
  1321.            WglrGrid.TextMatrix(Jsqte, 3) = Trim(.Fields("BillNo") & "")                                  '票号
  1322.            If IsDate(.Fields("BillDate")) Then
  1323.               WglrGrid.TextMatrix(Jsqte, 4) = Format(.Fields("BillDate"), "yyyy-mm-dd")                  '发生日期
  1324.            End If
  1325.            If .Fields("Jfsl") <> 0 Then
  1326.               WglrGrid.TextMatrix(Jsqte, 5) = Trim(Str(.Fields("Jfsl")))                                 '数量
  1327.            End If
  1328.            If .Fields("Dfsl") <> 0 Then
  1329.               WglrGrid.TextMatrix(Jsqte, 5) = Trim(Str(.Fields("Dfsl")))                                 '数量
  1330.            End If
  1331.            WglrGrid.TextMatrix(Jsqte, 7) = Trim(.Fields("Measure") & "")                                 '计量单位
  1332.            WglrGrid.TextMatrix(Jsqte, 8) = Trim(.Fields("ForeignCurrCode") & "")                         '外币编码
  1333.            WglrGrid.TextMatrix(Jsqte, 9) = Trim(.Fields("ForeignCurrName") & "")                         '外币名称
  1334.            If .Fields("Wbjfje") <> 0 Then
  1335.               WglrGrid.TextMatrix(Jsqte, 10) = Trim(Str(.Fields("Wbjfje")))                              '外币金额
  1336.            End If
  1337.            If .Fields("Wbdfje") <> 0 Then
  1338.               WglrGrid.TextMatrix(Jsqte, 10) = Trim(Str(.Fields("Wbdfje")))                              '外币金额
  1339.            End If
  1340.            If .Fields("AccRate") <> 0 Then
  1341.               WglrGrid.TextMatrix(Jsqte, 11) = Trim(Str(.Fields("AccRate")))                             '记帐汇率
  1342.            End If
  1343.            WglrGrid.TextMatrix(Jsqte, 12) = Trim(.Fields("DeptCode") & "")                               '部门编码
  1344.            WglrGrid.TextMatrix(Jsqte, 13) = Trim(.Fields("DeptName") & "")                               '部门名称
  1345.            WglrGrid.TextMatrix(Jsqte, 14) = Trim(.Fields("CusCode") & "")                                '单位编码
  1346.            WglrGrid.TextMatrix(Jsqte, 15) = Trim(.Fields("CusName") & "")                                '单位名称
  1347.            WglrGrid.TextMatrix(Jsqte, 16) = Trim(.Fields("PersonCode") & "")                             '职员编码
  1348.            WglrGrid.TextMatrix(Jsqte, 17) = Trim(.Fields("PersonName") & "")                             '职员名称
  1349.            WglrGrid.TextMatrix(Jsqte, 18) = Trim(.Fields("ItemClassCode") & "")                          '项目类别编码
  1350.            WglrGrid.TextMatrix(Jsqte, 19) = Trim(.Fields("ItemClassName") & "")                          '项目类别名称
  1351.            WglrGrid.TextMatrix(Jsqte, 20) = Trim(.Fields("ItemCode") & "")                               '项目编码
  1352.            WglrGrid.TextMatrix(Jsqte, 21) = Trim(.Fields("ItemName") & "")                               '项目名称
  1353.            If .Fields("ItemJfsl") <> 0 Then
  1354.               WglrGrid.TextMatrix(Jsqte, 22) = Trim(Str(.Fields("ItemJfsl")))                            '项目数量
  1355.            End If
  1356.            If .Fields("ItemDfsl") <> 0 Then
  1357.               WglrGrid.TextMatrix(Jsqte, 22) = Trim(Str(.Fields("ItemDfsl")))                            '项目数量
  1358.            End If
  1359.            WglrGrid.TextMatrix(Jsqte, 24) = Trim(.Fields("TranPerson") & "")                             '经办人
  1360.                
  1361.            WglrGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("Digest"))           '摘 要
  1362.            WglrGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("Ccode"))            '科目编码
  1363.            WglrGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("Cname") & "")       '科目名称
  1364.            If .Fields("Jfje") <> 0 Then
  1365.               WglrGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(Str(.Fields("Jfje")))     '借方金额
  1366.            Else
  1367.               WglrGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Trim(Str(.Fields("Dfje")))     '贷方金额
  1368.            End If
  1369.            
  1370.            '<<]
  1371.            
  1372.            WglrGrid.RowHeight(Jsqte) = Sjhgd
  1373.            .MoveNext
  1374.            Jsqte = Jsqte + 1
  1375.          Loop
  1376.       End With
  1377.             
  1378.             
  1379.       '调整网格
  1380.        Call Sub_AdjustGrid
  1381.       
  1382.        '显示备注信息
  1383.        Call Sub_ShowMemo(WglrGrid.Row)
  1384.       
  1385.       '计算合计数据
  1386.        For Jsqte = Qslz To WglrGrid.Cols - 1
  1387.            Call Sjhj(Jsqte)
  1388.        Next Jsqte
  1389.       
  1390. End Sub
  1391. Private Sub Tlb_Action_ButtonClick(ByVal Button As MSComctlLib.Button)             '用户点击工具条
  1392.      
  1393.      '屏蔽文本框,下拉组合框有效性判断
  1394.      
  1395.      Valilock = True
  1396.      
  1397.      '屏蔽网格失去焦点产生的有效性判断
  1398.      
  1399.      changelock = True
  1400.      
  1401.        Select Case Button.Key
  1402.           Case "ymsz"                                          '页面设置
  1403.               Dyymctbl.Show 1
  1404.           Case "yl"                                            '预 览
  1405.              If Fun_Drfrmyxxpd Then
  1406.                 Call bbyl(True)
  1407.              End If
  1408.           Case "dy"                                            '打 印
  1409.              If Fun_Drfrmyxxpd Then
  1410.               Call bbyl(False)
  1411.              End If
  1412.           Case "xz"                                            '新 增
  1413.              Call Sub_AddBill
  1414.           Case "xg"                                            '修 改
  1415.              Call Sub_EditBill
  1416.           Case "sc"                                            '删 除
  1417.              Call Sub_DeleteBill
  1418.           Case "zh"                                            '增 行
  1419.                Call zjlrfl
  1420.           Case "sh"                                            '删 行
  1421.                Call Scdqfl
  1422.           Case "bc"                                            '保 存
  1423.              If Fun_Drfrmyxxpd Then
  1424.                Call Sub_SaveBill
  1425.              End If
  1426.           Case "fq"                                            '放 弃
  1427.              Call Sub_AbandonBill
  1428.           Case "cx"                                            '查 询
  1429.              Call Sub_QueryBill
  1430.           Case "ye"                                            '余 额
  1431.              PZ_FrmYecx.Show 1
  1432.           Case "xx"                                            '选 项
  1433.              Call Sub_Option
  1434.           Case "shsh"                                          '审 核
  1435.              Call Sub_CheckBill
  1436.           Case "shqs"                                          '弃 审
  1437.              Call Sub_AbandonCheck
  1438.           Case "shbc"                                          '标 错
  1439.              Call Sub_ErrorBill
  1440.           Case "qbsh"                                          '全 审
  1441.              Call Sub_CheckAllBill
  1442.           Case "qbfq"                                          '全 弃
  1443.              Call Sub_AbandonAllCheck
  1444.           Case "first"                                         '首 张
  1445.              Call Sub_First
  1446.           Case "prev"                                          '上 张
  1447.              Call Sub_Prev
  1448.           Case "next"                                          '下 张
  1449.              Call Sub_next
  1450.           Case "last"                                          '末 张
  1451.              Call Sub_Last
  1452.           Case "bz"                                            '帮 助
  1453.              Call F1bz
  1454.           Case "fh"                                            '退 出
  1455.              Unload Me
  1456.        End Select
  1457.        
  1458.     '解 锁
  1459.     Valilock = False
  1460.     changelock = False
  1461.         
  1462. End Sub
  1463. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)     '支持热键操作
  1464.    Select Case KeyCode
  1465.       Case vbKeyF5          '增加凭证
  1466.         If Tlb_Action.Buttons("xz").Enabled Then
  1467.            Call Sub_AddBill
  1468.         End If
  1469.       Case vbKeyF3          '修改凭证
  1470.         If Tlb_Action.Buttons("xg").Enabled Then
  1471.            Call Sub_EditBill
  1472.         End If
  1473.       Case vbKeyF6          '保存凭证
  1474.         If Tlb_Action.Buttons("bc").Enabled Then
  1475.            Call Sub_SaveBill
  1476.         End If
  1477.    End Select
  1478. End Sub
  1479. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)        '支持热键操作
  1480.   If Shift = 2 Then
  1481.      Select Case UCase(Chr(KeyCode))
  1482.          Case "P"                   'Ctrl+P 打印
  1483.           If Tlb_Action.Buttons("dy").Enabled Then
  1484.             Call bbyl(False)
  1485.           End If
  1486.      End Select
  1487.   End If
  1488. End Sub
  1489. Private Sub Sub_OperStatus(Str_Status As String)                 '工具条依据不同状态所进行的变化
  1490.   With Tlb_Action
  1491.     Select Case Str_Status
  1492.       Case "10"   '浏览(系统进入、放弃新增单据、填制凭证时删除单据,凭证审核)
  1493.        '工具条
  1494.         .Buttons("dy").Enabled = True      '打印
  1495.         .Buttons("yl").Enabled = True      '预览
  1496.         .Buttons("xz").Enabled = True      '新增
  1497.         .Buttons("xg").Enabled = False     '修改
  1498.         .Buttons("sc").Enabled = False     '删除
  1499.         .Buttons("zh").Enabled = False     '增行
  1500.         .Buttons("sh").Enabled = False     '删行
  1501.         .Buttons("cx").Enabled = True      '查询
  1502.         .Buttons("bc").Enabled = False     '保存
  1503.         .Buttons("fq").Enabled = False     '放弃
  1504.         
  1505.        '录入文本框
  1506.         For Jsqte = Max_Text_Index To 0 Step -1
  1507.             LrText(Jsqte).Enabled = False
  1508.         Next Jsqte
  1509.         
  1510.         Combo_Kjqj.Enabled = False
  1511.         
  1512.         '合计金额大写显示
  1513.         HjGrid.TextMatrix(0, Sydz("003", GridStr(), Szzls)) = Fun_Jezh(Val(HjGrid.TextMatrix(0, Sydz("004", GridStr(), Szzls))))
  1514.         
  1515.       Case "11"   '浏览(放弃修改单据,查询单据)
  1516.          '工具条
  1517.         .Buttons("dy").Enabled = True      '打印
  1518.         .Buttons("yl").Enabled = True      '预览
  1519.         .Buttons("xz").Enabled = True      '新增
  1520.         .Buttons("xg").Enabled = True      '修改
  1521.         .Buttons("sc").Enabled = True      '删除
  1522.         .Buttons("zh").Enabled = False     '增行
  1523.         .Buttons("sh").Enabled = False     '删行
  1524.         .Buttons("cx").Enabled = True      '查询
  1525.         .Buttons("bc").Enabled = False     '保存
  1526.         .Buttons("fq").Enabled = False     '放弃
  1527.         .Buttons("first").Enabled = True   '首张
  1528.         .Buttons("prev").Enabled = True    '上张
  1529.         .Buttons("next").Enabled = True    '下张
  1530.         .Buttons("last").Enabled = True    '末张
  1531.         
  1532.        '录入文本框
  1533.         For Jsqte = Max_Text_Index To 0 Step -1
  1534.             LrText(Jsqte).Enabled = False
  1535.         Next Jsqte
  1536.         
  1537.         Combo_Kjqj.Enabled = False
  1538.         
  1539.         '合计金额大写显示
  1540.         HjGrid.TextMatrix(0, Sydz("003", GridStr(), Szzls)) = Fun_Jezh(Val(HjGrid.TextMatrix(0, Sydz("004", GridStr(), Szzls))))
  1541.       Case "2"   '新增单据
  1542.       
  1543.         '工具条
  1544.         .Buttons("dy").Enabled = False      '打印
  1545.         .Buttons("yl").Enabled = False      '预览
  1546.         .Buttons("xz").Enabled = False      '新增
  1547.         .Buttons("xg").Enabled = False      '修改
  1548.         .Buttons("sc").Enabled = False      '删除
  1549.         .Buttons("zh").Enabled = True       '增行
  1550.         .Buttons("sh").Enabled = True       '删行
  1551.         .Buttons("cx").Enabled = False      '查询
  1552.         .Buttons("bc").Enabled = True       '保存
  1553.         .Buttons("fq").Enabled = True       '放弃
  1554.         
  1555.         '录入文本框
  1556.         For Jsqte = 0 To Max_Text_Index
  1557.             LrText(Jsqte).Enabled = True
  1558.         Next Jsqte
  1559.         
  1560.         Combo_Kjqj.Enabled = True
  1561.         
  1562.         '清空合计大写
  1563.         HjGrid.TextMatrix(0, Sydz("003", GridStr(), Szzls)) = ""
  1564.         
  1565.       Case "30"   '修改
  1566.         
  1567.         '工具条
  1568.         .Buttons("dy").Enabled = False      '打印
  1569.         .Buttons("yl").Enabled = False      '预览
  1570.         .Buttons("xz").Enabled = False      '新增
  1571.         .Buttons("xg").Enabled = False      '修改
  1572.         .Buttons("sc").Enabled = False      '删除
  1573.         .Buttons("zh").Enabled = True       '增行
  1574.         .Buttons("sh").Enabled = True       '删行
  1575.         .Buttons("cx").Enabled = False      '查询
  1576.         .Buttons("bc").Enabled = True       '保存
  1577.         .Buttons("fq").Enabled = True       '放弃
  1578.         .Buttons("first").Enabled = False   '首张
  1579.         .Buttons("prev").Enabled = False    '上张
  1580.         .Buttons("next").Enabled = False    '下张
  1581.         .Buttons("last").Enabled = False    '末张
  1582.         
  1583.         '录入文本框
  1584.         For Jsqte = 0 To Max_Text_Index
  1585.             LrText(Jsqte).Enabled = True
  1586.         Next Jsqte
  1587.         
  1588.         LrText(0).Enabled = False
  1589.         LrText(3).Enabled = False
  1590.         
  1591.         Combo_Kjqj.Enabled = False
  1592.         
  1593.         '清空合计大写
  1594.         HjGrid.TextMatrix(0, Sydz("003", GridStr(), Szzls)) = ""
  1595.     End Select
  1596.   End With
  1597. End Sub
  1598. Private Sub Wbkcl()                                                 '文本框录入之前处理(根据实际情况)
  1599.  Dim xswbrr As String
  1600.  With WglrGrid
  1601.     Zdlrqnr = Trim(.Text)
  1602.     xswbrr = Trim(.Text)
  1603.     
  1604.     If GridBoolean(.Col, 3) Then   '列表框录入
  1605.     
  1606.        '填充列表框程序
  1607.         Call FillCombo(YdCombo, GridStr(.Col, 5), xswbrr, 0)
  1608.     Else
  1609.        Wbkbhlock = True
  1610.        
  1611.          '====以下为用户自定义
  1612.            Ydtext.Text = xswbrr
  1613.          '====以上为用户自定义
  1614.          
  1615.        Wbkbhlock = False
  1616.        Ydtext.SelStart = Len(Ydtext.Text)
  1617.     End If
  1618.  End With
  1619. End Sub
  1620. Private Function sjzdyxxpd(Dqpdwgh As Long, Dqpdwgl As Long)        '录入数据字段有效性判断,同时进行字段录入事后处理
  1621.  Dim Str_JudgeText As String  '临时有效性判断字段内容
  1622.  Dim Coljsq As Long           '临时列计数器
  1623.  Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1624.  
  1625.  With WglrGrid
  1626.     
  1627.     '非录入状态有效性为合法
  1628.     If Yxxpdlock Or .Row < .FixedRows Then
  1629.        sjzdyxxpd = True
  1630.        Exit Function
  1631.     End If
  1632.  
  1633.      Str_JudgeText = Trim(.TextMatrix(Dqpdwgh, Dqpdwgl))
  1634.      Select Case GridStr(Dqpdwgl, 1)
  1635.          
  1636.          '以下为自定义部分[
  1637.          
  1638.             Case "001"          '凭证摘要(如用户录入编码正确,则自动调入摘要内容)
  1639.                
  1640.                If Len(Str_JudgeText) <> 0 Then
  1641.                  SQLSTR = "SELECT * FROM Cwzz_Digest Where DigestCode='" & Str_JudgeText & "'"
  1642.                  Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
  1643.                  If Not RecTemp.EOF Then
  1644.                     .TextMatrix(Dqpdwgh, Sydz("001", GridStr(), Szzls)) = Trim(RecTemp.Fields("DigestText"))
  1645.                  End If
  1646.                  
  1647.                  '保存最后录入的一条凭证分录的摘要内容
  1648.                  Str_Digest = .TextMatrix(Dqpdwgh, Sydz("001", GridStr(), Szzls))
  1649.                  
  1650.                End If
  1651.          
  1652.             Case "002"          '会计科目(如有效则调入科目名称,如有辅助核算则调入辅助核算项录入窗体)
  1653.                   
  1654.                   If Len(Str_JudgeText) <> 0 Then
  1655.                       SQLSTR = "Select Cwzz_AccCode.* ,ItemClassName,ForeignCurrName,AccRate FROM  Cwzz_AccCode " & _
  1656.                       " LEFT OUTER JOIN Cwzz_ItemClass ON Cwzz_AccCode.ItemClassCode = Cwzz_ItemClass.ItemClassCode " & _
  1657.                       " LEFT OUTER JOIN Gy_ForeignCurrency ON Cwzz_AccCode.ForeignCurrCode= Gy_ForeignCurrency.ForeignCurrCode " & _
  1658.                       " Where Ccode='" & Str_JudgeText & "' OR AssCode='" & Str_JudgeText & "'"
  1659.                       Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
  1660.                       With RecTemp
  1661.                            If .EOF Then
  1662.                               Tsxx = "此科目不存在!"
  1663.                               GoTo Lrcwcl
  1664.                            Else
  1665.                               If Not .Fields("EndFlag") Then
  1666.                                  Tsxx = "此科目非末级科目!"
  1667.                                  GoTo Lrcwcl
  1668.                               End If
  1669.                               If .Fields("StopUse") Then
  1670.                                  Tsxx = "此科目已停用"
  1671.                                  GoTo Lrcwcl
  1672.                               End If
  1673.                               
  1674.                               '如果此科目存在且改变过则执行下列操作
  1675.                               
  1676.                               '1.显示科目编码,改变科目名称
  1677.                               WglrGrid.TextMatrix(Dqpdwgh, Sydz("002", GridStr(), Szzls)) = Trim(RecTemp.Fields("Ccode"))
  1678.                               WglrGrid.TextMatrix(Dqpdwgh, Sydz("003", GridStr(), Szzls)) = Trim(RecTemp.Fields("Cname"))
  1679.                               
  1680.                               '2.判断科目进行哪些辅助核算
  1681.                               
  1682.                               
  1683.                               '读入外币汇率
  1684.                               If Not IsNull(RecTemp.Fields("AccRate")) Then
  1685.                                  WglrGrid.TextMatrix(Dqpdwgh, 11) = RecTemp.Fields("AccRate")
  1686.                               Else
  1687.                                  WglrGrid.TextMatrix(Dqpdwgh, 11) = ""
  1688.                               End If
  1689.                               
  1690.                               Call Sub_Drfzhsx(Dqpdwgh, Str_JudgeText)
  1691.                            End If
  1692.                       End With
  1693.                               
  1694.                    Else
  1695.                    
  1696.                        '清除所有辅助核算内容
  1697.                        For Jsqte = 1 To 23
  1698.                            WglrGrid.TextMatrix(Dqpdwgh, Jsqte) = ""
  1699.                        Next Jsqte
  1700.                        .TextMatrix(Dqpdwgh, Sydz("003", GridStr(), Szzls)) = ""
  1701.                        
  1702.                    End If
  1703.                    
  1704.                 Case "004"     '借方金额
  1705.                   '用户如录入借方金额,系统则自动清除贷方金额
  1706.                    If Val(WglrGrid.TextMatrix(Dqpdwgh, Dqpdwgl)) <> 0 Then
  1707.                       WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)) = ""
  1708.                    End If
  1709.                 Case "005"     '贷方金额
  1710.                   '用户如录入贷方金额,系统则自动清除借方金额
  1711.                    If Val(WglrGrid.TextMatrix(Dqpdwgh, Dqpdwgl)) <> 0 Then
  1712.                       WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) = ""
  1713.                    End If
  1714.                    
  1715.                '2.放置字段事后处理程序
  1716.              
  1717.          '以上为自定义部分]
  1718.             
  1719.      End Select
  1720.      
  1721.      '字段录入正确后为零字段清空
  1722.       Call Qkwlzd(Dqpdwgh, Dqpdwgl)
  1723.      
  1724.      '字段录入正确后进行数据合计
  1725.      For Coljsq = Qslz To .Cols - 1
  1726.          Call Sjhj(Coljsq)
  1727.      Next Coljsq
  1728.      sjzdyxxpd = True
  1729.      Yxxpdlock = True
  1730.      Exit Function
  1731.  End With
  1732.   
  1733. Lrcwcl:    '录入错误处理
  1734.   With WglrGrid
  1735.       Call Xtxxts(Tsxx, 0, 1)
  1736.       changelock = True
  1737.       .Select Dqpdwgh, Dqpdwgl
  1738.       changelock = False
  1739.       Call xswbk
  1740.       sjzdyxxpd = False
  1741.       Exit Function
  1742.    End With
  1743. End Function
  1744. Private Function Sjhzyxxpd(ByVal Yxxpdh As Long) As Boolean                  '录入数据行有效性判断,同时进行行处理
  1745.  Dim Lrywlz As Long
  1746.  Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1747.  Dim Bln_AssVali As Boolean   '辅助核算错误
  1748.  With WglrGrid
  1749.   '判断行为空和无效数据行则清除当前行
  1750.   If Yxxpdh > (.Rows - .FixedRows) Then Exit Function
  1751.   If .TextMatrix(Yxxpdh, 0) <> "*" Then
  1752.      Sjhzyxxpd = True
  1753.      Exit Function
  1754.    Else
  1755.      If pdhwk(Yxxpdh) And Yxxpdh + 1 <= .Rows - 1 Then
  1756.          If .TextMatrix(Yxxpdh + 1, 0) <> "*" Then
  1757.             changelock = True
  1758.             .RemoveItem Yxxpdh
  1759.             If .Rows < Pmbcsjhs + .FixedRows + Fzxwghs + 1 Then
  1760.                .AddItem ""
  1761.                .RowHeight(.Rows - 1) = Sjhgd
  1762.             End If
  1763.             changelock = False
  1764.             Sjhzyxxpd = True
  1765.             Exit Function
  1766.          End If
  1767.       End If
  1768.   End If
  1769.   
  1770.   '行没有发生变化则不进行有效性判断
  1771.   If Hyxxpdlock Then
  1772.      Sjhzyxxpd = True
  1773.      Exit Function
  1774.   End If
  1775.   
  1776.    '以下为自定义部分[
  1777.         '1.放置行有效性判断程序
  1778.            '首先进行为空判断(固定不变)
  1779.            For Jsqte = Qslz To .Cols - 1
  1780.                If (GridInt(Jsqte, 5) = 1 And Len(Trim(.TextMatrix(Yxxpdh, Jsqte))) = 0) Or (GridInt(Jsqte, 5) = 2 And Val(Trim(.TextMatrix(Yxxpdh, Jsqte))) = 0) Then
  1781.                   Tsxx = GridStr(Jsqte, 2)
  1782.                   Lrywlz = Jsqte
  1783.                   GoTo Lrcwcl
  1784.                   Exit For
  1785.                End If
  1786.            Next Jsqte
  1787.         '2.[自定义判断(补丁)
  1788.             If Val(Trim(.TextMatrix(Yxxpdh, Sydz("004", GridStr(), Szzls)))) = 0 And Val(Trim(.TextMatrix(Yxxpdh, Sydz("005", GridStr(), Szzls)))) = 0 Then
  1789.                Tsxx = "借方和贷方金额不能同时为零!"
  1790.                Lrywlz = Sydz("004", GridStr(), Szzls)
  1791.                GoTo Lrcwcl
  1792.             End If
  1793.             If Val(Trim(.TextMatrix(Yxxpdh, Sydz("004", GridStr(), Szzls)))) <> 0 And Val(Trim(.TextMatrix(Yxxpdh, Sydz("005", GridStr(), Szzls)))) <> 0 Then
  1794.                Tsxx = "借方和贷方金额不能同时不为零!"
  1795.                Lrywlz = Sydz("004", GridStr(), Szzls)
  1796.                GoTo Lrcwcl
  1797.             End If
  1798.             '判断辅助核算项目是否填写
  1799.             SQLSTR = "Select * FROM Cwzz_AccCode Where Ccode='" & Trim(.TextMatrix(Yxxpdh, Sydz("002", GridStr(), Szzls))) & "'"
  1800.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
  1801.                With RecTemp
  1802.                   If Not .EOF Then
  1803.                   
  1804.                     '如有数量核算且用户选择数量不能为零则数量项不能为零
  1805.                  
  1806.                     If RecTemp.Fields("QuantityFlag") And Chk_Quantity.Value = 1 And Val(WglrGrid.TextMatrix(Yxxpdh, 5)) = 0 Then
  1807.                        Tsxx = "此科目需要数量核算,数量项不能为零"
  1808.                        Lrywlz = Sydz("002", GridStr(), Szzls)
  1809.                        Bln_AssVali = True
  1810.                        GoTo Lrcwcl
  1811.                     End If
  1812.                   
  1813.                     '部门核算则部门不能为空
  1814.                     If RecTemp.Fields("DeptFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 12))) = 0 Then
  1815.                        Tsxx = "此科目需要部门核算,部门项不能为空"
  1816.                        Lrywlz = Sydz("002", GridStr(), Szzls)
  1817.                        Bln_AssVali = True
  1818.                        GoTo Lrcwcl
  1819.                     End If
  1820.                     '往来单位核算则往来单位不能为空
  1821.                     If RecTemp.Fields("CusFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 14))) = 0 Then
  1822.                        Tsxx = "此科目需要往来单位核算,往来单位项不能为空"
  1823.                        Lrywlz = Sydz("002", GridStr(), Szzls)
  1824.                        Bln_AssVali = True
  1825.                        GoTo Lrcwcl
  1826.                     End If
  1827.                     '个人往来核算则个人项不能为空
  1828.                     If RecTemp.Fields("PersonFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 16))) = 0 Then
  1829.                        Tsxx = "此科目需要个人往来核算,个人项不能为空"
  1830.                        Lrywlz = Sydz("002", GridStr(), Szzls)
  1831.                        Bln_AssVali = True
  1832.                        GoTo Lrcwcl
  1833.                     End If
  1834.                     '项目核算则项目不能为空
  1835.                     If RecTemp.Fields("ItemFlag") And Len(Trim(WglrGrid.TextMatrix(Yxxpdh, 20))) = 0 Then
  1836.                        Tsxx = "此科目需要项目核算,核算项目不能为空"
  1837.                        Lrywlz = Sydz("002", GridStr(), Szzls)
  1838.                        Bln_AssVali = True
  1839.                        GoTo Lrcwcl
  1840.                     End If
  1841.                  End If
  1842.               End With
  1843.         '2.放置行处理程序
  1844.    '以上为自定义部分]
  1845.  End With
  1846.  Sjhzyxxpd = True
  1847.  Hyxxpdlock = True
  1848.  Exit Function
  1849. Lrcwcl:      '录入错误处理
  1850.   With WglrGrid
  1851.       Call Xtxxts(Tsxx, 0, 1)
  1852.       changelock = True
  1853.       .Select Yxxpdh, Lrywlz
  1854.       changelock = False
  1855.       '[>>如果辅助核算出现错误则调用辅助核算功能
  1856.       If Bln_AssVali Then
  1857.          Call Sub_Drfzhsx(Yxxpdh, Trim(.TextMatrix(Yxxpdh, Sydz("002", GridStr(), Szzls))))
  1858.          
  1859.          '解决鼠标点击取消造成的换行
  1860.          changelock = True
  1861.            .Select Yxxpdh, Lrywlz
  1862.          changelock = False
  1863.          
  1864.       '<<]
  1865.       Else
  1866.          Call xswbk
  1867.       End If
  1868.       Sjhzyxxpd = False
  1869.       Exit Function
  1870.   End With
  1871. End Function
  1872. Private Sub Lab_Memo_DblClick(Index As Integer)            '点击辅助核算信息列
  1873.   
  1874.   '如果单据操作状态为浏览状态则不能显示录入载体
  1875.    If Trim(Lab_OperStatus.Caption) = "1" Then
  1876.       Exit Sub
  1877.    End If
  1878.   
  1879.   '当科目编码处于录入状态时不能调入辅助核算项目
  1880.   
  1881.   If Ydtext.Visible And GridStr(WglrGrid.Col, 1) = "002" Then
  1882.     Exit Sub
  1883.   End If
  1884.   
  1885.   '当焦点处于非录入区域时也不能调入辅助核算项目
  1886.   
  1887.   If WglrGrid.Row < WglrGrid.FixedRows Then
  1888.      Exit Sub
  1889.   End If
  1890.   
  1891.   '屏蔽文本框,下拉组合框有效性判断
  1892.   
  1893.   Valilock = True
  1894.     Call Sub_Drfzhsx(WglrGrid.Row, Trim(WglrGrid.TextMatrix(WglrGrid.Row, Sydz("002", GridStr(), Szzls))))
  1895.   Valilock = False
  1896.   
  1897. End Sub
  1898. Private Sub Sub_Drfzhsx(Dqpdwgh As Long, Str_JudgeText As String)   '判断科目是否有辅助核算,如有则调入辅助核算窗体
  1899.    '函数参数:当前判断网格行,判断科目
  1900.    
  1901.    Dim Coljsq As Long           '临时列计数器
  1902.    Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1903.    
  1904.    If Len(Str_JudgeText) <> 0 Then
  1905.        SQLSTR = "Select Cwzz_AccCode.* ,ItemClassName,ForeignCurrName,ConVertFlag FROM  Cwzz_AccCode " & _
  1906.        " LEFT OUTER JOIN Cwzz_ItemClass ON Cwzz_AccCode.ItemClassCode = Cwzz_ItemClass.ItemClassCode " & _
  1907.        " LEFT OUTER JOIN Gy_ForeignCurrency ON Cwzz_AccCode.ForeignCurrCode= Gy_ForeignCurrency.ForeignCurrCode " & _
  1908.        " Where Ccode='" + Str_JudgeText + "' and EndFlag=1 and StopUse=0"
  1909.        Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
  1910.        With RecTemp
  1911.             If .EOF Then
  1912.                Exit Sub
  1913.             Else
  1914.                '判断科目进行哪些辅助核算
  1915.                
  1916.                   '清空辅助核算标识
  1917.                   For Jsqte = 0 To Int_AssCount - 1
  1918.                        Bln_AssShow(Jsqte) = False
  1919.                   Next Jsqte
  1920.                                                    
  1921.                   '银行科目--结算方式、票号、日期
  1922.                    If Trim(RecTemp.Fields("Cproperty")) = "银行" Then
  1923.                       Bln_AssShow(0) = True  '结算方式
  1924.                       Bln_AssShow(1) = True  '票号
  1925.                       Bln_AssShow(2) = True  '日期
  1926.                       Bln_AssShow(12) = True '经办人
  1927.                    Else
  1928.                       WglrGrid.TextMatrix(Dqpdwgh, 1) = ""
  1929.                       WglrGrid.TextMatrix(Dqpdwgh, 2) = ""
  1930.                       WglrGrid.TextMatrix(Dqpdwgh, 3) = ""
  1931.                       WglrGrid.TextMatrix(Dqpdwgh, 4) = ""
  1932.                    End If
  1933.                    
  1934.                    '数量核算--数量,单价
  1935.                    If RecTemp.Fields("QuantityFlag") Then
  1936.                       Bln_AssShow(3) = True  '数量
  1937.                       Bln_AssShow(4) = True  '单价
  1938.                       WglrGrid.TextMatrix(Dqpdwgh, 6) = ""
  1939.                       WglrGrid.TextMatrix(Dqpdwgh, 7) = Trim(.Fields("measure")) '单位
  1940.                    Else
  1941.                       WglrGrid.TextMatrix(Dqpdwgh, 5) = ""
  1942.                       WglrGrid.TextMatrix(Dqpdwgh, 6) = ""
  1943.                       WglrGrid.TextMatrix(Dqpdwgh, 7) = ""
  1944.                    End If
  1945.                    
  1946.                    '外币核算--外币,汇率
  1947.                    If RecTemp.Fields("ForeignFlag") Then
  1948.                       WglrGrid.TextMatrix(Dqpdwgh, 8) = Trim(.Fields("ForeignCurrCode"))
  1949.                       WglrGrid.TextMatrix(Dqpdwgh, 9) = Trim(.Fields("ForeignCurrName"))
  1950.                       Bln_AssShow(5) = True  '外币金额
  1951.                       Bln_AssShow(6) = True  '汇率
  1952.                    Else
  1953.                       WglrGrid.TextMatrix(Dqpdwgh, 8) = ""
  1954.                       WglrGrid.TextMatrix(Dqpdwgh, 9) = ""
  1955.                       WglrGrid.TextMatrix(Dqpdwgh, 10) = ""
  1956.                       WglrGrid.TextMatrix(Dqpdwgh, 11) = ""
  1957.                    End If
  1958.                    
  1959.                    '部门核算
  1960.                    If RecTemp.Fields("DeptFlag") Then
  1961.                       Bln_AssShow(7) = True  '部门
  1962.                    Else
  1963.                       WglrGrid.TextMatrix(Dqpdwgh, 12) = ""
  1964.                       WglrGrid.TextMatrix(Dqpdwgh, 13) = ""
  1965.                    End If
  1966.                    
  1967.                    '单位核算
  1968.                    If RecTemp.Fields("CusFlag") Then
  1969.                       Bln_AssShow(8) = True  '单位
  1970.                       Bln_AssShow(12) = True '经办人
  1971.                    Else
  1972.                       WglrGrid.TextMatrix(Dqpdwgh, 14) = ""
  1973.                       WglrGrid.TextMatrix(Dqpdwgh, 15) = ""
  1974.                       If Trim(RecTemp.Fields("Cproperty")) <> "银行" Then
  1975.                          WglrGrid.TextMatrix(Dqpdwgh, 24) = ""
  1976.                       End If
  1977.                    End If
  1978.                    
  1979.                    '个人核算
  1980.                    If RecTemp.Fields("PersonFlag") Then
  1981.                       Bln_AssShow(9) = True  '个人
  1982.                    Else
  1983.                       WglrGrid.TextMatrix(Dqpdwgh, 16) = ""
  1984.                       WglrGrid.TextMatrix(Dqpdwgh, 17) = ""
  1985.                    End If
  1986.                    
  1987.                    '项目核算
  1988.                    If RecTemp.Fields("ItemFlag") Then
  1989.                       If WglrGrid.TextMatrix(Dqpdwgh, 18) <> Trim(.Fields("ItemClassCode")) Then
  1990.                          WglrGrid.TextMatrix(Dqpdwgh, 20) = ""
  1991.                          WglrGrid.TextMatrix(Dqpdwgh, 21) = ""
  1992.                          WglrGrid.TextMatrix(Dqpdwgh, 22) = ""
  1993.                          WglrGrid.TextMatrix(Dqpdwgh, 23) = ""
  1994.                       End If
  1995.                       
  1996.                       WglrGrid.TextMatrix(Dqpdwgh, 18) = Trim(.Fields("ItemClassCode")) '项目类别编码
  1997.                       WglrGrid.TextMatrix(Dqpdwgh, 19) = Trim(.Fields("ItemClassName")) '项目类别名称
  1998.                       
  1999.                       Bln_AssShow(10) = True  '项目
  2000.                       Bln_AssShow(11) = True  '项目数量
  2001.                    Else
  2002.                       WglrGrid.TextMatrix(Dqpdwgh, 18) = ""
  2003.                       WglrGrid.TextMatrix(Dqpdwgh, 19) = ""
  2004.                       WglrGrid.TextMatrix(Dqpdwgh, 20) = ""
  2005.                       WglrGrid.TextMatrix(Dqpdwgh, 21) = ""
  2006.                       WglrGrid.TextMatrix(Dqpdwgh, 22) = ""
  2007.                       WglrGrid.TextMatrix(Dqpdwgh, 23) = ""
  2008.                       
  2009.                    End If
  2010.                
  2011.                    '调入科目辅助核算项目
  2012.                    For Jsqte = 0 To Int_AssCount - 1
  2013.                       If Bln_AssShow(Jsqte) Then
  2014.                          PZ_FrmAss.lab_GridRow = Dqpdwgh
  2015.                          Call Kmfzhsx(Dqpdwgh)
  2016.                          
  2017.                          '判断用户录入数量单价是否为零,如不为零则由数量*单价=金额
  2018.                          '(考虑销售收入主要为贷方则借贷金额均为零时,金额自动填入贷方)
  2019.                          If Val(WglrGrid.TextMatrix(Dqpdwgh, 5)) <> 0 And Val(WglrGrid.TextMatrix(Dqpdwgh, 6)) <> 0 Then
  2020.                             If Val(Trim(WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)))) <> 0 Then
  2021.                                WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 5)) * Val(WglrGrid.TextMatrix(Dqpdwgh, 6)), "##." + String(Xtjexsws, "0"))
  2022.                             Else
  2023.                                WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 5)) * Val(WglrGrid.TextMatrix(Dqpdwgh, 6)), "##." + String(Xtjexsws, "0"))
  2024.                             End If
  2025.                          End If
  2026.                          
  2027.                          '判断用户录入外币汇率是否为零,如不为零则由外币*汇率=金额
  2028.                          '(借贷金额均为零时,金额自动填入借方)
  2029.                          If Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) <> 0 And Val(WglrGrid.TextMatrix(Dqpdwgh, 11)) <> 0 Then
  2030.                             If Val(Trim(WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)))) <> 0 Then
  2031.                             
  2032.                                '判断外币折算方式
  2033.                                If RecTemp.Fields("ConVertFlag") Then
  2034.                                   WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) / Val(WglrGrid.TextMatrix(Dqpdwgh, 11)), "##." + String(Xtjexsws, "0"))
  2035.                                Else
  2036.                                   WglrGrid.TextMatrix(Dqpdwgh, Sydz("005", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) * Val(WglrGrid.TextMatrix(Dqpdwgh, 11)), "##." + String(Xtjexsws, "0"))
  2037.                                End If
  2038.                             Else
  2039.                             
  2040.                                 '判断外币折算方式
  2041.                                If RecTemp.Fields("ConVertFlag") Then
  2042.                                   WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) / Val(WglrGrid.TextMatrix(Dqpdwgh, 11)), "##." + String(Xtjexsws, "0"))
  2043.                                Else
  2044.                                    WglrGrid.TextMatrix(Dqpdwgh, Sydz("004", GridStr(), Szzls)) = Format(Val(WglrGrid.TextMatrix(Dqpdwgh, 10)) * Val(WglrGrid.TextMatrix(Dqpdwgh, 11)), "##." + String(Xtjexsws, "0"))
  2045.                                End If
  2046.                             End If
  2047.                          End If
  2048.                          
  2049.                          Exit For
  2050.                       End If
  2051.                    Next Jsqte
  2052.                End If
  2053.         End With
  2054.         
  2055.          '计算合计数据
  2056.         For Coljsq = Qslz To WglrGrid.Cols - 1
  2057.             Call Sjhj(Coljsq)
  2058.         Next Coljsq
  2059.         
  2060.         '重新显示辅助核算信息
  2061.         Call Sub_ShowMemo(WglrGrid.Row)
  2062.         
  2063.     End If
  2064. End Sub
  2065. Private Sub Kmfzhsx(Lng_GridRow As Long)                  '调用科目辅助核算项
  2066.     '过程函数;Lng_gridrow当前网格调入辅助核算行
  2067.     Dim Kjqstop#, Kjqsleft#, Kjjg#, Ctzxgd#, Kjxsgs%, Jsqte%
  2068.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  2069.     Kjqstop = 300          '控件显示起始高度
  2070.     Kjqsleft = 300         '控件显示起始左边界
  2071.     Kjjg = 450             '控件显示间隔
  2072.     Kjxsgs = 0             '控件显示个数
  2073.     Ctzxgd = 1500          '窗体显示最小高度
  2074.     With PZ_FrmAss          '辅助核算项目窗体
  2075.       .Caption = "辅助核算项目_" + Trim(WglrGrid.TextMatrix(Lng_GridRow, Sydz("003", GridStr(), Szzls)))
  2076.       For Jsqte = 0 To Int_AssCount - 1
  2077.          If Bln_AssShow(Jsqte) Then
  2078.             .TsLabel(Jsqte).Visible = True
  2079.             .TsLabel(Jsqte).Move Kjqsleft, Kjqstop + Kjxsgs * Kjjg
  2080.             .LrText(Jsqte).Visible = True
  2081.             .LrText(Jsqte).Move .TsLabel(Jsqte).Left + .TsLabel(Jsqte).Width + 50, .TsLabel(Jsqte).Top - 100
  2082.             If Bln_AssHelp(Jsqte) Then
  2083.                .Ydcommand1(Jsqte).Visible = True
  2084.                .Ydcommand1(Jsqte).Move .LrText(Jsqte).Left + .LrText(Jsqte).Width, .LrText(Jsqte).Top, .Ydcommand1(Jsqte).Width, .LrText(Jsqte).Height
  2085.             End If
  2086.             Kjxsgs = Kjxsgs + 1
  2087.             Select Case Jsqte
  2088.                Case 0     '结算方式
  2089.                  .LrText(Jsqte).Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 1))
  2090.                  .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 2))
  2091.                Case 1     '票号
  2092.                  .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 3))
  2093.                Case 2     '发生日期
  2094.                  .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 4))
  2095.                Case 3     '数量
  2096.                  .LrText(Jsqte).Text = WglrGrid.TextMatrix(Lng_GridRow, 5)
  2097.                  .Lab_Measure = Trim(WglrGrid.TextMatrix(Lng_GridRow, 7))
  2098.                  .Lab_Measure.Move .LrText(Jsqte).Left + .LrText(Jsqte).Width + 50, .LrText(Jsqte).Top + 100
  2099.                Case 4     '单价
  2100.                  If Val(WglrGrid.TextMatrix(Lng_GridRow, Sydz("004", GridStr(), Szzls))) <> 0 And Val(WglrGrid.TextMatrix(Lng_GridRow, 5)) <> 0 Then
  2101.                     .LrText(Jsqte).Text = Val(WglrGrid.TextMatrix(Lng_GridRow, Sydz("004", GridStr(), Szzls))) / Val(WglrGrid.TextMatrix(Lng_GridRow, 5))
  2102.                  Else
  2103.                     If Val(WglrGrid.TextMatrix(Lng_GridRow, Sydz("005", GridStr(), Szzls))) <> 0 And Val(WglrGrid.TextMatrix(Lng_GridRow, 5)) <> 0 Then
  2104.                        .LrText(Jsqte).Text = Val(WglrGrid.TextMatrix(Lng_GridRow, Sydz("005", GridStr(), Szzls))) / Val(WglrGrid.TextMatrix(Lng_GridRow, 5))
  2105.                     End If
  2106.                  End If
  2107.                Case 5     '外币金额
  2108.                  .LrText(Jsqte).Text = WglrGrid.TextMatrix(Lng_GridRow, 10)
  2109.                  .Lab_ForeignName.Caption = "(" + Trim(WglrGrid.TextMatrix(Lng_GridRow, 9)) + ")"
  2110.                  .Lab_ForeignName.Move .LrText(Jsqte).Left + .LrText(Jsqte).Width + 50, .LrText(Jsqte).Top + 100
  2111.                Case 6     '汇率
  2112.                  .LrText(Jsqte).Text = WglrGrid.TextMatrix(Lng_GridRow, 11)
  2113.                Case 7     '部门
  2114.                  .LrText(Jsqte).Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 12))
  2115.                  .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 13))
  2116.                Case 8     '单位
  2117.                  .LrText(Jsqte).Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 14))
  2118.                  .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 15))
  2119.                Case 9     '个人
  2120.                  .LrText(Jsqte).Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 16))
  2121.                  .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 17))
  2122.                Case 10     '项目
  2123.                  .Lab_ItemClass.Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 18))
  2124.                  .Lab_ItemClass.Caption = "(" + Trim(WglrGrid.TextMatrix(Lng_GridRow, 19)) + ")"
  2125.                  .Lab_ItemClass.Move .LrText(Jsqte).Left + .LrText(Jsqte).Width + 400, .LrText(Jsqte).Top + 100
  2126.                  .LrText(Jsqte).Tag = Trim(WglrGrid.TextMatrix(Lng_GridRow, 20))
  2127.                  .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 21))
  2128.                  SQLSTR = "select * from Cwzz_item where ItemClassCode='" & .Lab_ItemClass.Tag & "' and ItemCode='" & Trim(.LrText(10).Tag) & "'"
  2129.                  Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SQLSTR)
  2130.                  If Not RecTemp.EOF Then
  2131.                     If RecTemp.Fields("QuantityFlag") Then
  2132.                        .LrText(11).Text = WglrGrid.TextMatrix(Lng_GridRow, 22)
  2133.                        .Lab_ItemMeasure = Trim(RecTemp.Fields("Measure"))
  2134.                     End If
  2135.                  End If
  2136.                Case 11
  2137.                  .Lab_ItemMeasure.Move .LrText(11).Left + .LrText(11).Width + 50, .LrText(11).Top + 50
  2138.                Case 12      '经办人
  2139.                  .LrText(Jsqte).Text = Trim(WglrGrid.TextMatrix(Lng_GridRow, 24))
  2140.             End Select
  2141.          Else
  2142.             .TsLabel(Jsqte).Visible = False
  2143.             .LrText(Jsqte).Visible = False
  2144.              If Bln_AssHelp(Jsqte) Then
  2145.                .Ydcommand1(Jsqte).Visible = False
  2146.              End If
  2147.          End If
  2148.      Next Jsqte
  2149.         If Kjqstop * 3 + Kjxsgs * Kjjg > Ctzxgd Then
  2150.            .Height = Kjqstop * 3 + Kjxsgs * Kjjg
  2151.         Else
  2152.            .Height = Ctzxgd
  2153.         End If
  2154.       
  2155.       '加锁
  2156.       changelock = True
  2157.         .Show 1
  2158.       changelock = False
  2159.        
  2160.      End With
  2161. End Sub
  2162. Private Sub Sub_ShowMemo(Lng_GridRow)                                    '显示网格备注项
  2163.   '函数参数:网格行
  2164.   
  2165.   Dim Str_Memo As String
  2166.   
  2167.   Str_Memo = ""
  2168.   With WglrGrid
  2169.     If Len(Trim(.TextMatrix(Lng_GridRow, 2))) <> 0 Then
  2170.        Str_Memo = Str_Memo + "结算方式:" + Trim(.TextMatrix(Lng_GridRow, 2)) + Space(2)
  2171.     End If
  2172.     If Len(Trim(.TextMatrix(Lng_GridRow, 3))) <> 0 Then
  2173.        Str_Memo = Str_Memo + "票号:" + Trim(.TextMatrix(Lng_GridRow, 3)) + Space(2)
  2174.     End If
  2175.     If Len(Trim(.TextMatrix(Lng_GridRow, 4))) <> 0 Then
  2176.        Str_Memo = Str_Memo + "发生日期:" + Trim(.TextMatrix(Lng_GridRow, 4)) + Space(2)
  2177.     End If
  2178.     If Val(.TextMatrix(Lng_GridRow, 5)) <> 0 Then
  2179.        Str_Memo = Str_Memo + "数量:" + Format(Trim(.TextMatrix(Lng_GridRow, 5)), "#,##0." + String(Xtslxsws, "0")) + Trim(.TextMatrix(Lng_GridRow, 7)) + Space(2)
  2180.     End If
  2181.     
  2182.     '显示单价
  2183.     
  2184.     If Val(.TextMatrix(Lng_GridRow, Sydz("004", GridStr(), Szzls))) <> 0 And Val(.TextMatrix(Lng_GridRow, 5)) <> 0 Then
  2185.        Str_Memo = Str_Memo + "单价:" + Format(Val(.TextMatrix(Lng_GridRow, Sydz("004", GridStr(), Szzls))) / Val(.TextMatrix(Lng_GridRow, 5)), "#,##0." + String(Xtdjxsws, "0"))
  2186.     Else
  2187.        If Val(.TextMatrix(Lng_GridRow, Sydz("005", GridStr(), Szzls))) <> 0 And Val(.TextMatrix(Lng_GridRow, 5)) <> 0 Then
  2188.           Str_Memo = Str_Memo + "单价:" + Format(Val(.TextMatrix(Lng_GridRow, Sydz("005", GridStr(), Szzls))) / Val(.TextMatrix(Lng_GridRow, 5)), "#,##0." + String(Xtdjxsws, "0"))
  2189.        End If
  2190.     End If
  2191.     
  2192.     If Val(.TextMatrix(Lng_GridRow, 10)) <> 0 Then
  2193.        Str_Memo = Str_Memo + "外币:" + Format(Trim(.TextMatrix(Lng_GridRow, 10)), "#,##0." + String(Xtjexsws, "0")) + Trim(WglrGrid.TextMatrix(Lng_GridRow, 9)) + Space(2)
  2194.     End If
  2195.     If Val(.TextMatrix(Lng_GridRow, 11)) <> 0 Then
  2196.        Str_Memo = Str_Memo + "汇率:" + Trim(.TextMatrix(Lng_GridRow, 11)) + Space(2)
  2197.     End If
  2198.     If Len(Trim(.TextMatrix(Lng_GridRow, 13))) <> 0 Then
  2199.        Str_Memo = Str_Memo + "部门:" + Trim(.TextMatrix(Lng_GridRow, 13)) + Space(2)
  2200.     End If
  2201.     If Len(Trim(.TextMatrix(Lng_GridRow, 15))) <> 0 Then
  2202.        Str_Memo = Str_Memo + "往来单位:" + Trim(.TextMatrix(Lng_GridRow, 15)) + Space(2)
  2203.     End If
  2204.     If Len(Trim(.TextMatrix(Lng_GridRow, 17))) <> 0 Then
  2205.        Str_Memo = Str_Memo + "个人:" + Trim(.TextMatrix(Lng_GridRow, 17)) + Space(2)
  2206.     End If
  2207.     If Len(Trim(.TextMatrix(Lng_GridRow, 21))) <> 0 Then
  2208.        Str_Memo = Str_Memo + "项目类别:" + Trim(.TextMatrix(Lng_GridRow, 19)) + Space(2) + "核算项目:" + Trim(.TextMatrix(Lng_GridRow, 21)) + Space(2)
  2209.     End If