📄 mrp_qry_analyzermo5_mopoline.dfm
字号:
inherited Frm_Mrp_Qry_AnalyzerMo5_MoPoLine: TFrm_Mrp_Qry_AnalyzerMo5_MoPoLine
Left = 88
Top = 116
Caption = '订单分析'
PixelsPerInch = 96
TextHeight = 12
inherited Pnl_Title: TPanel
Caption = '订单分析'
end
inherited Pnl_Body: TPanel
inherited DBGridEh: TDBGridEh
Columns = <
Item
FieldName = 'mono'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '订单号'
Width = 89
KeyList.Strings = ()
end
Item
FieldName = 'MoLineno'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '订单行号'
Width = 56
KeyList.Strings = ()
end
Item
FieldName = 'Ite_ItemCode'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '父项代码'
Width = 95
KeyList.Strings = ()
end
Item
FieldName = 'ItemCode'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '子项代码'
KeyList.Strings = ()
end
Item
FieldName = 'MoQty'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '父项生产总数'
Width = 78
KeyList.Strings = ()
end
Item
FieldName = 'RationQty'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '子项定额领料总数'
Width = 109
KeyList.Strings = ()
end
Item
FieldName = 'OverAgeQty'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '子项超额领料总数'
Width = 102
KeyList.Strings = ()
end
Item
FieldName = 'Sjdg'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '实际单耗'
Width = 57
KeyList.Strings = ()
end
Item
FieldName = 'Bzdg'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '当前标准定额'
Width = 79
KeyList.Strings = ()
end
Item
FieldName = 'Dgbl'
PickList.Strings = ()
Title.Alignment = taCenter
Title.Caption = '超额比率'
Width = 57
KeyList.Strings = ()
end>
end
end
inherited AdoQry_Tmp: TAdoQuery
Left = 485
Top = 43
end
inherited ActionList: TActionList
Left = 248
Top = 176
inherited Act_Filter: TAction
Enabled = False
Visible = False
end
inherited Act_Look: TAction
OnExecute = Act_LookExecute
end
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.15' +
'1;Use procedure for Prepare=1;Auto Translate=True;Packet Size=40' +
'96;Workstation ID=XYB'
CurSorType = ctStatic
SQL.Strings = (
'----找出符合条件的poLine,MoLine'
'Select Tmp6.mono,Tmp6.MoLineno,Tmp6.Ite_ItemCode,Tmp6.ItemCode,T' +
'mp6.MoQty,Tmp6.RationQty,Tmp6.OverAgeQty,Tmp6.Sjdg,Tmp6.Bzdg,'
'Case When IsNull(Tmp6.Bzdg,0)<>0 Then Convert(ChAr,(Tmp6.Sjdg-Tm' +
'p6.Bzdg)/Tmp6.Bzdg*100)+'#39'%'#39' '
'else '#39'0%'#39
'end as Dgbl'
'From '
'(Select Tmp5.mono,Tmp5.MoLineno,Tmp5.Ite_ItemCode,Tmp5.ItemCode,' +
'Tmp5.MoQty,Tmp5.RationQty,Tmp5.OverAgeQty,'
'Case When IsNull(Tmp5.MoQty,0)<> 0 Then (IsNull(Tmp5.RationQty,0' +
')+IsNull(Tmp5.OverAgeQty,0))/Tmp5.Moqty'
' Else 0 end Sjdg,#TmpOpenBomLast.BomQty as Bzdg'
'From'
'(Select Tmp3.mono,Tmp3.MoLineno, Tmp3.Ite_ItemCode,Tmp4.ItemCode' +
',IsNull(Tmp3.MoQty,0) As MoQty,IsNull(Tmp4.RationQty,0) as Ratio' +
'nQty ,isNull(Tmp4.OverAgeQty,0) as OverAgeQty'
'From'
'-------------tmp3 begin----------'
'(Select #TmPMoLine.MoNO as MoNO ,#TmPMoLine.MoLineNO as MoLineNO' +
',#TmPMoLine.ItemCode as Ite_ItemCode,Sum(isnull(#TmPMoLine.MoRea' +
'lInQty,0)) As MoQty From #TmPMoLine'
' Group By #TmPMoLine.MoNO,#TmPMoLine.MoLineNO, #TmPMoLine.Itemc' +
'ode) Tmp3'
'------tmp3 end----'
'Left Join '
'(Select Tmp2.mono,Tmp2.MoLineno,Tmp1.Ite_ItemCode,Tmp1.ItemCode,' +
'Tmp1.RationQty,Tmp2.OverAgeQty From '
''
'(Select #TmpInvOutBillline.mono,#TmpInvOutBillline.MoLineno,#Tmp' +
'MoLine.ItemCode As Ite_ItemCode,#TmpInvOutBillline.ItemCode As I' +
'temCode,'
' Sum(Isnull(#TmpInvOutBillline.InvBillQty,0)) As RationQty'
' From #TmpInvOutBillline Join #TmPMoLine'
' On #TmpInvOutBillline.MoNo+Convert(ChAr,#TmpInvOutBilllin' +
'e.MoLineNo)=#TmPMoLine.MoNo+Convert(chAr,#TmPMoLine.MoLineNo)'
' and #TmpInvOutBillline.OverPlan=0'
' Group By #TmpInvOutBillline.mono,#TmpInvOutBillline.MoLineno,' +
' #TmPMoLine.ItemCode ,#TmpInvOutBillline.ItemCode)Tmp1'
''
'---------------------'
' Left Join '
'(Select #TmpInvOutBillline.mono,#TmpInvOutBillline.MoLineno,#Tmp' +
'MoLine.ItemCode As Ite_ItemCode,#TmpInvOutBillline.ItemCode As I' +
'temCode,'
' Sum(Isnull(#TmpInvOutBillline.InvBillQty,0)) As OverAgeQty'
' From #TmpInvOutBillline Join #TmPMoLine'
' On #TmpInvOutBillline.MoNo+Convert(ChAr,#TmpInvOutBilllin' +
'e.MoLineNo)=#TmPMoLine.MoNo+Convert(chAr,#TmPMoLine.MoLineNo)'
' and #TmpInvOutBillline.OverPlan=1'
' Group By #TmpInvOutBillline.mono,#TmpInvOutBillline.MoLineno, ' +
'#TmPMoLine.ItemCode ,#TmpInvOutBillline.ItemCode)tmp2'
'-------'
'On Tmp1.Ite_ItemCode=Tmp2.Ite_ItemCode'
'and Tmp1.ItemCode=Tmp2.ItemCode'
'and Tmp1.mono=Tmp2.mono'
'and Tmp1.MoLineno=Tmp2.MoLineno) Tmp4'
'On Tmp3.Ite_ItemCode=Tmp4.Ite_ItemCode'
'and Tmp3.mono=Tmp4.mono'
'and Tmp3.MoLineno=Tmp4.MoLineno) Tmp5'
' join #TmpOpenBomLast on #TmpOpenBomLast.ItemCode=Tmp5.ItemCode'
' And #TmpOpenBomLast.Ite_ItemCode=Tmp5.Ite_ItemCode) Tmp6'
'-----------')
Left = 488
Top = 185
object AdoQry_Mainmono: TStringField
FieldName = 'mono'
Size = 16
end
object AdoQry_MainMoLineno: TIntegerField
FieldName = 'MoLineno'
end
object AdoQry_MainIte_ItemCode: TStringField
FieldName = 'Ite_ItemCode'
Size = 16
end
object AdoQry_MainItemCode: TStringField
FieldName = 'ItemCode'
Size = 16
end
object AdoQry_MainMoQty: TFloatField
FieldName = 'MoQty'
end
object AdoQry_MainRationQty: TFloatField
FieldName = 'RationQty'
end
object AdoQry_MainOverAgeQty: TFloatField
FieldName = 'OverAgeQty'
end
object AdoQry_MainSjdg: TFloatField
FieldName = 'Sjdg'
ReadOnly = True
end
object AdoQry_MainBzdg: TFloatField
FieldName = 'Bzdg'
end
object AdoQry_MainDgbl: TStringField
FieldName = 'Dgbl'
ReadOnly = True
Size = 31
end
end
inherited DataSource: TDataSource
Left = 448
Top = 129
end
inherited PopuPmenu: TPopuPmenu
Left = 360
Top = 209
end
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -