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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{65A39231-6133-11D1-BAA2-444553540000}#1.0#0"; "vslight6.OCX"
  3. Object = "{D76D7128-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "VSOCX7.OCX"
  4. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  5. Begin VB.Form Dev_MonthRepairPlanListForm 
  6.    Caption         =   "设备检修计划单列表"
  7.    ClientHeight    =   8595
  8.    ClientLeft      =   315
  9.    ClientTop       =   390
  10.    ClientWidth     =   11820
  11.    HelpContextID   =   2506004
  12.    Icon            =   "设备检修_月度检修计划显示.frx":0000
  13.    KeyPreview      =   -1  'True
  14.    LinkTopic       =   "Form1"
  15.    MDIChild        =   -1  'True
  16.    ScaleHeight     =   8595
  17.    ScaleWidth      =   11820
  18.    WindowState     =   2  'Maximized
  19.    Begin MSComctlLib.Toolbar GsToolbar 
  20.       Height          =   540
  21.       Left            =   9330
  22.       TabIndex        =   3
  23.       Top             =   30
  24.       Width           =   2475
  25.       _ExtentX        =   4366
  26.       _ExtentY        =   953
  27.       ButtonWidth     =   1455
  28.       ButtonHeight    =   953
  29.       Appearance      =   1
  30.       Style           =   1
  31.       ImageList       =   "ImageList2"
  32.       _Version        =   393216
  33.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  34.          NumButtons      =   3
  35.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  36.             Caption         =   "保存格式"
  37.             Key             =   "bcgs"
  38.             ImageKey        =   "bcgs"
  39.          EndProperty
  40.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  41.             Caption         =   "默认列宽"
  42.             Key             =   "hfmrgs"
  43.             ImageKey        =   "mrlk"
  44.          EndProperty
  45.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  46.             Caption         =   "显示项目"
  47.             Key             =   "szxsxm"
  48.             ImageKey        =   "xsxm"
  49.          EndProperty
  50.       EndProperty
  51.    End
  52.    Begin VB.PictureBox Pic_Title 
  53.       BackColor       =   &H00FFFFFF&
  54.       Height          =   825
  55.       Left            =   0
  56.       Picture         =   "设备检修_月度检修计划显示.frx":1042
  57.       ScaleHeight     =   765
  58.       ScaleWidth      =   11715
  59.       TabIndex        =   1
  60.       Top             =   570
  61.       Width           =   11775
  62.       Begin VB.Label Lab_Title 
  63.          BackColor       =   &H80000018&
  64.          BackStyle       =   0  'Transparent
  65.          Caption         =   "设备检修计划单列表"
  66.          BeginProperty Font 
  67.             Name            =   "宋体"
  68.             Size            =   12
  69.             Charset         =   134
  70.             Weight          =   700
  71.             Underline       =   0   'False
  72.             Italic          =   0   'False
  73.             Strikethrough   =   0   'False
  74.          EndProperty
  75.          ForeColor       =   &H00000000&
  76.          Height          =   300
  77.          Index           =   4
  78.          Left            =   480
  79.          TabIndex        =   2
  80.          Top             =   210
  81.          Width           =   2715
  82.       End
  83.    End
  84.    Begin VB.Timer Timer1 
  85.       Enabled         =   0   'False
  86.       Interval        =   1
  87.       Left            =   7620
  88.       Top             =   90
  89.    End
  90.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  91.       Height          =   7545
  92.       Left            =   30
  93.       TabIndex        =   0
  94.       Top             =   1470
  95.       Width           =   11775
  96.       _ExtentX        =   20770
  97.       _ExtentY        =   13309
  98.       Appearance      =   1
  99.       BorderStyle     =   1
  100.       Enabled         =   -1  'True
  101.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  102.          Name            =   "宋体"
  103.          Size            =   9
  104.          Charset         =   134
  105.          Weight          =   400
  106.          Underline       =   0   'False
  107.          Italic          =   0   'False
  108.          Strikethrough   =   0   'False
  109.       EndProperty
  110.       MousePointer    =   0
  111.       BackColor       =   16777215
  112.       ForeColor       =   -2147483640
  113.       BackColorFixed  =   13826538
  114.       ForeColorFixed  =   -2147483630
  115.       BackColorSel    =   -2147483635
  116.       ForeColorSel    =   -2147483634
  117.       BackColorBkg    =   -2147483636
  118.       BackColorAlternate=   16777215
  119.       GridColor       =   -2147483633
  120.       GridColorFixed  =   -2147483632
  121.       TreeColor       =   -2147483632
  122.       FloodColor      =   192
  123.       SheetBorder     =   -2147483642
  124.       FocusRect       =   1
  125.       HighLight       =   1
  126.       AllowSelection  =   -1  'True
  127.       AllowBigSelection=   -1  'True
  128.       AllowUserResizing=   0
  129.       SelectionMode   =   0
  130.       GridLines       =   1
  131.       GridLinesFixed  =   2
  132.       GridLineWidth   =   1
  133.       Rows            =   50
  134.       Cols            =   10
  135.       FixedRows       =   1
  136.       FixedCols       =   1
  137.       RowHeightMin    =   0
  138.       RowHeightMax    =   0
  139.       ColWidthMin     =   0
  140.       ColWidthMax     =   0
  141.       ExtendLastCol   =   0   'False
  142.       FormatString    =   ""
  143.       ScrollTrack     =   0   'False
  144.       ScrollBars      =   3
  145.       ScrollTips      =   0   'False
  146.       MergeCells      =   0
  147.       MergeCompare    =   0
  148.       AutoResize      =   -1  'True
  149.       AutoSizeMode    =   0
  150.       AutoSearch      =   0
  151.       MultiTotals     =   -1  'True
  152.       SubtotalPosition=   1
  153.       OutlineBar      =   0
  154.       OutlineCol      =   0
  155.       Ellipsis        =   0
  156.       ExplorerBar     =   0
  157.       PicturesOver    =   0   'False
  158.       FillStyle       =   0
  159.       RightToLeft     =   0   'False
  160.       PictureType     =   0
  161.       TabBehavior     =   0
  162.       OwnerDraw       =   0
  163.       Editable        =   0   'False
  164.       ShowComboButton =   -1  'True
  165.       WordWrap        =   0   'False
  166.       TextStyle       =   0
  167.       TextStyleFixed  =   0
  168.       OleDragMode     =   0
  169.       OleDropMode     =   0
  170.       DataMode        =   0
  171.       VirtualData     =   -1  'True
  172.       Begin MSComctlLib.ImageList ImageList2 
  173.          Left            =   0
  174.          Top             =   0
  175.          _ExtentX        =   1005
  176.          _ExtentY        =   1005
  177.          BackColor       =   -2147483643
  178.          ImageWidth      =   16
  179.          ImageHeight     =   16
  180.          MaskColor       =   12632256
  181.          _Version        =   393216
  182.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  183.             NumListImages   =   40
  184.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  185.                Picture         =   "设备检修_月度检修计划显示.frx":1DF82
  186.                Key             =   "sz"
  187.             EndProperty
  188.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  189.                Picture         =   "设备检修_月度检修计划显示.frx":1E31C
  190.                Key             =   "dy"
  191.             EndProperty
  192.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  193.                Picture         =   "设备检修_月度检修计划显示.frx":1E6B6
  194.                Key             =   "yl"
  195.             EndProperty
  196.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  197.                Picture         =   "设备检修_月度检修计划显示.frx":1EA50
  198.                Key             =   "xg"
  199.             EndProperty
  200.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  201.                Picture         =   "设备检修_月度检修计划显示.frx":1EDEA
  202.                Key             =   "zh"
  203.             EndProperty
  204.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  205.                Picture         =   "设备检修_月度检修计划显示.frx":1F184
  206.                Key             =   "sh"
  207.             EndProperty
  208.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  209.                Picture         =   "设备检修_月度检修计划显示.frx":1F51E
  210.                Key             =   "bc"
  211.             EndProperty
  212.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  213.                Picture         =   "设备检修_月度检修计划显示.frx":1F8B8
  214.                Key             =   "fq"
  215.             EndProperty
  216.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  217.                Picture         =   "设备检修_月度检修计划显示.frx":1FC52
  218.                Key             =   "bz"
  219.             EndProperty
  220.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  221.                Picture         =   "设备检修_月度检修计划显示.frx":1FFEC
  222.                Key             =   "tc"
  223.             EndProperty
  224.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  225.                Picture         =   "设备检修_月度检修计划显示.frx":20386
  226.                Key             =   "bcgs"
  227.             EndProperty
  228.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  229.                Picture         =   "设备检修_月度检修计划显示.frx":20720
  230.                Key             =   "mrlk"
  231.             EndProperty
  232.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  233.                Picture         =   "设备检修_月度检修计划显示.frx":20ABA
  234.                Key             =   "xsxm"
  235.             EndProperty
  236.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  237.                Picture         =   "设备检修_月度检修计划显示.frx":20E54
  238.                Key             =   "first"
  239.             EndProperty
  240.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  241.                Picture         =   "设备检修_月度检修计划显示.frx":211EE
  242.                Key             =   "prev"
  243.             EndProperty
  244.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  245.                Picture         =   "设备检修_月度检修计划显示.frx":21588
  246.                Key             =   "next"
  247.             EndProperty
  248.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  249.                Picture         =   "设备检修_月度检修计划显示.frx":21922
  250.                Key             =   "last"
  251.             EndProperty
  252.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  253.                Picture         =   "设备检修_月度检修计划显示.frx":21CBC
  254.                Key             =   "xx"
  255.             EndProperty
  256.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  257.                Picture         =   "设备检修_月度检修计划显示.frx":22056
  258.                Key             =   "define"
  259.             EndProperty
  260.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  261.                Picture         =   "设备检修_月度检修计划显示.frx":223F0
  262.                Key             =   "exec"
  263.             EndProperty
  264.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  265.                Picture         =   "设备检修_月度检修计划显示.frx":2278A
  266.                Key             =   "xz"
  267.             EndProperty
  268.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  269.                Picture         =   "设备检修_月度检修计划显示.frx":22B24
  270.                Key             =   "sc"
  271.             EndProperty
  272.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  273.                Picture         =   "设备检修_月度检修计划显示.frx":22EBE
  274.                Key             =   "sx"
  275.             EndProperty
  276.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  277.                Picture         =   "设备检修_月度检修计划显示.frx":23258
  278.                Key             =   "cx"
  279.             EndProperty
  280.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  281.                Picture         =   "设备检修_月度检修计划显示.frx":235F2
  282.                Key             =   "zd"
  283.             EndProperty
  284.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  285.                Picture         =   "设备检修_月度检修计划显示.frx":2398C
  286.                Key             =   "dz"
  287.             EndProperty
  288.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  289.                Picture         =   "设备检修_月度检修计划显示.frx":23D26
  290.                Key             =   "ph"
  291.             EndProperty
  292.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  293.                Picture         =   "设备检修_月度检修计划显示.frx":240C0
  294.                Key             =   "fz"
  295.             EndProperty
  296.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  297.                Picture         =   "设备检修_月度检修计划显示.frx":2445A
  298.                Key             =   "dw"
  299.             EndProperty
  300.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  301.                Picture         =   "设备检修_月度检修计划显示.frx":247F4
  302.                Key             =   "hf"
  303.             EndProperty
  304.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  305.                Picture         =   "设备检修_月度检修计划显示.frx":24B8E
  306.                Key             =   "pz"
  307.             EndProperty
  308.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  309.                Picture         =   "设备检修_月度检修计划显示.frx":24F28
  310.                Key             =   "check"
  311.             EndProperty
  312.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  313.                Picture         =   "设备检修_月度检修计划显示.frx":252C2
  314.                Key             =   "qs"
  315.             EndProperty
  316.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  317.                Picture         =   "设备检修_月度检修计划显示.frx":2565C
  318.                Key             =   "fullcheck"
  319.             EndProperty
  320.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  321.                Picture         =   "设备检修_月度检修计划显示.frx":259F6
  322.                Key             =   "qq"
  323.             EndProperty
  324.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  325.                Picture         =   "设备检修_月度检修计划显示.frx":25D90
  326.                Key             =   "bcw"
  327.             EndProperty
  328.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  329.                Picture         =   "设备检修_月度检修计划显示.frx":2612A
  330.                Key             =   "ye"
  331.             EndProperty
  332.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  333.                Picture         =   "设备检修_月度检修计划显示.frx":264C4
  334.                Key             =   ""
  335.             EndProperty
  336.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  337.                Picture         =   "设备检修_月度检修计划显示.frx":2685E
  338.                Key             =   "frist"
  339.             EndProperty
  340.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  341.                Picture         =   "设备检修_月度检修计划显示.frx":26BF8
  342.                Key             =   "dj"
  343.             EndProperty
  344.          EndProperty
  345.       End
  346.    End
  347.    Begin MSComctlLib.Toolbar SzToolbar 
  348.       Align           =   1  'Align Top
  349.       Height          =   570
  350.       Left            =   0
  351.       TabIndex        =   4
  352.       Top             =   0
  353.       Width           =   11820
  354.       _ExtentX        =   20849
  355.       _ExtentY        =   1005
  356.       ButtonWidth     =   820
  357.       ButtonHeight    =   953
  358.       AllowCustomize  =   0   'False
  359.       Appearance      =   1
  360.       Style           =   1
  361.       ImageList       =   "ImageList1"
  362.       _Version        =   393216
  363.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  364.          NumButtons      =   15
  365.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  366.             Caption         =   "设置"
  367.             Key             =   "ymsz"
  368.             ImageKey        =   "sz"
  369.          EndProperty
  370.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  371.             Caption         =   "打印"
  372.             Key             =   "dy"
  373.             ImageKey        =   "dy"
  374.          EndProperty
  375.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  376.             Caption         =   "预览"
  377.             Key             =   "yl"
  378.             ImageKey        =   "yl"
  379.          EndProperty
  380.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  381.             Style           =   3
  382.          EndProperty
  383.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  384.             Caption         =   "查询"
  385.             Key             =   "cx"
  386.             ImageKey        =   "cx"
  387.          EndProperty
  388.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  389.             Caption         =   "单据"
  390.             Key             =   "Bill"
  391.             ImageKey        =   "pz"
  392.          EndProperty
  393.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  394.             Style           =   3
  395.          EndProperty
  396.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  397.             Caption         =   "新增"
  398.             Key             =   "xz"
  399.             ImageKey        =   "xz"
  400.          EndProperty
  401.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  402.             Caption         =   "删除"
  403.             Key             =   "sc"
  404.             ImageKey        =   "sc"
  405.          EndProperty
  406.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  407.             Style           =   3
  408.          EndProperty
  409.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  410.             Caption         =   "方案"
  411.             Key             =   "fa"
  412.             ImageKey        =   "FA"
  413.          EndProperty
  414.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  415.             Caption         =   "记录"
  416.             Key             =   "jl"
  417.             ImageKey        =   "JL"
  418.          EndProperty
  419.          BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  420.             Style           =   3
  421.          EndProperty
  422.          BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  423.             Caption         =   "帮助"
  424.             Key             =   "bz"
  425.             ImageKey        =   "bz"
  426.          EndProperty
  427.          BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  428.             Caption         =   "退出"
  429.             Key             =   "fh"
  430.             ImageKey        =   "tc"
  431.          EndProperty
  432.       EndProperty
  433.       BorderStyle     =   1
  434.       Begin MSComctlLib.ImageList ImageList1 
  435.          Left            =   6990
  436.          Top             =   30
  437.          _ExtentX        =   1005
  438.          _ExtentY        =   1005
  439.          BackColor       =   -2147483643
  440.          ImageWidth      =   16
  441.          ImageHeight     =   16
  442.          MaskColor       =   12632256
  443.          _Version        =   393216
  444.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  445.             NumListImages   =   34
  446.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  447.                Picture         =   "设备检修_月度检修计划显示.frx":26F92
  448.                Key             =   "sz"
  449.             EndProperty
  450.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  451.                Picture         =   "设备检修_月度检修计划显示.frx":2732C
  452.                Key             =   "dy"
  453.             EndProperty
  454.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  455.                Picture         =   "设备检修_月度检修计划显示.frx":276C6
  456.                Key             =   "yl"
  457.             EndProperty
  458.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  459.                Picture         =   "设备检修_月度检修计划显示.frx":27A60
  460.                Key             =   "xg"
  461.             EndProperty
  462.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  463.                Picture         =   "设备检修_月度检修计划显示.frx":27DFA
  464.                Key             =   "zh"
  465.             EndProperty
  466.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  467.                Picture         =   "设备检修_月度检修计划显示.frx":28194
  468.                Key             =   "sh"
  469.             EndProperty
  470.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  471.                Picture         =   "设备检修_月度检修计划显示.frx":2852E
  472.                Key             =   "bc"
  473.             EndProperty
  474.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  475.                Picture         =   "设备检修_月度检修计划显示.frx":288C8
  476.                Key             =   "fq"
  477.             EndProperty
  478.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  479.                Picture         =   "设备检修_月度检修计划显示.frx":28C62
  480.                Key             =   "bz"
  481.             EndProperty
  482.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  483.                Picture         =   "设备检修_月度检修计划显示.frx":28FFC
  484.                Key             =   "tc"
  485.             EndProperty
  486.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  487.                Picture         =   "设备检修_月度检修计划显示.frx":29396
  488.                Key             =   "bcgs"
  489.             EndProperty
  490.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  491.                Picture         =   "设备检修_月度检修计划显示.frx":29730
  492.                Key             =   "mrlk"
  493.             EndProperty
  494.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  495.                Picture         =   "设备检修_月度检修计划显示.frx":29ACA
  496.                Key             =   "xsxm"
  497.             EndProperty
  498.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  499.                Picture         =   "设备检修_月度检修计划显示.frx":29E64
  500.                Key             =   "first"
  501.             EndProperty
  502.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  503.                Picture         =   "设备检修_月度检修计划显示.frx":2A1FE
  504.                Key             =   "prev"
  505.             EndProperty
  506.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  507.                Picture         =   "设备检修_月度检修计划显示.frx":2A598
  508.                Key             =   "next"
  509.             EndProperty
  510.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  511.                Picture         =   "设备检修_月度检修计划显示.frx":2A932
  512.                Key             =   "last"
  513.             EndProperty
  514.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  515.                Picture         =   "设备检修_月度检修计划显示.frx":2ACCC
  516.                Key             =   "xx"
  517.             EndProperty
  518.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  519.                Picture         =   "设备检修_月度检修计划显示.frx":2B066
  520.                Key             =   "define"
  521.             EndProperty
  522.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  523.                Picture         =   "设备检修_月度检修计划显示.frx":2B400
  524.                Key             =   "exec"
  525.             EndProperty
  526.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  527.                Picture         =   "设备检修_月度检修计划显示.frx":2B79A
  528.                Key             =   "xz"
  529.             EndProperty
  530.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  531.                Picture         =   "设备检修_月度检修计划显示.frx":2BB34
  532.                Key             =   "sc"
  533.             EndProperty
  534.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  535.                Picture         =   "设备检修_月度检修计划显示.frx":2BECE
  536.                Key             =   "sx"
  537.             EndProperty
  538.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  539.                Picture         =   "设备检修_月度检修计划显示.frx":2C268
  540.                Key             =   "cx"
  541.             EndProperty
  542.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  543.                Picture         =   "设备检修_月度检修计划显示.frx":2C602
  544.                Key             =   "zd"
  545.             EndProperty
  546.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  547.                Picture         =   "设备检修_月度检修计划显示.frx":2C99C
  548.                Key             =   "dz"
  549.             EndProperty
  550.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  551.                Picture         =   "设备检修_月度检修计划显示.frx":2CD36
  552.                Key             =   "ph"
  553.             EndProperty
  554.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  555.                Picture         =   "设备检修_月度检修计划显示.frx":2D0D0
  556.                Key             =   "fz"
  557.             EndProperty
  558.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  559.                Picture         =   "设备检修_月度检修计划显示.frx":2D46A
  560.                Key             =   "dw"
  561.             EndProperty
  562.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  563.                Picture         =   "设备检修_月度检修计划显示.frx":2D804
  564.                Key             =   "hf"
  565.             EndProperty
  566.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  567.                Picture         =   "设备检修_月度检修计划显示.frx":2DB9E
  568.                Key             =   "pz"
  569.             EndProperty
  570.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  571.                Picture         =   "设备检修_月度检修计划显示.frx":2DF38
  572.                Key             =   "check"
  573.             EndProperty
  574.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  575.                Picture         =   "设备检修_月度检修计划显示.frx":2E2D2
  576.                Key             =   "FA"
  577.             EndProperty
  578.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  579.                Picture         =   "设备检修_月度检修计划显示.frx":2E66C
  580.                Key             =   "JL"
  581.             EndProperty
  582.          EndProperty
  583.       End
  584.    End
  585. End
  586. Attribute VB_Name = "Dev_MonthRepairPlanListForm"
  587. Attribute VB_GlobalNameSpace = False
  588. Attribute VB_Creatable = False
  589. Attribute VB_PredeclaredId = True
  590. Attribute VB_Exposed = False
  591. '**************************************************************************
  592. '*    模 块 名 称 :设备检修计划
  593. '*    功 能 描 述 :
  594. '*    程序员姓名  :王哲
  595. '*    最后修改人  :王哲
  596. '*    最后修改时间:2001/12/20
  597. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  598. '**************************************************************************
  599. Dim ReportTitle As String                '报表主标题
  600. Dim Str_QueryCondi As String             '用户录入查询条件
  601. Dim Rec_BillID As New ADODB.Recordset    '用户查询单据ID动态集
  602. '以下为固定使用变量
  603. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  604. Dim GridCode As String                   '显示网格网格代码
  605. Dim GridInf() As Variant                 '整个网格设置信息
  606. Dim Tsxx As String                       '系统提示信息
  607. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  608. Dim Sjhgd As Double                      '网格数据行高度
  609. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  610. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  611. Dim GridStr()  As String                 '网格列信息(字符型)
  612. Dim GridInt() As Integer                 '网格列信息(整型)
  613. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  614. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  615.     On Error Resume Next
  616.     With CxbbGrid
  617.         .Width = Me.Width - 160
  618.         .Height = Me.Height - .Top - 400
  619.     End With
  620.     With Pic_Title
  621.         .Width = Me.Width - 160
  622.     End With
  623.     
  624.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  625.     
  626. End Sub
  627. Private Sub Form_Load()                                                   '窗体装入
  628.     
  629.     '调入打印页面设置窗体
  630.     ReportTitle = "设备检修计划单列表"
  631.     XtReportCode = "Dev_RepairPlan"
  632.     Load Dyymctbl
  633.     
  634.     '调整标题栏及网格、格式工具条位置(Fixed)
  635.     Pic_Title.Left = 40
  636.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  637.     CxbbGrid.Left = Pic_Title.Left
  638.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  639.     
  640.     '调 入 网 格(Fixed)
  641.     GridCode = "Dev_RepairPlan"
  642.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  643.     
  644.     Qslz = GridInf(1)
  645.     Sjhgd = GridInf(2)
  646.     Sfxshjwg = GridInf(7)
  647.     Szzls = CxbbGrid.Cols - 1
  648.     
  649. End Sub
  650. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  651.     
  652.     '卸载条件窗体
  653.     Dev_MonthRepairPlanFindForm.UnloadCheck.Value = 1
  654.     Unload Dev_MonthRepairPlanFindForm
  655.     Security_Log "Dev_MonthRepair", Xtczybm, 2, False  '用户退出时写上机日志
  656.     '卸载打印页面设置窗体
  657.     Unload Dyymctbl
  658.     
  659. End Sub
  660. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  661.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  662. End Sub
  663. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)                '网格格式调整(Fixed)
  664.     
  665.     Select Case Button.Key
  666.     Case "bcgs"                                          '保存表格格式
  667.         Call Bcwggs(CxbbGrid, GridCode, GridStr())
  668.     Case "hfmrgs"                                        '恢复默认格式
  669.         Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  670.     Case "szxsxm"                                        '设置显示项目
  671.         Call Szxsxm(CxbbGrid, GridCode)
  672.     End Select
  673.     
  674. End Sub
  675. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  676.     
  677.     Select Case Button.Key
  678.     Case "ymsz"                                          '页面设置
  679.         Dyymctbl.Show 1
  680.     Case "yl"                                            '预 览
  681.         Call bbyl(True)
  682.     Case "dy"                                            '打 印
  683.         Call bbyl(False)
  684.     Case "cx"                                            '查 询
  685.         Dev_MonthRepairPlanFindForm.Show 1
  686.     Case "Bill"                                          '单 据
  687.         Call CxbbGrid_DblClick
  688.     Case "xz"                                            '新 增
  689.         Call Sub_AddBill
  690.     Case "sc"                                            '删 除
  691.         If Not Security_Log("Dev_MonthRepairFile", Xtczybm, 1, True) Then
  692.            Exit Sub
  693.         End If
  694.         Call Sub_DeleteBill
  695.     Case "fa"                                            '方案
  696.         If Not Security_Log("Dev_MonthRepairFile", Xtczybm, 1, True) Then
  697.            Exit Sub
  698.         End If
  699.         Dim RecTemp As New ADODB.Recordset               '临时使用动态集
  700.         If CxbbGrid.Rows = CxbbGrid.FixedRows Then Exit Sub
  701.         If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  702.             Exit Sub
  703.         End If
  704.         Sqlstr = "SELECT RepairMainID,RepairMainCode,Authorizer,RepairSubID,RepairType,ScenarioFlag From Dev_V_RepairMainSub Where RepairMainID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) & "And RepairSubID =" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 5))
  705.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  706.             If RecTemp.EOF Then
  707.             Else
  708.                 If RecTemp.Fields("Authorizer") = "" Or RecTemp.Fields("ScenarioFlag") = True Then
  709.                     Tsxx = "此检修计划没有批准或已作方案,不能作方案!"
  710.                     Call Xtxxts(Tsxx, 0, 4)
  711.                     Exit Sub
  712.                 Else
  713.                     With Dev_CheckScenarioEditForm
  714.                         TempMainCode = RecTemp.Fields("RepairMainCode")
  715.                         TempMainID = RecTemp.Fields("RepairMainID")
  716.                         TempSubID = RecTemp.Fields("RepairSubID")
  717.                         Xtcdcs = "1"
  718.                         .Show 1
  719.                     End With
  720.                     End If
  721.             End If
  722.     Case "jl"                                            '记录
  723.         If Not Security_Log("Dev_MonthRepairFile", Xtczybm, 1, True) Then
  724.            Exit Sub
  725.         End If
  726.         If CxbbGrid.Rows = CxbbGrid.FixedRows Then Exit Sub
  727.         If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  728.             Exit Sub
  729.         End If
  730.         Sqlstr = "SELECT RepairMainID,RepairMainCode,Authorizer,CheckFile,RepairSubID,RepairType,ScenarioFlag,FileFlag From Dev_V_RepairMainSub Where RepairMainID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) & "And RepairSubID =" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 5))
  731.         Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  732.             If RecTemp.EOF Then
  733.             
  734.             Else
  735.                 If RecTemp.Fields("CheckFile") = True Then
  736.                     Tsxx = "此检修计划不能直接记录!"
  737.                     Call Xtxxts(Tsxx, 0, 4)
  738.                     Exit Sub
  739.                 Else
  740.                     If RecTemp.Fields("Authorizer") = "" Or RecTemp.Fields("FileFlag") = True Then
  741.                         Tsxx = "此检修计划没有批准或已作记录,不能作记录!"
  742.                         Call Xtxxts(Tsxx, 0, 4)
  743.                         Exit Sub
  744.                     Else
  745.                         With Dev_RepairFileEditForm
  746.                             TempMainCode = RecTemp.Fields("RepairMainCode")
  747.                             TempMainID = RecTemp.Fields("RepairMainID")
  748.                             TempSubID = RecTemp.Fields("RepairSubID")
  749.                             Xtcdcs = "1"
  750.                             .Show 1
  751.                         End With
  752.                     End If
  753.                 End If
  754.             End If
  755.     Case "bz"                                            '帮 助
  756.         Call F1bz
  757.     Case "fh"                                            '退 出
  758.         Unload Me
  759.     End Select
  760.     
  761. End Sub
  762. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  763.     
  764.     Timer1.Enabled = False
  765.     Xt_Wait.Show
  766.     Xt_Wait.Refresh
  767.     
  768.     '加快显示速度
  769.     CxbbGrid.Redraw = False
  770.     
  771.     '生成查询结果
  772.     Call Sub_Query(0)
  773.     
  774.     CxbbGrid.Redraw = True
  775.     
  776.     Xt_Wait.Hide
  777.     
  778. End Sub
  779. Private Sub Sub_Query(Int_QueryType As Integer)                                     '生成查询结果(Define)
  780.     
  781.     '过程参数:Int_QueryType 0-"点确定按钮"查询  1-"刷新"查询
  782.     
  783.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  784.     Dim Coljsq As Long                          '网格列计数器
  785.     Dim jsqte As Integer                        '临时动态计数器
  786.     
  787.     '以下为自定义部分[
  788.     
  789.     If Int_QueryType = 0 Then   '0-"点确定按钮"查询
  790.         With Dev_MonthRepairPlanFindForm
  791.             
  792.             '生成查询条件
  793.             Str_QueryCondi = " where 1=1 "
  794.             For jsqte = 1 To 7
  795.                 Select Case jsqte
  796.                 Case 1  '查询日期范围(起始)
  797.                     If Trim(.LrText(0).Text) <> "" Then
  798.                         Str_QueryCondi = Str_QueryCondi & " And a.PlanDate>=' " & Trim(.LrText(0).Text) & "'"
  799.                     End If
  800.                 Case 2  '查询日期范围(终止)
  801.                     If Trim(.LrText(1).Text) <> "" Then
  802.                         Str_QueryCondi = Str_QueryCondi & " And a.PlanDate<= ' " & Trim(.LrText(1).Text) & "'"
  803.                     End If
  804.                 Case 3  '订单号(Like)
  805.                     If Trim(.LrText(2).Text) <> "" Then
  806.                         Str_QueryCondi = Str_QueryCondi & " And a.RepairMainCode like '" & Trim(.LrText(2).Text) & "%'"
  807.                     End If
  808.                 Case 4  '客户
  809.                     If Trim(.LrText(3).Text) <> "" Then
  810.                         Str_QueryCondi = Str_QueryCondi & " and a.WorkShop = '" & Trim(.LrText(3).Tag) & "'"
  811.                     End If
  812.                 Case 5  '存货编码
  813.                     If Trim(.LrText(4).Text) <> "" Then
  814.                         Str_QueryCondi = Str_QueryCondi & " and a.DEVID = '" & Trim(.LrText(4).Text) & "'"
  815.                     End If
  816.                 Case 6
  817.                     Str_QueryCondi = Str_QueryCondi & " and a.RepairType = '" & Trim(.Combo1.Text) & "'"
  818.                 Case 7   '审核状态
  819.                     If Not .Opt_Check(0).Value Then
  820.                         If .Opt_Check(1).Value Then
  821.                             Str_QueryCondi = Str_QueryCondi & " and  a.Checker='' "
  822.                         Else
  823.                             Str_QueryCondi = Str_QueryCondi & " and  a.Checker<>'' "
  824.                         End If
  825.                     End If
  826.                 End Select
  827.             Next jsqte
  828.         End With
  829.     Else
  830.         '1-"刷新"查询
  831.         If Str_QueryCondi = "" Then
  832.             Str_QueryCondi = " where 1=2 "
  833.         End If
  834.     End If
  835.     
  836.     Sqlstr = "select * from Dev_V_RepairPlan a" & _
  837.     Str_QueryCondi & " Order By a.PlanDate,a.RepairMainCode,a.RepairSubId"
  838.     
  839.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  840.     With Rec_Query
  841.         CxbbGrid.Rows = CxbbGrid.FixedRows
  842.         jsqte = CxbbGrid.FixedRows
  843.         Do While Not .EOF
  844.             CxbbGrid.AddItem ""
  845.             '[>>自定义填充内容
  846.             CxbbGrid.TextMatrix(jsqte, 0) = .Fields("RepairMainID")                                                             '计划主表ID(主要用来查询定位用)
  847.             CxbbGrid.TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("RepairMainCode") & "")                    '计划单号
  848.             CxbbGrid.TextMatrix(jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("DeptName") & "")                          '计划部门
  849.             CxbbGrid.TextMatrix(jsqte, Sydz("003", GridStr(), Szzls)) = Format(.Fields("PlanDate"), "yyyy-mm-dd")               '计划日期
  850.             CxbbGrid.TextMatrix(jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("RepairType") & "")                        '计划类型
  851.             CxbbGrid.TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("RepairSubID") & "")                       '子表ID
  852.             CxbbGrid.TextMatrix(jsqte, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("DEVID") & "")                             '设备编号
  853.             CxbbGrid.TextMatrix(jsqte, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("DName") & "")                             '设备名称
  854.             CxbbGrid.TextMatrix(jsqte, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("Model") & "")                             '规格型号
  855.             CxbbGrid.TextMatrix(jsqte, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("RprPosition") & "")                       '维修部位
  856.             If .Fields("CheckFile") = True Then                                                                                 '是否方案
  857.                 CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = True
  858.             Else
  859.                 CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = False
  860.             End If
  861.             CxbbGrid.TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = Format(.Fields("PlanBeginDate"), "yyyy-mm-dd")          '计划开始日期
  862.             CxbbGrid.TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = Format(.Fields("PlanEndDate"), "yyyy-mm-dd")            '计划结束日期
  863.             CxbbGrid.TextMatrix(jsqte, Sydz("013", GridStr(), Szzls)) = Format(.Fields("RealBeginDate"), "yyyy-mm-dd")          '实际开始日期
  864.             CxbbGrid.TextMatrix(jsqte, Sydz("014", GridStr(), Szzls)) = Format(.Fields("RealEndDate"), "yyyy-mm-dd")            '实际结束日期
  865.             CxbbGrid.TextMatrix(jsqte, Sydz("015", GridStr(), Szzls)) = Val(.Fields("PlanMoney") & "")                          '计划资金
  866.             CxbbGrid.TextMatrix(jsqte, Sydz("016", GridStr(), Szzls)) = Val(.Fields("RealMoney") & "")                          '实用资金
  867.             CxbbGrid.TextMatrix(jsqte, Sydz("017", GridStr(), Szzls)) = Trim(.Fields("StateName") & "")                         '维修后状态
  868.             CxbbGrid.TextMatrix(jsqte, Sydz("018", GridStr(), Szzls)) = Trim(.Fields("Maker") & "")                             '制表人
  869.             CxbbGrid.TextMatrix(jsqte, Sydz("019", GridStr(), Szzls)) = Trim(.Fields("Checker") & "")                           '审核人
  870.             CxbbGrid.TextMatrix(jsqte, Sydz("020", GridStr(), Szzls)) = Trim(.Fields("Authorizer") & "")                        '批准人
  871.             CxbbGrid.TextMatrix(jsqte, Sydz("021", GridStr(), Szzls)) = Trim(.Fields("Remark") & "")                            '备注
  872.             If .Fields("ScenarioFlag") = True Then                                                                              '方案完成标志
  873.                 CxbbGrid.TextMatrix(jsqte, Sydz("022", GridStr(), Szzls)) = True
  874.             Else
  875.                 CxbbGrid.TextMatrix(jsqte, Sydz("022", GridStr(), Szzls)) = False
  876.             End If
  877.             If .Fields("FileFlag") = True Then
  878.                 CxbbGrid.TextMatrix(jsqte, Sydz("023", GridStr(), Szzls)) = True                                                '记录完成标志
  879.             Else
  880.                 CxbbGrid.TextMatrix(jsqte, Sydz("023", GridStr(), Szzls)) = False
  881.             End If
  882.             '<<]
  883.             '设置数据行高度(Fixed)
  884.             CxbbGrid.RowHeight(jsqte) = Sjhgd
  885.             
  886.             '动态集指针加1,同时将计数器加1(Fixed)
  887.             .MoveNext
  888.             jsqte = jsqte + 1
  889.         Loop
  890.     End With
  891.     
  892.     ']以上为用户自定义部分
  893.     
  894. End Sub
  895. Private Sub CxbbGrid_DblClick()                                              '用户双击网格调入相应单据
  896.     
  897.     Dim RecTemp As New ADODB.Recordset               '临时使用动态集
  898.     
  899.     '非数据行退出
  900.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then Exit Sub
  901.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  902.         Exit Sub
  903.     End If
  904.     
  905.     Sqlstr = "SELECT RepairMainID From Dev_RepairMain Where RepairMainID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  906.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  907.     With RecTemp
  908.         If .EOF Then
  909.             Tsxx = "此检修计划已被其他用户删除!"
  910.             Call Xtxxts(Tsxx, 0, 4)
  911.             Exit Sub
  912.         Else
  913.             '调入单据处理窗体
  914.             With Dev_MonthRepairPlanEditForm
  915.                 
  916.                 '填充查询单据标识
  917.                 XT_BillID = CxbbGrid.TextMatrix(CxbbGrid.Row, 0)
  918.                 Xtcdcsfz = Str_QueryCondi
  919.                 
  920.                 '设置单据处理为列表查询(修改)状态
  921.                 Xtcdcs = "2"
  922.                 .Show 1
  923.             End With
  924.             If Xtfhcs = "1" Then
  925.                 Tsxx = "检修计划发生变化,是否刷新检修计划列表?"
  926.                 Yhanswer = Xtxxts(Tsxx, 2, 2)
  927.                 If Yhanswer = 1 Then
  928.                     Xt_Wait.Show
  929.                     Xt_Wait.Refresh
  930.                     
  931.                     '加快显示速度
  932.                     CxbbGrid.Redraw = False
  933.                     
  934.                     '生成查询结果
  935.                     Call Sub_Query(1)
  936.                     
  937.                     CxbbGrid.Redraw = True
  938.                     Xt_Wait.Hide
  939.                 End If
  940.             End If
  941.         End If
  942.     End With
  943.     
  944. End Sub
  945. Private Sub Sub_AddBill()                                              '新增单据
  946.     
  947.     With Dev_MonthRepairPlanEditForm
  948.         
  949.         '设置单据处理为填制单据状态
  950.         Xtcdcs = "1"
  951.         
  952.         .Show 1
  953.     End With
  954.     
  955.     If Xtfhcs = "1" Then
  956.         Tsxx = "检修计划发生变化,是否刷新检修计划列表?"
  957.         Yhanswer = Xtxxts(Tsxx, 2, 2)
  958.         If Yhanswer = 1 Then
  959.             Xt_Wait.Show
  960.             Xt_Wait.Refresh
  961.             
  962.             '加快显示速度
  963.             CxbbGrid.Redraw = False
  964.             
  965.             '生成查询结果
  966.             Call Sub_Query(1)
  967.             
  968.             CxbbGrid.Redraw = True
  969.             Xt_Wait.Hide
  970.         End If
  971.     End If
  972.     
  973. End Sub
  974. Private Sub Sub_DeleteBill()                                            '删除选中当前销售订单
  975.     
  976.     Dim YAnswer As Integer
  977.     Dim Lng_BillID As Long           '单据标识
  978.     
  979.     '非数据行退出
  980.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then Exit Sub
  981.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  982.         Exit Sub
  983.     End If
  984.     
  985.     Tsxx = "请确认是否删除当前检修计划?"
  986.     Yhanswer = Xtxxts(Tsxx, 2, 2)
  987.     
  988.     If Yhanswer = 1 Then
  989.         '1.判断当前销售订单是否允许删除
  990.         If Not Fun_AllowDelete Then
  991.             Exit Sub
  992.         End If
  993.         
  994.         '2.删除单据所有内容
  995.         Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  996.         On Error GoTo Swcwcl
  997.         Cw_DataEnvi.DataConnect.BeginTrans
  998.         Cw_DataEnvi.DataConnect.Execute ("Delete XS_OrderBillMain Where RepairMainID=" & Lng_BillID)        '删除单据主表内容
  999.         Cw_DataEnvi.DataConnect.Execute ("Delete XS_OrderBillSub Where RepairMainID=" & Lng_BillID)         '删除单据子表内容
  1000.         Cw_DataEnvi.DataConnect.CommitTrans
  1001.         
  1002.         '删除网格中单据数据
  1003.         jsqte = CxbbGrid.FixedRows
  1004.             Do While jsqte <= CxbbGrid.Rows - 1
  1005.                 If Val(CxbbGrid.TextMatrix(jsqte, 0)) = Lng_BillID Then
  1006.                     CxbbGrid.RemoveItem (jsqte)
  1007.                 Else
  1008.                     jsqte = jsqte + 1
  1009.                 End If
  1010.             Loop
  1011.     Else
  1012.         Exit Sub
  1013.     End If
  1014.     Exit Sub
  1015. Swcwcl:
  1016.     Cw_DataEnvi.DataConnect.RollbackTrans
  1017.     Tsxx = "删除检修计划过程中出现未知错误,程序自动恢复删除前状态!"
  1018.     Call Xtxxts(Tsxx, 0, 1)
  1019.     Exit Sub
  1020.     
  1021. End Sub
  1022. Private Function Fun_AllowDelete() As Boolean                                        '判断当前单据是否允许删除
  1023.     
  1024.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1025.     Dim Sqlstr As String                   '查询字符串
  1026.     Dim Lng_BillID As Long                 '单据ID
  1027.     
  1028.     Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1029.     Sqlstr = "Select Checker From Dev_RepairMain Where RepairMainID=" & Lng_BillID
  1030.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1031.     With RecTemp
  1032.         If Not .EOF Then
  1033.             If Trim(.Fields("Checker") & "") <> "" Then
  1034.                 Tsxx = "该检修计划已审核确认,不能删除!"
  1035.                 Call Xtxxts(Tsxx, 0, 4)
  1036.                 Exit Function
  1037.             End If
  1038.         End If
  1039.     End With
  1040.     Fun_AllowDelete = True
  1041.     
  1042. End Function
  1043. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1044.     
  1045.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1046.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1047.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1048.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1049.     ReDim Bbxbt(1 To Bbxbtgs)
  1050.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1051.     If Bbbwhgs <> 0 Then
  1052.         ReDim Bbbwh(1 To Bbbwhgs)
  1053.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1054.     End If
  1055.     Bbzbt = ReportTitle
  1056.     Bbxbt(1) = ""
  1057.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1058.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1059.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1060.     If Not bbylte Then
  1061.         Unload DY_Tybbyldy
  1062.     End If
  1063.     
  1064. End Sub