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

企业管理

开发平台:

Visual Basic

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