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

企业管理

开发平台:

Visual Basic

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