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

📄 mrp_qry_analyzermo6_mopoline.dfm

📁 一个MRPII系统源代码版本
💻 DFM
字号:
inherited Frm_Mrp_Qry_AnalyzerMo6_MoPoLine: TFrm_Mrp_Qry_AnalyzerMo6_MoPoLine
  Left = 35
  Top = 80
  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 = 80
          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 = 89
          KeyList.Strings = ()
        end
        Item
          FieldName = 'ItemCode'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '子项代码'
          Width = 83
          KeyList.Strings = ()
        end
        Item
          FieldName = 'MOQty'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '父项生产总数'
          Width = 77
          KeyList.Strings = ()
        end
        Item
          FieldName = 'TotalQty'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '子项领料总数'
          Width = 80
          KeyList.Strings = ()
        end
        Item
          FieldName = 'Sjdg'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '子项实际单耗数量'
          Width = 102
          KeyList.Strings = ()
        end
        Item
          FieldName = 'bzdg'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '子项当前标准定额数量'
          Width = 127
          KeyList.Strings = ()
        end
        Item
          FieldName = 'sjdgcb'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '子项实际单耗成本'
          Width = 102
          KeyList.Strings = ()
        end
        Item
          FieldName = 'bzdgcb'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '子项当前标准定额成本'
          Width = 126
          KeyList.Strings = ()
        end
        Item
          FieldName = 'Dgbl'
          PickList.Strings = ()
          Title.Alignment = taCenter
          Title.Caption = '超额比率'
          Width = 52
          KeyList.Strings = ()
        end>
    end
  end
  inherited AdoQry_Tmp: TAdoQuery
    Left = 485
    Top = 43
  end
  inherited ActionList: TActionList
    Left = 208
    Top = 168
    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 = (
      ''
      
        'Select mono,MoLineno, Ite_ItemCode,ItemCode,MOQty,TotalQty,Sjdg,' +
        'bzdg,sjdgcb,bzdgcb,'
      '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.mono,Tmp3.MoLineno,Tmp3.Ite_ItemCode,Tmp3.ItemCode' +
        ',Tmp3.MoQty,Tmp3.TotalQty,Tmp3.Sjdg,#TmpOpenBomLast.BomQty As Bz' +
        'dg,'
      
        '     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.mono,Tmp1.MoLineno,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.mono,#TmPMoLineLast.MoLineno,#TmPmoLin' +
        'eLast.ItemCode as Ite_ItemCode,#TmpInvOutBillline.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.mono,#TmPMoLineLast.MoLineno, #TmPmoL' +
        'ineLast.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 = 360
    Top = 249
    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_MainTotalQty: TFloatField
      FieldName = 'TotalQty'
    end
    object AdoQry_MainSjdg: TFloatField
      FieldName = 'Sjdg'
      ReadOnly = True
    end
    object AdoQry_Mainbzdg: TFloatField
      FieldName = 'bzdg'
    end
    object AdoQry_Mainsjdgcb: TFloatField
      FieldName = 'sjdgcb'
    end
    object AdoQry_Mainbzdgcb: TFloatField
      FieldName = 'bzdgcb'
      ReadOnly = True
    end
    object AdoQry_MainDgbl: TStringField
      FieldName = 'Dgbl'
      ReadOnly = True
      Size = 31
    end
  end
  inherited DataSource: TDataSource
    Left = 448
    Top = 129
  end
end

⌨️ 快捷键说明

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