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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  3. Begin VB.Form FAVari_Variation 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "固定资产变动"
  6.    ClientHeight    =   6570
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   9720
  10.    HelpContextID   =   503001
  11.    Icon            =   "固定资产变动.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    LinkTopic       =   "Form1"
  14.    LockControls    =   -1  'True
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    ScaleHeight     =   6570
  18.    ScaleWidth      =   9720
  19.    ShowInTaskbar   =   0   'False
  20.    StartUpPosition =   2  '屏幕中心
  21.    Begin VB.Frame Frame1 
  22.       BeginProperty Font 
  23.          Name            =   "宋体"
  24.          Size            =   10.5
  25.          Charset         =   134
  26.          Weight          =   700
  27.          Underline       =   0   'False
  28.          Italic          =   0   'False
  29.          Strikethrough   =   0   'False
  30.       EndProperty
  31.       ForeColor       =   &H00000000&
  32.       Height          =   5895
  33.       Left            =   3270
  34.       TabIndex        =   16
  35.       Top             =   630
  36.       Width           =   6405
  37.       Begin VB.CommandButton YdCommand 
  38.          Height          =   300
  39.          Index           =   12
  40.          Left            =   5895
  41.          Picture         =   "固定资产变动.frx":1042
  42.          Style           =   1  'Graphical
  43.          TabIndex        =   73
  44.          Top             =   2175
  45.          Width           =   300
  46.       End
  47.       Begin VB.CommandButton YdCommand 
  48.          Height          =   300
  49.          Index           =   10
  50.          Left            =   5895
  51.          Picture         =   "固定资产变动.frx":13CC
  52.          Style           =   1  'Graphical
  53.          TabIndex        =   72
  54.          Top             =   1810
  55.          Width           =   300
  56.       End
  57.       Begin VB.CommandButton YdCommand 
  58.          Height          =   300
  59.          Index           =   3
  60.          Left            =   5895
  61.          Picture         =   "固定资产变动.frx":1756
  62.          Style           =   1  'Graphical
  63.          TabIndex        =   71
  64.          Top             =   1445
  65.          Width           =   300
  66.       End
  67.       Begin VB.ComboBox Com_DeprMethod 
  68.          Enabled         =   0   'False
  69.          ForeColor       =   &H00000000&
  70.          Height          =   300
  71.          Index           =   1
  72.          ItemData        =   "固定资产变动.frx":1AE0
  73.          Left            =   4140
  74.          List            =   "固定资产变动.frx":1AF9
  75.          Style           =   2  'Dropdown List
  76.          TabIndex        =   5
  77.          Top             =   2540
  78.          Width           =   2055
  79.       End
  80.       Begin VB.ComboBox Com_DeprMethod 
  81.          Enabled         =   0   'False
  82.          Height          =   300
  83.          Index           =   0
  84.          ItemData        =   "固定资产变动.frx":1B7B
  85.          Left            =   1050
  86.          List            =   "固定资产变动.frx":1B94
  87.          Style           =   2  'Dropdown List
  88.          TabIndex        =   62
  89.          Top             =   2540
  90.          Width           =   2055
  91.       End
  92.       Begin VB.CommandButton YdCommand 
  93.          Height          =   300
  94.          Index           =   0
  95.          Left            =   2790
  96.          Picture         =   "固定资产变动.frx":1C16
  97.          Style           =   1  'Graphical
  98.          TabIndex        =   35
  99.          Top             =   1080
  100.          Width           =   300
  101.       End
  102.       Begin VB.CommandButton QdCommand 
  103.          Caption         =   "生成变动单"
  104.          Enabled         =   0   'False
  105.          Height          =   300
  106.          Left            =   5010
  107.          TabIndex        =   13
  108.          Top             =   5490
  109.          Width           =   1215
  110.       End
  111.       Begin VB.TextBox lrtext 
  112.          Enabled         =   0   'False
  113.          ForeColor       =   &H00000000&
  114.          Height          =   300
  115.          Index           =   8
  116.          Left            =   1050
  117.          TabIndex        =   12
  118.          Text            =   "8"
  119.          Top             =   5100
  120.          Width           =   5145
  121.       End
  122.       Begin VB.TextBox lrtext 
  123.          Enabled         =   0   'False
  124.          ForeColor       =   &H00000000&
  125.          Height          =   300
  126.          Index           =   7
  127.          Left            =   4140
  128.          TabIndex        =   11
  129.          Text            =   "7"
  130.          Top             =   4730
  131.          Width           =   2055
  132.       End
  133.       Begin VB.TextBox lrtext 
  134.          Enabled         =   0   'False
  135.          Height          =   300
  136.          Index           =   6
  137.          Left            =   1050
  138.          TabIndex        =   32
  139.          Text            =   "6"
  140.          Top             =   4730
  141.          Width           =   2055
  142.       End
  143.       Begin VB.TextBox lrtext 
  144.          Enabled         =   0   'False
  145.          ForeColor       =   &H00000000&
  146.          Height          =   300
  147.          Index           =   5
  148.          Left            =   4140
  149.          TabIndex        =   10
  150.          Text            =   "5"
  151.          Top             =   4365
  152.          Width           =   2055
  153.       End
  154.       Begin VB.TextBox lrtext 
  155.          Enabled         =   0   'False
  156.          Height          =   300
  157.          Index           =   4
  158.          Left            =   1050
  159.          TabIndex        =   30
  160.          Text            =   "4"
  161.          Top             =   4365
  162.          Width           =   2055
  163.       End
  164.       Begin VB.TextBox lrtext 
  165.          Enabled         =   0   'False
  166.          Height          =   300
  167.          Index           =   1
  168.          Left            =   4140
  169.          TabIndex        =   1
  170.          Text            =   "1"
  171.          Top             =   1080
  172.          Width           =   2055
  173.       End
  174.       Begin VB.TextBox lrtext 
  175.          Enabled         =   0   'False
  176.          Height          =   300
  177.          Index           =   0
  178.          Left            =   1050
  179.          TabIndex        =   0
  180.          Text            =   "0"
  181.          Top             =   1080
  182.          Width           =   1755
  183.       End
  184.       Begin VB.TextBox lrtext 
  185.          Enabled         =   0   'False
  186.          Height          =   300
  187.          Index           =   17
  188.          Left            =   1050
  189.          TabIndex        =   40
  190.          Text            =   "17"
  191.          Top             =   4000
  192.          Width           =   2055
  193.       End
  194.       Begin VB.TextBox lrtext 
  195.          Enabled         =   0   'False
  196.          Height          =   300
  197.          Index           =   15
  198.          Left            =   1050
  199.          TabIndex        =   39
  200.          Text            =   "15"
  201.          Top             =   3635
  202.          Width           =   2055
  203.       End
  204.       Begin VB.TextBox lrtext 
  205.          Enabled         =   0   'False
  206.          Height          =   300
  207.          Index           =   13
  208.          Left            =   1050
  209.          TabIndex        =   38
  210.          Text            =   "13"
  211.          Top             =   3270
  212.          Width           =   2055
  213.       End
  214.       Begin VB.TextBox lrtext 
  215.          Enabled         =   0   'False
  216.          ForeColor       =   &H00000000&
  217.          Height          =   300
  218.          Index           =   18
  219.          Left            =   4140
  220.          TabIndex        =   9
  221.          Text            =   "18"
  222.          Top             =   4000
  223.          Width           =   2055
  224.       End
  225.       Begin VB.TextBox lrtext 
  226.          Enabled         =   0   'False
  227.          ForeColor       =   &H00000000&
  228.          Height          =   300
  229.          Index           =   16
  230.          Left            =   4140
  231.          TabIndex        =   8
  232.          Text            =   "16"
  233.          Top             =   3635
  234.          Width           =   2055
  235.       End
  236.       Begin VB.TextBox lrtext 
  237.          Enabled         =   0   'False
  238.          ForeColor       =   &H00000000&
  239.          Height          =   300
  240.          Index           =   14
  241.          Left            =   4140
  242.          TabIndex        =   7
  243.          Text            =   "14"
  244.          Top             =   3270
  245.          Width           =   2055
  246.       End
  247.       Begin VB.TextBox lrtext 
  248.          Enabled         =   0   'False
  249.          ForeColor       =   &H00000000&
  250.          Height          =   300
  251.          Index           =   3
  252.          Left            =   4140
  253.          TabIndex        =   2
  254.          Text            =   "3"
  255.          Top             =   1445
  256.          Width           =   1755
  257.       End
  258.       Begin VB.TextBox lrtext 
  259.          Enabled         =   0   'False
  260.          ForeColor       =   &H00000000&
  261.          Height          =   300
  262.          Index           =   12
  263.          Left            =   4140
  264.          TabIndex        =   4
  265.          Text            =   "12"
  266.          Top             =   2175
  267.          Width           =   1755
  268.       End
  269.       Begin VB.TextBox lrtext 
  270.          Enabled         =   0   'False
  271.          ForeColor       =   &H00000000&
  272.          Height          =   300
  273.          Index           =   10
  274.          Left            =   4140
  275.          TabIndex        =   3
  276.          Text            =   "10"
  277.          Top             =   1810
  278.          Width           =   1755
  279.       End
  280.       Begin VB.TextBox lrtext 
  281.          Enabled         =   0   'False
  282.          Height          =   300
  283.          Index           =   2
  284.          Left            =   1050
  285.          TabIndex        =   28
  286.          Text            =   "2"
  287.          Top             =   1445
  288.          Width           =   2055
  289.       End
  290.       Begin VB.TextBox lrtext 
  291.          Enabled         =   0   'False
  292.          Height          =   300
  293.          Index           =   11
  294.          Left            =   1050
  295.          TabIndex        =   37
  296.          Text            =   "11"
  297.          Top             =   2175
  298.          Width           =   2055
  299.       End
  300.       Begin VB.TextBox lrtext 
  301.          Enabled         =   0   'False
  302.          Height          =   300
  303.          Index           =   9
  304.          Left            =   1050
  305.          TabIndex        =   36
  306.          Text            =   "9"
  307.          Top             =   1810
  308.          Width           =   2055
  309.       End
  310.       Begin VB.TextBox lrtext 
  311.          Enabled         =   0   'False
  312.          Height          =   300
  313.          Index           =   19
  314.          Left            =   1050
  315.          TabIndex        =   46
  316.          Text            =   "19"
  317.          Top             =   2905
  318.          Width           =   2055
  319.       End
  320.       Begin VB.TextBox lrtext 
  321.          Enabled         =   0   'False
  322.          ForeColor       =   &H00000000&
  323.          Height          =   300
  324.          Index           =   20
  325.          Left            =   4140
  326.          TabIndex        =   6
  327.          Text            =   "20"
  328.          Top             =   2905
  329.          Width           =   2055
  330.       End
  331.       Begin VB.Label Lbl_Name 
  332.          AutoSize        =   -1  'True
  333.          Caption         =   "资产名称:"
  334.          Height          =   180
  335.          Left            =   240
  336.          TabIndex        =   70
  337.          Top             =   660
  338.          Width           =   810
  339.       End
  340.       Begin VB.Label Lbl_FAName 
  341.          BorderStyle     =   1  'Fixed Single
  342.          Height          =   240
  343.          Left            =   1050
  344.          TabIndex        =   69
  345.          Top             =   630
  346.          Width           =   1050
  347.       End
  348.       Begin VB.Label lbl_Y 
  349.          AutoSize        =   -1  'True
  350.          Caption         =   "会计年度:"
  351.          ForeColor       =   &H00000080&
  352.          Height          =   180
  353.          Left            =   2160
  354.          TabIndex        =   68
  355.          Top             =   660
  356.          Width           =   810
  357.       End
  358.       Begin VB.Label Xt_Year 
  359.          AutoSize        =   -1  'True
  360.          BorderStyle     =   1  'Fixed Single
  361.          ForeColor       =   &H00000000&
  362.          Height          =   240
  363.          Left            =   3000
  364.          TabIndex        =   67
  365.          Top             =   630
  366.          Width           =   480
  367.       End
  368.       Begin VB.Label Period 
  369.          AutoSize        =   -1  'True
  370.          Caption         =   "期间:"
  371.          ForeColor       =   &H00000080&
  372.          Height          =   180
  373.          Left            =   3570
  374.          TabIndex        =   66
  375.          Top             =   660
  376.          Width           =   450
  377.       End
  378.       Begin VB.Label Xt_Period 
  379.          BorderStyle     =   1  'Fixed Single
  380.          ForeColor       =   &H00000000&
  381.          Height          =   240
  382.          Left            =   4050
  383.          TabIndex        =   65
  384.          Top             =   630
  385.          Width           =   240
  386.       End
  387.       Begin VB.Label Xt_Czy 
  388.          BorderStyle     =   1  'Fixed Single
  389.          ForeColor       =   &H00000000&
  390.          Height          =   240
  391.          Left            =   5025
  392.          TabIndex        =   64
  393.          Top             =   630
  394.          Width           =   1170
  395.       End
  396.       Begin VB.Label Czy 
  397.          AutoSize        =   -1  'True
  398.          Caption         =   "操作员:"
  399.          ForeColor       =   &H00000080&
  400.          Height          =   180
  401.          Left            =   4380
  402.          TabIndex        =   63
  403.          Top             =   660
  404.          Width           =   630
  405.       End
  406.       Begin VB.Label Label7 
  407.          BackColor       =   &H00000080&
  408.          BorderStyle     =   1  'Fixed Single
  409.          Height          =   180
  410.          Left            =   3660
  411.          TabIndex        =   61
  412.          Top             =   5550
  413.          Width           =   375
  414.       End
  415.       Begin VB.Label Label6 
  416.          AutoSize        =   -1  'True
  417.          Caption         =   "变动后:"
  418.          Height          =   180
  419.          Left            =   3060
  420.          TabIndex        =   60
  421.          Top             =   5550
  422.          Width           =   630
  423.       End
  424.       Begin VB.Label Label4 
  425.          BackColor       =   &H00000000&
  426.          BorderStyle     =   1  'Fixed Single
  427.          Height          =   180
  428.          Left            =   2430
  429.          TabIndex        =   59
  430.          Top             =   5550
  431.          Width           =   375
  432.       End
  433.       Begin VB.Label Label2 
  434.          AutoSize        =   -1  'True
  435.          Caption         =   "变动前:"
  436.          Height          =   180
  437.          Left            =   1830
  438.          TabIndex        =   58
  439.          Top             =   5550
  440.          Width           =   630
  441.       End
  442.       Begin VB.Label LblName 
  443.          AutoSize        =   -1  'True
  444.          Caption         =   "使用年限:"
  445.          ForeColor       =   &H00000000&
  446.          Height          =   180
  447.          Index           =   20
  448.          Left            =   3300
  449.          TabIndex        =   57
  450.          Tag             =   "UseYears"
  451.          Top             =   2965
  452.          Width           =   810
  453.       End
  454.       Begin VB.Label LblName 
  455.          AutoSize        =   -1  'True
  456.          Caption         =   "使用年限:"
  457.          Height          =   180
  458.          Index           =   19
  459.          Left            =   240
  460.          TabIndex        =   56
  461.          Top             =   2965
  462.          UseMnemonic     =   0   'False
  463.          Width           =   810
  464.       End
  465.       Begin VB.Label LblName 
  466.          AutoSize        =   -1  'True
  467.          Caption         =   "净 残 值:"
  468.          ForeColor       =   &H00000000&
  469.          Height          =   180
  470.          Index           =   18
  471.          Left            =   3300
  472.          TabIndex        =   55
  473.          Tag             =   "Sal"
  474.          Top             =   4060
  475.          Width           =   810
  476.       End
  477.       Begin VB.Label LblName 
  478.          AutoSize        =   -1  'True
  479.          Caption         =   "净 残 值:"
  480.          Height          =   180
  481.          Index           =   17
  482.          Left            =   240
  483.          TabIndex        =   54
  484.          Top             =   4060
  485.          UseMnemonic     =   0   'False
  486.          Width           =   810
  487.       End
  488.       Begin VB.Label LblName 
  489.          AutoSize        =   -1  'True
  490.          Caption         =   "工作总量:"
  491.          ForeColor       =   &H00000000&
  492.          Height          =   180
  493.          Index           =   16
  494.          Left            =   3300
  495.          TabIndex        =   53
  496.          Tag             =   "Acti"
  497.          Top             =   3695
  498.          Width           =   810
  499.       End
  500.       Begin VB.Label LblName 
  501.          AutoSize        =   -1  'True
  502.          Caption         =   "工作总量:"
  503.          Height          =   180
  504.          Index           =   15
  505.          Left            =   240
  506.          TabIndex        =   52
  507.          Top             =   3695
  508.          Width           =   810
  509.       End
  510.       Begin VB.Label LblName 
  511.          AutoSize        =   -1  'True
  512.          Caption         =   "累计折旧:"
  513.          ForeColor       =   &H00000000&
  514.          Height          =   180
  515.          Index           =   14
  516.          Left            =   3300
  517.          TabIndex        =   51
  518.          Tag             =   "DeprSum"
  519.          Top             =   3330
  520.          Width           =   810
  521.       End
  522.       Begin VB.Label LblName 
  523.          AutoSize        =   -1  'True
  524.          Caption         =   "累计折旧:"
  525.          Height          =   180
  526.          Index           =   13
  527.          Left            =   240
  528.          TabIndex        =   50
  529.          Top             =   3330
  530.          Width           =   810
  531.       End
  532.       Begin VB.Label LblCom 
  533.          AutoSize        =   -1  'True
  534.          Caption         =   "折旧方法:"
  535.          ForeColor       =   &H00000000&
  536.          Height          =   180
  537.          Index           =   1
  538.          Left            =   3300
  539.          TabIndex        =   49
  540.          Tag             =   "DeprMothed"
  541.          Top             =   2600
  542.          Width           =   810
  543.       End
  544.       Begin VB.Label LblName 
  545.          AutoSize        =   -1  'True
  546.          Caption         =   "资产原值:"
  547.          ForeColor       =   &H00000000&
  548.          Height          =   180
  549.          Index           =   5
  550.          Left            =   3300
  551.          TabIndex        =   48
  552.          Tag             =   "FAValue"
  553.          Top             =   4425
  554.          Width           =   810
  555.       End
  556.       Begin VB.Label LblName 
  557.          AutoSize        =   -1  'True
  558.          Caption         =   "资产原值:"
  559.          Height          =   180
  560.          Index           =   4
  561.          Left            =   240
  562.          TabIndex        =   47
  563.          Top             =   4425
  564.          Width           =   810
  565.       End
  566.       Begin VB.Label LblCom 
  567.          AutoSize        =   -1  'True
  568.          Caption         =   "折旧方法:"
  569.          Height          =   180
  570.          Index           =   0
  571.          Left            =   240
  572.          TabIndex        =   45
  573.          Top             =   2600
  574.          Width           =   810
  575.       End
  576.       Begin VB.Label LblName 
  577.          AutoSize        =   -1  'True
  578.          Caption         =   "资产类别:"
  579.          ForeColor       =   &H00000000&
  580.          Height          =   180
  581.          Index           =   12
  582.          Left            =   3300
  583.          TabIndex        =   44
  584.          Tag             =   "FASort"
  585.          Top             =   2235
  586.          Width           =   810
  587.       End
  588.       Begin VB.Label LblName 
  589.          AutoSize        =   -1  'True
  590.          Caption         =   "变动原因:"
  591.          ForeColor       =   &H00000080&
  592.          Height          =   180
  593.          Index           =   8
  594.          Left            =   240
  595.          TabIndex        =   34
  596.          Top             =   5160
  597.          Width           =   810
  598.       End
  599.       Begin VB.Label LblName 
  600.          AutoSize        =   -1  'True
  601.          Caption         =   "资产数量:"
  602.          ForeColor       =   &H00000000&
  603.          Height          =   180
  604.          Index           =   7
  605.          Left            =   3300
  606.          TabIndex        =   33
  607.          Tag             =   "Quantity"
  608.          Top             =   4790
  609.          Width           =   810
  610.       End
  611.       Begin VB.Label LblName 
  612.          AutoSize        =   -1  'True
  613.          Caption         =   "资产数量:"
  614.          Height          =   180
  615.          Index           =   6
  616.          Left            =   240
  617.          TabIndex        =   31
  618.          Top             =   4790
  619.          Width           =   810
  620.       End
  621.       Begin VB.Label LblName 
  622.          AutoSize        =   -1  'True
  623.          Caption         =   "所属部门:"
  624.          ForeColor       =   &H00000000&
  625.          Height          =   180
  626.          Index           =   3
  627.          Left            =   3300
  628.          TabIndex        =   29
  629.          Tag             =   "DeptName"
  630.          Top             =   1505
  631.          Width           =   810
  632.       End
  633.       Begin VB.Label LblName 
  634.          AutoSize        =   -1  'True
  635.          Caption         =   "所属部门:"
  636.          Height          =   180
  637.          Index           =   2
  638.          Left            =   240
  639.          TabIndex        =   27
  640.          Top             =   1505
  641.          Width           =   810
  642.       End
  643.       Begin VB.Label LblName 
  644.          AutoSize        =   -1  'True
  645.          Caption         =   "凭 证 号:"
  646.          ForeColor       =   &H00000080&
  647.          Height          =   180
  648.          Index           =   1
  649.          Left            =   3300
  650.          TabIndex        =   26
  651.          Top             =   1140
  652.          Width           =   810
  653.       End
  654.       Begin VB.Label LblName 
  655.          AutoSize        =   -1  'True
  656.          Caption         =   "凭证类别:"
  657.          ForeColor       =   &H00000080&
  658.          Height          =   180
  659.          Index           =   0
  660.          Left            =   240
  661.          TabIndex        =   25
  662.          Top             =   1140
  663.          Width           =   810
  664.       End
  665.       Begin VB.Line Line2 
  666.          BorderColor     =   &H80000005&
  667.          X1              =   180
  668.          X2              =   6300
  669.          Y1              =   990
  670.          Y2              =   990
  671.       End
  672.       Begin VB.Line Line1 
  673.          X1              =   120
  674.          X2              =   6270
  675.          Y1              =   960
  676.          Y2              =   960
  677.       End
  678.       Begin VB.Label Label29 
  679.          AutoSize        =   -1  'True
  680.          Caption         =   "操作员:"
  681.          Height          =   180
  682.          Left            =   4380
  683.          TabIndex        =   24
  684.          Top             =   360
  685.          Width           =   630
  686.       End
  687.       Begin VB.Label Lbl_Operator 
  688.          BorderStyle     =   1  'Fixed Single
  689.          Height          =   240
  690.          Left            =   5025
  691.          TabIndex        =   23
  692.          Top             =   330
  693.          Width           =   1170
  694.       End
  695.       Begin VB.Label Lbl_Period 
  696.          AutoSize        =   -1  'True
  697.          BorderStyle     =   1  'Fixed Single
  698.          Height          =   240
  699.          Left            =   4050
  700.          TabIndex        =   22
  701.          Top             =   330
  702.          Width           =   240
  703.       End
  704.       Begin VB.Label Label5 
  705.          AutoSize        =   -1  'True
  706.          Caption         =   "期间:"
  707.          Height          =   180
  708.          Left            =   3570
  709.          TabIndex        =   21
  710.          Top             =   360
  711.          Width           =   450
  712.       End
  713.       Begin VB.Label Lbl_Year 
  714.          AutoSize        =   -1  'True
  715.          BorderStyle     =   1  'Fixed Single
  716.          Height          =   240
  717.          Left            =   3000
  718.          TabIndex        =   20
  719.          Top             =   330
  720.          Width           =   480
  721.       End
  722.       Begin VB.Label Label3 
  723.          AutoSize        =   -1  'True
  724.          Caption         =   "会计年度:"
  725.          Height          =   180
  726.          Left            =   2160
  727.          TabIndex        =   19
  728.          Top             =   360
  729.          Width           =   810
  730.       End
  731.       Begin VB.Label Lbl_Num 
  732.          BorderStyle     =   1  'Fixed Single
  733.          Height          =   240
  734.          Left            =   1050
  735.          TabIndex        =   18
  736.          Top             =   330
  737.          Width           =   1050
  738.       End
  739.       Begin VB.Label Label1 
  740.          AutoSize        =   -1  'True
  741.          Caption         =   "卡片编号:"
  742.          Height          =   180
  743.          Left            =   240
  744.          TabIndex        =   17
  745.          Top             =   360
  746.          Width           =   810
  747.       End
  748.       Begin VB.Label LblName 
  749.          AutoSize        =   -1  'True
  750.          Caption         =   "使用状况:"
  751.          ForeColor       =   &H00000000&
  752.          Height          =   180
  753.          Index           =   10
  754.          Left            =   3300
  755.          TabIndex        =   42
  756.          Tag             =   "FAState"
  757.          Top             =   1870
  758.          Width           =   810
  759.       End
  760.       Begin VB.Label LblName 
  761.          AutoSize        =   -1  'True
  762.          Caption         =   "使用状况:"
  763.          Height          =   180
  764.          Index           =   9
  765.          Left            =   240
  766.          TabIndex        =   41
  767.          Top             =   1870
  768.          Width           =   810
  769.       End
  770.       Begin VB.Label LblName 
  771.          AutoSize        =   -1  'True
  772.          Caption         =   "资产类别:"
  773.          Height          =   180
  774.          Index           =   11
  775.          Left            =   240
  776.          TabIndex        =   43
  777.          Top             =   2235
  778.          Width           =   810
  779.       End
  780.    End
  781.    Begin MSComctlLib.TreeView TreeView 
  782.       Height          =   5865
  783.       Left            =   30
  784.       TabIndex        =   14
  785.       Top             =   630
  786.       Width           =   3165
  787.       _ExtentX        =   5583
  788.       _ExtentY        =   10345
  789.       _Version        =   393217
  790.       Indentation     =   661
  791.       LabelEdit       =   1
  792.       LineStyle       =   1
  793.       Style           =   7
  794.       ImageList       =   "ImageList2"
  795.       Appearance      =   1
  796.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  797.          Name            =   "宋体"
  798.          Size            =   9
  799.          Charset         =   134
  800.          Weight          =   400
  801.          Underline       =   0   'False
  802.          Italic          =   0   'False
  803.          Strikethrough   =   0   'False
  804.       EndProperty
  805.    End
  806.    Begin MSComctlLib.Toolbar SzToolbar 
  807.       Align           =   1  'Align Top
  808.       Height          =   555
  809.       Left            =   0
  810.       TabIndex        =   15
  811.       Top             =   0
  812.       Width           =   9720
  813.       _ExtentX        =   17145
  814.       _ExtentY        =   979
  815.       ButtonWidth     =   820
  816.       ButtonHeight    =   926
  817.       AllowCustomize  =   0   'False
  818.       Appearance      =   1
  819.       Style           =   1
  820.       ImageList       =   "ImageList1"
  821.       _Version        =   393216
  822.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  823.          NumButtons      =   2
  824.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  825.             Caption         =   "帮助"
  826.             Key             =   "bz"
  827.             ImageKey        =   "bz"
  828.          EndProperty
  829.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  830.             Caption         =   "退出"
  831.             Key             =   "fh"
  832.             ImageKey        =   "tc"
  833.          EndProperty
  834.       EndProperty
  835.       BorderStyle     =   1
  836.       Begin MSComctlLib.ImageList ImageList1 
  837.          Left            =   5760
  838.          Top             =   0
  839.          _ExtentX        =   1005
  840.          _ExtentY        =   1005
  841.          BackColor       =   -2147483643
  842.          ImageWidth      =   16
  843.          ImageHeight     =   16
  844.          MaskColor       =   12632256
  845.          _Version        =   393216
  846.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  847.             NumListImages   =   2
  848.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  849.                Picture         =   "固定资产变动.frx":1FA0
  850.                Key             =   "bz"
  851.             EndProperty
  852.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  853.                Picture         =   "固定资产变动.frx":233A
  854.                Key             =   "tc"
  855.             EndProperty
  856.          EndProperty
  857.       End
  858.    End
  859.    Begin MSComctlLib.ImageList ImageList2 
  860.       Left            =   0
  861.       Top             =   0
  862.       _ExtentX        =   1005
  863.       _ExtentY        =   1005
  864.       BackColor       =   -2147483643
  865.       ImageWidth      =   16
  866.       ImageHeight     =   16
  867.       MaskColor       =   12632256
  868.       _Version        =   393216
  869.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  870.          NumListImages   =   4
  871.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  872.             Picture         =   "固定资产变动.frx":26D4
  873.             Key             =   "T"
  874.          EndProperty
  875.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  876.             Picture         =   "固定资产变动.frx":2FAE
  877.             Key             =   "C"
  878.          EndProperty
  879.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  880.             Picture         =   "固定资产变动.frx":3888
  881.             Key             =   "Cl"
  882.          EndProperty
  883.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  884.             Picture         =   "固定资产变动.frx":48DA
  885.             Key             =   "O"
  886.          EndProperty
  887.       EndProperty
  888.    End
  889. End
  890. Attribute VB_Name = "FAVari_Variation"
  891. Attribute VB_GlobalNameSpace = False
  892. Attribute VB_Creatable = False
  893. Attribute VB_PredeclaredId = True
  894. Attribute VB_Exposed = False
  895. '*******************************************************
  896. '*    模 块 名 称 :资产变动
  897. '*    功 能 描 述 :资产变动
  898. '*    程序员姓名  :徐衍民
  899. '*    最后修改人  :徐衍民
  900. '*    最后修改时间:2001/11/29
  901. '*    备        注:自定义模块
  902. '*******************************************************
  903.  
  904. Dim RecDigest As New ADODB.Recordset     '常用摘要表
  905. Dim jdzygs As Integer                    '控件焦点转移个数
  906. Dim Lrzt As Integer                      '录入状态标志(0-非录入状态 1-增加 2-修改)
  907. Dim ReportTitle As String                '报表主标题
  908. Dim Tsxx As String                       '提示信息
  909. Dim Rs_Temp As ADODB.Recordset           '打开数据集临时变量
  910. Dim Sqlstr As String                     '字符串变量
  911. Dim MaxCode As String                    '最大变动单据号变量
  912. Dim Jsqte As Integer                     '控件个数变量
  913.   
  914. '以下为固定使用变量(文本框)
  915. Dim Textvar() As Variant                 '存储变体型文本框信息
  916. Dim Textboolean() As Boolean             '存储布尔型文本框信息
  917. Dim Textint() As Integer                 '存储整型文本框信息
  918. Dim Textstr() As String                  '存储字符型文本框信息
  919. Dim Max_Text_Index As Integer            '最大录入文本框索引值
  920. Dim TextGroupCode As String              '文本框录入分组编码
  921. Dim TextValiLock As Boolean              '文本框失去焦点是否进行有效性控制判断
  922. Dim TextValiJudgeLock() As Boolean       '文本框录入有效性判断控制锁
  923. Dim CurTextIndex As Integer              '当前文本框索引值
  924. Dim TextChangeLock As Boolean            '文本框内容变换控制锁
  925. '<<<<<<<<<<<<<<<<<<
  926. Dim nodX As Node                         '树控件Node集合变量
  927. Private Sub Form_Activate()              '填充窗体内容
  928.     If Me.AutoRedraw = False Then
  929.         '填充文本框
  930.         Call Card_Rs
  931.     End If
  932.     
  933.     Me.AutoRedraw = True
  934.     
  935. End Sub
  936. Private Sub Form_KeyPress(KeyAscii As Integer)   '控 制 焦 点 转 移
  937.     
  938.     jdzygs = 14
  939.     
  940.     Select Case KeyAscii
  941.     
  942.         Case vbKeyReturn
  943.             If Kjjdzy(jdzygs) Then
  944.                 KeyAscii = 0
  945.             End If
  946.         Case 39           '屏蔽"'"
  947.             KeyAscii = 0
  948.    End Select
  949.    
  950. End Sub
  951. Private Sub Form_Load()         '窗体装入
  952.     
  953.     '添加树
  954.     Add_Tree
  955.     
  956.     '以下为文本框处理程序
  957.     TextGroupCode = "Gdzc_Variation"
  958.     Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())  '读入文本框录入信息
  959.     Call Wbkcsh
  960.     '初始化时显示值
  961.     Xt_Year.Caption = Xtyear                     '会计年度
  962.     Xt_Period.Caption = Format(Xtmm, "00")                    '会计期间
  963.     Xt_Czy.Caption = Xtczy                       '操作员姓名
  964. End Sub
  965. '录入文本框初始化
  966. Private Sub Wbkcsh()
  967.   
  968.     Dim Jsqte As Integer
  969.   
  970.     '最大录入文本框索引值
  971.     Max_Text_Index = Textvar(1)
  972.   
  973.     ReDim TextValiJudgeLock(Max_Text_Index)
  974.     
  975.     For Jsqte = 0 To Max_Text_Index
  976.         LrText(Jsqte).Text = ""
  977.     Next Jsqte
  978.     For Jsqte = 3 To Max_Text_Index
  979.         If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
  980.             If Textboolean(Jsqte, 1) Then
  981.                 If Jsqte <> 0 And Not Textboolean(Jsqte, 3) Then
  982.                     Load ydcommand(Jsqte)
  983.                 End If
  984.                 ydcommand(Jsqte).Visible = True
  985.                 ydcommand(Jsqte).Move LrText(Jsqte).Left + LrText(Jsqte).Width + 10, LrText(Jsqte).Top
  986.             End If
  987.             TextChangeLock = True
  988.             LrText(Jsqte).Text = ""
  989.             LrText(Jsqte).Tag = ""
  990.             If Textint(Jsqte, 5) <> 0 Then
  991.                 LrText(Jsqte).MaxLength = Textint(Jsqte, 5)
  992.             End If
  993.             TextChangeLock = False
  994.         End If
  995.         TextValiJudgeLock(Jsqte) = True
  996.     Next Jsqte
  997. End Sub
  998. '添加树项
  999. Private Sub Add_Tree()
  1000.     
  1001.     Dim aDo_Sort As New Recordset
  1002.     
  1003.     TreeView.Nodes.Clear
  1004.     TreeView.Nodes.Add , 4, "M", "部分增减", "Cl"
  1005.     TreeView.Nodes.Add , 4, "Z", "其它变动", "Cl"
  1006.     Set aDo_Sort = Cw_DataEnvi.DataConnect.Execute("select * from Gdzc_VariationMode where VariSort > 2 order by FAVariCode")
  1007.     With aDo_Sort
  1008.         Do While Not .EOF
  1009.             If aDo_Sort!VariSort = 3 Then
  1010.                 Set nodX = TreeView.Nodes.Add("M", 4, "M" & Trim(.Fields("FAVariCode")), "(" & Trim(.Fields("FAVariCode")) & ")" & Trim(.Fields("FAVariName")), "C")
  1011.             ElseIf aDo_Sort!VariSort = 4 Then
  1012.                 Set nodX = TreeView.Nodes.Add("Z", 4, "Z" & Trim(.Fields("FAVariCode")), "(" & Trim(.Fields("FAVariCode")) & ")" & Trim(.Fields("FAVariName")), "C")
  1013.             End If
  1014.             nodX.EnsureVisible
  1015.             .MoveNext
  1016.         Loop
  1017.     End With
  1018.     aDo_Sort.Close
  1019.     Set aDo_Sort = Nothing
  1020.     
  1021. End Sub
  1022. '用户录入条件有效性判断
  1023. Private Function Lrtjyxxpd() As Boolean
  1024.  
  1025.     Dim Jsqte As Integer
  1026.     Lrtjyxxpd = False
  1027.  
  1028.     '对需要进行事后判断的文本框录入内容进行有效性判断 (固定不变)
  1029.     For Jsqte = 0 To Max_Text_Index
  1030.         If Textint(Jsqte, 9) = 0 Or Textint(Jsqte, 9) = 2 Then
  1031.             If Not TextYxxpd(Jsqte) Then
  1032.                 Exit Function
  1033.             End If
  1034.         End If
  1035.     Next Jsqte
  1036.     
  1037.     Lrtjyxxpd = True
  1038. End Function
  1039. '*******************以下区域为编写自定义过程区域**********************
  1040. '向文本框填充数据
  1041. Function Card_Rs()
  1042.     
  1043.     Sqlstr = "SELECT Gdzc_Card.*, Gdzc_Sort.FASortName AS FASortName," _
  1044.         & "Gy_Department.DeptName AS DeptName,Gdzc_State.FAStateName AS FAStateName," _
  1045.         & "Cwzz_VouchClass.VouchClassName AS VouchClassName FROM Gdzc_Card INNER JOIN " _
  1046.         & "Gdzc_Sort ON Gdzc_Card.FASortCode = Gdzc_Sort.FASortCode INNER JOIN " _
  1047.         & "Gdzc_State ON Gdzc_Card.FAStateCode = Gdzc_State.FaStateCode INNER JOIN " _
  1048.         & "Gy_Department ON Gdzc_Card.DeptCode = Gy_Department.DeptCode LEFT OUTER JOIN " _
  1049.         & "Cwzz_VouchClass ON Gdzc_Card.VouchClassCode = Cwzz_VouchClass.VouchClassCode"
  1050.     Sqlstr = Sqlstr & " where gdzc_card.cardcode='" & Trim(Lbl_Num.Caption) & "'"
  1051.     Set Rs_Temp = New ADODB.Recordset
  1052.     Rs_Temp.Open Sqlstr, Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1053.     With Rs_Temp
  1054.         If Not .EOF Then
  1055.             Lbl_FAName.Caption = Trim(!FAName & "")         '资产名称
  1056.             Lbl_Year.Caption = !Year                        '会计年度
  1057.             Lbl_Period.Caption = Format(!Period, "00")      '会计期间
  1058.             Lbl_Operator.Caption = !Opreator                '操作员
  1059.             LrText(0).Text = Trim(!VouchClassName & "")     '凭证类别
  1060.             LrText(0).Tag = Trim(!VouchClassCode)           '凭证类别编号
  1061.             LrText(1).Text = Trim(!VouchNo & "")            '凭证号
  1062.             LrText(2).Text = Trim(!DeptName)                '部门名称
  1063.             LrText(2).Tag = Trim(!DeptCode)                 '部门编号
  1064.             LrText(3).Text = Trim(!DeptName)                '部门名称
  1065.             LrText(3).Tag = Trim(!DeptCode)                 '部门编号
  1066.             LrText(4).Text = !FAValue                       '资产原值
  1067.             LrText(5).Text = !FAValue                       '资产原值
  1068.             LrText(6).Text = !FAQuantity                    '资产数量
  1069.             LrText(7).Text = !FAQuantity                    '资产数量
  1070.             LrText(9).Text = Trim(!FAStateName & "")        '使用状况名称
  1071.             LrText(9).Tag = Trim(!FAStateCode & "")         '使用状况编码
  1072.             LrText(10).Text = Trim(!FAStateName & "")       '是用状况名称
  1073.             LrText(10).Tag = Trim(!FAStateCode & "")        '使用状况编号
  1074.             LrText(11).Text = Trim(!FASortName & "")        '资产类别名称
  1075.             LrText(11).Tag = Trim(!FASortCode & "")         '资产类别编码
  1076.             LrText(12).Text = Trim(!FASortName & "")        '资产类别名称
  1077.             LrText(12).Tag = Trim(!FASortCode & "")         '资产类别编号
  1078.             LrText(13).Text = !DeprSum                      '累计折旧
  1079.             LrText(14).Text = !DeprSum                      '累计折旧
  1080.             LrText(15).Text = !Activities                   '工作总量
  1081.             LrText(16).Text = !Activities                   '工作总量
  1082.             LrText(17).Text = !FactValue                    '净资产
  1083.             LrText(18).Text = !FactValue                    '净资产
  1084.             LrText(19).Text = !Useyears                     '使用年限
  1085.             LrText(20).Text = !Useyears                     '使用年限
  1086.             Select Case !DeprMethod                         '折旧方法
  1087.                 Case "01"
  1088.                     Com_DeprMethod(0).Text = "不计提折旧"
  1089.                     Com_DeprMethod(1).Text = "不计提折旧"
  1090.                 Case "02"
  1091.                     Com_DeprMethod(0).Text = "平均年限法(依净资产计提折旧)"
  1092.                     Com_DeprMethod(1).Text = "平均年限法(依净资产计提折旧)"
  1093.                 Case "03"
  1094.                     Com_DeprMethod(0).Text = "平均年限法(依帐面原值计提折旧)"
  1095.                     Com_DeprMethod(1).Text = "平均年限法(依帐面原值计提折旧)"
  1096.                 Case "04"
  1097.                     Com_DeprMethod(0).Text = "工作量法"
  1098.                     Com_DeprMethod(1).Text = "工作量法"
  1099.                 Case "05"
  1100.                     Com_DeprMethod(0).Text = "固定折旧额折旧法"
  1101.                     Com_DeprMethod(1).Text = "固定折旧额折旧法"
  1102.                 Case "06"
  1103.                     Com_DeprMethod(0).Text = "年数总和法"
  1104.                     Com_DeprMethod(1).Text = "年数总和法"
  1105.                 Case "07"
  1106.                     Com_DeprMethod(0).Text = "双倍余额法"
  1107.                     Com_DeprMethod(1).Text = "双倍余额法"
  1108.             End Select
  1109.         End If
  1110.     End With
  1111.     Rs_Temp.Close
  1112.     Set Rs_Temp = Nothing
  1113.     
  1114. End Function
  1115. '解锁
  1116. Function Open_Clock()
  1117.     LrText(0).Enabled = True
  1118.     LrText(1).Enabled = True
  1119.     LrText(3).Enabled = True
  1120.     LrText(5).Enabled = True
  1121.     LrText(7).Enabled = True
  1122.     LrText(8).Enabled = True
  1123.     LrText(10).Enabled = True
  1124.     LrText(12).Enabled = True
  1125.     LrText(14).Enabled = True
  1126.     LrText(16).Enabled = True
  1127.     LrText(18).Enabled = True
  1128.     LrText(20).Enabled = True
  1129.     Com_DeprMethod(1).Enabled = True
  1130.     QdCommand.Enabled = True
  1131.     
  1132. End Function
  1133. '加锁
  1134. Function Add_Clock()
  1135.     Dim i As Integer
  1136.     
  1137.     For i = 0 To LrText.count - 1
  1138.         LrText(i).Enabled = False
  1139.     Next i
  1140.     For i = 2 To LblName.count - 1
  1141.         If i = 8 Then i = 9
  1142.         LblName(i).ForeColor = &H0&
  1143.     Next i
  1144.     QdCommand.Enabled = False
  1145.     Com_DeprMethod(1).Enabled = False
  1146.     
  1147. End Function
  1148. '录入存盘
  1149. Function Save()
  1150.     If IsValidity = True Then
  1151.                 
  1152.         Dim FAValue_Temp As Double              '修改原资产原值变量
  1153.         Dim DeprSum_temp As Double              '修改原累计折旧变量
  1154.         Dim Dept_Temp As String                 '部门编号
  1155.         Dim Sort As String                      '资产类别
  1156.                 
  1157.         On Error GoTo Cwcl
  1158.         Cw_DataEnvi.DataConnect.BeginTrans
  1159.         
  1160.         '修改资产卡片表
  1161.         Set Rs_Temp = New ADODB.Recordset
  1162.         Rs_Temp.Open "select * from gdzc_card where cardcode='" & Trim(Lbl_Num.Caption) & "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1163.         With Rs_Temp
  1164.             If Not .EOF Then
  1165.                 Dept_Temp = !DeptCode
  1166.                 Sort = !FASortCode
  1167.                 !WhetherVariation = True                        '修改“是否发生变动标志”
  1168.                 !FAValue = CCur(Val(LrText(5).Text))            '资产原值
  1169.                 !DeptCode = Trim(LrText(3).Tag)                 '部门编号
  1170.                 !FASortCode = Trim(LrText(12).Tag)              '资产类别编号
  1171.                 !FAQuantity = Val(LrText(7).Text)               '资产数量
  1172.                 !FAStateCode = Trim(LrText(10).Tag)             '使用状况编号
  1173.                 !DeprSum = CCur(Val(LrText(14).Text))           '累计折旧
  1174.                 !FactValue = CCur(Val(!FAValue) - Val(!DeprSum)) '净资产
  1175.                 !Activities = Val(LrText(16).Text)              '工作总量
  1176.                 !Useyears = Val(LrText(14).Text)                '使用年限
  1177.                 !SalValue = CCur(Val(LrText(18).Text))          '净残值
  1178.                 .Update
  1179.             End If
  1180.         End With
  1181.         Rs_Temp.Close
  1182.         Set Rs_Temp = Nothing
  1183.         
  1184.         '修改工作量表
  1185.         If Val(LrText(15).Text & "") <> Val(LrText(16).Text & "") Then
  1186.             Set Rs_Temp = New ADODB.Recordset
  1187.             Rs_Temp.Open "select * from Gdzc_JobQuantity where cardcode='" & Trim(Lbl_Num.Caption) & "' and year=" & Xtyear & " and period=" & Xtmm, Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1188.             With Rs_Temp
  1189.                 If Not .EOF Then
  1190.                     !AcivitiesAEnd = Val(LrText(16).Text & "")  '变动后工作总量
  1191.                     .Update
  1192.                 End If
  1193.             End With
  1194.             Rs_Temp.Close
  1195.             Set Rs_Temp = Nothing
  1196.         End If
  1197.         
  1198.         '修改固定资产明细帐
  1199.         Set Rs_Temp = New ADODB.Recordset
  1200.         Rs_Temp.Open "select * from Gdzc_DetailedForm where cardCode='" & Trim(Lbl_Num.Caption) & "' and FASortCode='" & Trim(LrText(12).Tag) & "' and year=" & Xtyear & " and period=" & Xtmm, Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1201.         With Rs_Temp
  1202.             If Not .EOF Then
  1203.                 If Val(LrText(4).Text) <> Val(LrText(5).Text) Then
  1204.                     !FAValueEnd = CCur(Val(!FAValueEnd) + Val(LrText(5).Text))  '期末资产原值
  1205.                 End If
  1206.                 If Val(LrText(13).Text) <> Val(LrText(14).Text) Then
  1207.                     !DeprSumEnd = CCur(Val(!DeprSumEnd) + Val(LrText(14).Text)) '期末累计折旧
  1208.                 End If
  1209.                 .Update
  1210.             Else
  1211.                 .AddNew
  1212.                 !CardCode = Trim(Lbl_Num.Caption)                               '卡片编号
  1213.                 !FASortCode = Trim(LrText(12).Tag)                              '资产类别
  1214.                 !Year = Trim(Xt_Year.Caption)                                   '会计年度
  1215.                 !Period = Val(Xt_Period.Caption)                                '会计期间
  1216.                 !MmMake = False                                                 '录入期间标志
  1217.                 !FAValueEnd = CCur(Val(LrText(5).Text))                         '期末资产原值
  1218.                 !DeprSumEnd = CCur(LrText(14).Text)                             '期末累计折旧
  1219.                 !DeprDate = Xtrq                                                '变动日期
  1220.                 .Update
  1221.             End If
  1222.         End With
  1223.         Rs_Temp.Close
  1224.         Set Rs_Temp = Nothing
  1225.         
  1226.         '修改资产汇总表
  1227.         Set Rs_Temp = New ADODB.Recordset
  1228.         Rs_Temp.Open "select * from Gdzc_total where DeptCode='" & Trim(LrText(3).Tag) & "' and FASortCode='" & Trim(LrText(12).Tag) & "' and year=" & Xt_Year & " and Period=" & Xt_Period, Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1229.         With Rs_Temp
  1230.             If Not .EOF Then
  1231.                 !FAvalueEndM = CCur(Val(!FAvalueEndM) - Val(LrText(4).Text) + Val(LrText(5).Text))
  1232.                 !DeprSumEndM = CCur(Val(!DeprSumEndM) - Val(LrText(13).Text) + Val(LrText(14).Text))
  1233.                 If Val(LrText(5).Text) - Val(LrText(4).Text) > 0 Then
  1234.                     !FAValueInM = CCur(Val(LrText(5).Text) - Val(LrText(4).Text))       '本期原值增加
  1235.                 Else
  1236.                     !FAValueOutM = CCur(Val(LrText(4).Text) - Val(LrText(5).Text))      '本期原值减少
  1237.                 End If
  1238.                 If Val(Val(LrText(14).Text) - Val(LrText(13).Text)) > 0 Then
  1239.                     !DeprSumInM = CCur(Val(LrText(14).Text) - Val(LrText(13).Text))     '本期累计折旧增加
  1240.                 Else
  1241.                     !DeprSumOutM = CCur(Val(LrText(13).Text) - Val(LrText(14).Text))    '本期累计折旧减少
  1242.                 End If
  1243.                 .Update
  1244.             Else
  1245.                 .AddNew
  1246.                 !DeptCode = Trim(LrText(3).Tag)                                         '所属部门
  1247.                 !FASortCode = Trim(LrText(12).Tag)                                      '资产类别
  1248.                 !Year = Trim(Xt_Year.Caption)                                           '会计年度
  1249.                 !Period = Val(Xt_Period.Caption)                                        '会计期间
  1250.                 !FAvalueEndM = CCur(Val(LrText(5).Text))                                '期末资产原值
  1251.                 !DeprSumEndM = CCur(Val(LrText(14).Text))                               '期末累计折旧
  1252.                 If Val(LrText(5).Text) - Val(LrText(4).Text) > 0 Then
  1253.                     !FAValueInM = CCur(Val(LrText(5).Text) - Val(LrText(4).Text))       '原值增加
  1254.                 Else
  1255.                     !FAValueOutM = CCur(Val(LrText(4).Text) - Val(LrText(5).Text))      '原值减少
  1256.                 End If
  1257.                 If Val(Val(LrText(14).Text) - Val(LrText(13).Text)) > 0 Then
  1258.                     !DeprSumInM = CCur(Val(LrText(14).Text) - Val(LrText(13).Text))     '累计折旧增加
  1259.                 Else
  1260.                     !DeprSumOutM = CCur(Val(LrText(13).Text) - Val(LrText(14).Text))    '累计折旧减少
  1261.                 End If
  1262.                 .Update
  1263.             End If
  1264.         End With
  1265.         Rs_Temp.Close
  1266.         Set Rs_Temp = Nothing
  1267.         
  1268.         '生成变动单
  1269.         Call Vari                 '生成变动单据号
  1270.         Set Rs_Temp = New ADODB.Recordset
  1271.         Rs_Temp.Open "select * from Gdzc_Variation where 1=2", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1272.         With Rs_Temp
  1273.             .AddNew
  1274.             !VariVouCode = Trim(MaxCode)                                                '变动单号
  1275.             !CardCode = Trim(Lbl_Num.Caption)                                           '卡片编号
  1276.             !Year = Val(Xt_Year.Caption)                                                '会计年度
  1277.             !Period = Val(Xt_Period.Caption)                                            '会计期间
  1278.             !varidate = Xtrq                                                            '变动日期
  1279.             !FAVariCode = Trim(Frame1.Tag)                                              '变动方式
  1280.             If Trim(LrText(0).Text) <> "" Then !VouchClassCode = Trim(LrText(0).Tag)    '凭证类别
  1281.             If Trim(LrText(1).Text) <> "" Then !VouchNo = Val(LrText(1).Text)           '凭证号
  1282.             !VariationReason = Trim(LrText(8).Text)                                     '变动原因
  1283.             !DeptOld = Trim(LrText(2).Tag)                                              '变动前部门
  1284.             !DeptNew = Trim(LrText(3).Tag)                                              '变动后部门
  1285.             !FAStateOld = Trim(LrText(9).Tag)                                           '变动前使用状况
  1286.             !FAStateNew = Trim(LrText(10).Tag)                                          '变动后使用状况
  1287.             !DeprMethOld = Trim("0" & Val(Com_DeprMethod(0).ListIndex + 1))             '变动前折旧方法
  1288.             !DeprMethNew = Trim("0" & Val(Com_DeprMethod(1).ListIndex + 1))             '变动后这就方法
  1289.             !FASortOld = Trim(LrText(11).Tag)                                           '变动前资产类别
  1290.             !FASortNew = Trim(LrText(12).Tag)                                           '变动后资产类别
  1291.             !FAValueOld = CCur(LrText(4).Text)                                          '变动前资产原值
  1292.             !FAValueNew = CCur(LrText(5).Text)                                          '变动后资产原值
  1293.             !SumDeprOld = CCur(LrText(13).Text)                                         '变动前累计折旧
  1294.             !SumDeprNew = CCur(LrText(14).Text)                                         '变动后累计折旧
  1295.             !ActivitiesOld = Val(LrText(15).Text)                                       '变动前工作总量
  1296.             !ActivitiesNew = Val(LrText(16).Text)                                       '变动后工作总量
  1297.             !SalValueOld = CCur(LrText(17).Text)                                        '变动前净残值
  1298.             !SalValueNew = CCur(LrText(18).Text)                                        '变动后净残值
  1299.             !UseYearsOld = Val(LrText(19).Text)                                         '变动前使用年限
  1300.             !UseYearsNew = Val(LrText(20).Text)                                         '变动后使用年限
  1301.             !FAQuantityOld = Val(LrText(6).Text)                                        '变动前资产总量
  1302.             !FAQuantityNew = Val(LrText(7).Text)                                        '变动后资产数量
  1303.             !Opreator = Trim(Xt_Czy.Caption)                                            '操作员
  1304.             .Update
  1305.         End With
  1306.         Rs_Temp.Close
  1307.         Set Rs_Temp = Nothing
  1308.         
  1309.         Cw_DataEnvi.DataConnect.CommitTrans
  1310.         MsgBox "资产变动单生成完毕!变动单号--" + Trim(MaxCode), vbOKOnly + vbInformation, "百利/ERP5.0-固定资产"
  1311.         Unload Me
  1312.         Exit Function
  1313.     End If
  1314. Cwcl:
  1315.     Cw_DataEnvi.DataConnect.RollbackTrans
  1316.     Tsxx = "您的输入有误导致存盘失败,请核对数据!"
  1317.     Call Xtxxts(Tsxx, 0, 1)
  1318.     Exit Function
  1319.     
  1320. End Function
  1321. '录入有效性判断
  1322. Function IsValidity() As Boolean
  1323.     IsValidity = False
  1324.     
  1325.     '变动方式不能为空
  1326.     If Trim(Frame1.Caption) = "" Then
  1327.         Tsxx = "请先选择变动方式!"
  1328.         Call Xtxxts(Tsxx, 0, 4)
  1329.         Exit Function
  1330.     End If
  1331.     
  1332.     '变动原因不能为空
  1333.     If Trim(LrText(8).Text) = "" Then
  1334.         Tsxx = "变动原因不能为空!"
  1335.         Call Xtxxts(Tsxx, 0, 4)
  1336.         LrText(8).SetFocus
  1337.         Exit Function
  1338.     End If
  1339.     
  1340.     '累计折旧不能大于资产原值
  1341.     If Val(LrText(14).Text) - Val(LrText(5).Text) > 0 Then
  1342.         Tsxx = "累计折旧不能大于资产原值!"
  1343.         Call Xtxxts(Tsxx, 0, 4)
  1344.         LrText(14).SetFocus
  1345.         Exit Function
  1346.     End If
  1347.         
  1348.     '当折旧方法为“工作量法”后,工作总量不能为空
  1349.     If Trim(Com_DeprMethod(1).Text) = "工作量法" Then
  1350.         If Trim(LrText(16).Text) = "" Then
  1351.             Tsxx = "工作总量不能为空!"
  1352.             Call Xtxxts(Tsxx, 0, 4)
  1353.             LrText(16).SetFocus
  1354.             Exit Function
  1355.         End If
  1356.     End If
  1357.     
  1358.     IsValidity = True
  1359.     
  1360. End Function
  1361. '变动单自动编号
  1362. Function Vari()
  1363.     Dim Max_Code As Double                              '最大值数值变量
  1364.     
  1365.     Set rstemp = New ADODB.Recordset
  1366.     rstemp.Open "select max(VariVouCode) as Max_CardCode from Gdzc_Variation", Cw_DataEnvi.DataConnect, adOpenKeyset, adLockOptimistic
  1367.     If Val(rstemp.Fields("Max_CardCode") & "") = 0 Then
  1368.         Max_Code = 1
  1369.     Else
  1370.         Max_Code = Val(rstemp.Fields("Max_CardCode")) + 1
  1371.     End If
  1372.     rstemp.Close
  1373.     Set rstemp = Nothing
  1374.     
  1375.     MaxCode = IIf(Max_Code < 10, "00000" & Max_Code, IIf(Max_Code < 100, "0000" & Max_Code, IIf(Max_Code < 1000, "000" & Max_Code, IIf(Max_Code < 10000, "00" & Max_Code, IIf(Max_Code < 100000, "0" & Max_Code, Max_Code)))))
  1376. End Function
  1377. '*******************以上区域为编写自定义过程区域**********************
  1378. '************以下为文本框录入处理程序(固定不变部分)*************'
  1379. Private Sub Wbklrwbcl(Index As Integer)    '文本框录入事后处理程序
  1380.     '以下为依据实际情况自定义部分[
  1381.   
  1382.     '在此填写文本框录入事后处理程序
  1383.    
  1384.     ']以上为依据实际情况自定义部分
  1385. End Sub
  1386. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  1387.     Kpgl_CardList.Timer1.Enabled = True
  1388. End Sub
  1389. Private Sub LrText_Change(Index As Integer)
  1390.     
  1391.     '屏蔽程序改变控制
  1392.     If TextChangeLock Then
  1393.         Exit Sub
  1394.     End If
  1395.    
  1396.     TextValiJudgeLock(Index) = False    '打开有效性判断锁
  1397.     
  1398.     '限制字段录入长度
  1399.           
  1400.     TextChangeLock = True  '加锁(防止执行Lrtext_Change)
  1401.     Select Case Textint(Index, 1)
  1402.         Case 8, 11      '金额型
  1403.             Call Sjgskz(LrText(Index), Xtjezws - Xtjexsws - 1, Xtjexsws)
  1404.         Case 9, 12      '数量型
  1405.             Call Sjgskz(LrText(Index), Xtslzws - Xtslxsws - 1, Xtslxsws)
  1406.         Case 10          '单价型
  1407.             Call Sjgskz(LrText(Index), Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
  1408.         Case Else        '其他小数类型控制
  1409.             If Textint(Index, 6) <> 0 Or Textint(Index, 7) <> 0 Then
  1410.                 Call Sjgskz(LrText(Index), Textint(Index, 6), Textint(Index, 7))
  1411.             End If
  1412.         End Select
  1413.     TextChangeLock = False '解锁
  1414.     
  1415. End Sub
  1416. '文本框得到焦点,显示相应信息
  1417. Private Sub LrText_GotFocus(Index As Integer)
  1418.     
  1419.     Call TextShow(Index)
  1420.     CurTextIndex = Index
  1421.     LrText(Index).SelStart = Len(LrText(Index))
  1422. End Sub
  1423. '字段按F2键提供帮助
  1424. Private Sub LrText_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
  1425.     
  1426.     Select Case KeyCode
  1427.         Case vbKeyF2
  1428.             Call Text_Help(Index)
  1429.     End Select
  1430. End Sub
  1431. '文本框录入事中控制
  1432. Private Sub LrText_KeyPress(Index As Integer, KeyAscii As Integer)
  1433.     Call InputFieldLimit(LrText(Index), Textint(Index, 1), KeyAscii)
  1434. End Sub
  1435. '文本框失去焦点进行有效性判断及相应处理
  1436. Private Sub LrText_LostFocus(Index As Integer)
  1437.     
  1438.     If Textint(Index, 9) = 0 Or Textint(Index, 9) = 1 Then '事中判断
  1439.         Call TextYxxpd(Index)
  1440.     End If
  1441.     
  1442. End Sub
  1443. Private Sub QdCommand_Click()
  1444.     Call Save
  1445. End Sub
  1446. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  1447.     
  1448.     Select Case Button.Key
  1449.         Case "bz"
  1450.             SendKeys "{F1}"
  1451.         Case "fh"                                            '退 出
  1452.             Unload Me
  1453.     End Select
  1454.     
  1455. End Sub
  1456. '单击树节点,执行相应功能
  1457. Private Sub TreeView_NodeClick(ByVal Node As MSComctlLib.Node)
  1458.     
  1459.     '将变动方式赋值给Frame
  1460.     Frame1.Caption = Mid(TreeView.SelectedItem.Text, 8)
  1461.     Frame1.Tag = Mid(TreeView.SelectedItem.Text, 2, 5)
  1462.     LrText(8).Text = Mid(TreeView.SelectedItem.Text, 8)
  1463.     
  1464.     If Frame1.Caption <> "" Then
  1465.         Call Add_Clock
  1466.         Set Rs_Temp = New ADODB.Recordset
  1467.         Rs_Temp.Open "select * from Gdzc_VariWbkBj where FAVariCode='" & Trim(Frame1.Tag) & "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  1468.         If Not Rs_Temp.EOF Then
  1469.             For Jsqte = 0 To LblName.count - 1
  1470.                 If Trim(Trim(LblName(Jsqte).Tag)) <> "" Then
  1471.                     If Rs_Temp.Fields(LblName(Jsqte).Tag) = True Then
  1472.                         LrText(Jsqte).Enabled = True
  1473.                         LblName(Jsqte).ForeColor = &H80&
  1474.                     End If
  1475.                 End If
  1476.             Next Jsqte
  1477.             If Rs_Temp.Fields(LblCom(1).Tag) = True Then
  1478.                 Com_DeprMethod(1).Enabled = True
  1479.                 LblCom(1).ForeColor = &H80&
  1480.             Else
  1481.                 Com_DeprMethod(1).Enabled = False
  1482.                 LblCom(1).ForeColor = &H0&
  1483.             End If
  1484.         End If
  1485.         Rs_Temp.Close
  1486.         Set Rs_Temp = Nothing
  1487.         LrText(0).Enabled = True
  1488.         LrText(1).Enabled = True
  1489.         LrText(8).Enabled = True
  1490.         QdCommand.Enabled = True
  1491.     Else
  1492.         Call Add_Clock
  1493.     End If
  1494.     
  1495. End Sub
  1496. '按钮提供帮助
  1497. Private Sub ydcommand_MouseDown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
  1498.     
  1499.     If LrText(Index).Enabled = False Then
  1500.         Exit Sub
  1501.     End If
  1502.     Call Text_Help(Index)
  1503.     
  1504. End Sub
  1505. '录入字段帮助
  1506. Private Sub Text_Help(Index As Integer)
  1507.     
  1508.     If Not Textboolean(Index, 1) Then
  1509.         Exit Sub
  1510.     End If
  1511.     TextValiJudgeLock(Index) = True
  1512.    
  1513.     '先进行有效性判断
  1514.     If Not TextYxxpd(CurTextIndex) Then
  1515.         Exit Sub
  1516.     End If
  1517.      
  1518.     '[>>调入参照窗体
  1519.     Call Drbmhelp(Textint(Index, 2), Textstr(Index, 4), Trim(LrText(Index).Text))
  1520.      '<<]
  1521.     If Len(Xtfhcs) <> 0 Then
  1522.         If Textint(Index, 3) = 1 Then
  1523.             LrText(Index).Text = Xtfhcsfz
  1524.             LrText(Index).Tag = Xtfhcs
  1525.         Else
  1526.             LrText(Index).Text = Xtfhcs
  1527.             LrText(Index).Tag = Xtfhcsfz
  1528.         End If
  1529.     End If
  1530.     TextValiJudgeLock(Index) = False
  1531.     LrText(Index).SetFocus
  1532.     
  1533. End Sub
  1534. '文本框得到焦点,显示相应信息
  1535. Private Sub TextShow(Index As Integer)
  1536.     '填写文本框得到焦点,进行相应信息处理程序
  1537.    
  1538. End Sub
  1539. '文本框有效性判断
  1540. Private Function TextYxxpd(Index As Integer) As Boolean
  1541.     
  1542.     Dim Sqlstr As String
  1543.     Dim Findrec As ADODB.Recordset
  1544.     
  1545.     If TextValiJudgeLock(Index) Then    '文本框内容未曾改变不进行有效性判断
  1546.         TextYxxpd = True
  1547.         Exit Function
  1548.     End If
  1549.     
  1550.     If Trim(LrText(Index)) = "" Then
  1551.         LrText(Index).Tag = ""
  1552.         Call Wbklrwbcl(Index)
  1553.         TextValiJudgeLock(Index) = True
  1554.         TextYxxpd = True
  1555.         Exit Function
  1556.     End If
  1557.     
  1558.     Select Case Textint(Index, 4)
  1559.         Case 1      '编码型
  1560.             Sqlstr = Trim(Textstr(Index, 5))
  1561.             Sqlstr = Replace(Sqlstr, "@", "'" + Trim(LrText(Index).Text) + "'")
  1562.             Set Findrec = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1563.             If Findrec.EOF Then
  1564.                 Call Xtxxts(Trim(Textstr(Index, 6)), 0, 1)
  1565.                 LrText(Index).SetFocus
  1566.                 Exit Function
  1567.             Else
  1568.                 Select Case Textint(Index, 3)
  1569.                     Case 0
  1570.                         If Len(Trim(Textstr(Index, 2))) <> 0 Then
  1571.                             LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
  1572.                         End If
  1573.                         If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
  1574.                             LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
  1575.                         End If
  1576.                     Case 1
  1577.                         If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
  1578.                             LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
  1579.                         End If
  1580.                         If Len(Trim(Textstr(Index, 2))) <> 0 Then
  1581.                             LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
  1582.                         End If
  1583.                 End Select
  1584.             End If
  1585.         Case 2      '日期型
  1586.             If IsDate(LrText(Index).Text) Then
  1587.                 LrText(Index).Text = Format(LrText(Index).Text, "yyyy-mm-dd")
  1588.                 If Val(Mid(LrText(Index), 1, 4)) < 1900 Then
  1589.                     LrText(Index).Text = "1900" + Mid(LrText(Index), 5, 6)
  1590.                 End If
  1591.             Else
  1592.                 Tsxx = "非法公历日期!(格式:" + Format(Date, "yyyy-mm-dd") + ")"
  1593.                 Call Xtxxts(Tsxx, 0, 1)
  1594.                 LrText(Index).SetFocus
  1595.                 Exit Function
  1596.             End If
  1597.         Case 3      '其他类型
  1598.     End Select
  1599.     TextValiJudgeLock(Index) = True
  1600.     TextYxxpd = True
  1601. End Function