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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{65A39231-6133-11D1-BAA2-444553540000}#1.0#0"; "vslight6.OCX"
  3. Object = "{C5DE3F80-3376-11D2-BAA4-04F205C10000}#1.0#0"; "Vsflex6d.ocx"
  4. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  5. Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "tabctl32.ocx"
  6. Begin VB.Form JC_FrmObjectSet 
  7.    BorderStyle     =   3  'Fixed Dialog
  8.    Caption         =   "核算对象设置"
  9.    ClientHeight    =   6480
  10.    ClientLeft      =   45
  11.    ClientTop       =   330
  12.    ClientWidth     =   9615
  13.    HelpContextID   =   2001
  14.    Icon            =   "基础设置_对象设置.frx":0000
  15.    KeyPreview      =   -1  'True
  16.    LinkTopic       =   "Form2"
  17.    MaxButton       =   0   'False
  18.    MinButton       =   0   'False
  19.    ScaleHeight     =   6480
  20.    ScaleWidth      =   9615
  21.    ShowInTaskbar   =   0   'False
  22.    StartUpPosition =   2  '屏幕中心
  23.    Begin VB.PictureBox Picture1 
  24.       BorderStyle     =   0  'None
  25.       Height          =   345
  26.       Left            =   6780
  27.       ScaleHeight     =   345
  28.       ScaleWidth      =   2835
  29.       TabIndex        =   25
  30.       Top             =   570
  31.       Width           =   2835
  32.       Begin VB.ComboBox Combo_CostCell 
  33.          Height          =   300
  34.          Left            =   870
  35.          Style           =   2  'Dropdown List
  36.          TabIndex        =   27
  37.          Top             =   30
  38.          Width           =   1935
  39.       End
  40.       Begin VB.Label Label5 
  41.          AutoSize        =   -1  'True
  42.          Caption         =   "成本中心:"
  43.          Height          =   180
  44.          Left            =   60
  45.          TabIndex        =   26
  46.          Top             =   97
  47.          Width           =   810
  48.       End
  49.    End
  50.    Begin TabDlg.SSTab StTab 
  51.       Height          =   5865
  52.       Left            =   0
  53.       TabIndex        =   0
  54.       Top             =   630
  55.       Width           =   9630
  56.       _ExtentX        =   16986
  57.       _ExtentY        =   10345
  58.       _Version        =   393216
  59.       Style           =   1
  60.       Tabs            =   2
  61.       TabHeight       =   520
  62.       TabCaption(0)   =   "列表视图"
  63.       TabPicture(0)   =   "基础设置_对象设置.frx":1042
  64.       Tab(0).ControlEnabled=   -1  'True
  65.       Tab(0).Control(0)=   "CzxsGrid"
  66.       Tab(0).Control(0).Enabled=   0   'False
  67.       Tab(0).ControlCount=   1
  68.       TabCaption(1)   =   "单张视图"
  69.       TabPicture(1)   =   "基础设置_对象设置.frx":105E
  70.       Tab(1).ControlEnabled=   0   'False
  71.       Tab(1).Control(0)=   "Frame1"
  72.       Tab(1).ControlCount=   1
  73.       Begin VB.Frame Frame1 
  74.          Height          =   5445
  75.          Left            =   -74940
  76.          TabIndex        =   15
  77.          Top             =   330
  78.          Width           =   9495
  79.          Begin VB.TextBox LrText 
  80.             Height          =   300
  81.             Index           =   8
  82.             Left            =   5700
  83.             TabIndex        =   8
  84.             Text            =   "8"
  85.             Top             =   1995
  86.             Width           =   1905
  87.          End
  88.          Begin VB.TextBox LrText 
  89.             Height          =   300
  90.             Index           =   7
  91.             Left            =   5700
  92.             TabIndex        =   9
  93.             Text            =   "7"
  94.             Top             =   1470
  95.             Width           =   1905
  96.          End
  97.          Begin VB.TextBox LrText 
  98.             Height          =   300
  99.             Index           =   2
  100.             Left            =   1425
  101.             TabIndex        =   3
  102.             Text            =   "2"
  103.             Top             =   1470
  104.             Width           =   1845
  105.          End
  106.          Begin VB.TextBox LrText 
  107.             Height          =   300
  108.             Index           =   6
  109.             Left            =   5700
  110.             TabIndex        =   7
  111.             Text            =   "6"
  112.             Top             =   945
  113.             Width           =   1905
  114.          End
  115.          Begin VB.TextBox LrText 
  116.             Height          =   300
  117.             Index           =   5
  118.             Left            =   5700
  119.             TabIndex        =   6
  120.             Text            =   "5"
  121.             Top             =   420
  122.             Width           =   1905
  123.          End
  124.          Begin VB.TextBox LrText 
  125.             Height          =   300
  126.             Index           =   4
  127.             Left            =   1410
  128.             TabIndex        =   5
  129.             Text            =   "4"
  130.             Top             =   2520
  131.             Width           =   1845
  132.          End
  133.          Begin VB.TextBox LrText 
  134.             Height          =   300
  135.             Index           =   3
  136.             Left            =   1425
  137.             TabIndex        =   4
  138.             Text            =   "3"
  139.             Top             =   1995
  140.             Width           =   1845
  141.          End
  142.          Begin VB.CommandButton BcCommand 
  143.             Caption         =   "保存(&S)"
  144.             Height          =   300
  145.             Left            =   2820
  146.             TabIndex        =   10
  147.             Top             =   3180
  148.             Width           =   1120
  149.          End
  150.          Begin VB.CommandButton QxCommand 
  151.             Cancel          =   -1  'True
  152.             Caption         =   "取消(&C)"
  153.             Height          =   300
  154.             Left            =   4230
  155.             TabIndex        =   11
  156.             Top             =   3180
  157.             Width           =   1120
  158.          End
  159.          Begin VB.CommandButton Ydcommand1 
  160.             Height          =   300
  161.             Index           =   0
  162.             Left            =   6780
  163.             Picture         =   "基础设置_对象设置.frx":107A
  164.             Style           =   1  'Graphical
  165.             TabIndex        =   16
  166.             Top             =   4500
  167.             Visible         =   0   'False
  168.             Width           =   300
  169.          End
  170.          Begin VB.TextBox LrText 
  171.             Height          =   300
  172.             Index           =   1
  173.             Left            =   1425
  174.             TabIndex        =   2
  175.             Text            =   "1"
  176.             Top             =   945
  177.             Width           =   1845
  178.          End
  179.          Begin VB.TextBox LrText 
  180.             Height          =   300
  181.             Index           =   0
  182.             Left            =   1425
  183.             TabIndex        =   1
  184.             Text            =   "0"
  185.             Top             =   420
  186.             Width           =   1845
  187.          End
  188.          Begin VB.Label Label1 
  189.             AutoSize        =   -1  'True
  190.             Caption         =   "对应库存对象:"
  191.             Height          =   180
  192.             Left            =   4170
  193.             TabIndex        =   28
  194.             Top             =   2055
  195.             Width           =   1170
  196.          End
  197.          Begin VB.Label Label8 
  198.             AutoSize        =   -1  'True
  199.             Caption         =   "完工转出方式:"
  200.             Height          =   195
  201.             Left            =   4170
  202.             TabIndex        =   24
  203.             Top             =   1530
  204.             Width           =   1125
  205.          End
  206.          Begin VB.Label Label7 
  207.             AutoSize        =   -1  'True
  208.             Caption         =   "对象类别:"
  209.             Height          =   195
  210.             Left            =   4170
  211.             TabIndex        =   23
  212.             Top             =   1005
  213.             Width           =   765
  214.          End
  215.          Begin VB.Label Label6 
  216.             AutoSize        =   -1  'True
  217.             Caption         =   "转下道工序方式:"
  218.             Height          =   195
  219.             Left            =   4170
  220.             TabIndex        =   22
  221.             Top             =   480
  222.             Width           =   1305
  223.          End
  224.          Begin VB.Label Label4 
  225.             AutoSize        =   -1  'True
  226.             Caption         =   "计划产量:"
  227.             Height          =   180
  228.             Left            =   465
  229.             TabIndex        =   21
  230.             Top             =   2055
  231.             Width           =   810
  232.          End
  233.          Begin VB.Label Label3 
  234.             AutoSize        =   -1  'True
  235.             Caption         =   "计划成本:"
  236.             Height          =   180
  237.             Left            =   420
  238.             TabIndex        =   20
  239.             Top             =   2580
  240.             Width           =   810
  241.          End
  242.          Begin VB.Label Label2 
  243.             AutoSize        =   -1  'True
  244.             Caption         =   "计量单位:"
  245.             Height          =   180
  246.             Left            =   465
  247.             TabIndex        =   19
  248.             Top             =   1530
  249.             Width           =   810
  250.          End
  251.          Begin VB.Label TsLabel 
  252.             AutoSize        =   -1  'True
  253.             Caption         =   "对象名称:"
  254.             Height          =   180
  255.             Index           =   1
  256.             Left            =   465
  257.             TabIndex        =   18
  258.             Top             =   1005
  259.             Width           =   810
  260.          End
  261.          Begin VB.Label TsLabel 
  262.             AutoSize        =   -1  'True
  263.             Caption         =   "对象编码:"
  264.             Height          =   180
  265.             Index           =   0
  266.             Left            =   465
  267.             TabIndex        =   17
  268.             Top             =   480
  269.             Width           =   810
  270.          End
  271.       End
  272.       Begin VSFlex6DAOCtl.vsFlexGrid CzxsGrid 
  273.          Height          =   5385
  274.          Left            =   60
  275.          TabIndex        =   14
  276.          Top             =   390
  277.          Width           =   9495
  278.          _ExtentX        =   16748
  279.          _ExtentY        =   9499
  280.          _ConvInfo       =   1
  281.          Appearance      =   1
  282.          BorderStyle     =   1
  283.          Enabled         =   -1  'True
  284.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  285.             Name            =   "宋体"
  286.             Size            =   9
  287.             Charset         =   134
  288.             Weight          =   400
  289.             Underline       =   0   'False
  290.             Italic          =   0   'False
  291.             Strikethrough   =   0   'False
  292.          EndProperty
  293.          MousePointer    =   0
  294.          BackColor       =   -2147483643
  295.          ForeColor       =   -2147483640
  296.          BackColorFixed  =   -2147483633
  297.          ForeColorFixed  =   -2147483630
  298.          BackColorSel    =   -2147483635
  299.          ForeColorSel    =   -2147483634
  300.          BackColorBkg    =   8421504
  301.          BackColorAlternate=   -2147483643
  302.          GridColor       =   -2147483633
  303.          GridColorFixed  =   -2147483632
  304.          TreeColor       =   -2147483632
  305.          FloodColor      =   192
  306.          SheetBorder     =   -2147483642
  307.          FocusRect       =   1
  308.          HighLight       =   1
  309.          AllowSelection  =   -1  'True
  310.          AllowBigSelection=   -1  'True
  311.          AllowUserResizing=   0
  312.          SelectionMode   =   0
  313.          GridLines       =   1
  314.          GridLinesFixed  =   2
  315.          GridLineWidth   =   1
  316.          Rows            =   5000
  317.          Cols            =   10
  318.          FixedRows       =   1
  319.          FixedCols       =   0
  320.          RowHeightMin    =   0
  321.          RowHeightMax    =   0
  322.          ColWidthMin     =   0
  323.          ColWidthMax     =   0
  324.          ExtendLastCol   =   0   'False
  325.          FormatString    =   ""
  326.          ScrollTrack     =   0   'False
  327.          ScrollBars      =   3
  328.          ScrollTips      =   0   'False
  329.          MergeCells      =   0
  330.          MergeCompare    =   0
  331.          AutoResize      =   -1  'True
  332.          AutoSizeMode    =   0
  333.          AutoSearch      =   0
  334.          MultiTotals     =   -1  'True
  335.          SubtotalPosition=   1
  336.          OutlineBar      =   0
  337.          OutlineCol      =   0
  338.          Ellipsis        =   0
  339.          ExplorerBar     =   0
  340.          PicturesOver    =   0   'False
  341.          FillStyle       =   0
  342.          RightToLeft     =   0   'False
  343.          PictureType     =   0
  344.          TabBehavior     =   0
  345.          OwnerDraw       =   0
  346.          Editable        =   0   'False
  347.          ShowComboButton =   -1  'True
  348.          WordWrap        =   0   'False
  349.          TextStyle       =   0
  350.          TextStyleFixed  =   0
  351.          OleDragMode     =   0
  352.          OleDropMode     =   0
  353.          DataMode        =   0
  354.          VirtualData     =   -1  'True
  355.       End
  356.    End
  357.    Begin MSComctlLib.Toolbar SzToolbar 
  358.       Align           =   1  'Align Top
  359.       Height          =   570
  360.       Left            =   0
  361.       TabIndex        =   12
  362.       Top             =   0
  363.       Width           =   9615
  364.       _ExtentX        =   16960
  365.       _ExtentY        =   1005
  366.       ButtonWidth     =   820
  367.       ButtonHeight    =   953
  368.       AllowCustomize  =   0   'False
  369.       Appearance      =   1
  370.       Style           =   1
  371.       ImageList       =   "ImageList1"
  372.       _Version        =   393216
  373.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  374.          NumButtons      =   12
  375.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  376.             Caption         =   "设置"
  377.             Key             =   "ymsz"
  378.             ImageKey        =   "sz"
  379.          EndProperty
  380.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  381.             Caption         =   "打印"
  382.             Key             =   "dy"
  383.             ImageKey        =   "dy"
  384.          EndProperty
  385.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  386.             Caption         =   "预览"
  387.             Key             =   "yl"
  388.             ImageKey        =   "yl"
  389.          EndProperty
  390.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  391.             Style           =   3
  392.          EndProperty
  393.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  394.             Caption         =   "增加"
  395.             Key             =   "zj"
  396.             ImageKey        =   "xz"
  397.          EndProperty
  398.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  399.             Caption         =   "修改"
  400.             Key             =   "xg"
  401.             ImageKey        =   "xg"
  402.          EndProperty
  403.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  404.             Caption         =   "删除"
  405.             Key             =   "sc"
  406.             ImageKey        =   "sc"
  407.          EndProperty
  408.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  409.             Style           =   3
  410.          EndProperty
  411.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  412.             Caption         =   "刷新"
  413.             Key             =   "sx"
  414.             ImageIndex      =   23
  415.          EndProperty
  416.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  417.             Style           =   3
  418.          EndProperty
  419.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  420.             Caption         =   "帮助"
  421.             Key             =   "bz"
  422.             ImageKey        =   "bz"
  423.          EndProperty
  424.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  425.             Caption         =   "退出"
  426.             Key             =   "fh"
  427.             ImageKey        =   "tc"
  428.          EndProperty
  429.       EndProperty
  430.       BorderStyle     =   1
  431.       Begin MSComctlLib.Toolbar GsToolbar 
  432.          Height          =   540
  433.          Left            =   6990
  434.          TabIndex        =   13
  435.          Top             =   0
  436.          Width           =   2595
  437.          _ExtentX        =   4577
  438.          _ExtentY        =   953
  439.          ButtonWidth     =   1455
  440.          ButtonHeight    =   953
  441.          AllowCustomize  =   0   'False
  442.          Appearance      =   1
  443.          Style           =   1
  444.          ImageList       =   "ImageList1"
  445.          _Version        =   393216
  446.          BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  447.             NumButtons      =   3
  448.             BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  449.                Caption         =   "保存格式"
  450.                Key             =   "bcgs"
  451.                ImageKey        =   "bcgs"
  452.             EndProperty
  453.             BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  454.                Caption         =   "默认列宽"
  455.                Key             =   "hfmrgs"
  456.                ImageKey        =   "mrlk"
  457.             EndProperty
  458.             BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  459.                Caption         =   "显示项目"
  460.                Key             =   "szxsxm"
  461.                ImageKey        =   "xsxm"
  462.             EndProperty
  463.          EndProperty
  464.       End
  465.    End
  466.    Begin MSComctlLib.ImageList ImageList1 
  467.       Left            =   4950
  468.       Top             =   1200
  469.       _ExtentX        =   1005
  470.       _ExtentY        =   1005
  471.       BackColor       =   -2147483643
  472.       ImageWidth      =   16
  473.       ImageHeight     =   16
  474.       MaskColor       =   12632256
  475.       _Version        =   393216
  476.       BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  477.          NumListImages   =   29
  478.          BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  479.             Picture         =   "基础设置_对象设置.frx":1404
  480.             Key             =   "sz"
  481.          EndProperty
  482.          BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  483.             Picture         =   "基础设置_对象设置.frx":179E
  484.             Key             =   "dy"
  485.          EndProperty
  486.          BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  487.             Picture         =   "基础设置_对象设置.frx":1B38
  488.             Key             =   "yl"
  489.          EndProperty
  490.          BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  491.             Picture         =   "基础设置_对象设置.frx":1ED2
  492.             Key             =   "xg"
  493.          EndProperty
  494.          BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  495.             Picture         =   "基础设置_对象设置.frx":226C
  496.             Key             =   "zh"
  497.          EndProperty
  498.          BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  499.             Picture         =   "基础设置_对象设置.frx":2606
  500.             Key             =   "sh"
  501.          EndProperty
  502.          BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  503.             Picture         =   "基础设置_对象设置.frx":29A0
  504.             Key             =   "bc"
  505.          EndProperty
  506.          BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  507.             Picture         =   "基础设置_对象设置.frx":2D3A
  508.             Key             =   "fq"
  509.          EndProperty
  510.          BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  511.             Picture         =   "基础设置_对象设置.frx":30D4
  512.             Key             =   "bz"
  513.          EndProperty
  514.          BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  515.             Picture         =   "基础设置_对象设置.frx":346E
  516.             Key             =   "tc"
  517.          EndProperty
  518.          BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  519.             Picture         =   "基础设置_对象设置.frx":3808
  520.             Key             =   "bcgs"
  521.          EndProperty
  522.          BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  523.             Picture         =   "基础设置_对象设置.frx":3BA2
  524.             Key             =   "mrlk"
  525.          EndProperty
  526.          BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  527.             Picture         =   "基础设置_对象设置.frx":3F3C
  528.             Key             =   "xsxm"
  529.          EndProperty
  530.          BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  531.             Picture         =   "基础设置_对象设置.frx":42D6
  532.             Key             =   "first"
  533.          EndProperty
  534.          BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  535.             Picture         =   "基础设置_对象设置.frx":4670
  536.             Key             =   "prev"
  537.          EndProperty
  538.          BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  539.             Picture         =   "基础设置_对象设置.frx":4A0A
  540.             Key             =   "next"
  541.          EndProperty
  542.          BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  543.             Picture         =   "基础设置_对象设置.frx":4DA4
  544.             Key             =   "last"
  545.          EndProperty
  546.          BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  547.             Picture         =   "基础设置_对象设置.frx":513E
  548.             Key             =   "xx"
  549.          EndProperty
  550.          BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  551.             Picture         =   "基础设置_对象设置.frx":54D8
  552.             Key             =   "define"
  553.          EndProperty
  554.          BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  555.             Picture         =   "基础设置_对象设置.frx":5872
  556.             Key             =   "exec"
  557.          EndProperty
  558.          BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  559.             Picture         =   "基础设置_对象设置.frx":5C0C
  560.             Key             =   "xz"
  561.          EndProperty
  562.          BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  563.             Picture         =   "基础设置_对象设置.frx":5FA6
  564.             Key             =   "sc"
  565.          EndProperty
  566.          BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  567.             Picture         =   "基础设置_对象设置.frx":6340
  568.             Key             =   "sx"
  569.          EndProperty
  570.          BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  571.             Picture         =   "基础设置_对象设置.frx":66DA
  572.             Key             =   "cx"
  573.          EndProperty
  574.          BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  575.             Picture         =   "基础设置_对象设置.frx":6A74
  576.             Key             =   "zd"
  577.          EndProperty
  578.          BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  579.             Picture         =   "基础设置_对象设置.frx":6E0E
  580.             Key             =   "dz"
  581.          EndProperty
  582.          BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  583.             Picture         =   "基础设置_对象设置.frx":71A8
  584.             Key             =   "ph"
  585.          EndProperty
  586.          BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  587.             Picture         =   "基础设置_对象设置.frx":7542
  588.             Key             =   "fz"
  589.          EndProperty
  590.          BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  591.             Picture         =   "基础设置_对象设置.frx":78DC
  592.             Key             =   "dw"
  593.          EndProperty
  594.       EndProperty
  595.    End
  596. End
  597. Attribute VB_Name = "JC_FrmObjectSet"
  598. Attribute VB_GlobalNameSpace = False
  599. Attribute VB_Creatable = False
  600. Attribute VB_PredeclaredId = True
  601. Attribute VB_Exposed = False
  602. '*************************************************************
  603. '*    模 块 名 称 :对象设置
  604. '*    功 能 描 述 :录入产品
  605. '*    程序员姓名  : xjl
  606. '*    最后修改人  : xjl
  607. '*    最后修改时间:2001/07/24
  608. '*    备        注:
  609. '*************************************************************
  610.  
  611. Dim RecSettlement As New ADODB.Recordset '结算方式表(编码表)
  612. Dim jdzygs As Integer                    '控件焦点转移个数
  613. Dim Lrzt As Integer                      '录入状态标志(0-非录入状态 1-增加 2-修改)
  614. Dim ReportTitle As String                '报表主标题
  615. Dim Combo_CostCellCode() As String       '成本中心COMBO
  616. Dim Combo_BZ As String                   'Combo标志
  617. '以下为固定使用变量(网格)
  618. Dim Cxnrrec As New ADODB.Recordset       '显示查询内容动态集
  619. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  620. Dim GridCode As String                   '显示网格网格代码
  621. Dim GridInf() As Variant                 '整个网格设置信息
  622. Dim Tsxx As String                       '系统提示信息
  623. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  624. Dim Sjhgd As Double                      '网格数据行高度
  625. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  626. Dim GridStr()  As String                 '网格列信息(字符型)
  627. Dim GridInt() As Integer                 '网格列信息(整型)
  628. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  629. '以下为固定使用变量(文本框)
  630. Dim Textvar() As Variant                 '存储变体型文本框信息
  631. Dim Textboolean() As Boolean             '存储布尔型文本框信息
  632. Dim Textint() As Integer                 '存储整型文本框信息
  633. Dim Textstr() As String                  '存储字符型文本框信息
  634. Dim Max_Text_Index As Integer            '最大录入文本框索引值
  635. Dim TextGroupCode As String              '文本框录入分组编码
  636. Dim TextValiLock As Boolean              '文本框失去焦点是否进行有效性控制判断
  637. Dim TextValiJudgeLock() As Boolean       '文本框录入有效性判断控制锁
  638. Dim CurTextIndex As Integer              '当前文本框索引值
  639. Dim TextChangeLock As Boolean            '文本框内容变换控制锁
  640. Dim Bln_Cancel As Boolean                '取消按钮信息传递
  641. '查询数据
  642. Private Sub Combo_CostCell_Click()
  643.     If Combo_BZ = "0" Then
  644.         Combo_BZ = "1"
  645.         Exit Sub
  646.     End If
  647.     Call Cxnrtcwg
  648. End Sub
  649. Private Sub Form_KeyPress(KeyAscii As Integer)   '控 制 焦 点 转 移
  650.    jdzygs = 13
  651.    Select Case KeyAscii
  652.       Case vbKeyReturn
  653.            If Kjjdzy(jdzygs) Then
  654.               KeyAscii = 0
  655.            End If
  656.       Case 39           '屏蔽"'"
  657.         KeyAscii = 0
  658.    End Select
  659. End Sub
  660. '调入窗体
  661. Private Sub Form_Load()
  662.     '定义可变部分变量
  663.     ReportTitle = "成本对象设置"
  664.     Combo_BZ = "0"
  665.     '调入打印页面设置窗体
  666.     
  667.     XtReportCode = "Cbhs_object"
  668.     Load Dyymctbl
  669.     '初始化成本中心
  670.     Call CshAccountCell
  671.     '以下为文本框处理程序
  672.     TextGroupCode = "Cbhs_object"
  673.     Call Drwbkxx(TextGroupCode, Textvar(), Textboolean(), Textint(), Textstr())  '读入文本框录入信息
  674.     Call Wbkcsh
  675.     '调 入 网 格
  676.     GridCode = "Cbhs_Object"
  677.     Call BzWgcsh(CzxsGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  678.     Qslz = GridInf(1)
  679.     Sjhgd = GridInf(2)
  680.     Szzls = CzxsGrid.Cols - 1
  681.     '填 充 网 格
  682.     Call Cxnrtcwg
  683.     '初始化toolbar,tab卡状态
  684.     StTab.Tab = 0
  685.     StTab.TabEnabled(1) = False
  686.     Frame1.Enabled = False
  687.     Lrzt = 0
  688.  End Sub
  689. Private Sub Cxnrtcwg()                               '查 询 内 容 填 充 网 格
  690.     Dim SqlStr As String
  691.     Dim Jsqte As Long
  692.   
  693.     '查询连接串
  694.     SqlStr = "Select Objectcode,ObjectName,MeasureUnitName,ProPlanCost,ProPlanQuantity,ObjectClassName,TurnNextClassName,CompleteClassName,costobject_name From Cbhs_object  A " _
  695.                     & "Left Outer Join Cbhs_ObjectType B On A.ObjectClassCode=B.ObjectClassCode " _
  696.                     & "Left OUter Join Cbhs_TurnNextType C On A.TurnNextClassCode=C.TurnNextClassCode " _
  697.                     & "Left OUter Join Cbhs_Completetype D On A.CompleteClassCode=D.CompleteClassCode  " _
  698.                     & "Left Outer Join Cbhs_MeasureUnitType E On A.MeasureUnitCode=E.MeasureUnitCode " _
  699.                     & "Left Outer Join Kf_costobject F On A.KF_Object=F.costobject_code " _
  700.                     & "Where AccountCellcCode='" + Trim(Combo_CostCellCode(Combo_CostCell.ListIndex)) + "' Order By ObjectCode"
  701.     Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  702.     With Cxnrrec
  703.         CzxsGrid.Clear 1
  704.         CzxsGrid.Rows = .RecordCount + CzxsGrid.FixedRows
  705.         If .EOF And .BOF Then
  706.             Exit Sub
  707.         End If
  708.         Jsqte = CzxsGrid.FixedRows
  709.         Do While Not .EOF
  710.             If Jsqte >= CzxsGrid.Rows Then
  711.                 CzxsGrid.AddItem ""
  712.             End If
  713.             Call Jltcwg(Cxnrrec, Jsqte)
  714.             CzxsGrid.RowHeight(Jsqte) = Sjhgd
  715.             .MoveNext
  716.             Jsqte = Jsqte + 1
  717.         Loop
  718.     End With
  719. End Sub
  720. Private Sub Jltcwg(Jlbrec As ADODB.Recordset, Rowjsq As Long)                                     '记录内容填充网格
  721.     Dim RecTemp As New ADODB.Recordset
  722.     '[以下为自定义部分
  723.     With Jlbrec
  724.         '-----------对象编码------------------------
  725.         CzxsGrid.TextMatrix(Rowjsq, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("ObjectCode")) & ""
  726.         '-----------对象名称-------------------------
  727.         CzxsGrid.TextMatrix(Rowjsq, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("ObjectName")) & ""
  728.         '-----------计量单位-------------------------
  729.         CzxsGrid.TextMatrix(Rowjsq, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("MeasureUnitName")) & ""
  730.         '-----------计划成本--------------------------
  731.         CzxsGrid.TextMatrix(Rowjsq, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("ProPlanCost")) & ""
  732.         '-----------计划产量--------------------------
  733.         CzxsGrid.TextMatrix(Rowjsq, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("ProPlanQuantity")) & ""
  734.         '-----------转下道工序方式----------------------
  735.         CzxsGrid.TextMatrix(Rowjsq, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("TurnNextClassName")) & ""
  736.         '-------------对象类别-----------------
  737.         CzxsGrid.TextMatrix(Rowjsq, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("ObjectClassName")) & ""
  738.         '---------------完工转出方式---------------------
  739.         CzxsGrid.TextMatrix(Rowjsq, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("CompleteClassName")) & ""
  740.         
  741.         CzxsGrid.TextMatrix(Rowjsq, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("costobject_name")) & ""
  742.     End With
  743.     '以上为自定义部分]
  744. End Sub
  745. Private Sub Form_Unload(Cancel As Integer)             '窗体卸载
  746.     Set Cxnrrec = Nothing
  747.     Unload Dyymctbl
  748. End Sub
  749. Private Function Bclrsj() As Boolean                   '判断录入数据有效性,并保存数据
  750.     Dim RecTemp As New ADODB.Recordset
  751.     Dim Jsqte As Integer
  752.     Bclrsj = False
  753.     
  754.     With RecSettlement
  755.     For Jsqte = 0 To Max_Text_Index
  756.         If Textint(Jsqte, 8) = 1 Then     '字段不能为空
  757.             If Len(Trim(LrText(Jsqte).Text)) = 0 Then
  758.                 Tsxx = Textstr(Jsqte, 7) & "不能为空!"
  759.                 Call Xtxxts(Tsxx, 0, 1)
  760.                 LrText(Jsqte).SetFocus
  761.                 Bclrsj = False
  762.                 Exit Function
  763.             End If
  764.         Else
  765.             If Textint(Jsqte, 8) = 2 Then   '字段不能为零
  766.                 If Val(Trim(LrText(Jsqte).Text)) = 0 Then
  767.                     Tsxx = Textstr(Jsqte, 7) & "不能为零!"
  768.                     Call Xtxxts(Tsxx, 0, 1)
  769.                     LrText(Jsqte).SetFocus
  770.                     Bclrsj = False
  771.                     Exit Function
  772.                 End If
  773.             End If
  774.         End If
  775.     Next Jsqte
  776.     
  777.     '对需要进行事后判断的文本框录入内容进行有效性判断 (固定不变)
  778.     For Jsqte = 0 To Max_Text_Index
  779.         If Textint(Jsqte, 9) = 0 Or Textint(Jsqte, 9) = 2 Then
  780.             If Not TextYxxpd(Jsqte) Then
  781.                 Exit Function
  782.             End If
  783.         End If
  784.     Next Jsqte
  785.     
  786.     If Lrzt = 1 Then  '增 加
  787.         If .State = 1 Then .Close
  788.         .Open "SELECT * FROM Cbhs_Object WHERE ObjectCode= '" + Trim(LrText(0)) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  789.         If Not .EOF Then
  790.             Tsxx = "对象编码重复!"
  791.             Call Xtxxts(Tsxx, 0, 1)
  792.             LrText(0).SetFocus
  793.             Bclrsj = False
  794.             Exit Function
  795.         End If
  796.     
  797.         If .State = 1 Then .Close
  798.         .Open "SELECT * FROM Cbhs_Object WHERE ObjectName= '" + Trim(LrText(1)) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic
  799.         If Not .EOF Then
  800.             Tsxx = "对象名称重复!"
  801.             Call Xtxxts(Tsxx, 0, 1)
  802.             LrText(1).SetFocus
  803.             Bclrsj = False
  804.             Exit Function
  805.         End If
  806.         .AddNew
  807.         .Fields("ObjectCode") = Trim(LrText(0))
  808.         .Fields("ObjectName") = Trim(LrText(1))
  809.         .Fields("MeasureUnitCode") = Trim(LrText(2).Tag)
  810.         .Fields("ProPlanCost") = Trim(LrText(3))
  811.         .Fields("ProPlanQuantity") = Trim(LrText(4))
  812.         .Fields("TurnNextClassCode") = Trim(LrText(5).Tag)
  813.         .Fields("ObjectClassCode") = Trim(LrText(6).Tag)
  814.         .Fields("CompleteClassCode") = Trim(LrText(7).Tag)
  815.         .Fields("AccountCellcCode") = Combo_CostCellCode(Combo_CostCell.ListIndex)
  816.         .Fields("KF_Object") = Trim(LrText(8).Tag)
  817.         .Update
  818.         SqlStr = "Select Objectcode,ObjectName,MeasureUnitName,ProPlanCost,ProPlanQuantity,ObjectClassName,TurnNextClassName,CompleteClassName,costobject_name From Cbhs_object  A " _
  819.                     & "Left Outer Join Cbhs_ObjectType B On A.ObjectClassCode=B.ObjectClassCode " _
  820.                     & "Left Outer Join Cbhs_TurnNextType C On A.TurnNextClassCode=C.TurnNextClassCode " _
  821.                     & "Left Outer Join Cbhs_Completetype D On A.CompleteClassCode=D.CompleteClassCode  " _
  822.                     & "Left Outer Join Cbhs_MeasureUnitType E On A.MeasureUnitCode=E.MeasureUnitCode " _
  823.                     & "Left Outer Join Kf_costobject F On A.KF_Object=F.costobject_code " _
  824.                     & "Where AccountCellcCode='" + Trim(Combo_CostCellCode(Combo_CostCell.ListIndex)) + "'  " _
  825.                     & "And ObjectCode='" & Trim(LrText(0).Text) & "' Order By ObjectCode"
  826.     
  827.         Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  828.         With CzxsGrid
  829.             .AddItem ""
  830.             .RowHeight(.Rows - 1) = Sjhgd
  831.             .Select .Rows - 1, Qslz
  832.             Call Jltcwg(Cxnrrec, .Rows - 1)
  833.         End With
  834.    
  835.         Tsxx = "保存完毕!"
  836.         Call Xtxxts(Tsxx, 0, 4)
  837.         Call Cshlrxx(1)
  838.         LrText(0).SetFocus
  839.     Else
  840.         '对象名
  841.         If .State = 1 Then .Close
  842.         .Open "SELECT * FROM Cbhs_object WHERE ObjectName= '" + Trim(LrText(1).Text) + "' And ObjectCode<>'" & Trim(LrText(0)) & "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  843.         If Not .EOF Then
  844.             Tsxx = "对象名称重复!"
  845.             Call Xtxxts(Tsxx, 0, 1)
  846.             LrText(1).SetFocus
  847.             Bclrsj = False
  848.             Exit Function
  849.         End If
  850.         If .State = 1 Then .Close
  851.         .Open "SELECT * FROM Cbhs_Object WHERE ObjectCode= '" + Trim(LrText(0)) + "'", Cw_DataEnvi.DataConnect, adOpenDynamic, adLockOptimistic
  852.         If Not .EOF Then
  853.             .Fields("ObjectName") = Trim(LrText(1))
  854.             
  855.             '计量单位
  856.             SqlStr = "Select * From Cbhs_MeasureUnitType Where MeasureUnitCode='" & Trim(LrText(2).Text) & "' Or MeasureUnitName='" & Trim(LrText(2).Text) & "'"
  857.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  858.             If Not RecTemp.EOF Then
  859.                 .Fields("MeasureUnitCode") = Trim(RecTemp.Fields("MeasureUnitCode"))
  860.             End If
  861.             .Fields("ProPlanCost") = Trim(LrText(3))
  862.             .Fields("ProPlanQuantity") = Trim(LrText(4))
  863.             
  864.             '转下道工序
  865.             SqlStr = "Select * From Cbhs_TurnNextType Where TurnNextClassCode='" & Trim(LrText(5).Text) & "' Or TurnNextClassName='" & Trim(LrText(5).Text) & "'"
  866.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  867.             If Not RecTemp.EOF Then
  868.                 .Fields("TurnNextClassCode") = Trim(RecTemp.Fields("TurnNextClassCode"))
  869.             End If
  870.             '对象类型
  871.             SqlStr = "Select * From Cbhs_ObjectType Where ObjectClassCode='" & Trim(LrText(6).Text) & "' Or ObjectClassName='" & Trim(LrText(6).Text) & "'"
  872.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  873.             If Not RecTemp.EOF Then
  874.                 .Fields("ObjectClassCode") = Trim(RecTemp.Fields("ObjectClassCode"))
  875.             End If
  876.             '完工方式
  877.             SqlStr = "Select * From Cbhs_Completetype Where CompleteClassCode='" & Trim(LrText(7).Text) & "' Or CompleteClassName='" & Trim(LrText(7).Text) & "'"
  878.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  879.             If Not RecTemp.EOF Then
  880.                 .Fields("CompleteClassCode") = Trim(RecTemp.Fields("CompleteClassCode"))
  881.             End If
  882.             '库房对象
  883.             SqlStr = "Select * From kf_costobject Where costobject_code='" & Trim(LrText(8).Text) & "' Or costobject_name='" & Trim(LrText(8).Text) & "'"
  884.             Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  885.             If Not RecTemp.EOF Then
  886.                 .Fields("KF_Object") = Trim(RecTemp.Fields("costobject_code"))
  887.             End If
  888.             .Update
  889.         End If
  890.         SqlStr = "Select Objectcode,ObjectName,MeasureUnitName,ProPlanCost,ProPlanQuantity,ObjectClassName,TurnNextClassName,CompleteClassName From Cbhs_object  A " _
  891.                     & "Left Outer Join Cbhs_ObjectType B On A.ObjectClassCode=B.ObjectClassCode " _
  892.                     & "Left OUter Join Cbhs_TurnNextType C On A.TurnNextClassCode=C.TurnNextClassCode " _
  893.                     & "Left OUter Join Cbhs_Completetype D On A.CompleteClassCode=D.CompleteClassCode  " _
  894.                     & "Left Outer Join Cbhs_MeasureUnitType E On A.MeasureUnitCode=E.MeasureUnitCode " _
  895.                     & "Where AccountCellcCode='" + Trim(Combo_CostCellCode(Combo_CostCell.ListIndex)) + "'  " _
  896.                     & "And ObjectCode='" & Trim(LrText(0).Text) & "' Order By ObjectCode"
  897.         Set Cxnrrec = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  898.         If Not Cxnrrec.EOF Then
  899.             With CzxsGrid
  900.                 Call Jltcwg(Cxnrrec, .Row)
  901.             End With
  902.         End If
  903.     End If
  904.     Bclrsj = True
  905.     Exit Function
  906.     End With
  907. Swcwcl:
  908.      Tsxx = "存盘过程中出现错误,请退出后重新进入!"
  909.      Call Xtxxts(Tsxx, 0, 1)
  910.      Exit Function
  911. End Function
  912. Private Sub Cshlrxx(lrztxx As Integer)              '初始化录入字段信息
  913.     TextChangeLock = True       '关闭Chang事件
  914.     If lrztxx = 1 Then
  915.         For Jsqte = 0 To Max_Text_Index
  916.             If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
  917.                 TextChangeLock = True
  918.                 LrText(Jsqte).Text = ""
  919.                 LrText(Jsqte).Tag = ""
  920.                 TextChangeLock = False
  921.             End If
  922.             TextValiJudgeLock(Jsqte) = True
  923.         Next Jsqte
  924.     Else
  925.     
  926.         Dim strCode As String
  927.         Dim i As Integer
  928.         With CzxsGrid
  929.             LrText(0).Text = Trim(.TextMatrix(.Row, Sydz("001", GridStr(), Szzls)))
  930.             LrText(1).Text = Trim(.TextMatrix(.Row, Sydz("002", GridStr(), Szzls)))
  931.             LrText(2).Text = Trim(.TextMatrix(.Row, Sydz("003", GridStr(), Szzls)))
  932.             LrText(3).Text = Trim(.TextMatrix(.Row, Sydz("004", GridStr(), Szzls)))
  933.             LrText(4).Text = Trim(.TextMatrix(.Row, Sydz("005", GridStr(), Szzls)))
  934.             LrText(5).Text = Trim(.TextMatrix(.Row, Sydz("006", GridStr(), Szzls)))
  935.             LrText(6).Text = Trim(.TextMatrix(.Row, Sydz("007", GridStr(), Szzls)))
  936.             LrText(7).Text = Trim(.TextMatrix(.Row, Sydz("008", GridStr(), Szzls)))
  937.             LrText(8).Text = Trim(.TextMatrix(.Row, Sydz("009", GridStr(), Szzls)))
  938.         End With
  939.     End If
  940.     TextChangeLock = False
  941. End Sub
  942. Private Sub Scdqjl()                 '删 除 当 前 记 录
  943.   Dim yhAnswer As Integer
  944.   If CzxsGrid.Row < CzxsGrid.FixedRows Then
  945.      Exit Sub
  946.   End If
  947.   Tsxx = "请确认是否删除当前记录?"
  948.   yhAnswer = Xtxxts(Tsxx, 2, 2)
  949.   If yhAnswer = 2 Then
  950.      Exit Sub
  951.   End If
  952.   On Error GoTo Cwcl
  953.   
  954.   '[以下需自定义部分
  955.   Cw_DataEnvi.DataConnect.Execute "delete Cbhs_Object where  ObjectCode = '" + Trim(CzxsGrid.TextMatrix(CzxsGrid.Row, Sydz("001", GridStr(), Szzls))) + "'"
  956.   '以上为自定义部分]
  957.     
  958.   CzxsGrid.RemoveItem CzxsGrid.Row
  959.   Exit Sub
  960. Cwcl:
  961.     If ERR.Number = -2147217900 Then
  962.      Tsxx = "该编码已经被使用,不能删除!"
  963.      Call Xtxxts(Tsxx, 0, 1)
  964.      Exit Sub
  965.     Else
  966.      Tsxx = "出现未知情况,该编码不能被删除!"
  967.      Call Xtxxts(Tsxx, 0, 1)
  968.      Exit Sub
  969.     End If
  970. End Sub
  971. '******************以下为基本处理程序(固定不变)************************'
  972. Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)        '支持热键操作
  973.     If Shift = 2 Then
  974.      Select Case UCase(Chr(KeyCode))
  975.          Case "P"                   'Ctrl+P 打印
  976.             Call bbyl(False)
  977.          Case "I"                   'Ctrl+I 增加
  978.               Call Toolbjzt
  979.                Lrzt = 1
  980.                Call Cshlrxx(Lrzt)
  981.               LrText(0).SetFocus
  982.               LrText(0).Locked = False
  983.          Case "D"                   'Ctrl+D 删除
  984.               Call Scdqjl
  985.      End Select
  986.   End If
  987. End Sub
  988. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  989.    Select Case Button.Key
  990.       Case "ymsz"                                          '页面设置
  991.           Dyymctbl.Show 1
  992.       Case "yl"                                            '预 览
  993.           Call bbyl(True)
  994.       Case "dy"                                            '打 印
  995.           Call bbyl(False)
  996.       Case "zj"                                            '增 加
  997.         Call Toolbjzt
  998.         Lrzt = 1
  999.         Call Cshlrxx(Lrzt)
  1000.         LrText(0).SetFocus
  1001.         LrText(0).Locked = False
  1002.       Case "xg"                                            '修 改
  1003.          Call Xgdqjl
  1004.       Case "sc"                                            '删 除
  1005.          Call Scdqjl
  1006.       Case "fq"                                            '取 消
  1007.         Call Toolfbjzt
  1008.       Case "sx"                                            '刷 新
  1009.        Call Cxnrtcwg
  1010.       Case "bz"                                            '帮 助
  1011.        Call F1bz
  1012.       Case "fh"                                            '退 出
  1013.        Unload Me
  1014.    End Select
  1015. End Sub
  1016. Private Sub CzxsGrid_DblClick()                            '修改当前编码记录
  1017.   Call Xgdqjl
  1018. End Sub
  1019. Private Sub Xgdqjl()                                       '修改当前编码记录
  1020.   If CzxsGrid.Row < CzxsGrid.FixedRows Then
  1021.     Exit Sub
  1022.   End If
  1023.   Call Toolbjzt
  1024.   Lrzt = 2
  1025.   Call Cshlrxx(Lrzt)
  1026.   LrText(1).SetFocus
  1027.   LrText(0).Locked = True
  1028. End Sub
  1029. Private Sub Toolbjzt()                                     'Toolbar状态(编辑状态)
  1030.   StTab.TabEnabled(1) = True
  1031.   StTab.Tab = 1
  1032.   Frame1.Enabled = True
  1033.   StTab.TabEnabled(0) = False
  1034.   CzxsGrid.Enabled = False
  1035.   With SzToolbar
  1036.     .Buttons("ymsz").Enabled = False
  1037.     .Buttons("dy").Enabled = False
  1038.     .Buttons("yl").Enabled = False
  1039.     .Buttons("zj").Enabled = False
  1040.     .Buttons("xg").Enabled = False
  1041.     .Buttons("sc").Enabled = False
  1042.   End With
  1043. End Sub
  1044. Private Sub Toolfbjzt()                                    'Toolbar状态(非编辑状态)
  1045.   StTab.TabEnabled(0) = True
  1046.   StTab.Tab = 0
  1047.   CzxsGrid.Enabled = True
  1048.   Frame1.Enabled = False
  1049.   StTab.TabEnabled(1) = False
  1050.   Lrzt = 0
  1051.    With SzToolbar
  1052.      .Buttons("ymsz").Enabled = True
  1053.      .Buttons("dy").Enabled = True
  1054.      .Buttons("yl").Enabled = True
  1055.      .Buttons("zj").Enabled = True
  1056.      .Buttons("xg").Enabled = True
  1057.      .Buttons("sc").Enabled = True
  1058.   End With
  1059. End Sub
  1060. Private Sub BcCommand_Click()                                           '保 存
  1061.   If Not Bclrsj Then
  1062.      Exit Sub
  1063.   End If
  1064.   If Lrzt = 2 Then
  1065.      Call Toolfbjzt
  1066.   End If
  1067. End Sub
  1068. Private Sub QxCommand_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)       '取消
  1069.   '避免执行Click程序
  1070.   Bln_Cancel = True
  1071.   Call Cancel
  1072. End Sub
  1073. Private Sub QxCommand_Click()                                                                         '取消
  1074.  If Bln_Cancel Then
  1075.     Bln_Cancel = False
  1076.     Exit Sub
  1077.  End If
  1078.  Call Cancel
  1079. End Sub
  1080. Private Sub Cancel()                                                                                  '取消
  1081.   '文本框加锁
  1082. '  For Jsqte = 0 To Max_Text_Index
  1083. '     TextValiJudgeLock(Jsqte) = True
  1084. '  Next Jsqte
  1085.   Call Toolfbjzt
  1086. End Sub
  1087. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)   '表格格式设置(通用)
  1088.     Select Case Button.Key
  1089.       Case "bcgs"                              '保存表格格式
  1090.         Call Bcwggs(CzxsGrid, GridCode)
  1091.       Case "hfmrgs"                            '恢复默认格式
  1092.         Call Hfmrgs(CzxsGrid, GridCode)
  1093.       Case "szxsxm"                            '设置显示项目
  1094.         Call Szxsxm(CzxsGrid, GridCode)
  1095.     End Select
  1096. End Sub
  1097. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1098.   Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1099.   Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1100.   Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1101.   Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1102.   ReDim Bbxbt(1 To Bbxbtgs)
  1103.   ReDim bbxbtzzxs(1 To Bbxbtgs)
  1104.   If Bbbwhgs <> 0 Then
  1105.      ReDim Bbbwh(1 To Bbbwhgs)
  1106.      ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1107.   End If
  1108.   Bbzbt = ReportTitle
  1109.   Bbxbt(1) = " "
  1110.   bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1111.   Call Scyxsjb(CzxsGrid)                               '生成报表数据
  1112.   Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1113.   If Not bbylte Then
  1114.      Unload DY_Tybbyldy
  1115.   End If
  1116. End Sub
  1117. '************以下为文本框录入处理程序(固定不变部分)*************'
  1118. Private Sub Wbklrwbcl(Index As Integer)    '文本框录入事后处理程序
  1119.   '以下为依据实际情况自定义部分[
  1120.   
  1121.       '在此填写文本框录入事后处理程序
  1122.    
  1123.   ']以上为依据实际情况自定义部分
  1124. End Sub
  1125. Private Sub LrText_Change(Index As Integer)
  1126.    '屏蔽程序改变控制
  1127.    If TextChangeLock Then
  1128.       Exit Sub
  1129.    End If
  1130.    
  1131.    TextValiJudgeLock(Index) = False    '打开有效性判断锁
  1132.     
  1133.     '限制字段录入长度
  1134.           
  1135.      TextChangeLock = True  '加锁(防止执行Lrtext_Change)
  1136.         Select Case Textint(Index, 1)
  1137.            Case 8           '金额型
  1138.              Call Sjgskz(LrText(Index), Xtjezws - Xtjexsws - 1, Xtjexsws)
  1139.            Case 9           '数量型
  1140.              Call Sjgskz(LrText(Index), Xtslzws - Xtslxsws - 1, Xtslxsws)
  1141.            Case 10          '单价型
  1142.              Call Sjgskz(LrText(Index), Xtdjzws - Xtdjxsws - 1, Xtdjxsws)
  1143.            Case Else        '其他小数类型控制
  1144.               If Textint(Index, 6) <> 0 Or Textint(Index, 7) <> 0 Then
  1145.                  Call Sjgskz(LrText(Index), Textint(Index, 6), Textint(Index, 7))
  1146.               End If
  1147.         End Select
  1148.      TextChangeLock = False '解锁
  1149. End Sub
  1150. Private Sub LrText_GotFocus(Index As Integer)                                                 '文本框得到焦点,显示相应信息
  1151.    Call TextShow(Index)
  1152.    CurTextIndex = Index
  1153.    LrText(Index).SelStart = Len(LrText(Index))
  1154. End Sub
  1155. Private Sub LrText_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)            '字段按F2键提供帮助
  1156.    Select Case KeyCode
  1157.       Case vbKeyF2
  1158.         Call Text_Help(Index)
  1159.    End Select
  1160. End Sub
  1161. Private Sub LrText_KeyPress(Index As Integer, KeyAscii As Integer)                            '文本框录入事中控制
  1162.    Call InputFieldLimit(LrText(Index), Textint(Index, 1), KeyAscii)
  1163. End Sub
  1164. Private Sub LrText_LostFocus(Index As Integer)                                                '文本框失去焦点进行有效性判断及相应处理
  1165.   If Textint(Index, 9) = 0 Or Textint(Index, 9) = 1 Then '事中判断
  1166.      Call TextYxxpd(Index)
  1167.   End If
  1168. End Sub
  1169. Private Sub Ydcommand1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)     '按钮提供帮助
  1170.    Call Text_Help(Index)
  1171. End Sub
  1172. Private Sub Text_Help(Index As Integer)                                                       '录入字段帮助
  1173.   If Not Textboolean(Index, 1) Then
  1174.      Exit Sub
  1175.   End If
  1176.    TextValiJudgeLock(Index) = True
  1177.    
  1178.      '先进行有效性判断
  1179.      If Not TextYxxpd(CurTextIndex) Then
  1180.         Exit Sub
  1181.      End If
  1182.    
  1183.      Call Drbmhelp(Textint(Index, 2), Textstr(Index, 4), Trim(LrText(Index).Text))
  1184.      If Len(Xtfhcs) <> 0 Then
  1185.         If Textint(Index, 3) = 1 Then
  1186.            LrText(Index).Text = Xtfhcsfz
  1187.            LrText(Index).Tag = Xtfhcs
  1188.         Else
  1189.            LrText(Index).Text = Xtfhcs
  1190.            LrText(Index).Tag = Xtfhcsfz
  1191.         End If
  1192.         
  1193.      End If
  1194.    TextValiJudgeLock(Index) = False
  1195.    LrText(Index).SetFocus
  1196. End Sub
  1197. Private Sub TextShow(Index As Integer)        '文本框得到焦点,显示相应信息
  1198.    '填写文本框得到焦点,进行相应信息处理程序
  1199. End Sub
  1200. Private Sub Wbkcsh()                          '录入文本框初始化
  1201.   Dim Jsqte As Integer
  1202.   
  1203.   '最大录入文本框索引值
  1204.   Max_Text_Index = Textvar(1)
  1205.   
  1206.   ReDim TextValiJudgeLock(Max_Text_Index)
  1207.   For Jsqte = 0 To Max_Text_Index
  1208.      
  1209.      If Len(Trim(Textstr(Jsqte, 1))) <> 0 Then
  1210.         If Textboolean(Jsqte, 1) Then
  1211.             If Jsqte <> 0 And Not Textboolean(Jsqte, 3) Then
  1212.                 Load Ydcommand1(Jsqte)
  1213.             End If
  1214.             Ydcommand1(Jsqte).Visible = True
  1215.             Ydcommand1(Jsqte).Move LrText(Jsqte).Left + LrText(Jsqte).Width, LrText(Jsqte).Top
  1216.         End If
  1217.         TextChangeLock = True
  1218.          LrText(Jsqte).Text = ""
  1219.          LrText(Jsqte).Tag = ""
  1220.          If Textint(Jsqte, 5) <> 0 Then
  1221.             LrText(Jsqte).MaxLength = Textint(Jsqte, 5)
  1222.          End If
  1223.         TextChangeLock = False
  1224.      End If
  1225.      TextValiJudgeLock(Jsqte) = True
  1226.   Next Jsqte
  1227. End Sub
  1228. Private Function TextYxxpd(Index As Integer) As Boolean           '文本框有效性判断
  1229.   Dim SqlStr As String
  1230.   Dim Findrec As ADODB.Recordset
  1231.   If TextValiJudgeLock(Index) Then    '文本框内容未曾改变不进行有效性判断
  1232.      TextYxxpd = True
  1233.      Exit Function
  1234.   End If
  1235.   If Trim(LrText(Index)) = "" Then
  1236.      LrText(Index).Tag = ""
  1237.      Call Wbklrwbcl(Index)
  1238.      TextValiJudgeLock(Index) = True
  1239.      TextYxxpd = True
  1240.      Exit Function
  1241.   End If
  1242.        Select Case Textint(Index, 4)
  1243.          Case 1      '编码型
  1244.             SqlStr = Trim(Textstr(Index, 5))
  1245.             SqlStr = Replace(SqlStr, "@", "'" + Trim(LrText(Index).Text) + "'")
  1246.             Set Findrec = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  1247.             If Findrec.EOF Then
  1248.                Call Xtxxts(Trim(Textstr(Index, 6)), 0, 1)
  1249.                LrText(Index).SetFocus
  1250.                Exit Function
  1251.             Else
  1252.                Select Case Textint(Index, 3)
  1253.                  Case 0
  1254.                    If Len(Trim(Textstr(Index, 2))) <> 0 Then
  1255.                       LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
  1256.                    End If
  1257.                     If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
  1258.                       LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
  1259.                    End If
  1260.                  Case 1
  1261.                    If Len(Trim(Textstr(Index, 3) & "")) <> 0 Then
  1262.                       LrText(Index).Text = Trim(Findrec.Fields(Trim(Textstr(Index, 3))))
  1263.                    End If
  1264.                     If Len(Trim(Textstr(Index, 2))) <> 0 Then
  1265.                       LrText(Index).Tag = Trim(Findrec.Fields(Trim(Textstr(Index, 2))))
  1266.                    End If
  1267.                End Select
  1268.             End If
  1269.          Case 2      '日期型
  1270.             If IsDate(LrText(Index).Text) Then
  1271.                LrText(Index).Text = Format(LrText(Index).Text, "yyyy-mm-dd")
  1272.              Else
  1273.                Tsxx = "非法公历日期!(格式:" + Format(Date, "yyyy-mm-dd") + ")"
  1274.                Call Xtxxts(Tsxx, 0, 1)
  1275.                LrText(Index).SetFocus
  1276.                Exit Function
  1277.             End If
  1278.          Case 3      '其他类型
  1279.        End Select
  1280.    TextValiJudgeLock(Index) = True
  1281.    TextYxxpd = True
  1282. End Function
  1283. '初始化成本中心
  1284. Sub CshAccountCell()
  1285.     Dim RecTemp As New ADODB.Recordset
  1286.     SqlStr = "Select * from cbhs_accountcell order by AccountCellCode"
  1287.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  1288.     ReDim Combo_CostCellCode(RecTemp.RecordCount)
  1289.     Do Until RecTemp.EOF
  1290.         Combo_CostCell.AddItem "(" + Trim(RecTemp.Fields("AccountCellCode")) + ")" + RecTemp.Fields("AccountCellName")
  1291.         Combo_CostCellCode(Combo_CostCell.NewIndex) = RecTemp.Fields("AccountCellCode")
  1292.         RecTemp.MoveNext
  1293.     Loop
  1294.     If Combo_CostCell.ListCount >= 1 Then
  1295.         Combo_CostCell.ListIndex = 0
  1296.     End If
  1297. End Sub