object frmPlanOrderPL: TfrmPlanOrderPL
  Left = 41
  Top = 76
  Width = 1261
  Height = 684
  Caption = #35745#21010#21333#37197#26009
  Color = clBtnFace
  Font.Charset = GB2312_CHARSET
  Font.Color = clWindowText
  Font.Height = -12
  Font.Name = #23435#20307
  Font.Style = []
  OldCreateOrder = False
  OnClose = FormClose
  OnCreate = FormCreate
  OnDestroy = FormDestroy
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 12
  object ToolBar3: TToolBar
    Left = 0
    Top = 0
    Width = 1234
    Height = 24
    AutoSize = True
    ButtonWidth = 57
    Caption = 'ToolBar1'
    Flat = True
    Images = ImageList24
    List = True
    ShowCaptions = True
    TabOrder = 0
    object Tfind: TToolButton
      Left = 0
      Top = 0
      AutoSize = True
      Caption = #26597#35810
      ImageIndex = 2
      OnClick = TfindClick
    end
    object ToolButton5: TToolButton
      Left = 55
      Top = 0
      AutoSize = True
      Caption = #20462#25913
      ImageIndex = 15
      Visible = False
      OnClick = ToolButton5Click
    end
    object TBView: TToolButton
      Left = 110
      Top = 0
      AutoSize = True
      Caption = #26597#30475
      ImageIndex = 0
      OnClick = TBViewClick
    end
    object TBPrint: TToolButton
      Left = 165
      Top = 0
      AutoSize = True
      Caption = #25171#21360
      ImageIndex = 4
      OnClick = TBPrintClick
    end
    object TBExport: TToolButton
      Left = 220
      Top = 0
      AutoSize = True
      Caption = #23548#20986
      ImageIndex = 47
      OnClick = TBExportClick
    end
    object Tclose: TToolButton
      Left = 275
      Top = 0
      AutoSize = True
      Caption = #20851' '#38381
      ImageIndex = 10
      OnClick = TcloseClick
    end
  end
  object GroupBox1: TGroupBox
    Left = 0
    Top = 24
    Width = 1234
    Height = 66
    Align = alTop
    TabOrder = 1
    object Label2: TLabel
      Left = 207
      Top = 21
      Width = 24
      Height = 12
      Caption = #25209#21495
    end
    object Label3: TLabel
      Left = 324
      Top = 21
      Width = 48
      Height = 12
      Caption = #23458'    '#25143
    end
    object Label4: TLabel
      Left = 207
      Top = 45
      Width = 24
      Height = 12
      Caption = #21697#21517
    end
    object Label5: TLabel
      Left = 701
      Top = 45
      Width = 36
      Height = 12
      Caption = #25968'  '#37327
    end
    object Label6: TLabel
      Left = 778
      Top = 44
      Width = 18
      Height = 12
      Caption = '---'
    end
    object Label1: TLabel
      Left = 324
      Top = 45
      Width = 48
      Height = 12
      Caption = #20135#21697#32534#21495
    end
    object Label7: TLabel
      Left = 464
      Top = 21
      Width = 24
      Height = 12
      Caption = #32441#36335
    end
    object Label8: TLabel
      Left = 464
      Top = 45
      Width = 24
      Height = 12
      Caption = #33394#21495
    end
    object Label9: TLabel
      Left = 582
      Top = 21
      Width = 24
      Height = 12
      Caption = #24213#24067
    end
    object Label10: TLabel
      Left = 582
      Top = 45
      Width = 24
      Height = 12
      Caption = #36125#26031
    end
    object Label12: TLabel
      Left = 701
      Top = 21
      Width = 36
      Height = 12
      Caption = #25171#26679#21495
    end
    object ComboBox1: TComboBox
      Left = 7
      Top = 17
      Width = 99
      Height = 20
      Style = csDropDownList
      ItemHeight = 12
      ItemIndex = 2
      TabOrder = 0
      Text = #25353#25490#20135#26085#26399#26597
      Items.Strings = (
        #25353#21046#21333#26085#26399#26597
        #25353#20132#36135#26085#26399#26597
        #25353#25490#20135#26085#26399#26597
        #25353#37197#26009#26085#26399#26597
        '')
    end
    object begDate: TDateTimePicker
      Left = 110
      Top = 18
      Width = 87
      Height = 20
      Date = 39465.654464328710000000
      Time = 39465.654464328710000000
      TabOrder = 1
    end
    object endDate: TDateTimePicker
      Left = 110
      Top = 41
      Width = 88
      Height = 20
      Date = 39465.654555844910000000
      Time = 39465.654555844910000000
      TabOrder = 2
    end
    object edtPlan: TEdit
      Left = 230
      Top = 17
      Width = 84
      Height = 20
      TabOrder = 3
      OnChange = edtPlanChange
    end
    object P_chnName: TEdit
      Left = 231
      Top = 41
      Width = 84
      Height = 20
      TabOrder = 4
      OnChange = edtPlanChange
    end
    object Edt_cust: TEdit
      Left = 371
      Top = 17
      Width = 84
      Height = 20
      TabOrder = 5
      OnChange = edtPlanChange
    end
    object p_num1: TEdit
      Left = 737
      Top = 41
      Width = 44
      Height = 20
      TabOrder = 6
      OnKeyPress = p_num1KeyPress
    end
    object p_num2: TEdit
      Left = 796
      Top = 41
      Width = 44
      Height = 20
      TabOrder = 7
      OnKeyPress = p_num1KeyPress
    end
    object P_FQNo: TEdit
      Left = 371
      Top = 41
      Width = 84
      Height = 20
      TabOrder = 8
      OnChange = edtPlanChange
    end
    object P_YhNo: TEdit
      Left = 488
      Top = 17
      Width = 84
      Height = 20
      TabOrder = 9
      OnChange = edtPlanChange
    end
    object P_Color: TEdit
      Left = 488
      Top = 41
      Width = 84
      Height = 20
      TabOrder = 10
      OnChange = edtPlanChange
    end
    object P_BaseChnName: TEdit
      Left = 607
      Top = 17
      Width = 84
      Height = 20
      TabOrder = 11
      OnChange = edtPlanChange
    end
    object LbStr6: TEdit
      Left = 607
      Top = 41
      Width = 84
      Height = 20
      TabOrder = 12
      OnChange = edtPlanChange
    end
    object P_Csid: TEdit
      Left = 737
      Top = 17
      Width = 102
      Height = 20
      TabOrder = 13
      OnChange = edtPlanChange
    end
  end
  object Panel1: TPanel
    Left = 288
    Top = 184
    Width = 153
    Height = 33
    BorderStyle = bsSingle
    Caption = #27491#22312#21047#26032#25968#25454#12290#12290#12290
    Font.Charset = GB2312_CHARSET
    Font.Color = clBlue
    Font.Height = -12
    Font.Name = #23435#20307
    Font.Style = [fsBold]
    ParentFont = False
    TabOrder = 2
    Visible = False
  end
  object dbGrid2: TcxGrid
    Left = 32
    Top = 128
    Width = 1057
    Height = 273
    TabOrder = 3
    object Tv1: TcxGridDBTableView
      NavigatorButtons.ConfirmDelete = False
      OnFocusedRecordChanged = Tv1FocusedRecordChanged
      DataController.DataSource = DataSourcePlan
      DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoGroupsAlwaysExpanded, dcoImmediatePost]
      DataController.Summary.DefaultGroupSummaryItems = <>
      DataController.Summary.FooterSummaryItems = <
        item
          Kind = skSum
          Column = Tv1p_num
        end>
      DataController.Summary.SummaryGroups = <>
      OptionsBehavior.ExpandMasterRowOnDblClick = False
      OptionsCustomize.ColumnFiltering = False
      OptionsView.Footer = True
      OptionsView.GroupByBox = False
      Styles.ContentOdd = ADODBMD_POPC.gridrow
      Styles.Header = ADODBMD_POPC.gridhand
      object v1PCSeqNo: TcxGridDBColumn
        Caption = #24207#21495
        DataBinding.FieldName = 'PCSeqNo'
        PropertiesClassName = 'TcxTextEditProperties'
        Options.Editing = False
        SortIndex = 0
        SortOrder = soAscending
        Width = 49
      end
      object Tv1exigence: TcxGridDBColumn
        Caption = #32039#24613#31243#24230
        DataBinding.FieldName = 'exigence'
        PropertiesClassName = 'TcxTextEditProperties'
        Properties.Alignment.Horz = taLeftJustify
        Properties.Alignment.Vert = taVCenter
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Width = 60
      end
      object Tv1PlanNo: TcxGridDBColumn
        Caption = #25209#21495
        DataBinding.FieldName = 'PlanNo'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 63
      end
      object Tv1BusineesName: TcxGridDBColumn
        Caption = #19994#21153#21592
        DataBinding.FieldName = 'BusineesName'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 52
      end
      object Tv1customName: TcxGridDBColumn
        Caption = #23458#25143
        DataBinding.FieldName = 'CustomNo'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Width = 90
      end
      object Tv1p_chnname: TcxGridDBColumn
        Caption = #21697#21517
        DataBinding.FieldName = 'p_chnname'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Width = 99
      end
      object v1P_FQNo: TcxGridDBColumn
        Caption = #20135#21697#32534#21495
        DataBinding.FieldName = 'P_FQNo'
        OnCustomDrawCell = v1P_FQNoCustomDrawCell
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Width = 75
      end
      object v1P_YhNo: TcxGridDBColumn
        Caption = #32441#36335
        DataBinding.FieldName = 'P_YhNo'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Width = 76
      end
      object v1P_Color: TcxGridDBColumn
        Caption = #33394#21495
        DataBinding.FieldName = 'P_Color'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.FilteringMRUItemsList = False
        Width = 60
      end
      object v1P_BaseChnName: TcxGridDBColumn
        Caption = #24213#24067
        DataBinding.FieldName = 'P_BaseChnName'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 76
      end
      object v1P_FactoryName: TcxGridDBColumn
        Caption = #20379#24212#21830
        DataBinding.FieldName = 'P_FactoryName'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 49
      end
      object v1sbtr2: TcxGridDBColumn
        Caption = #22522#24067#39068#33394
        DataBinding.FieldName = 'sbtr2'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 58
      end
      object v1LbStr6: TcxGridDBColumn
        Caption = #36125#26031
        DataBinding.FieldName = 'LbStr6'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 56
      end
      object Tv1p_num: TcxGridDBColumn
        Caption = #25968#37327
        DataBinding.FieldName = 'p_num'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 58
      end
      object Tv1P_unitName: TcxGridDBColumn
        Caption = #21333#20301
        DataBinding.FieldName = 'P_unitName'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 52
      end
      object v1Vuserdef1: TcxGridDBColumn
        Caption = #21253#35013
        DataBinding.FieldName = 'Vuserdef1'
        PropertiesClassName = 'TcxMemoProperties'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 61
      end
      object v1P_tnum: TcxGridDBColumn
        Caption = #25215#21046#37327
        DataBinding.FieldName = 'P_tnum'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 60
      end
      object v1P_Csid: TcxGridDBColumn
        Caption = #25171#26679#21495
        DataBinding.FieldName = 'P_Csid'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 54
      end
      object v1sid: TcxGridDBColumn
        Caption = #21407#32534#21495
        DataBinding.FieldName = 'sid'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 47
      end
      object v1Crafts: TcxGridDBColumn
        Caption = #24037#33402
        DataBinding.FieldName = 'Crafts'
        PropertiesClassName = 'TcxMemoProperties'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 75
      end
      object v1P_Other: TcxGridDBColumn
        Caption = #22791#27880
        DataBinding.FieldName = 'P_Other'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 70
      end
      object Tv1statusName: TcxGridDBColumn
        Caption = #23457#26680#29366#24577
        DataBinding.FieldName = 'statusName'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 61
      end
      object v1CheckName: TcxGridDBColumn
        Caption = #23457#26680#20154
        DataBinding.FieldName = 'CheckName'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 55
      end
      object v1BChkTime: TcxGridDBColumn
        Caption = #23457#26680#26102#38388
        DataBinding.FieldName = 'BChkTime'
        HeaderAlignmentHorz = taCenter
        Options.Focusing = False
      end
      object v1DhChk: TcxGridDBColumn
        Caption = #23457#26680#22791#27880
        DataBinding.FieldName = 'DhChk'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 57
      end
      object v1PCPerson: TcxGridDBColumn
        Caption = #25490#20135#20154
        DataBinding.FieldName = 'PCPerson'
        HeaderAlignmentHorz = taCenter
        Width = 59
      end
      object v1PCDate: TcxGridDBColumn
        Caption = #25490#20135#26085#26399
        DataBinding.FieldName = 'PCSCDate'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 59
      end
      object v1PLPerson: TcxGridDBColumn
        Caption = #37197#26009#20154
        DataBinding.FieldName = 'PLPerson'
        HeaderAlignmentHorz = taCenter
        Width = 59
      end
      object v1PLTime: TcxGridDBColumn
        Caption = #37197#26009#26102#38388
        DataBinding.FieldName = 'PLTime'
        HeaderAlignmentHorz = taCenter
        Width = 70
      end
      object Tv1Busntime: TcxGridDBColumn
        Caption = #21046#21333#26085#26399
        DataBinding.FieldName = 'Busntime'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 64
      end
      object Tv1Deliver: TcxGridDBColumn
        Caption = #20132#36135#26085#26399
        DataBinding.FieldName = 'Deliver'
        HeaderAlignmentHorz = taCenter
        Options.Editing = False
        Options.Focusing = False
        Width = 73
      end
      object v1Column1: TcxGridDBColumn
        DataBinding.FieldName = 'SBtr3'
        Visible = False
      end
    end
    object dbGrid2Level1: TcxGridLevel
      GridView = Tv1
    end
  end
  object cxTabControl1: TcxTabControl
    Left = 0
    Top = 90
    Width = 1234
    Height = 21
    Align = alTop
    Style = 9
    TabIndex = 0
    TabOrder = 4
    Tabs.Strings = (
      #24453#37197#26009
      #24050#37197#26009
      #20840#37096)
    OnChange = cxTabControl1Change
    ClientRectBottom = 21
    ClientRectRight = 1234
    ClientRectTop = 19
  end
  object cxSplitter1: TcxSplitter
    Left = 0
    Top = 401
    Width = 1234
    Height = 8
    HotZoneClassName = 'TcxMediaPlayer9Style'
    AlignSplitter = salBottom
    Control = Panel2
  end
  object Panel2: TPanel
    Left = 0
    Top = 409
    Width = 1234
    Height = 264
    Align = alBottom
    BevelOuter = bvNone
    Caption = 'Panel2'
    TabOrder = 6
    object ToolBar1: TToolBar
      Left = 0
      Top = 0
      Width = 1234
      Height = 23
      ButtonWidth = 147
      Caption = 'ToolBar2'
      Flat = True
      Images = ADODBMD_POPC.ImageList24
      List = True
      ShowCaptions = True
      TabOrder = 0
      object btnAddDye: TToolButton
        Left = 0
        Top = 0
        AutoSize = True
        Caption = #22686#34892
        ImageIndex = 76
        OnClick = btnAddDyeClick
      end
      object btnDelDye: TToolButton
        Left = 55
        Top = 0
        AutoSize = True
        Caption = #21024#34892
        ImageIndex = 77
        OnClick = btnDelDyeClick
      end
      object btnSaveDye: TToolButton
        Left = 110
        Top = 0
        AutoSize = True
        Caption = #20445#23384
        Enabled = False
        ImageIndex = 5
        OnClick = btnSaveDyeClick
      end
      object ToolButton1: TToolButton
        Left = 165
        Top = 0
        AutoSize = True
        Caption = #26681#25454#25171#26679#32534#21495#25552#21462#37197#26041
        ImageIndex = 6
        OnClick = ToolButton1Click
      end
      object ToolButton2: TToolButton
        Left = 316
        Top = 0
        AutoSize = True
        Caption = #26681#25454#35746#21333#25209#21495#25552#21462
        ImageIndex = 87
        OnClick = ToolButton2Click
      end
    end
    object grdDye: TcxGrid
      Left = 0
      Top = 23
      Width = 1234
      Height = 241
      Align = alClient
      TabOrder = 1
      LookAndFeel.Kind = lfStandard
      object grdDyeTV1: TcxGridDBTableView
        NavigatorButtons.ConfirmDelete = False
        DataController.DataSource = ds1
        DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoGroupsAlwaysExpanded, dcoImmediatePost]
        DataController.Summary.DefaultGroupSummaryItems = <>
        DataController.Summary.FooterSummaryItems = <
          item
            Format = #20849' 0 '#26465
            Kind = skCount
            Column = grdDyeTV1OrderId
          end>
        DataController.Summary.SummaryGroups = <>
        OptionsBehavior.GoToNextCellOnEnter = True
        OptionsBehavior.FocusCellOnCycle = True
        OptionsCustomize.ColumnFiltering = False
        OptionsCustomize.ColumnSorting = False
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Inserting = False
        OptionsView.Footer = True
        OptionsView.GroupByBox = False
        OptionsView.Indicator = True
        object grdDyeTV1OrderId: TcxGridDBColumn
          Caption = #24207#21495
          DataBinding.FieldName = 'OrderId'
          HeaderAlignmentHorz = taCenter
          Options.Editing = False
          Options.Focusing = False
          Width = 49
        end
        object grdDyeTV1Crafts: TcxGridDBColumn
          Caption = #24037#24207#21517#31216
          DataBinding.FieldName = 'Crafts'
          PropertiesClassName = 'TcxButtonEditProperties'
          Properties.Buttons = <
            item
              Default = True
              Kind = bkEllipsis
            end>
          Properties.ReadOnly = True
          Properties.OnButtonClick = grdDyeTV1CraftsPropertiesButtonClick
          HeaderAlignmentHorz = taCenter
          Width = 79
        end
        object grdDyeTV1chnName: TcxGridDBColumn
          Caption = #26448#26009#21517#31216
          DataBinding.FieldName = 'chnName'
          PropertiesClassName = 'TcxButtonEditProperties'
          Properties.Buttons = <
            item
              Default = True
              Kind = bkEllipsis
            end>
          Properties.ReadOnly = True
          Properties.OnButtonClick = grdDyeTV1chnNamePropertiesButtonClick
          HeaderAlignmentHorz = taCenter
          Width = 125
        end
        object grdDyeTV1DyeStyle: TcxGridDBColumn
          Caption = #31867#21035
          DataBinding.FieldName = 'DyeStyle'
          HeaderAlignmentHorz = taCenter
          Options.Editing = False
          Options.Focusing = False
          Width = 71
        end
        object grdDyeTV1DyeUnitName: TcxGridDBColumn
          Caption = #21333#20301
          DataBinding.FieldName = 'Unit'
          HeaderAlignmentHorz = taCenter
          Options.Editing = False
          Options.Focusing = False
          Width = 34
        end
        object grdDyeTV1UnitdyeNum: TcxGridDBColumn
          Caption = #37197#26041#25968
          DataBinding.FieldName = 'UnitdyeNum'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.OnChange = grdDyeTV1UnitdyeNumPropertiesChange
          HeaderAlignmentHorz = taCenter
          Width = 61
        end
        object grdDyeTV1stepId: TcxGridDBColumn
          Caption = #27493#39588#21495
          DataBinding.FieldName = 'stepId'
          PropertiesClassName = 'TcxTextEditProperties'
          HeaderAlignmentHorz = taCenter
          SortIndex = 0
          SortOrder = soAscending
          Width = 64
        end
        object grdDyeTV1beizhu: TcxGridDBColumn
          Caption = #22791#27880
          DataBinding.FieldName = 'beizhu'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.OnEditValueChanged = grdDyeTV1beizhuPropertiesEditValueChanged
          FooterAlignmentHorz = taCenter
          HeaderAlignmentHorz = taCenter
          Width = 80
        end
      end
      object grdDyeL1: TcxGridLevel
        GridView = grdDyeTV1
      end
    end
  end
  object ImageList24: TImageList
    Left = 520
    Bitmap = {
[encoded data, 244027 characters]
      000000000000}
  end
  object ADOQueryPlan: TADOQuery
    Connection = ADODBMD_POPC.ADOCon
    CursorType = ctStatic
    CommandTimeout = 300
    Parameters = <>
    SQL.Strings = (
      'select * from ('
      
        #9'SELECT   A.ChgTimes, A.PlanNo, A.CustomNo,A.ContractNo,A.Delive' +
        'r,A.sysType,'
      
        '                 A.BusnTime,A.Status, A.plantype,A.exigence,A.un' +
        'it,'
      '                 lpnum = A.lpnum / (select  xc_unit.unitfact'
      #9#9#9#9#9' from  xc_unit'
      #9#9#9#9#9'       where  xc_unit.unitcode = A.unit'
      '                                   ),'
      '         '#9' p_num = B.p_num / (select  xc_unit.unitfact'
      #9#9#9#9'    from  xc_unit'
      #9#9#9#9#9#9'  where  xc_unit.unitcode = A.unit'
      '                                   ),'
      '                 B.p_chnname,B.p_rollNum,'
      
        '                ShortName =(select shortName from BC_customer wh' +
        'ere customNo=A.customNo),'
      
        '                Businees = (select Name from YC_stuff where code' +
        '=A.Businees  ),'
      
        '                BusnFill = (select Name from YC_Stuff where code' +
        '=A.BusnFill ),'
      
        '                statusName=(select note from XD_status where Sta' +
        'tus=A.Status and type='#39'PLAN'#39' and Valid='#39'Y'#39' ),'
      
        '                unitName=(select unitName from xc_unit where uni' +
        'tCode=A.unit),'
      '                userNo = A.BusnFill,'
      '                A.filltime,'
      '                B.p_code,'
      '                dyetype = A.dyetype'
      '        FROM MV_PlanInfo_All A ,'
      
        '             (select  PlanNo,p_code,p_chnname,count(PlanNo) as s' +
        'umnum,'
      #9#9#9'     sum(P_num) as p_num,'
      '                            sum(P_rollNum) as p_rollNum'
      '                from  MV_ProductInfo_All'
      #9'        where   P_Valid = '#39'Y'#39
      #9#9'group by PlanNo, p_code,p_chnname'
      '             ) B'
      '          WHERE A.planno = B.PlanNo'
      '                and  A.Valid = '#39'Y'#39
      '  )AA'
      ''
      '  ')
    Left = 184
    Top = 224
  end
  object DataSourcePlan: TDataSource
    DataSet = ADOQueryPlan
    Left = 152
    Top = 224
  end
  object ADOQueryCmd: TADOQuery
    Connection = ADODBMD_POPC.ADOCon
    Parameters = <>
    Left = 576
  end
  object ADOQueryTemp: TADOQuery
    Connection = ADODBMD_POPC.ADOCon
    CursorType = ctStatic
    LockType = ltReadOnly
    CommandTimeout = 300
    Parameters = <>
    SQL.Strings = (
      'select * from ('
      
        #9'SELECT   A.ChgTimes, A.PlanNo, A.CustomNo,A.ContractNo,A.Delive' +
        'r,A.sysType,'
      
        '                 A.BusnTime,A.Status, A.plantype,A.exigence,A.un' +
        'it,'
      '                 lpnum = A.lpnum / (select  xc_unit.unitfact'
      #9#9#9#9#9' from  xc_unit'
      #9#9#9#9#9'       where  xc_unit.unitcode = A.unit'
      '                                   ),'
      '         '#9' p_num = B.p_num / (select  xc_unit.unitfact'
      #9#9#9#9'    from  xc_unit'
      #9#9#9#9#9#9'  where  xc_unit.unitcode = A.unit'
      '                                   ),'
      '                 B.p_chnname,B.p_rollNum,'
      
        '                ShortName =(select shortName from BC_customer wh' +
        'ere customNo=A.customNo),'
      
        '                Businees = (select Name from YC_stuff where code' +
        '=A.Businees  ),'
      
        '                BusnFill = (select Name from YC_Stuff where code' +
        '=A.BusnFill ),'
      
        '                statusName=(select note from XD_status where Sta' +
        'tus=A.Status and type='#39'PLAN'#39' and Valid='#39'Y'#39' ),'
      
        '                unitName=(select unitName from xc_unit where uni' +
        'tCode=A.unit),'
      '                userNo = A.BusnFill,'
      '                A.filltime,'
      '                B.p_code,'
      '                dyetype = A.dyetype'
      '        FROM MV_PlanInfo_All A ,'
      
        '             (select  PlanNo,p_code,p_chnname,count(PlanNo) as s' +
        'umnum,'
      #9#9#9'     sum(P_num) as p_num,'
      '                            sum(P_rollNum) as p_rollNum'
      '                from  MV_ProductInfo_All'
      #9'        where   P_Valid = '#39'Y'#39
      #9#9'group by PlanNo, p_code,p_chnname'
      '             ) B'
      '          WHERE A.planno = B.PlanNo'
      '                and  A.Valid = '#39'Y'#39
      '  )AA'
      ''
      '  ')
    Left = 152
    Top = 192
  end
  object cxGridPopupMenu1: TcxGridPopupMenu
    Grid = dbGrid2
    PopupMenus = <>
    Left = 184
    Top = 192
  end
  object CDS_Sub: TClientDataSet
    Aggregates = <>
    Params = <>
    Left = 424
    Top = 489
  end
  object AdoQuerySub: TADOQuery
    Connection = ADODBMD_POPC.ADOCon
    LockType = ltReadOnly
    Parameters = <>
    Left = 456
    Top = 489
  end
  object ds1: TDataSource
    DataSet = CDS_Sub
    Left = 368
    Top = 489
  end
end
