⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qc_qry_qcreport.dfm

📁 一个MRPII系统源代码版本
💻 DFM
字号:
inherited Frm_Qc_Qry_QcReport: TFrm_Qc_Qry_QcReport
  Left = 328
  Top = 191
  Caption = 'Qc'#36136#26816#32467#26524#20998#26512#34920
  ClientHeight = 553
  ClientWidth = 800
  Icon.Data = {
    0000010001002020100001000400E80200001600000028000000200000004000
    0000010004000000000080020000000000000000000000000000000000000000
    0000000080000080000000808000800000008000800080800000C0C0C0008080
    80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000
    0000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000077
    7777000000000000000000000000777777777777777700000000000000000000
    00000077777777700000000000000000DDDDD00000077777700000000000DDDD
    DDDDDDDDDD0000777770000000000000000007DDDDDDD0000777700000000000
    0000000007DDDDDDD0077700000000000000000000007DCCCDD0777000000000
    000000000000000CCCC407770000007770000000000000000CCCC47770000711
    1700000000000000000CCC477700099917000000000000000000CCC477700099
    917000000000000000000CCC477000009970000000000000000007CCC4777000
    0977000000000000000002CCC47717000001700000000000000072ACCC479170
    7079177000000000000072AAAC470097171991177700000000072AAAAC470009
    99919991111777777772AAAAAAC700011999999999911111332AAAAAAAC00001
    999999999999999BBBAAAAAAAAC0771999999999999999BBBBBBBAAAAC009999
    9999999999999999BBBBBBBAAC000099999999999999999BBBBBBBBBA0000000
    99999999999999BBBBBBBBBA00000000009999999999999BBBBBBAA000000000
    0000999999999999BB990000000000000000000999999999990000000000FFFF
    FFFFFFFFFFFFFFFFFFFFFFFFFFFFC0FFFFFF0000FFFFFFC01FFFF07E07FF0003
    C1FFFF80787FFFF8063FFFFF011FFFFFE08FC7FFF80783FFFE0383FFFF01C1FF
    FF81F1FFFF8078FFFF803E7FFF00141FFF00C003FE00E0000000E0000001E000
    00010000000300000003C0000007F000000FFC00001FFF0000FFFFE003FF}
  PixelsPerInch = 96
  TextHeight = 12
  inherited ControlBar: TControlBar
    Width = 800
  end
  inherited Pnl_Title: TPanel
    Width = 800
    Caption = 'Qc'#36136#26816#32467#26524#20998#26512#34920
    Font.Name = #40657#20307
    Font.Style = [fsBold]
    inherited Image2: TImage
      Width = 800
    end
    inherited PnlTitleLabel: TLabel
      Width = 8
    end
  end
  inherited Pnl_Head: TPanel
    Width = 800
    inherited Image1: TImage
      Width = 800
    end
    inherited Lbl_Condition: TLabel
      Width = 24
      Caption = #20840#37096
    end
    inherited Lbl_Order: TLabel
      Width = 60
      Caption = #20379#24212#21830#20195#30721
    end
  end
  inherited Pnl_Hint: TPanel
    Top = 528
    Width = 800
    inherited Image4: TImage
      Width = 800
    end
  end
  inherited Pnl_Body: TPanel
    Width = 800
    Height = 437
    inherited Image3: TImage
      Width = 800
      Height = 437
    end
    inherited DBGridEh: TDBGridEh
      Width = 800
      Height = 437
      Columns = <
        item
          EditButtons = <>
          FieldName = 'VendorCode'
          Footers = <>
          Title.Caption = #20379#24212#21830#26631#35782
          Width = 272
        end
        item
          EditButtons = <>
          FieldName = 'allItem'
          Footers = <>
          Title.Caption = #29289#26009#26631#35782
          Width = 277
        end
        item
          EditButtons = <>
          FieldName = 'allQc'
          Footers = <>
          Title.Caption = #26816#39564#25209#27425
        end
        item
          EditButtons = <>
          FieldName = 'illage'
          Footers = <>
          Title.Caption = #19981#21512#26684#25209#27425
        end
        item
          Alignment = taRightJustify
          EditButtons = <>
          FieldName = 'dispQcpercent'
          Footers = <>
          Title.Caption = #25209#27425#21512#26684#29575
          Width = 84
        end>
    end
  end
  inherited ActionList: TActionList
    Top = 152
  end
  inherited AdoQry_Main: TAdoQuery
    ConnectionString = 
      'Provider=SQLOLEDB.1;Password=mdrcmrm;Persist Security Info=True;' +
      'User ID=mdrcmrm;Initial Catalog=mdrcmrm_B;Data Source=192.168.0.' +
      '151'
    SQL.Strings = (
      '--'#25152#26377#22788#29702
      'select ff.VendorCode+'#39' '#39'+Vendor.VendorName VendorCode,'
      '  allItem,'
      '  allQc,'
      '  illage,'
      '  Qcpercent,'
      '  dispQcpercent'
      ' from'
      '('
      'select VendorCode,'
      '  '#39' '#27719#24635#39' allItem,'
      '  allQc,'
      '   illage,'
      
        '   convert(decimal(20,4),(allQc-illage))/convert(decimal(20,4),a' +
        'llQc)*100 as Qcpercent,'
      
        '   convert(varchAr(50),convert(decimal(10,2),convert(decimal(20,' +
        '4),(allQc-illage))/convert(decimal(20,4),allQc)*100))+'#39'%'#39' as dis' +
        'pQcpercent'
      'from '
      '('
      'select '
      '  VendorCode,'
      '  case when allQc  is null then 0 else allQc end allQc,'
      '  case when illage is null then 0 else illage end illage'
      'from '
      '(        '
      'select cc1.VendorCode,cc1.allQc,cc2.illage '
      'from'
      '('
      'select VendorCode,Count(*) as allQc from '
      '('
      'select distinct VendorCode,QcBatchno'
      'from ('
      'select * from '
      '('
      '  select a.VendorCode ,b.QcBatchno '
      '  from oncheckBill a,oncheckBillline b'
      '  where a.oncheckBillid=b.oncheckBillid'
      '    and b.Qcstatus<>0'
      '    and a.oncheckdate>='#39'2001.01.01'#39' '
      '    and a.oncheckdate<='#39''#39
      ') bb'
      'where bb.QcBatchno is not null '
      '  and bb.QcBatchno<>'#39#39
      ') aa'
      ') cc'
      'group by VendorCode'
      ') cc1'
      'left join '
      '--'#19981#21512#26684
      '(select VendorCode,Count(*) as illage'
      'from '
      ' ('
      '  select distinct VendorCode,QcBatchno'
      '  from '
      '   ('
      '     select * '
      '     from  '
      '      ('
      '        select a.VendorCode ,b.QcBatchno '
      '        from oncheckBill a,oncheckBillline b'
      '        where a.oncheckBillid=b.oncheckBillid'
      '          and b.Qcstatus<>0 '
      '          and b.Qcstatus<>1'
      '          and a.oncheckdate>='#39'2001.01.01'#39' '
      '          and a.oncheckdate<='#39''#39
      '       ) bb'
      '     where bb.QcBatchno is not null '
      '       and bb.QcBatchno<>'#39#39
      '    ) aa'
      '  ) cc'
      'group by VendorCode'
      ')  cc2'
      'on cc1.VendorCode=cc2.VendorCode'
      ') dd'
      ') ee'
      ' '
      'union'
      '--*************************************************************'
      '--'#25152#26377#22788#29702
      'select VendorCode,'
      '  ee.ItemCode+'#39' '#39'+Item.ItemName allItem,'
      '  allQc,'
      '   illage,'
      
        '   convert(decimal(20,4),(allQc-illage))/convert(decimal(20,4),a' +
        'llQc)*100 as Qcpercent,'
      
        '   convert(varchAr(50),convert(decimal(10,2),convert(decimal(20,' +
        '4),(allQc-illage))/convert(decimal(20,4),allQc)*100))+'#39'%'#39' as dis' +
        'pQcpercent'
      'from '
      '('
      'select '
      '  VendorCode,'
      '  ItemCode,'
      '  case when allQc  is null then 0 else allQc end allQc,'
      '  case when illage is null then 0 else illage end illage'
      'from '
      '(        '
      'select cc1.VendorCode,cc1.ItemCode,cc1.allQc,cc2.illage '
      'from'
      '('
      'select VendorCode,ItemCode,Count(*) as allQc from '
      '('
      'select distinct VendorCode,QcBatchno,ItemCode'
      'from ('
      'select * from '
      '('
      '  select a.VendorCode ,'
      '    b.QcBatchno ,'
      '    b.ItemCode'
      '  from oncheckBill a,oncheckBillline b'
      '  where a.oncheckBillid=b.oncheckBillid'
      '    and b.Qcstatus<>0'
      '    and a.oncheckdate>='#39'2001.01.01'#39' '
      '    and a.oncheckdate<='#39''#39
      ') bb'
      'where bb.QcBatchno is not null '
      '  and bb.QcBatchno<>'#39#39
      ') aa'
      ') cc'
      'group by VendorCode,ItemCode'
      ') cc1'
      'left join '
      '--'#19981#21512#26684
      '(select VendorCode,ItemCode,Count(*) as illage'
      'from '
      ' ('
      '  select distinct VendorCode,QcBatchno,ItemCode'
      '  from '
      '   ('
      '     select * '
      '     from  '
      '      ('
      '        select a.VendorCode ,'
      '           b.QcBatchno ,'
      '           b.ItemCode'
      '        from oncheckBill a,oncheckBillline b'
      '        where a.oncheckBillid=b.oncheckBillid'
      '          and b.Qcstatus<>0 '
      '          and b.Qcstatus<>1'
      '          and a.oncheckdate>='#39'2001.01.01'#39' '
      '          and a.oncheckdate<='#39''#39
      '       ) bb'
      '     where bb.QcBatchno is not null '
      '       and bb.QcBatchno<>'#39#39
      '    ) aa'
      '  ) cc'
      'group by VendorCode,ItemCode'
      ')  cc2'
      'on cc1.VendorCode=cc2.VendorCode'
      ') dd'
      ') ee ,Item'
      'where ee.ItemCode=Item.ItemCode'
      ') ff,Vendor '
      'where ff.VendorCode=Vendor.VendorCode'
      'Order by VendorCode,allItem DESC '
      '')
    Top = 145
    object AdoQry_MaInvendorCode: TStringField
      FieldName = 'VendorCode'
      ReadOnly = True
      Size = 73
    end
    object AdoQry_MainallItem: TStringField
      FieldName = 'allItem'
      Size = 97
    end
    object AdoQry_MainallQc: TIntegerField
      FieldName = 'allQc'
    end
    object AdoQry_Mainillage: TIntegerField
      FieldName = 'illage'
    end
    object AdoQry_MainQcpercent: TFloatField
      FieldName = 'Qcpercent'
    end
    object AdoQry_MaindispQcpercent: TStringField
      FieldName = 'dispQcpercent'
      Size = 51
    end
  end
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -