diff --git a/复合检验管理/U_CPDBAO.pas b/复合检验管理/U_CPDBAO.pas index 7359745..a0cb4ab 100644 --- a/复合检验管理/U_CPDBAO.pas +++ b/复合检验管理/U_CPDBAO.pas @@ -10,7 +10,21 @@ uses cxGrid, StdCtrls, cxContainer, cxTextEdit, cxCurrencyEdit, BtnEdit, ExtCtrls, ComCtrls, ToolWin, DBClient, ADODB, MovePanel, Buttons, Menus, cxLookAndFeelPainters, cxButtons, RM_Common, RM_Class, RM_GridReport, - RM_System, RM_Dataset, cxCheckBox, MMSystem, cxLookAndFeels, cxNavigator; + RM_System, RM_Dataset, cxCheckBox, MMSystem, cxLookAndFeels, cxNavigator, + dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, + dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle, + dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, + dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, + dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis, + dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black, + dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink, + dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue, + dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, + dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, + dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, + dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, + dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine, + dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter; type TfrmCPDBao = class(TForm) @@ -909,20 +923,23 @@ begin begin Close; SQL.Clear; - sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,'); - sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),'); - sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), '); - sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), '); - sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); - sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); - sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), '); - sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), '); - SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen,SUM(A.HSLEN)as HSLEN'); - sql.Add('from WFB_MJJY A'); - sql.Add(' inner join JYOrder_Sub C on C.SubID=A.SubID'); - sql.Add(' inner join JYOrder_Main D on D.MainID=A.MainID'); - SQL.Add('where A.BaoID=''' + Trim(BaoID.Text) + ''''); - SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName'); +// sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,'); +// sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),'); +// sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), '); +// sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), '); +// sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); +// sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); +// sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), '); +// sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), '); +// SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen,SUM(A.HSLEN)as HSLEN'); +// sql.Add('from WFB_MJJY A'); +// sql.Add(' inner join JYOrder_Sub C on C.SubID=A.SubID'); +// sql.Add(' inner join JYOrder_Main D on D.MainID=A.MainID'); +// SQL.Add('where A.BaoID=''' + Trim(BaoID.Text) + ''''); +// SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName'); + + sql.Add('exec P_Print_bbq'); + SQL.Add('@baoid=''' + Trim(BaoID.Text) + ''''); Open; end; @@ -987,7 +1004,7 @@ begin if check_bz.Checked then begin if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then - fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) + '.rmf' + fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ADOQueryPrint.fieldbyname('NLBName').AsString)// + '.rmf' else fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\ǩ.rmf'; if not FileExists(fPrintFile) then diff --git a/复合检验管理/U_JYOrderCDOne.dfm b/复合检验管理/U_JYOrderCDOne.dfm index 8455b9a..3e29ad1 100644 --- a/复合检验管理/U_JYOrderCDOne.dfm +++ b/复合检验管理/U_JYOrderCDOne.dfm @@ -22,7 +22,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne Left = 0 Top = 0 Width = 1384 - Height = 62 + Height = 92 AutoSize = True ButtonHeight = 30 ButtonWidth = 119 @@ -101,27 +101,28 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne Top = 0 Caption = #25209#37327#20462#25913#32568#21495 ImageIndex = 54 + Wrap = True OnClick = ToolButton11Click end object TBDW: TToolButton - Left = 608 - Top = 0 + Left = 0 + Top = 30 AutoSize = True Caption = #20462#25913#25968#37327#21333#20301 ImageIndex = 54 OnClick = TBDWClick end object ToolButton4: TToolButton - Left = 719 - Top = 0 + Left = 111 + Top = 30 AutoSize = True Caption = #25209#37327#35843#25972#31859#25968 ImageIndex = 54 OnClick = ToolButton4Click end object ToolButton13: TToolButton - Left = 830 - Top = 0 + Left = 222 + Top = 30 AutoSize = True Caption = #25209#37327#20928#37325#36716#38271#24230 ImageIndex = 54 @@ -129,23 +130,22 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnClick = ToolButton13Click end object ToolButton8: TToolButton - Left = 953 - Top = 0 + Left = 345 + Top = 30 AutoSize = True Caption = #25209#37327#20462#25913#30382#37325 ImageIndex = 54 OnClick = ToolButton8Click end object ToolButton14: TToolButton - Left = 1064 - Top = 0 + Left = 456 + Top = 30 Caption = #25209#37327#20462#25913#31995#25968 ImageIndex = 54 - Wrap = True OnClick = ToolButton14Click end object ToolButton1: TToolButton - Left = 0 + Left = 575 Top = 30 AutoSize = True Caption = #25171#21360#26631#31614 @@ -153,7 +153,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnClick = ToolButton1Click end object TCPDB: TToolButton - Left = 87 + Left = 662 Top = 30 AutoSize = True Caption = #25104#21697#25171#21253 @@ -162,33 +162,34 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnClick = TCPDBClick end object ToolButton3: TToolButton - Left = 174 + Left = 749 Top = 30 AutoSize = True Caption = #25171#21360#21253#26631#31614 ImageIndex = 12 + Wrap = True Visible = False OnClick = ToolButton3Click end object ToolButton2: TToolButton - Left = 273 - Top = 30 + Left = 0 + Top = 60 AutoSize = True Caption = #25171#21360#26816#39564#25253#21578 ImageIndex = 12 OnClick = ToolButton2Click end object ToolButton5: TToolButton - Left = 384 - Top = 30 + Left = 111 + Top = 60 AutoSize = True Caption = #25171#21360 ImageIndex = 12 OnClick = ToolButton5Click end object Edit3: TEdit - Left = 447 - Top = 30 + Left = 174 + Top = 60 Width = 68 Height = 30 Font.Charset = GB2312_CHARSET @@ -202,8 +203,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne OnKeyPress = Edit3KeyPress end object ComboBox1: TComboBox - Left = 515 - Top = 33 + Left = 242 + Top = 63 Width = 149 Height = 24 Style = csDropDownList @@ -227,8 +228,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne #26816#39564#30721#21333) end object Edit4: TEdit - Left = 664 - Top = 30 + Left = 391 + Top = 60 Width = 121 Height = 30 Font.Charset = GB2312_CHARSET @@ -241,32 +242,32 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne Visible = False end object ToolButton12: TToolButton - Left = 785 - Top = 30 + Left = 512 + Top = 60 Caption = #20462#25913#30721#21333 ImageIndex = 54 Visible = False OnClick = ToolButton12Click end object ToolButton9: TToolButton - Left = 904 - Top = 30 + Left = 631 + Top = 60 AutoSize = True Caption = #24322#24120#25968#25454 ImageIndex = 2 OnClick = ToolButton9Click end object TBExport: TToolButton - Left = 991 - Top = 30 + Left = 718 + Top = 60 AutoSize = True Caption = #23548#20986 ImageIndex = 75 OnClick = TBExportClick end object TBClose: TToolButton - Left = 1054 - Top = 30 + Left = 781 + Top = 60 AutoSize = True Caption = #20851#38381 ImageIndex = 55 @@ -275,7 +276,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne end object Panel1: TPanel Left = 0 - Top = 62 + Top = 92 Width = 1384 Height = 88 Align = alTop @@ -843,9 +844,9 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne end object cxGrid1: TcxGrid Left = 0 - Top = 150 + Top = 180 Width = 1384 - Height = 568 + Height = 538 Align = alClient PopupMenu = PopupMenu1 TabOrder = 3 diff --git a/复合检验管理/U_JYOrderCDOne.pas b/复合检验管理/U_JYOrderCDOne.pas index 08e1737..7f6a44b 100644 --- a/复合检验管理/U_JYOrderCDOne.pas +++ b/复合检验管理/U_JYOrderCDOne.pas @@ -1175,20 +1175,22 @@ begin begin Close; SQL.Clear; - sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,'); - sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),'); - sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), '); - sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), '); - sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); - sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); - sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), '); - sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), '); - SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen,SUM(A.HSLEN)as HSLEN'); - sql.Add('from WFB_MJJY A'); - sql.Add(' inner join JYOrder_Sub C on C.SubID=A.SubID'); - sql.Add(' inner join JYOrder_Main D on D.MainID=A.MainID'); - SQL.Add(' where A.BaoID=''' + Trim(Order_Main.fieldbyname('BaoID').AsString) + ''''); - SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName'); +// sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,'); +// sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),'); +// sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), '); +// sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), '); +// sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); +// sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); +// sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), '); +// sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), '); +// SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen,SUM(A.HSLEN)as HSLEN'); +// sql.Add('from WFB_MJJY A'); +// sql.Add(' inner join JYOrder_Sub C on C.SubID=A.SubID'); +// sql.Add(' inner join JYOrder_Main D on D.MainID=A.MainID'); +// SQL.Add(' where A.BaoID=''' + Trim(Order_Main.fieldbyname('BaoID').AsString) + ''''); +// SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName'); + sql.Add('exec P_Print_bbq'); + SQL.Add('@baoid=''' + Trim(Order_Main.fieldbyname('BaoID').AsString) + ''''); Open; end; if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then diff --git a/复合检验管理/U_MJManageNewFDNew.dfm b/复合检验管理/U_MJManageNewFDNew.dfm index 5311a56..a1f3b9f 100644 --- a/复合检验管理/U_MJManageNewFDNew.dfm +++ b/复合检验管理/U_MJManageNewFDNew.dfm @@ -1,6 +1,6 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF - Left = 312 - Top = 185 + Left = 387 + Top = 217 Width = 1368 Height = 754 Caption = #25104#21697#26816#39564 @@ -111,7 +111,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF HeaderAlignmentHorz = taCenter Styles.Content = cxStyle3 Styles.Header = cxStyle3 - Width = 40 + Width = 34 end object Tv3Column5: TcxGridDBColumn Caption = #33394#21495 @@ -119,7 +119,15 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF HeaderAlignmentHorz = taCenter Styles.Content = cxStyle3 Styles.Header = cxStyle3 - Width = 40 + Width = 36 + end + object Tv3Column7: TcxGridDBColumn + Caption = #21253#21495 + DataBinding.FieldName = 'baono' + HeaderAlignmentHorz = taCenter + Styles.Content = cxStyle5 + Styles.Header = cxStyle5 + Width = 37 end object v3Column1: TcxGridDBColumn Caption = #21367#21495 @@ -155,7 +163,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF Styles.Content = cxStyle5 Styles.Footer = cxStyle5 Styles.Header = cxStyle5 - Width = 50 + Width = 42 end object v3Column5: TcxGridDBColumn Caption = #20928#37325 @@ -1461,7 +1469,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Label59: TLabel Left = 212 - Top = 304 + Top = 343 Width = 42 Height = 20 Caption = #26631#31614 @@ -1542,6 +1550,20 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF Font.Style = [fsBold] ParentFont = False end + object Label65: TLabel + Left = 213 + Top = 299 + Width = 42 + Height = 20 + Caption = #30721#23610 + Font.Charset = ANSI_CHARSET + Font.Color = clBlue + Font.Height = -20 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + end object MJFK: TEdit Left = 51 Top = 371 @@ -1978,7 +2000,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object SLbName: TFTComboBox Left = 260 - Top = 295 + Top = 334 Width = 185 Height = 32 Font.Charset = GB2312_CHARSET @@ -2162,6 +2184,23 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF OnKeyDown = MJQty4KeyDown OnKeyPress = MJstr3KeyPress end + object MAchi: TEdit + Left = 262 + Top = 294 + Width = 90 + Height = 36 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -28 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 37 + Visible = False + OnClick = Edit1Click + OnKeyDown = MJQty4KeyDown + OnKeyPress = MJstr3KeyPress + end end object MovePanel1: TMovePanel Left = 910 @@ -2566,7 +2605,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end object Panel3: TPanel Left = 602 - Top = 316 + Top = 468 Width = 347 Height = 334 BevelInner = bvRaised @@ -3308,8 +3347,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF end end object ScrollBox2: TScrollBox - Left = 28 - Top = 128 + Left = -404 + Top = 472 Width = 653 Height = 457 Font.Charset = GB2312_CHARSET diff --git a/复合检验管理/U_MJManageNewFDNew.pas b/复合检验管理/U_MJManageNewFDNew.pas index 0cb5019..dd1262e 100644 --- a/复合检验管理/U_MJManageNewFDNew.pas +++ b/复合检验管理/U_MJManageNewFDNew.pas @@ -11,20 +11,20 @@ uses RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu, ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox, MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, ShellAPI, - BtnEdit, FTComboBox, dxSkinsCore, dxSkinBlack, dxSkinBlue, - dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, - dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, - dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, - dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, - dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins, - dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green, - dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black, - dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, - dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, - dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, - dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, - dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine, - dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter; + BtnEdit, FTComboBox, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, + dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, + dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy, + dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, + dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis, + dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black, + dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink, + dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue, + dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray, + dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic, + dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust, + dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, + dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, + dxSkinscxPCPainter; type TfrmMJManageNewFDNewSF = class(TForm) @@ -323,6 +323,9 @@ type Label64: TLabel; HSLEN: TEdit; Tv3Column6: TcxGridDBColumn; + Tv3Column7: TcxGridDBColumn; + Label65: TLabel; + MAchi: TEdit; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBCloseClick(Sender: TObject); @@ -438,7 +441,7 @@ implementation uses U_DataLink, U_Fun, U_ZDYHelp, U_ZDYHelp12, U_iniParam, U_ClothHCList, MMSystem, - U_SysLogOrder; + U_SCPersonColor, U_SysLogOrder; {$R *.dfm} procedure TfrmMJManageNewFDNewSF.PrtBaoData(FBaoid: string); @@ -457,22 +460,24 @@ begin begin Close; SQL.Clear; - sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,C.BlBName,'); - sql.Add('PRTCodeName=DBO.F_Get_Order_SubStr(BaoID,''BNCodeName''),'); - sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),'); - sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), '); - sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), '); - sql.Add('MJXH=DBO.F_Get_Order_SubStr(BaoID,''BNMJXH''), '); - sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); - sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); - sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), '); - sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), '); - SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen,SUM(A.HSLEN)as HSLEN'); - sql.Add('from WFB_MJJY A'); - sql.Add('inner join JYOrder_Sub C on C.SubID=A.SubID'); - sql.Add('inner join JYOrder_Main D on D.MainID=A.MainID'); - SQL.Add('where A.BaoID=''' + Trim(FBaoid) + ''''); - SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,C.BlBName'); +// sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,C.BlBName,'); +// sql.Add('PRTCodeName=DBO.F_Get_Order_SubStr(BaoID,''BNCodeName''),'); +// sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),'); +// sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), '); +// sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), '); +// sql.Add('MJXH=DBO.F_Get_Order_SubStr(BaoID,''BNMJXH''), '); +// sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); +// sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); +// sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), '); +// sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), '); +// SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen,SUM(A.HSLEN)as HSLEN'); +// sql.Add('from WFB_MJJY A'); +// sql.Add('inner join JYOrder_Sub C on C.SubID=A.SubID'); +// sql.Add('inner join JYOrder_Main D on D.MainID=A.MainID'); +// SQL.Add('where A.BaoID=''' + Trim(FBaoid) + ''''); +// SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,C.BlBName'); + sql.Add('exec P_Print_bbq'); + SQL.Add('@baoid=''' + Trim(FBaoid) + ''''); Open; end; if ADOQueryPrint.RecordCount > 1 then @@ -1146,10 +1151,12 @@ begin if (FDC <> 0) and (Edit12.text <> '') then begin FieldByName('MJLen').Value := FDC; - end + end else begin - FieldByName('MJLen').Value := StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0); //fjc + + FieldByName('MJLen').Value := format('%.' + trim(fxsws) + 'f', [StrToFloatdef(trim(MJLen.Text), 0) / StrToFloatdef(trim(MAchi.Text), 1) - StrToFloatdef(trim(MJQty2.Text), 0)]); + ; end; FieldByName('JCLen').Value := StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0) + StrToFloatdef(trim(JC.Text), 0); FieldByName('MJQty1').Value := StrToFloatdef(trim(MJQty1.Text), 0); @@ -1158,7 +1165,7 @@ begin FieldByName('MJQty3').Value := StrToFloatdef(trim(MJQty3.Text), 0); FieldByName('MJQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0); //fjZ FieldByName('JCQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0) + StrToFloatdef(trim(JZ.Text), 0); - FieldByName('JC').Value := StrToFloatdef(trim(JC.Text), 0); + FieldByName('JC').Value := StrToFloatdef(trim(JC.Text), 0); FieldByName('JZ').Value := StrToFloatdef(trim(JZ.Text), 0); if Trim(MJFK.Text) <> '' then begin @@ -1245,7 +1252,7 @@ begin // sql.Add('update WFB_MJJY SET mjxh=1+isnull((select cast (max(mjxh) as int) from WFB_MJJY X inner join JYOrder_Sub B on B.mainid=X.mainid and B.subid=X.subid where X.mainid=WFB_MJJY.mainid and B.prtcolor=''' + trim(FPRTCOLOR) + ''' and X.MJID<>WFB_MJJY.MJID),0)'); // sql.Add('where MJID=''' + Trim(maxno) + ''''); execsql; - end; + end; end else if fRollType = '޹' then begin @@ -2682,8 +2689,9 @@ begin FDC := StrToFloatDef(ADOTmp.fieldbyname('DC').asstring, 0); fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString); fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString); - JC.Text := ADOTmp.fieldbyname('jiazhong').asstring; // StrToFloatDef(ADOTmp.fieldbyname('jiachang').asstring, 0); - jz.Text := ADOTmp.fieldbyname('jiachang').asstring; //StrToFloatDef(ADOTmp.fieldbyname('jiazhong').asstring, 0); + JC.Text := ADOTmp.fieldbyname('jiachang').asstring; // StrToFloatDef(ADOTmp.fieldbyname('jiachang').asstring, 0); + jz.Text := ADOTmp.fieldbyname('jiazhong').asstring; //StrToFloatDef(ADOTmp.fieldbyname('jiazhong').asstring, 0); + machi.Text := FloatToStr(ADOTmp.fieldbyname('PRTmachi').asfloat); if FDC <> 0 then begin Edit12.Visible := True; @@ -3056,25 +3064,27 @@ begin if CDS_MJID.IsEmpty then exit; CDS_MJID.First; - with ADOQueryPrint do + with ADOQueryPrint do begin Close; SQL.Clear; - sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,'); - sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),'); - sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), '); - sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), '); - sql.Add('MJXH=DBO.F_Get_Order_SubStr(BaoID,''BNMJXH''), '); - sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); - sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); - sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), '); - sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), '); - SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen,SUM(A.HSLEN)as HSLEN'); - sql.Add('from WFB_MJJY A'); - sql.Add('inner join JYOrder_Sub C on C.SubID=A.SubID'); - sql.Add('inner join JYOrder_Main D on D.MainID=A.MainID'); - SQL.Add('where A.BaoID=''' + Trim(CDS_MJID.fieldbyname('baoID').AsString) + ''''); - SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName'); +// sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,'); +// sql.Add('PRTColor=DBO.F_Get_Order_SubStr(BaoID,''BNColor''),SOrddefstr1=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr1''),'); +// sql.Add('SOrddefstr4=DBO.F_Get_Order_SubStr(BaoID,''BNSOrddefstr4''),PRtHX=DBO.F_Get_Order_SubStr(BaoID,''BNPRtHX''), '); +// sql.Add('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), '); +// sql.Add('MJXH=DBO.F_Get_Order_SubStr(BaoID,''BNMJXH''), '); +// sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); +// sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); +// sql.Add('khConNo=(select top 1 khConNo from JYOrderCon_Main X where X.ConNO=D.conNO), '); +// sql.Add('MprtCodeNameEng=(select top 1 Note from KH_Zdy X where X.zdyName=D.MprtCodeName), '); +// SQL.ADD('count(A.MJID) as JSl,sum(A.MJMaoZ) MJMAOZ,sum(MJQty3) as MJQty3,sum(MJQty4) as MJQty4,SUM(A.MJLen)as MJLen,SUM(A.HSLEN)as HSLEN'); +// sql.Add('from WFB_MJJY A'); +// sql.Add('inner join JYOrder_Sub C on C.SubID=A.SubID'); +// sql.Add('inner join JYOrder_Main D on D.MainID=A.MainID'); +// SQL.Add('where A.BaoID=''' + Trim(CDS_MJID.fieldbyname('baoID').AsString) + ''''); +// SQL.ADD('group by A.Baoid,A.BaoNo,A.MJTypeOther,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName'); + sql.Add('exec P_Print_bbq'); + SQL.Add('@baoid=''' + Trim(CDS_MJID.fieldbyname('baoID').AsString) + ''''); Open; end; if ADOQueryPrint.RecordCount > 1 then @@ -3331,7 +3341,8 @@ begin Button11.Visible := True; Button12.Visible := True; Button13.Visible := True; - + MAchi.Visible := True; + Label65.Visible := True; end else begin @@ -3349,19 +3360,21 @@ begin JSKH.Visible := False; KH.Visible := False; PM.Visible := False; - YS.Visible := False; + YS.Visible := False; HX.Visible := False; SH.Visible := False; JC.Visible := False; jz.Visible := False; SLbName.Visible := False; - + Button9.Visible := False; Button10.Visible := False; Button5.Visible := False; Button11.Visible := False; Button12.Visible := False; Button13.Visible := False; + MAchi.Visible := False; + Label65.Visible := False; end; end; @@ -3386,41 +3399,80 @@ end; procedure TfrmMJManageNewFDNewSF.Button8Click(Sender: TObject); begin - InitJP2('0'); + InitJP2('0'); ScrollBox2.Visible := False; -end; +end; procedure TfrmMJManageNewFDNewSF.Button10Click(Sender: TObject); begin - ScrollBox2.Visible := true; - InitJP2('PRTCodeName'); - ftest := 'PM'; -// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; + try + frmSCPersonColor := TfrmSCPersonColor.Create(self); + with frmSCPersonColor do + begin + FTYPE := 'PM'; + if ShowModal = 1 then + begin + PM.Text := FName; + end; + end; + finally + frmSCPersonColor.close; + end; end; procedure TfrmMJManageNewFDNewSF.Button9Click(Sender: TObject); begin - ScrollBox2.Visible := true; - InitJP2('CustomerNoName'); - ftest := 'KH'; +// ScrollBox2.Visible := true; +// InitJP2('CustomerNoName'); +// ftest := 'KH'; // ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; + try + frmSCPersonColor := TfrmSCPersonColor.Create(self); + with frmSCPersonColor do + begin + FTYPE := 'KH'; + if ShowModal = 1 then + begin + KH.Text := FName; + end; + end; + finally + frmSCPersonColor.close; + end; end; procedure TfrmMJManageNewFDNewSF.Button11Click(Sender: TObject); begin - ScrollBox2.Visible := true; - InitJP2('PRTColor'); - ftest := 'YS'; -// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; + try + frmSCPersonColor := TfrmSCPersonColor.Create(self); + with frmSCPersonColor do + begin + FTYPE := 'YS'; + if ShowModal = 1 then + begin + YS.Text := FName; + end; + end; + finally + frmSCPersonColor.close; + end; end; procedure TfrmMJManageNewFDNewSF.Button12Click(Sender: TObject); begin - ScrollBox2.Visible := true; - InitJP2('SOrddefstr1'); - ftest := 'SH'; - Button8.Font.Color := clRed; // ðťıɫΪɫ -// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; + try + frmSCPersonColor := TfrmSCPersonColor.Create(self); + with frmSCPersonColor do + begin + FTYPE := 'SH'; + if ShowModal = 1 then + begin + SH.Text := FName; + end; + end; + finally + frmSCPersonColor.close; + end; end; procedure TfrmMJManageNewFDNewSF.InitJP2(flag: string); @@ -3462,8 +3514,8 @@ begin end; end; i := i - 1; - if i > 59 then - begin + if i > 59 then + begin i := 59; end; for j := 0 to i do @@ -3472,9 +3524,9 @@ begin begin TSpeedButton(Controls[j]).Visible := True; TSpeedButton(Controls[j]).Hint := AA[j]; - if Length(AA[j]) > 9 then + if Length(AA[j]) > 9 then begin - TSpeedButton(Controls[j]).Caption := Copy(Trim(AA[j]), 1, 9) + #13+ Copy(Trim(AA[j]), 10, Length(AA[j]) - 9); + TSpeedButton(Controls[j]).Caption := Copy(Trim(AA[j]), 1, 9) + #13 + Copy(Trim(AA[j]), 10, Length(AA[j]) - 9); end else TSpeedButton(Controls[j]).Caption := AA[j]; @@ -3525,18 +3577,40 @@ end; procedure TfrmMJManageNewFDNewSF.Button13Click(Sender: TObject); begin - ScrollBox2.Visible := true; - InitJP2('PRTHX'); - ftest := 'HX'; -// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; + try + frmSCPersonColor := TfrmSCPersonColor.Create(self); + with frmSCPersonColor do + begin + FTYPE := 'HX'; + if ShowModal = 1 then + begin + HX.Text := FName; + + end; + end; + finally + frmSCPersonColor.close; + end; end; procedure TfrmMJManageNewFDNewSF.Button5Click(Sender: TObject); begin - ScrollBox2.Visible := true; - InitJP2('CustomerJS'); - ftest := 'JSKH'; -// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; +// ScrollBox2.Visible := true; +// InitJP2('CustomerJS'); +// ftest := 'JSKH'; + try + frmSCPersonColor := TfrmSCPersonColor.Create(self); + with frmSCPersonColor do + begin + FTYPE := 'JSKH'; + if ShowModal = 1 then + begin + SH.Text := FName; + end; + end; + finally + frmSCPersonColor.close; + end; end; end. diff --git a/复合检验管理/U_ProductOrderLBNameSet.dfm b/复合检验管理/U_ProductOrderLBNameSet.dfm index cc5b2be..e29d9e4 100644 --- a/复合检验管理/U_ProductOrderLBNameSet.dfm +++ b/复合检验管理/U_ProductOrderLBNameSet.dfm @@ -161,23 +161,31 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet ImageIndex = 60 OnClick = ToolButton14Click end - object ToolButton7: TToolButton + object ToolButton16: TToolButton Left = 348 Top = 30 AutoSize = True + Caption = #30721#23610#35774#32622 + ImageIndex = 60 + OnClick = ToolButton16Click + end + object ToolButton7: TToolButton + Left = 435 + Top = 30 + AutoSize = True Caption = #39044#35272#21367#26631#31614 ImageIndex = 12 OnClick = ToolButton7Click end object ToolButton15: TToolButton - Left = 447 + Left = 534 Top = 30 Caption = #39044#35272#20013#25991#26631#31614 ImageIndex = 57 OnClick = ToolButton15Click end object ToolButton8: TToolButton - Left = 554 + Left = 641 Top = 30 AutoSize = True Caption = #39044#35272#21253#26631#31614 @@ -185,7 +193,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet OnClick = ToolButton8Click end object PiZhong: TEdit - Left = 653 + Left = 740 Top = 30 Width = 121 Height = 30 @@ -198,7 +206,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet TabOrder = 0 end object TBClose: TToolButton - Left = 774 + Left = 861 Top = 30 AutoSize = True Caption = #20851#38381 @@ -685,6 +693,12 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet Visible = False Width = 60 end + object Tv1Column6: TcxGridDBColumn + Caption = #30721#23610 + DataBinding.FieldName = 'PRTmachi' + HeaderAlignmentHorz = taCenter + Width = 60 + end end object cxGrid1Level1: TcxGridLevel GridView = Tv1 diff --git a/复合检验管理/U_ProductOrderLBNameSet.pas b/复合检验管理/U_ProductOrderLBNameSet.pas index 30713c4..d64e3cd 100644 --- a/复合检验管理/U_ProductOrderLBNameSet.pas +++ b/复合检验管理/U_ProductOrderLBNameSet.pas @@ -10,7 +10,21 @@ uses cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System, RM_Common, RM_Class, RM_GridReport, RM_e_Xls, StrUtils, Menus, cxDropDownEdit, - cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator; + cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, + dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, + dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle, + dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, + dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, + dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis, + dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black, + dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink, + dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue, + dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, + dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, + dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, + dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, + dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine, + dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter; type TfrmProductOrderLBNameSet = class(TForm) @@ -28,7 +42,7 @@ type cxGrid1: TcxGrid; cxGridPopupMenu1: TcxGridPopupMenu; ADOQueryCmd: TADOQuery; - ADOQueryMain: TADOQuery; + ADOQueryMain: TADOQuery; ADOQueryTemp: TADOQuery; DataSource1: TDataSource; Label3: TLabel; @@ -117,6 +131,8 @@ type ToolButton13: TToolButton; ToolButton14: TToolButton; ToolButton15: TToolButton; + ToolButton16: TToolButton; + Tv1Column6: TcxGridDBColumn; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); @@ -153,6 +169,7 @@ type procedure Tv1Column2PropertiesEditValueChanged(Sender: TObject); procedure Tv1Column5PropertiesEditValueChanged(Sender: TObject); procedure ToolButton15Click(Sender: TObject); + procedure ToolButton16Click(Sender: TObject); private DQdate: TDateTime; procedure InitGrid(); @@ -1508,7 +1525,7 @@ var Txt, fImagePath: string; Moudle: THandle; Makebar: TMakebar; - Mixtext: TMixtext; + Mixtext: TMixtext; begin if Order_Main.IsEmpty then exit; @@ -1554,5 +1571,70 @@ begin end; end; +procedure TfrmProductOrderLBNameSet.ToolButton16Click(Sender: TObject); +var + FPiZhong: string; + FReal: Double; +begin + if Order_Main.IsEmpty then + exit; + if Order_Main.Locate('SSel', True, []) = False then + begin + Application.MessageBox('ûѡݣ', 'ʾ', 0); + Exit; + end; + if Trim(PiZhong.Text) = '' then + begin + Application.MessageBox('߲Ϊ!', 'ʾ', 0); + Exit; + end; + if TryStrToFloat(PiZhong.Text, FReal) = False then + begin + Application.MessageBox('߷Ƿ!', 'ʾ', 0); + Exit; + end; + with order_Main do + begin + first; + while not Eof do + begin + if order_Main.FieldByName('Ssel').AsBoolean = true then + begin + with ADOQueryCmd do + begin + Close; + sql.Clear; + sql.Add('Update JYOrder_Sub Set PRTmachi=' + Trim(PiZhong.Text)); + sql.Add(' where Subid=''' + Trim(Order_Main.fieldbyname('Subid').AsString) + ''''); + ExecSQL; + end; + with Order_Main do + begin + Edit; + FieldByName('PRTmachi').Value := PiZhong.Text; + Post; + end; + end; + next; + end; + end; + CheckBox1.Checked := False; + with Order_Main do + begin + DisableControls; + first; + while not Eof do + begin + edit; + fieldbyname('Ssel').AsBoolean := False; + post; + next; + end; + first; + EnableControls; + end; + +end; + end. diff --git a/复合检验管理/U_SCPersonColor.dfm b/复合检验管理/U_SCPersonColor.dfm new file mode 100644 index 0000000..6422510 --- /dev/null +++ b/复合检验管理/U_SCPersonColor.dfm @@ -0,0 +1,371 @@ +object frmSCPersonColor: TfrmSCPersonColor + Left = 632 + Top = 123 + Width = 1011 + Height = 676 + Caption = #25968#25454#36873#25321 + Color = clBtnFace + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #23435#20307 + Font.Style = [] + OldCreateOrder = False + Position = poScreenCenter + OnClose = FormClose + OnDestroy = FormDestroy + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 12 + object ScrollBox1: TScrollBox + Left = 0 + Top = 0 + Width = 995 + Height = 637 + Align = alClient + TabOrder = 0 + object btn58: TSpeedButton + Left = 23 + Top = 15 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn9: TSpeedButton + Left = 215 + Top = 15 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn10: TSpeedButton + Left = 407 + Top = 15 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn11: TSpeedButton + Left = 599 + Top = 15 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn12: TSpeedButton + Left = 791 + Top = 15 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn59: TSpeedButton + Left = 23 + Top = 159 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn16: TSpeedButton + Left = 215 + Top = 159 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn17: TSpeedButton + Left = 407 + Top = 159 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn18: TSpeedButton + Left = 599 + Top = 159 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn19: TSpeedButton + Left = 791 + Top = 159 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn60: TSpeedButton + Left = 23 + Top = 302 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn23: TSpeedButton + Left = 215 + Top = 302 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn24: TSpeedButton + Left = 407 + Top = 302 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn25: TSpeedButton + Left = 599 + Top = 302 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn26: TSpeedButton + Left = 791 + Top = 302 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn61: TSpeedButton + Left = 23 + Top = 446 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn30: TSpeedButton + Left = 215 + Top = 446 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn31: TSpeedButton + Left = 407 + Top = 446 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn32: TSpeedButton + Left = 599 + Top = 446 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object btn33: TSpeedButton + Left = 791 + Top = 446 + Width = 180 + Height = 120 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + Visible = False + OnClick = btn1Click + end + object Label27: TLabel + Left = 434 + Top = 589 + Width = 78 + Height = 21 + Caption = #24403#21069#39029':' + Font.Charset = GB2312_CHARSET + Font.Color = clRed + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label1: TLabel + Left = 528 + Top = 588 + Width = 12 + Height = 21 + Caption = '1' + Font.Charset = GB2312_CHARSET + Font.Color = clRed + Font.Height = -21 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Button3: TButton + Left = 587 + Top = 585 + Width = 148 + Height = 29 + Caption = #19979#19968#39029 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -19 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 0 + OnClick = Button3Click + end + object Button1: TButton + Left = 258 + Top = 585 + Width = 148 + Height = 29 + Caption = #19978#19968#39029 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -19 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 1 + OnClick = Button1Click + end + end + object ADOTmp: TADOQuery + Connection = DataLink_TradeManage.ADOLink + LockType = ltReadOnly + Parameters = <> + Left = 856 + Top = 504 + end +end diff --git a/复合检验管理/U_SCPersonColor.pas b/复合检验管理/U_SCPersonColor.pas new file mode 100644 index 0000000..1d1d16c --- /dev/null +++ b/复合检验管理/U_SCPersonColor.pas @@ -0,0 +1,227 @@ +unit U_SCPersonColor; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, Buttons, DB, ADODB, StdCtrls; + +type + TfrmSCPersonColor = class(TForm) + ScrollBox1: TScrollBox; + btn58: TSpeedButton; + btn9: TSpeedButton; + btn10: TSpeedButton; + btn11: TSpeedButton; + btn12: TSpeedButton; + btn59: TSpeedButton; + btn16: TSpeedButton; + btn17: TSpeedButton; + btn18: TSpeedButton; + btn19: TSpeedButton; + btn60: TSpeedButton; + btn23: TSpeedButton; + btn24: TSpeedButton; + btn25: TSpeedButton; + btn26: TSpeedButton; + btn61: TSpeedButton; + btn31: TSpeedButton; + btn32: TSpeedButton; + btn33: TSpeedButton; + ADOTmp: TADOQuery; + Label27: TLabel; + Label1: TLabel; + Button3: TButton; + Button1: TButton; + procedure FormDestroy(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure btn1Click(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure Button1Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + private + CPage: Integer; + procedure InitPerson(page: Integer); + { Private declarations } + public + FlagStr: string; + FName, FSJZL, FType: string; + { Public declarations } + end; + +var + frmSCPersonColor: TfrmSCPersonColor; + +implementation + +uses + U_DataLink; + +{$R *.dfm} + +procedure TfrmSCPersonColor.FormDestroy(Sender: TObject); +begin + frmSCPersonColor := nil; +end; + +procedure TfrmSCPersonColor.InitPerson(page: Integer); +type + FdDy = record + inc: integer; + FDdys: string[32]; + FdDysName: string[32]; + end; +var + BB: array[0..500] of FdDy; + i, j: Integer; +begin + with ADOTmp do + begin + Close; + sql.Clear; + if FTYPE = 'KH' then + begin + sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''CustomerNoName'')AA'); +// sql.Add('select ZDYName from KH_Zdy where Type=''' + flag + ''' order by ZDYNO '); + end + else if FTYPE = 'JSKH' then + begin + sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''CustomerJS'')AA'); + end + else if FTYPE = 'PM' then + begin + sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''PRTCodeName'')AA'); + end + else if FTYPE = 'YS' then + begin + sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''PRTColor'')AA'); + end + else if FTYPE = 'HX' then + begin + sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''PRTHX'')AA'); + end + else if FTYPE = 'SH' then + begin + sql.Add('select AA.*,row_number () over (order by name) as keyNo from(select DISTINCT zdyname as name,note from kh_zdy where type=''SOrddefstr1'')AA'); + end; + + + +// showmessage(sql.text); + Open; + end; + + if ADOTmp.IsEmpty then + begin + Application.MessageBox('ûжݣ', 'ʾ', 0); + Exit; + end; + + j := (StrToInt(Label1.Caption) - 1) * 20 + 1; + for i := 0 to 19 do + begin + + with ScrollBox1 do + begin + if ADOTmp.locate('keyNo', j + i, []) then + begin +// application.MessageBox(pchar(CDS_Kuang.FieldByName('ZDYName').AsString), 'ʾϢ', 0); + TSpeedButton(Controls[i]).Visible := True; + TSpeedButton(Controls[i]).Caption := Trim(ADOTmp.FieldByName('name').AsString); + if FTYPE = '' then + begin + TSpeedButton(Controls[i]).hint := Trim(ADOTmp.FieldByName('note').AsString); + end; + + end + else + begin + TSpeedButton(Controls[i]).Visible := False; + +// application.MessageBox(pchar('ûҵ' + inttostr(i)), 'ʾϢ', 0); + + end; + + end; + end; + + +// with ADOTmp do +// begin +// First; +// i := 0; +// while not Eof do +// begin +// BB[i].inc := i; +// BB[i].FdDysName := Trim(fieldbyname('name').AsString); +// i := i + 1; +// Next; +// end; +// end; +// i := i - 1; +// if i > 19 then +// begin +// i := 19; +// end; +// for j := 0 to 19 do +// begin +// with ScrollBox1 do +// begin +// TSpeedButton(Controls[j]).Visible := false; +// TSpeedButton(Controls[j]).Caption := ''; +// TSpeedButton(Controls[j]).Hint := ''; +// end; +// end; +// for j := 0 to i do +// begin +// with ScrollBox1 do +// begin +// TSpeedButton(Controls[j]).Visible := True; +// TSpeedButton(Controls[j]).Caption := BB[j].FdDysName; +// end; +// end; +end; + +procedure TfrmSCPersonColor.FormShow(Sender: TObject); +begin + InitPerson(1); + CPage := 1; +end; + +procedure TfrmSCPersonColor.btn1Click(Sender: TObject); +begin + FName := Trim(TSpeedButton(Sender).Caption); + ModalResult := 1; +end; + +procedure TfrmSCPersonColor.FormClose(Sender: TObject; var Action: TCloseAction); +begin + Action := caHide; +end; + +procedure TfrmSCPersonColor.Button1Click(Sender: TObject); +begin + if CPage <= 1 then + begin + + Label1.Caption := '1'; + InitPerson(1); + end + else + begin + CPage := CPage - 1; + + Label1.Caption := IntToStr(CPage); + InitPerson(CPage); + end; +end; + +procedure TfrmSCPersonColor.Button3Click(Sender: TObject); +begin + CPage := CPage + 1; + Label1.Caption := IntToStr(CPage); + InitPerson(CPage); +end; + +end. +