📄 unitmatenumchg.~dfm
字号:
ParentFont = False
TabOrder = 2
Visible = False
end
object btnClose: TButton
Left = 15
Top = 340
Width = 155
Height = 29
Caption = #36864#20986'(&E)'
TabOrder = 6
OnClick = btnCloseClick
end
object cbbLb: TComboBox
Left = 61
Top = 86
Width = 141
Height = 20
Style = csDropDownList
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
ItemHeight = 12
MaxLength = 2
ParentFont = False
TabOrder = 7
end
end
object Panel3: TPanel
Left = 1
Top = 1
Width = 457
Height = 400
Align = alClient
Color = 15263976
TabOrder = 1
object Panel4: TPanel
Left = 1
Top = 1
Width = 455
Height = 30
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = 15263976
TabOrder = 0
object Panel16: TPanel
Left = 2
Top = 2
Width = 451
Height = 25
Align = alTop
BevelOuter = bvLowered
Color = 15263976
TabOrder = 0
object RxLabel7: TRxLabel
Left = 16
Top = 5
Width = 62
Height = 13
Caption = #26597#35810#32467#26524#65306
end
object lbl_HuiZong: TRxLabel
Left = 104
Top = 6
Width = 14
Height = 13
Caption = #26465
end
end
end
object DBGrid1: TDBGrid
Left = 1
Top = 31
Width = 455
Height = 368
Align = alClient
DataSource = dsHuiZong
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit]
ParentFont = False
TabOrder = 1
TitleFont.Charset = GB2312_CHARSET
TitleFont.Color = clWindowText
TitleFont.Height = -12
TitleFont.Name = #23435#20307
TitleFont.Style = [fsBold]
end
end
end
object ADOQuery_sql: TADOQuery
Connection = DM.ADO_C
Parameters = <
item
Name = 'dtp1'
Size = -1
Value = Null
end
item
Name = 'dtp2'
Size = -1
Value = Null
end>
Prepared = True
SQL.Strings = (
'select a.mate_code as '#29289#26009#32534#30721',a.mate_name as '#29289#26009#21517#31216',a.mate_type as '#35268#26684 +
#22411#21495',a.mate_class as '#29289#26009#31867#21035','
' (a.stoc_amount-isNull(b.In_Amount,0)-isNull(c.TL_Amount,0)+i' +
'sNull(d.Out_Amount,0)+isNull(e.Out_Amount,0)) as '#26399#21021#25968#37327','
' (a.mate_totalprice-isNull(b.In_Zj,0)-isNull(c.TL_Zj,0)+isNul' +
'l(d.Out_Zj,0)+isNull(e.Out_Zj,0)) as '#26399#21021#24635#39069','
' (isNull(b.In_Amount,0))+(isNull(c.TL_Amount,0)) as '#20837#24211#25968#37327','
' (isNull(b.In_Zj,0))+(isNull(c.TL_Zj,0)) as '#20837#24211#24635#39069','
' (isNull(d.Out_Amount,0))+(isNull(e.Out_Amount,0)) as '#20986#24211#25968#37327','
' (isNull(d.Out_Zj,0))+(isNull(e.Out_Zj,0)) as '#20986#24211#24635#39069','
' a.stoc_amount as '#24211#23384#25968#37327',a.mate_totalprice as '#24211#23384#24635#39069
'from mate_basic a '
'left outer join '
'(select mate_code,sum(in_amount) as in_amount,sum(in_zj) as in_z' +
'j from mate_CgRk where (In_Date between :dtp1 and :dtp2) group b' +
'y mate_code) b on a.mate_code=b.mate_code'
'left outer join '
'(select mate_code,sum(TL_amount) as TL_amount,sum(TL_zj) as TL_z' +
'j from TuiLiao_Rk where (mate_code=:bm) and (TL_Date between :dt' +
'p1 and :dtp2) group by mate_code) c on a.mate_code=c.mate_code'
'left outer join '
'(select mate_code,sum(Out_amount) as Out_amount,sum(Out_zj) as O' +
'ut_zj from Mate_Ly where (Out_Date between :dtp1 and :dtp2) grou' +
'p by mate_code) d on a.mate_code=d.mate_code'
'left outer join '
'(select mate_code,sum(Out_amount) as Out_amount,sum(Out_zj) as O' +
'ut_zj from Mate_Bf where (Out_Date between :dtp1 and :dtp2) grou' +
'p by mate_code) e on a.mate_code=e.mate_code'
'where (a.mate_class between '#39'101'#39' and '#39'606'#39')'
'Union all'
'select a.mate_code as '#29289#26009#32534#30721',a.mate_name as '#29289#26009#21517#31216',a.mate_type as '#35268#26684 +
#22411#21495',a.mate_class as '#29289#26009#31867#21035','
' (a.stoc_amount-isNull(b.In_Amount,0)-isNull(c.TL_Amount,0)+i' +
'sNull(d.Out_Amount,0)+isNull(e.Out_Amount,0)) as '#26399#21021#32467#23384#25968#37327','
' (a.mate_totalprice-isNull(b.In_Zj,0)-isNull(c.TL_Zj,0)+isNul' +
'l(d.Out_Zj,0)+isNull(e.Out_Zj,0)) as '#26399#21021#32467#23384#37329#39069','
' (isNull(b.In_Amount,0))+(isNull(c.TL_Amount,0)) as '#20837#24211#25968#37327','
' (isNull(b.In_Zj,0))+(isNull(c.TL_Zj,0)) as '#20837#24211#37329#39069','
' (isNull(d.Out_Amount,0))+(isNull(e.Out_Amount,0)) as '#20986#24211#25968#37327','
' (isNull(d.Out_Zj,0))+(isNull(e.Out_Zj,0)) as '#20986#24211#37329#39069','
' a.stoc_amount as '#26399#26411#32467#23384#25968#37327',a.mate_totalprice as '#26399#26411#32467#23384#37329#39069
'from mate_basic a ' +
' '
'left outer join'
'(select mate_code,sum(in_amount) as in_amount,sum(in_zj) as in_z' +
'j from mate_ZzRk where (In_Date between :dtp1 and :dtp2) group b' +
'y mate_code) b on a.mate_code=b.mate_code'
'left outer join'
'(select mate_code,sum(TL_amount) as TL_amount,sum(TL_zj) as TL_z' +
'j from TuiLiao_Rk where (TL_Date between :dtp1 and :dtp2) group ' +
'by mate_code) c on a.mate_code=c.mate_code'
'left outer join'
'(select mate_code,sum(Out_amount) as Out_amount,sum(Out_zj) as O' +
'ut_zj from mate_Ly where (Out_Date between :dtp1 and :dtp2) grou' +
'p by mate_code) d on a.mate_code=d.mate_code'
'left outer join'
'(select mate_code,sum(Out_amount) as Out_amount,sum(Out_zj) as O' +
'ut_zj from mate_Bf where (Out_Date between :dtp1 and :dtp2) grou' +
'p by mate_code) e on a.mate_code=e.mate_code'
'where (a.mate_class like '#39'CCC'#39') '
'union all'
'select a.mate_code as '#29289#26009#32534#30721',a.mate_name as '#29289#26009#21517#31216',a.mate_type as '#35268#26684 +
#22411#21495',a.mate_class as '#29289#26009#31867#21035','
' (a.stoc_amount-isNull(b.In_Amount,0)-isNull(c.TL' +
'_Amount,0)+isNull(d.Out_Amount,0)+isNull(e.Out_Amount,0)) as '#26399#21021#32467 +
#23384#25968#37327','
' (a.mate_totalprice-isNull(b.In_Zj,0)-isNull(c.TL' +
'_Zj,0)+isNull(d.Out_Zj,0)+isNull(e.Out_Zj,0)) as '#26399#21021#32467#23384#37329#39069','
' (isNull(b.In_Amount,0))+(isNull(c.TL_Amount,0)) ' +
'as '#20837#24211#25968#37327','
' (isNull(b.In_Zj,0))+(isNull(c.TL_Zj,0)) as '#20837#24211#24635#39069','
' (isNull(d.Out_Amount,0))+(isNull(e.Out_Amount,0)' +
') as '#20986#24211#25968#37327','
' (isNull(d.Out_Zj,0))+(isNull(e.Out_Zj,0)) as '#20986#24211#37329 +
#39069','
' a.stoc_amount as '#26399#26411#32467#23384#25968#37327',a.mate_totalprice as '#26399#26411#32467 +
#23384#37329#39069
'from mate_basic a ' +
' '
'left outer join '
'(select mate_code,sum(In_Amount) as In_Amount,sum(In_Zj) as In_Z' +
'j from Product_Rk where (In_Date between :dtp1 and :dtp2) group ' +
'by mate_code) b on a.mate_code=b.mate_code'
'left outer join '
'(select mate_code,sum(TL_Amount) as TL_Amount,sum(TL_Zj) as TL_Z' +
'j from TuiLiao_Rk where (TL_Date between :dtp1 and :dtp2) group ' +
'by mate_code) c on a.mate_code=c.mate_code'
'left outer join '
'(select mate_code,sum(Out_Amount) as Out_Amount,sum(Out_Zj) as O' +
'ut_Zj from mate_Ck where (Out_Date between :dtp1 and :dtp2) grou' +
'p by mate_code) d on a.mate_code=d.mate_code'
'left outer join '
'(select mate_code,sum(Out_Amount) as Out_Amount,sum(Out_Zj) as O' +
'ut_Zj from mate_Bf where (Out_Date between :dtp1 and :dtp2) grou' +
'p by mate_code) e on a.mate_code=e.mate_code'
'where (a.mate_class like '#39'PPP'#39') '
'order by a.mate_code')
Left = 112
Top = 48
end
object dsHuiZong: TDataSource
DataSet = ADOQuery_sql
Left = 40
Top = 48
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -