📄 mrp_qry_analyzermo6.dfm
字号:
inherited Frm_Mrp_Qry_AnalyzerMo6: TFrm_Mrp_Qry_AnalyzerMo6
Left = -5
Top = 76
Caption = '产品材料成本分析'
ClientHeight = 452
ClientWidth = 800
PixelsPerInch = 96
TextHeight = 12
inherited ControlBar: TControlBar
Width = 800
inherited ToolBar: TToolBar
inherited TlBtn_Look: TToolButton
Hint = '查询明细'
end
end
end
inherited Pnl_Title: TPanel
Width = 800
Caption = '产品材料成本分析'
end
inherited Pnl_Head: TPanel
Width = 800
inherited Lbl_Condition: TLabel
Width = 24
Caption = '全部'
end
inherited Lbl_Order: TLabel
Width = 102
Caption = '父项代码/子项代码'
end
end
inherited Pnl_Hint: TPanel
Top = 426
Width = 800
end
inherited Pnl_Body: TPanel
Width = 800
Height = 329
inherited DBGridEh: TDBGridEh
Width = 800
Height = 329
FrozenCols = 2
UseMultiTitle = True
Columns = <
Item
FieldName = 'Ite_ItemCode'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '父项|代码'
Width = 70
KeyList.Strings = ()
end
Item
FieldName = 'MOQty'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '父项|生产总数'
Width = 75
KeyList.Strings = ()
end
Item
FieldName = 'ItemCode'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '子项|代码'
Width = 80
KeyList.Strings = ()
end
Item
FieldName = 'TotalQty'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '子项|领料总数'
Width = 61
KeyList.Strings = ()
end
Item
FieldName = 'Sjdg'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '子项|实际单耗数量'
Width = 91
KeyList.Strings = ()
end
Item
FieldName = 'bzdg'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '子项|当前标准定额数量'
Width = 102
KeyList.Strings = ()
end
Item
FieldName = 'sjdgcb'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '子项|实际单耗成本'
Width = 77
KeyList.Strings = ()
end
Item
FieldName = 'bzdgcb'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '子项|当前标准定额成本'
Width = 100
KeyList.Strings = ()
end
Item
FieldName = 'Dgbl'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '超额比率'
Width = 56
KeyList.Strings = ()
end>
end
end
inherited AdoQry_Tmp: TAdoQuery
Left = 501
Top = 43
end
inherited ActionList: TActionList
Left = 160
Top = 224
inherited Act_Look: TAction
Enabled = True
Visible = True
OnExecute = Act_LookExecute
end
inherited Act_ShowGrid: TAction
Caption = '订单分析'
Hint = '订单分析'
OnExecute = Act_ShowGridExecute
end
end
inherited AdoQry_Main: TAdoQuery
CurSorType = ctStatic
OnFetchProgress = AdoQry_MainFetchProgress
SQL.Strings = (
''
''
''
''
'Select Ite_ItemCode,ItemCode,MOQty,TotalQty,Sjdg,bzdg,sjdgcb,bzd' +
'gcb,'
'Case when Isnull(bzdgcb,0) <>0 then'
' Convert(chAr,(sjdgcb-bzdgcb)/bzdgcb*100)+'#39'%'#39
' else '#39'0%'#39
' end Dgbl'
'from'
'--------------------------------------begin (b)------'
'(Select Tmp3.Ite_ItemCode,Tmp3.ItemCode,Tmp3.MoQty,Tmp3.TotalQty' +
',Tmp3.Sjdg,#TmpOpenBomLast.BomQty As Bzdg,'
' Tmp3.Sjdgcb,Case when Isnull(Tmp3.Sjdg,0)<>0 Then #TmpOpenB' +
'omLast.BomQty/Tmp3.Sjdg*Tmp3.Sjdgcb'
' Else 0 end Bzdgcb'
'From'
''
'------------子项领料总数(TotalQTY)--------子项实际定额数(SJDG' +
')---子项实际定额成本(SjdgCb)------begin(a)------'
'-------------------------'
'(Select Tmp1.Ite_ItemCode,Tmp1.ItemCode,Tmp2.MoQty,Tmp1.TotalQty' +
',case when isnull(Tmp2.MoQty,0)<>0 then isNull(Tmp1.TotalQty,0)/' +
'IsNull(Tmp2.MoQty,0)'
' ' +
'else 0 end Sjdg,'
' Tmp1.Sjdgcb from'
' (Select #TmPMoLineLast.ItemCode as Ite_ItemCode,#TmpInvoutBil' +
'lline.ItemCode, Sum(isnull(#TmpInvOutBillline.InvBillQty,0)) As ' +
'TotalQty,'
' Sum(isNull(#TmpInvOutBillLine.InvBillQty*#TmpInvOutBi' +
'llLine.InvBillPrice,0)) As SjdgCb'
' From #TmPMoLineLast Join #TmpInvOutBillLine'
' On #TmPMoLineLast.MoNo+Convert(ChAr,#TmPmoL' +
'ineLast.MoLineNO)=#TmpInvOutBillLine.MoNo+Convert(chAr,#TmpInvOu' +
'tBillLine.MoLineNo)'
' Group By #TmPMoLineLast.ItemCode,#TmpInvOutBillline.ItemCode ' +
') Tmp1 '
'join'
' (Select ItemCode As Ite_ItemCode,Sum(IsNull(MoRealInQty,0)) As' +
' MoQty From #TmPMoLineLast'
' Group By ItemCode)Tmp2'
'On Tmp1.Ite_ItemCode=Tmp2.Ite_ItemCode ) Tmp3'
'----------------------------------------------------------------' +
'------------------------------end(a)--'
'Join #TmpOpenBomLast On Tmp3.Ite_ItemCode=#TmpOpenBomLast.Ite_it' +
'emCode'
' and Tmp3.ItemCode=#TmpOpenBomLast.ItemCode)' +
' tmp4'
'-------------------------end(b)----- '
' ')
Left = 344
Top = 241
object AdoQry_MainIte_ItemCode: TStringField
FieldName = 'Ite_ItemCode'
Origin = '#tmp17'
Size = 16
end
object AdoQry_MainItemCode: TStringField
FieldName = 'ItemCode'
Origin = '#tmp17'
Size = 16
end
object AdoQry_MainMOQty: TFloatField
FieldName = 'MOQty'
Origin = '#tmp17'
end
object AdoQry_MainTotalQty: TFloatField
FieldName = 'TotalQty'
Origin = '#tmp17'
end
object AdoQry_MainSjdg: TFloatField
FieldName = 'Sjdg'
Origin = '#tmp17'
ReadOnly = True
end
object AdoQry_Mainbzdg: TFloatField
FieldName = 'bzdg'
Origin = '#tmp17'
end
object AdoQry_Mainsjdgcb: TFloatField
FieldName = 'sjdgcb'
Origin = '#tmp17'
end
object AdoQry_Mainbzdgcb: TFloatField
FieldName = 'bzdgcb'
Origin = '#tmp17'
ReadOnly = True
end
object AdoQry_MainDgbl: TStringField
FieldName = 'Dgbl'
Origin = '#tmp17'
ReadOnly = True
Size = 31
end
end
inherited DataSource: TDataSource
Top = 145
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -