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

📄 urep.dfm

📁 delphi 源码 小型企业管理软件
💻 DFM
📖 第 1 页 / 共 5 页
字号:
            Title.Font.Color = clNavy
            Title.Font.Height = -14
            Title.Font.Name = #23435#20307
            Title.Font.Style = []
            Width = 80
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'spname'
            Title.Alignment = taCenter
            Title.Caption = #21697#21517
            Title.Font.Charset = GB2312_CHARSET
            Title.Font.Color = clNavy
            Title.Font.Height = -14
            Title.Font.Name = #23435#20307
            Title.Font.Style = []
            Width = 80
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'spspec'
            Title.Alignment = taCenter
            Title.Caption = #35268#26684
            Title.Font.Charset = GB2312_CHARSET
            Title.Font.Color = clNavy
            Title.Font.Height = -14
            Title.Font.Name = #23435#20307
            Title.Font.Style = []
            Width = 80
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'invqty'
            Title.Alignment = taCenter
            Title.Caption = #24211#23384#25968#37327
            Title.Font.Charset = GB2312_CHARSET
            Title.Font.Color = clNavy
            Title.Font.Height = -14
            Title.Font.Name = #23435#20307
            Title.Font.Style = []
            Width = 80
            Visible = True
          end
          item
            Expanded = False
            FieldName = 'spUnit'
            Title.Alignment = taCenter
            Title.Caption = #21333#20301
            Title.Font.Charset = GB2312_CHARSET
            Title.Font.Color = clNavy
            Title.Font.Height = -14
            Title.Font.Name = #23435#20307
            Title.Font.Style = []
            Width = 80
            Visible = True
          end>
      end
      object SeSkinPanel2: TSeSkinPanel
        Left = 496
        Top = 0
        Width = 274
        Height = 443
        Performance = kspNoBuffer
        Transparent = True
        Align = alRight
        AnimateRoll = False
        BevelWidth = 1
        BorderWidth = 3
        ButtonKind = pbkRoll
        Caption = #26597#35810#26465#20214
        Rolled = False
        ParentRoll = False
        ShowBevel = True
        ShowButton = False
        ShowCaption = True
        SkinObject = 'Panel'
        NormalHeight = {00000000}
        object SeSkinLabel8: TSeSkinLabel
          Left = 13
          Top = 64
          Width = 42
          Height = 14
          Performance = kspNoBuffer
          Transparent = True
          Caption = #25104#21697#65306
          Color = clBtnFace
          ParentColor = False
          SkinObject = 'Label'
        end
        object SeSkinButton3: TSeSkinButton
          Left = 16
          Top = 249
          Width = 89
          Height = 26
          Performance = kspDoubleBuffer
          Transparent = False
          OnClick = SeSkinButton3Click
          BlackAndWhiteGlyph = False
          Caption = #26597#35810'(&Q)'
          State = kbsNormal
          TabOrder = 0
          WordWrap = False
          ShowCaption = True
          ShowGlyph = True
          SkinObject = 'Button'
        end
        object SeSkinButton4: TSeSkinButton
          Left = 16
          Top = 289
          Width = 89
          Height = 26
          Performance = kspDoubleBuffer
          Transparent = False
          Visible = False
          OnClick = SeSkinButton1Click
          BlackAndWhiteGlyph = False
          Caption = #25171#21360'(&P)'
          State = kbsNormal
          TabOrder = 1
          WordWrap = False
          ShowCaption = True
          ShowGlyph = True
          SkinObject = 'Button'
        end
        object SeSkinButton5: TSeSkinButton
          Left = 16
          Top = 337
          Width = 89
          Height = 26
          Performance = kspDoubleBuffer
          Transparent = False
          OnClick = SeSkinButton2Click
          BlackAndWhiteGlyph = False
          Caption = #36864#20986'(&X)'
          State = kbsNormal
          TabOrder = 2
          WordWrap = False
          ShowCaption = True
          ShowGlyph = True
          SkinObject = 'Button'
        end
        object wwDBLookupCombo7: TwwDBLookupCombo
          Left = 9
          Top = 91
          Width = 240
          Height = 22
          HelpType = htKeyword
          DropDownAlignment = taRightJustify
          Selected.Strings = (
            'spno'#9'12'#9#25104#21697#32534#21495#9'F'
            'spname'#9'18'#9#25104#21697#21517#31216#9'F'
            'spspec'#9'18'#9#35268#26684#9'F'
            'spunit'#9'5'#9#21333#20301#9'F')
          DataField = 'spno'
          LookupTable = DM.QDM_CP
          LookupField = 'spno'
          Style = csDropDownList
          
          TabOrder = 3
          AutoDropDown = True
          ShowButton = True
          UseTFields = False
          PreciseEditRegion = False
          AllowClearKey = False
          ShowMatchText = True
        end
      end
    end
    object SeCustomTabSheet3: TSeCustomTabSheet
      Caption = 'New Tab 2'
      PageIndex = 2
      PageVisible = True
      object Memo1: TMemo
        Left = 24
        Top = 16
        Width = 350
        Height = 57
        
        Lines.Strings = (
          'declare @khid varchar(20)'
          ''
          'select @khid=khid from kh where khname='#39'%0:s'#39
          ''
          
            'select a.invDate,a.invid, a.poid, qty=-b.qty*a.ioType, b.Price, ' +
            'amt=-b.amt*a.ioType,'
          '       c.spname, c.spspec, c.spno'
          'into #temp1'
          'from invHead a'
          'inner join invBody b'
          'on a.invid=b.invid'
          'left join sp c'
          'on b.spno=c.spno'
          'where a.khid=@khid'
          '  and a.invDate between '#39'%1:s'#39' and '#39'%2:s'#39
          '  and ('#39#39'='#39'%3:s'#39' or poid='#39'%3:s'#39')'
          '  and (a.invType='#39#25104#21697#21457#36135#39' or a.invType='#39#25104#21697#36864#36135#39')'
          ''
          'update #temp1'
          'set price=b.Price, amt=b.Price*a.Qty'
          'from #temp1 a, poBody b'
          'where a.poid=b.poid and a.spno=b.spno'
          ''
          ''
          '')
        TabOrder = 0
        WordWrap = False
      end
      object Memo2: TMemo
        Left = 24
        Top = 80
        Width = 350
        Height = 49
        
        Lines.Strings = (
          'select *'
          'into #temp1'
          'from invHead a'
          'inner join invBody b'
          'on a.invid=b.invid'
          'left join cp c'
          'on b.spno=c.spno'
          'where a.khid=@khid'
          '  and a.invDate between '#39'%1:s'#39' and '#39'%2:s'#39
          '  and ('#39#39'='#39'%3:s'#39' or poid='#39'%3:s'#39')')
        TabOrder = 1
        WordWrap = False
      end
      object Memo3: TMemo
        Left = 24
        Top = 136
        Width = 350
        Height = 81
        
        Lines.Strings = (
          'declare @khid varchar(20)'
          ''
          'select @khid=khid from kh where khname='#39'%0:s'#39
          ''
          'select a.poDate,a.poid, moid=space(20),poQty=b.qty,'
          '       c.spname, c.spspec, c.spno'
          'into #temp1'
          'from poHead a'
          'inner join poBody b'
          'on a.poid=b.poid'
          'left join sp c'
          'on b.spno=c.spno'
          'where a.khid=@khid'
          ''
          'select a.invDate,a.invid,b.spno,a.poid,invQty=-b.qty*a.ioType'
          'into #temp2'
          'from invHead a'
          'inner join invBody b'
          'on a.invid=b.invid'
          'where a.poid<>'#39#39' and (a.invType='#39#25104#21697#21457#36135#39' or a.invType='#39#25104#21697#36864#36135#39')'
          ''
          
            'select a.*, b.invDate,b.invid,b.invQty,leftQty=a.poQty,id=identi' +
            'ty(int,1,1)'
          'into #temp3'
          'from #temp1 a left join #temp2 b'
          'on a.poid=b.poid and a.spno=b.spno'
          'order by a.poid,a.spno,b.invDate,b.invQty desc,b.invid'
          ''
          'update #temp3'
          'set leftQty=poQty-(select sum(invQty) from #temp3 a'
          
            '  where a.id<=#temp3.id and a.poid=#temp3.poid and a.spno=#temp3' +
            '.spno)'
          ''
          '--'#21024#38500#26368#32456#27809#26377#27424#36135#30340#35746#21333
          'delete from #temp3'
          'where poid+'#39'_'#39'+spno in ('
          '  select poid+'#39'_'#39'+spno from #temp3 where leftQty=0 and id in ('
          '  select max(id) from #temp3 group by poid,spno'
          '  ))'
          ''
          '')
        TabOrder = 2
        WordWrap = False
      end
      object Memo4: TMemo
        Left = 24
        Top = 232
        Width = 350
        Height = 65
        
        Lines.Strings = (
          '--'#20986#20837#24211#21512#35745
          'select b.spno, Qty=sum(b.Qty*a.ioType)'
          'into #temp1'
          'from invHead a, invBody b'
          'where a.invid=b.invid'
          
            '  and ('#39#39'='#39'%0:s'#39' or b.spno in (select spno from invBody where in' +
            'vid='#39'%0:s'#39'))'
          'group by b.spno'
          ''
          '--'#24403#21069#25104#21697#24211#23384','#24403#21069#35746#21333#21487#29992#37327
          'update sp'
          'set invQty=b.Qty'
          'from sp a, #temp1 b'
          'where a.spno=b.spno'
          ''
          'update sp'
          'set invQty=0'
          'where spno not in (select spno from #temp1)'
          '')
        TabOrder = 3
        WordWrap = False
      end
      object Memo5: TMemo
        Left = 24
        Top = 320
        Width = 350
        Height = 65
        
        Lines.Strings = (
          '--'#20986#20837#24211#21512#35745
          'select b.spno, b.Qty, a.ioType, a.invType, a.invDate, a.poid'
          'into #temp1'
          'from invHead a, invBody b'
          'where a.invid=b.invid'
          '  and a.invDate between '#39'%0:s'#39' and '#39'%1:s'#39
          '  and ('#39#39'='#39'%2:s'#39' or a.poid='#39'%2:s'#39')'
          ''
          ''
          '--'#24403#21069#24211#23384
          'select b.spname,b.spspec,b.spunit,a.*'
          'into #temp2'
          'from #temp1 a, sp b'
          'where a.spno=b.spno'
          ''
          ''
          ''
          '')
        TabOrder = 4
        WordWrap = False
      end
      object Memo6: TMemo
        Left = 24
        Top = 400
        Width = 350
        Height = 57
        
        Lines.Strings = (
          'declare @khid varchar(20)'
          ''
          'select @khid=khid from kh where khname='#39'%0:s'#39
          ''
          
            'select a.invDate,a.invid, a.poid, qty=b.qty*a.ioType, b.Price, a' +
            'mt=b.amt*a.ioType,'
          '       c.spname, c.spspec, c.spno'
          'into #temp1'
          'from invHead a'
          'inner join invBody b'
          'on a.invid=b.invid'
          'left join sp c'
          'on b.spno=c.spno'
          'where a.khid=@khid'
          '  and a.invDate between '#39'%1:s'#39' and '#39'%2:s'#39
          '  and ('#39#39'='#39'%3:s'#39' or poid='#39'%3:s'#39')'
          '  and (a.invType='#39#36141#26009#20837#24211#39' or a.invType='#39#36141#26009#36864#36135#39')'
          ''
          'update #temp1'
          'set price=b.Price, amt=b.Price*a.Qty'
          'from #temp1 a, poBody b'
          'where a.poid=b.poid and a.spno=b.spno'
          ''
          ''
          '')
        TabOrder = 5
        WordWrap = False
      end
      object Memo7: TMemo
        Left = 392
        Top = 16
        Width = 350
        Height = 57
        
        Lines.Strings = (
          'select a.boid, a.khid, a.boDate, a.NeedDate, spno=b.ljno'
          
            '  , b.qty, b.price, b.amt, id=0, ioType=1, a.poid, diff=cast(0 a' +
            's numeric(18,4))'
          '  , djType='#39#37319#36141#38656#27714#39
          'into #temp1'
          'from boHead a, boBody b'
          'where a.poid='#39'%0:s'#39' and a.boid=b.boid'
          ''
          'insert into #temp1('
          '  boid, khid, boDate, NeedDate, spno'
          '  , qty, price, amt, id, ioType, poid, diff'
          '  , djType)'
          'select a.invid, a.khid, a.invDate, NULL, b.spno'
          '  , b.qty, b.price, b.amt, id=1, -1*a.ioType, a.poid, 0'
          '  , a.invType'
          'from invHead a, invBody b'
          'where a.poid='#39'%0:s'#39' and a.invid=b.invid'
          '  and (a.invType='#39#36141#26009#20837#24211#39' or a.invType='#39#36141#26009#36864#36135#39')'
          ''
          'select a.*,b.spname,b.spspec,b.spunit'
          'into #temp2'
          'from #temp1 a, sp b'
          'where a.spno=b.spno'
          ''
          'select *,rid=identity(int,1,1)'
          'into #temp3'
          'from #temp2'
          'order by spno, id, boDate'
          ''
          'update #temp3'

⌨️ 快捷键说明

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