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

企业管理

开发平台:

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