加码尺

This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-07-18 11:22:50 +08:00
parent cbf8488898
commit 8ca2a12f14
9 changed files with 997 additions and 170 deletions

View File

@ -10,7 +10,21 @@ uses
cxGrid, StdCtrls, cxContainer, cxTextEdit, cxCurrencyEdit, BtnEdit, ExtCtrls, cxGrid, StdCtrls, cxContainer, cxTextEdit, cxCurrencyEdit, BtnEdit, ExtCtrls,
ComCtrls, ToolWin, DBClient, ADODB, MovePanel, Buttons, Menus, ComCtrls, ToolWin, DBClient, ADODB, MovePanel, Buttons, Menus,
cxLookAndFeelPainters, cxButtons, RM_Common, RM_Class, RM_GridReport, 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 type
TfrmCPDBao = class(TForm) TfrmCPDBao = class(TForm)
@ -909,20 +923,23 @@ begin
begin begin
Close; Close;
SQL.Clear; 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('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('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('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('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), ');
sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); // sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), ');
sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); // 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('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('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('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('from WFB_MJJY A');
sql.Add(' inner join JYOrder_Sub C on C.SubID=A.SubID'); // 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(' inner join JYOrder_Main D on D.MainID=A.MainID');
SQL.Add('where A.BaoID=''' + Trim(BaoID.Text) + ''''); // 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('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; Open;
end; end;
@ -987,7 +1004,7 @@ begin
if check_bz.Checked then if check_bz.Checked then
begin begin
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then 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 else
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\°ü±êÇ©.rmf'; fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\°ü±êÇ©.rmf';
if not FileExists(fPrintFile) then if not FileExists(fPrintFile) then

View File

@ -22,7 +22,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1384 Width = 1384
Height = 62 Height = 92
AutoSize = True AutoSize = True
ButtonHeight = 30 ButtonHeight = 30
ButtonWidth = 119 ButtonWidth = 119
@ -101,27 +101,28 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
Top = 0 Top = 0
Caption = #25209#37327#20462#25913#32568#21495 Caption = #25209#37327#20462#25913#32568#21495
ImageIndex = 54 ImageIndex = 54
Wrap = True
OnClick = ToolButton11Click OnClick = ToolButton11Click
end end
object TBDW: TToolButton object TBDW: TToolButton
Left = 608 Left = 0
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #20462#25913#25968#37327#21333#20301 Caption = #20462#25913#25968#37327#21333#20301
ImageIndex = 54 ImageIndex = 54
OnClick = TBDWClick OnClick = TBDWClick
end end
object ToolButton4: TToolButton object ToolButton4: TToolButton
Left = 719 Left = 111
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #25209#37327#35843#25972#31859#25968 Caption = #25209#37327#35843#25972#31859#25968
ImageIndex = 54 ImageIndex = 54
OnClick = ToolButton4Click OnClick = ToolButton4Click
end end
object ToolButton13: TToolButton object ToolButton13: TToolButton
Left = 830 Left = 222
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #25209#37327#20928#37325#36716#38271#24230 Caption = #25209#37327#20928#37325#36716#38271#24230
ImageIndex = 54 ImageIndex = 54
@ -129,23 +130,22 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = ToolButton13Click OnClick = ToolButton13Click
end end
object ToolButton8: TToolButton object ToolButton8: TToolButton
Left = 953 Left = 345
Top = 0 Top = 30
AutoSize = True AutoSize = True
Caption = #25209#37327#20462#25913#30382#37325 Caption = #25209#37327#20462#25913#30382#37325
ImageIndex = 54 ImageIndex = 54
OnClick = ToolButton8Click OnClick = ToolButton8Click
end end
object ToolButton14: TToolButton object ToolButton14: TToolButton
Left = 1064 Left = 456
Top = 0 Top = 30
Caption = #25209#37327#20462#25913#31995#25968 Caption = #25209#37327#20462#25913#31995#25968
ImageIndex = 54 ImageIndex = 54
Wrap = True
OnClick = ToolButton14Click OnClick = ToolButton14Click
end end
object ToolButton1: TToolButton object ToolButton1: TToolButton
Left = 0 Left = 575
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #25171#21360#26631#31614 Caption = #25171#21360#26631#31614
@ -153,7 +153,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = ToolButton1Click OnClick = ToolButton1Click
end end
object TCPDB: TToolButton object TCPDB: TToolButton
Left = 87 Left = 662
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #25104#21697#25171#21253 Caption = #25104#21697#25171#21253
@ -162,33 +162,34 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = TCPDBClick OnClick = TCPDBClick
end end
object ToolButton3: TToolButton object ToolButton3: TToolButton
Left = 174 Left = 749
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #25171#21360#21253#26631#31614 Caption = #25171#21360#21253#26631#31614
ImageIndex = 12 ImageIndex = 12
Wrap = True
Visible = False Visible = False
OnClick = ToolButton3Click OnClick = ToolButton3Click
end end
object ToolButton2: TToolButton object ToolButton2: TToolButton
Left = 273 Left = 0
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #25171#21360#26816#39564#25253#21578 Caption = #25171#21360#26816#39564#25253#21578
ImageIndex = 12 ImageIndex = 12
OnClick = ToolButton2Click OnClick = ToolButton2Click
end end
object ToolButton5: TToolButton object ToolButton5: TToolButton
Left = 384 Left = 111
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #25171#21360 Caption = #25171#21360
ImageIndex = 12 ImageIndex = 12
OnClick = ToolButton5Click OnClick = ToolButton5Click
end end
object Edit3: TEdit object Edit3: TEdit
Left = 447 Left = 174
Top = 30 Top = 60
Width = 68 Width = 68
Height = 30 Height = 30
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -202,8 +203,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnKeyPress = Edit3KeyPress OnKeyPress = Edit3KeyPress
end end
object ComboBox1: TComboBox object ComboBox1: TComboBox
Left = 515 Left = 242
Top = 33 Top = 63
Width = 149 Width = 149
Height = 24 Height = 24
Style = csDropDownList Style = csDropDownList
@ -227,8 +228,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
#26816#39564#30721#21333) #26816#39564#30721#21333)
end end
object Edit4: TEdit object Edit4: TEdit
Left = 664 Left = 391
Top = 30 Top = 60
Width = 121 Width = 121
Height = 30 Height = 30
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -241,32 +242,32 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
Visible = False Visible = False
end end
object ToolButton12: TToolButton object ToolButton12: TToolButton
Left = 785 Left = 512
Top = 30 Top = 60
Caption = #20462#25913#30721#21333 Caption = #20462#25913#30721#21333
ImageIndex = 54 ImageIndex = 54
Visible = False Visible = False
OnClick = ToolButton12Click OnClick = ToolButton12Click
end end
object ToolButton9: TToolButton object ToolButton9: TToolButton
Left = 904 Left = 631
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #24322#24120#25968#25454 Caption = #24322#24120#25968#25454
ImageIndex = 2 ImageIndex = 2
OnClick = ToolButton9Click OnClick = ToolButton9Click
end end
object TBExport: TToolButton object TBExport: TToolButton
Left = 991 Left = 718
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #23548#20986 Caption = #23548#20986
ImageIndex = 75 ImageIndex = 75
OnClick = TBExportClick OnClick = TBExportClick
end end
object TBClose: TToolButton object TBClose: TToolButton
Left = 1054 Left = 781
Top = 30 Top = 60
AutoSize = True AutoSize = True
Caption = #20851#38381 Caption = #20851#38381
ImageIndex = 55 ImageIndex = 55
@ -275,7 +276,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
end end
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Top = 62 Top = 92
Width = 1384 Width = 1384
Height = 88 Height = 88
Align = alTop Align = alTop
@ -843,9 +844,9 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
end end
object cxGrid1: TcxGrid object cxGrid1: TcxGrid
Left = 0 Left = 0
Top = 150 Top = 180
Width = 1384 Width = 1384
Height = 568 Height = 538
Align = alClient Align = alClient
PopupMenu = PopupMenu1 PopupMenu = PopupMenu1
TabOrder = 3 TabOrder = 3

View File

@ -1175,20 +1175,22 @@ begin
begin begin
Close; Close;
SQL.Clear; 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('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('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('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('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), ');
sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); // sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), ');
sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); // 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('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('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('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('from WFB_MJJY A');
sql.Add(' inner join JYOrder_Sub C on C.SubID=A.SubID'); // 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(' inner join JYOrder_Main D on D.MainID=A.MainID');
SQL.Add(' where A.BaoID=''' + Trim(Order_Main.fieldbyname('BaoID').AsString) + ''''); // 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('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; Open;
end; end;
if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then if Trim(ADOQueryPrint.fieldbyname('NLBName').AsString) <> '' then

View File

@ -1,6 +1,6 @@
object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 312 Left = 387
Top = 185 Top = 217
Width = 1368 Width = 1368
Height = 754 Height = 754
Caption = #25104#21697#26816#39564 Caption = #25104#21697#26816#39564
@ -111,7 +111,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Styles.Content = cxStyle3 Styles.Content = cxStyle3
Styles.Header = cxStyle3 Styles.Header = cxStyle3
Width = 40 Width = 34
end end
object Tv3Column5: TcxGridDBColumn object Tv3Column5: TcxGridDBColumn
Caption = #33394#21495 Caption = #33394#21495
@ -119,7 +119,15 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Styles.Content = cxStyle3 Styles.Content = cxStyle3
Styles.Header = 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 end
object v3Column1: TcxGridDBColumn object v3Column1: TcxGridDBColumn
Caption = #21367#21495 Caption = #21367#21495
@ -155,7 +163,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Styles.Content = cxStyle5 Styles.Content = cxStyle5
Styles.Footer = cxStyle5 Styles.Footer = cxStyle5
Styles.Header = cxStyle5 Styles.Header = cxStyle5
Width = 50 Width = 42
end end
object v3Column5: TcxGridDBColumn object v3Column5: TcxGridDBColumn
Caption = #20928#37325 Caption = #20928#37325
@ -1461,7 +1469,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Label59: TLabel object Label59: TLabel
Left = 212 Left = 212
Top = 304 Top = 343
Width = 42 Width = 42
Height = 20 Height = 20
Caption = #26631#31614 Caption = #26631#31614
@ -1542,6 +1550,20 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Font.Style = [fsBold] Font.Style = [fsBold]
ParentFont = False ParentFont = False
end 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 object MJFK: TEdit
Left = 51 Left = 51
Top = 371 Top = 371
@ -1978,7 +2000,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object SLbName: TFTComboBox object SLbName: TFTComboBox
Left = 260 Left = 260
Top = 295 Top = 334
Width = 185 Width = 185
Height = 32 Height = 32
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -2162,6 +2184,23 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
OnKeyDown = MJQty4KeyDown OnKeyDown = MJQty4KeyDown
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end 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 end
object MovePanel1: TMovePanel object MovePanel1: TMovePanel
Left = 910 Left = 910
@ -2566,7 +2605,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
object Panel3: TPanel object Panel3: TPanel
Left = 602 Left = 602
Top = 316 Top = 468
Width = 347 Width = 347
Height = 334 Height = 334
BevelInner = bvRaised BevelInner = bvRaised
@ -3308,8 +3347,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end end
end end
object ScrollBox2: TScrollBox object ScrollBox2: TScrollBox
Left = 28 Left = -404
Top = 128 Top = 472
Width = 653 Width = 653
Height = 457 Height = 457
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET

View File

@ -11,20 +11,20 @@ uses
RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu, RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu,
ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox, ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox,
MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, ShellAPI, MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, ShellAPI,
BtnEdit, FTComboBox, dxSkinsCore, dxSkinBlack, dxSkinBlue, BtnEdit, FTComboBox, dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinCaramel, dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide,
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter; dxSkinscxPCPainter;
type type
TfrmMJManageNewFDNewSF = class(TForm) TfrmMJManageNewFDNewSF = class(TForm)
@ -323,6 +323,9 @@ type
Label64: TLabel; Label64: TLabel;
HSLEN: TEdit; HSLEN: TEdit;
Tv3Column6: TcxGridDBColumn; Tv3Column6: TcxGridDBColumn;
Tv3Column7: TcxGridDBColumn;
Label65: TLabel;
MAchi: TEdit;
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject); procedure TBCloseClick(Sender: TObject);
@ -438,7 +441,7 @@ implementation
uses uses
U_DataLink, U_Fun, U_ZDYHelp, U_ZDYHelp12, U_iniParam, U_ClothHCList, MMSystem, U_DataLink, U_Fun, U_ZDYHelp, U_ZDYHelp12, U_iniParam, U_ClothHCList, MMSystem,
U_SysLogOrder; U_SCPersonColor, U_SysLogOrder;
{$R *.dfm} {$R *.dfm}
procedure TfrmMJManageNewFDNewSF.PrtBaoData(FBaoid: string); procedure TfrmMJManageNewFDNewSF.PrtBaoData(FBaoid: string);
@ -457,22 +460,24 @@ begin
begin begin
Close; Close;
SQL.Clear; 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('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('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('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('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('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), ');
sql.Add('MJXH=DBO.F_Get_Order_SubStr(BaoID,''BNMJXH''), '); // sql.Add('MJXH=DBO.F_Get_Order_SubStr(BaoID,''BNMJXH''), ');
sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); // sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), ');
sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); // 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('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('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('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('from WFB_MJJY A');
sql.Add('inner join JYOrder_Sub C on C.SubID=A.SubID'); // 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('inner join JYOrder_Main D on D.MainID=A.MainID');
SQL.Add('where A.BaoID=''' + Trim(FBaoid) + ''''); // 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('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; Open;
end; end;
if ADOQueryPrint.RecordCount > 1 then if ADOQueryPrint.RecordCount > 1 then
@ -1146,10 +1151,12 @@ begin
if (FDC <> 0) and (Edit12.text <> '') then if (FDC <> 0) and (Edit12.text <> '') then
begin begin
FieldByName('MJLen').Value := FDC; FieldByName('MJLen').Value := FDC;
end end
else else
begin 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; end;
FieldByName('JCLen').Value := StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0) + StrToFloatdef(trim(JC.Text), 0); 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); FieldByName('MJQty1').Value := StrToFloatdef(trim(MJQty1.Text), 0);
@ -1158,7 +1165,7 @@ begin
FieldByName('MJQty3').Value := StrToFloatdef(trim(MJQty3.Text), 0); FieldByName('MJQty3').Value := StrToFloatdef(trim(MJQty3.Text), 0);
FieldByName('MJQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0); //fjZ FieldByName('MJQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0); //fjZ
FieldByName('JCQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0) + StrToFloatdef(trim(JZ.Text), 0); 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); FieldByName('JZ').Value := StrToFloatdef(trim(JZ.Text), 0);
if Trim(MJFK.Text) <> '' then if Trim(MJFK.Text) <> '' then
begin 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('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) + ''''); // sql.Add('where MJID=''' + Trim(maxno) + '''');
execsql; execsql;
end; end;
end end
else if fRollType = 'ÎÞ¹æÔòÉú³É' then else if fRollType = 'ÎÞ¹æÔòÉú³É' then
begin begin
@ -2682,8 +2689,9 @@ begin
FDC := StrToFloatDef(ADOTmp.fieldbyname('DC').asstring, 0); FDC := StrToFloatDef(ADOTmp.fieldbyname('DC').asstring, 0);
fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString); fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString);
fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString); fbaosx := Trim(ADOTmp.fieldbyname('baosx').AsString);
JC.Text := ADOTmp.fieldbyname('jiazhong').asstring; // StrToFloatDef(ADOTmp.fieldbyname('jiachang').asstring, 0); JC.Text := ADOTmp.fieldbyname('jiachang').asstring; // StrToFloatDef(ADOTmp.fieldbyname('jiachang').asstring, 0);
jz.Text := ADOTmp.fieldbyname('jiachang').asstring; //StrToFloatDef(ADOTmp.fieldbyname('jiazhong').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 if FDC <> 0 then
begin begin
Edit12.Visible := True; Edit12.Visible := True;
@ -3056,25 +3064,27 @@ begin
if CDS_MJID.IsEmpty then if CDS_MJID.IsEmpty then
exit; exit;
CDS_MJID.First; CDS_MJID.First;
with ADOQueryPrint do with ADOQueryPrint do
begin begin
Close; Close;
SQL.Clear; 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('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('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('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('Mjstr4=DBO.F_Get_Order_SubStr(BaoID,''BNGangNo''), ');
sql.Add('MJXH=DBO.F_Get_Order_SubStr(BaoID,''BNMJXH''), '); // sql.Add('MJXH=DBO.F_Get_Order_SubStr(BaoID,''BNMJXH''), ');
sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), '); // sql.Add('BNMJLENLIST=DBO.F_Get_Order_SubStr(BaoID,''BNMJLENLIST''), ');
sql.Add('PRTkuanNo=DBO.F_Get_Order_SubStr(BaoID,''BNPrtkuanno''),'); // 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('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('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('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('from WFB_MJJY A');
sql.Add('inner join JYOrder_Sub C on C.SubID=A.SubID'); // 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('inner join JYOrder_Main D on D.MainID=A.MainID');
SQL.Add('where A.BaoID=''' + Trim(CDS_MJID.fieldbyname('baoID').AsString) + ''''); // 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('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; Open;
end; end;
if ADOQueryPrint.RecordCount > 1 then if ADOQueryPrint.RecordCount > 1 then
@ -3331,7 +3341,8 @@ begin
Button11.Visible := True; Button11.Visible := True;
Button12.Visible := True; Button12.Visible := True;
Button13.Visible := True; Button13.Visible := True;
MAchi.Visible := True;
Label65.Visible := True;
end end
else else
begin begin
@ -3349,19 +3360,21 @@ begin
JSKH.Visible := False; JSKH.Visible := False;
KH.Visible := False; KH.Visible := False;
PM.Visible := False; PM.Visible := False;
YS.Visible := False; YS.Visible := False;
HX.Visible := False; HX.Visible := False;
SH.Visible := False; SH.Visible := False;
JC.Visible := False; JC.Visible := False;
jz.Visible := False; jz.Visible := False;
SLbName.Visible := False; SLbName.Visible := False;
Button9.Visible := False; Button9.Visible := False;
Button10.Visible := False; Button10.Visible := False;
Button5.Visible := False; Button5.Visible := False;
Button11.Visible := False; Button11.Visible := False;
Button12.Visible := False; Button12.Visible := False;
Button13.Visible := False; Button13.Visible := False;
MAchi.Visible := False;
Label65.Visible := False;
end; end;
end; end;
@ -3386,41 +3399,80 @@ end;
procedure TfrmMJManageNewFDNewSF.Button8Click(Sender: TObject); procedure TfrmMJManageNewFDNewSF.Button8Click(Sender: TObject);
begin begin
InitJP2('0'); InitJP2('0');
ScrollBox2.Visible := False; ScrollBox2.Visible := False;
end; end;
procedure TfrmMJManageNewFDNewSF.Button10Click(Sender: TObject); procedure TfrmMJManageNewFDNewSF.Button10Click(Sender: TObject);
begin begin
ScrollBox2.Visible := true; try
InitJP2('PRTCodeName'); frmSCPersonColor := TfrmSCPersonColor.Create(self);
ftest := 'PM'; with frmSCPersonColor do
// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; begin
FTYPE := 'PM';
if ShowModal = 1 then
begin
PM.Text := FName;
end;
end;
finally
frmSCPersonColor.close;
end;
end; end;
procedure TfrmMJManageNewFDNewSF.Button9Click(Sender: TObject); procedure TfrmMJManageNewFDNewSF.Button9Click(Sender: TObject);
begin begin
ScrollBox2.Visible := true; // ScrollBox2.Visible := true;
InitJP2('CustomerNoName'); // InitJP2('CustomerNoName');
ftest := 'KH'; // ftest := 'KH';
// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; // 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; end;
procedure TfrmMJManageNewFDNewSF.Button11Click(Sender: TObject); procedure TfrmMJManageNewFDNewSF.Button11Click(Sender: TObject);
begin begin
ScrollBox2.Visible := true; try
InitJP2('PRTColor'); frmSCPersonColor := TfrmSCPersonColor.Create(self);
ftest := 'YS'; with frmSCPersonColor do
// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; begin
FTYPE := 'YS';
if ShowModal = 1 then
begin
YS.Text := FName;
end;
end;
finally
frmSCPersonColor.close;
end;
end; end;
procedure TfrmMJManageNewFDNewSF.Button12Click(Sender: TObject); procedure TfrmMJManageNewFDNewSF.Button12Click(Sender: TObject);
begin begin
ScrollBox2.Visible := true; try
InitJP2('SOrddefstr1'); frmSCPersonColor := TfrmSCPersonColor.Create(self);
ftest := 'SH'; with frmSCPersonColor do
Button8.Font.Color := clRed; // 设置按钮文本颜色为红色 begin
// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; FTYPE := 'SH';
if ShowModal = 1 then
begin
SH.Text := FName;
end;
end;
finally
frmSCPersonColor.close;
end;
end; end;
procedure TfrmMJManageNewFDNewSF.InitJP2(flag: string); procedure TfrmMJManageNewFDNewSF.InitJP2(flag: string);
@ -3462,8 +3514,8 @@ begin
end; end;
end; end;
i := i - 1; i := i - 1;
if i > 59 then if i > 59 then
begin begin
i := 59; i := 59;
end; end;
for j := 0 to i do for j := 0 to i do
@ -3472,9 +3524,9 @@ begin
begin begin
TSpeedButton(Controls[j]).Visible := True; TSpeedButton(Controls[j]).Visible := True;
TSpeedButton(Controls[j]).Hint := AA[j]; TSpeedButton(Controls[j]).Hint := AA[j];
if Length(AA[j]) > 9 then if Length(AA[j]) > 9 then
begin 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 end
else else
TSpeedButton(Controls[j]).Caption := AA[j]; TSpeedButton(Controls[j]).Caption := AA[j];
@ -3525,18 +3577,40 @@ end;
procedure TfrmMJManageNewFDNewSF.Button13Click(Sender: TObject); procedure TfrmMJManageNewFDNewSF.Button13Click(Sender: TObject);
begin begin
ScrollBox2.Visible := true; try
InitJP2('PRTHX'); frmSCPersonColor := TfrmSCPersonColor.Create(self);
ftest := 'HX'; with frmSCPersonColor do
// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; begin
FTYPE := 'HX';
if ShowModal = 1 then
begin
HX.Text := FName;
end;
end;
finally
frmSCPersonColor.close;
end;
end; end;
procedure TfrmMJManageNewFDNewSF.Button5Click(Sender: TObject); procedure TfrmMJManageNewFDNewSF.Button5Click(Sender: TObject);
begin begin
ScrollBox2.Visible := true; // ScrollBox2.Visible := true;
InitJP2('CustomerJS'); // InitJP2('CustomerJS');
ftest := 'JSKH'; // ftest := 'JSKH';
// ScrollBox2.Left := frmMJManageNewFDNewSF.Width div 2 - 730; 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;
end. end.

View File

@ -161,23 +161,31 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
ImageIndex = 60 ImageIndex = 60
OnClick = ToolButton14Click OnClick = ToolButton14Click
end end
object ToolButton7: TToolButton object ToolButton16: TToolButton
Left = 348 Left = 348
Top = 30 Top = 30
AutoSize = True 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 Caption = #39044#35272#21367#26631#31614
ImageIndex = 12 ImageIndex = 12
OnClick = ToolButton7Click OnClick = ToolButton7Click
end end
object ToolButton15: TToolButton object ToolButton15: TToolButton
Left = 447 Left = 534
Top = 30 Top = 30
Caption = #39044#35272#20013#25991#26631#31614 Caption = #39044#35272#20013#25991#26631#31614
ImageIndex = 57 ImageIndex = 57
OnClick = ToolButton15Click OnClick = ToolButton15Click
end end
object ToolButton8: TToolButton object ToolButton8: TToolButton
Left = 554 Left = 641
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #39044#35272#21253#26631#31614 Caption = #39044#35272#21253#26631#31614
@ -185,7 +193,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
OnClick = ToolButton8Click OnClick = ToolButton8Click
end end
object PiZhong: TEdit object PiZhong: TEdit
Left = 653 Left = 740
Top = 30 Top = 30
Width = 121 Width = 121
Height = 30 Height = 30
@ -198,7 +206,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
TabOrder = 0 TabOrder = 0
end end
object TBClose: TToolButton object TBClose: TToolButton
Left = 774 Left = 861
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #20851#38381 Caption = #20851#38381
@ -685,6 +693,12 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet
Visible = False Visible = False
Width = 60 Width = 60
end end
object Tv1Column6: TcxGridDBColumn
Caption = #30721#23610
DataBinding.FieldName = 'PRTmachi'
HeaderAlignmentHorz = taCenter
Width = 60
end
end end
object cxGrid1Level1: TcxGridLevel object cxGrid1Level1: TcxGridLevel
GridView = Tv1 GridView = Tv1

View File

@ -10,7 +10,21 @@ uses
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System, cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, StrUtils, Menus, cxDropDownEdit, 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 type
TfrmProductOrderLBNameSet = class(TForm) TfrmProductOrderLBNameSet = class(TForm)
@ -28,7 +42,7 @@ type
cxGrid1: TcxGrid; cxGrid1: TcxGrid;
cxGridPopupMenu1: TcxGridPopupMenu; cxGridPopupMenu1: TcxGridPopupMenu;
ADOQueryCmd: TADOQuery; ADOQueryCmd: TADOQuery;
ADOQueryMain: TADOQuery; ADOQueryMain: TADOQuery;
ADOQueryTemp: TADOQuery; ADOQueryTemp: TADOQuery;
DataSource1: TDataSource; DataSource1: TDataSource;
Label3: TLabel; Label3: TLabel;
@ -117,6 +131,8 @@ type
ToolButton13: TToolButton; ToolButton13: TToolButton;
ToolButton14: TToolButton; ToolButton14: TToolButton;
ToolButton15: TToolButton; ToolButton15: TToolButton;
ToolButton16: TToolButton;
Tv1Column6: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
@ -153,6 +169,7 @@ type
procedure Tv1Column2PropertiesEditValueChanged(Sender: TObject); procedure Tv1Column2PropertiesEditValueChanged(Sender: TObject);
procedure Tv1Column5PropertiesEditValueChanged(Sender: TObject); procedure Tv1Column5PropertiesEditValueChanged(Sender: TObject);
procedure ToolButton15Click(Sender: TObject); procedure ToolButton15Click(Sender: TObject);
procedure ToolButton16Click(Sender: TObject);
private private
DQdate: TDateTime; DQdate: TDateTime;
procedure InitGrid(); procedure InitGrid();
@ -1508,7 +1525,7 @@ var
Txt, fImagePath: string; Txt, fImagePath: string;
Moudle: THandle; Moudle: THandle;
Makebar: TMakebar; Makebar: TMakebar;
Mixtext: TMixtext; Mixtext: TMixtext;
begin begin
if Order_Main.IsEmpty then if Order_Main.IsEmpty then
exit; exit;
@ -1554,5 +1571,70 @@ begin
end; end;
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. end.

View File

@ -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

View File

@ -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.