检验,新增按钮

This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-10-31 09:19:12 +08:00
parent 673433c8b1
commit 3b83925afb
4 changed files with 180 additions and 88 deletions

View File

@ -22,7 +22,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1392 Width = 1392
Height = 92 Height = 62
AutoSize = True AutoSize = True
ButtonHeight = 30 ButtonHeight = 30
ButtonWidth = 119 ButtonWidth = 119
@ -101,28 +101,27 @@ 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 = 0 Left = 608
Top = 30 Top = 0
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 = 111 Left = 719
Top = 30 Top = 0
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 = 222 Left = 830
Top = 30 Top = 0
AutoSize = True AutoSize = True
Caption = #25209#37327#20928#37325#36716#38271#24230 Caption = #25209#37327#20928#37325#36716#38271#24230
ImageIndex = 54 ImageIndex = 54
@ -130,23 +129,24 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = ToolButton13Click OnClick = ToolButton13Click
end end
object ToolButton8: TToolButton object ToolButton8: TToolButton
Left = 345 Left = 953
Top = 30 Top = 0
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 ToolButton1: TToolButton object ToolButton1: TToolButton
Left = 456 Left = 1064
Top = 30 Top = 0
AutoSize = True AutoSize = True
Caption = #25171#21360#26631#31614 Caption = #25171#21360#26631#31614
ImageIndex = 96 ImageIndex = 96
Wrap = True
OnClick = ToolButton1Click OnClick = ToolButton1Click
end end
object TCPDB: TToolButton object TCPDB: TToolButton
Left = 543 Left = 0
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #25104#21697#25171#21253 Caption = #25104#21697#25171#21253
@ -154,7 +154,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = TCPDBClick OnClick = TCPDBClick
end end
object ToolButton3: TToolButton object ToolButton3: TToolButton
Left = 630 Left = 87
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #25171#21360#21253#26631#31614 Caption = #25171#21360#21253#26631#31614
@ -163,25 +163,24 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnClick = ToolButton3Click OnClick = ToolButton3Click
end end
object ToolButton2: TToolButton object ToolButton2: TToolButton
Left = 729 Left = 186
Top = 30 Top = 30
AutoSize = True AutoSize = True
Caption = #25171#21360#26816#39564#25253#21578 Caption = #25171#21360#26816#39564#25253#21578
ImageIndex = 12 ImageIndex = 12
Wrap = True
OnClick = ToolButton2Click OnClick = ToolButton2Click
end end
object ToolButton5: TToolButton object ToolButton5: TToolButton
Left = 0 Left = 297
Top = 60 Top = 30
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 = 63 Left = 360
Top = 60 Top = 30
Width = 68 Width = 68
Height = 30 Height = 30
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -195,8 +194,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
OnKeyPress = Edit3KeyPress OnKeyPress = Edit3KeyPress
end end
object ComboBox1: TComboBox object ComboBox1: TComboBox
Left = 131 Left = 428
Top = 63 Top = 33
Width = 149 Width = 149
Height = 24 Height = 24
Style = csDropDownList Style = csDropDownList
@ -220,8 +219,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
#26816#39564#30721#21333) #26816#39564#30721#21333)
end end
object Edit4: TEdit object Edit4: TEdit
Left = 280 Left = 577
Top = 60 Top = 30
Width = 121 Width = 121
Height = 30 Height = 30
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -234,41 +233,48 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
Visible = False Visible = False
end end
object ToolButton12: TToolButton object ToolButton12: TToolButton
Left = 401 Left = 698
Top = 60 Top = 30
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 = 520 Left = 817
Top = 60 Top = 30
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 = 607 Left = 904
Top = 60 Top = 30
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 = 670 Left = 967
Top = 60 Top = 30
AutoSize = True AutoSize = True
Caption = #20851#38381 Caption = #20851#38381
ImageIndex = 55 ImageIndex = 55
OnClick = TBCloseClick OnClick = TBCloseClick
end end
object ToolButton14: TToolButton
Left = 1030
Top = 30
Caption = #25209#37327#20462#25913#31867#22411
ImageIndex = 54
OnClick = ToolButton14Click
end
end end
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Top = 92 Top = 62
Width = 1392 Width = 1392
Height = 88 Height = 88
Align = alTop Align = alTop
@ -783,9 +789,9 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
end end
object cxGrid1: TcxGrid object cxGrid1: TcxGrid
Left = 0 Left = 0
Top = 180 Top = 150
Width = 1392 Width = 1392
Height = 546 Height = 576
Align = alClient Align = alClient
PopupMenu = PopupMenu1 PopupMenu = PopupMenu1
TabOrder = 3 TabOrder = 3
@ -1188,8 +1194,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
end end
end end
object MovePanel2: TMovePanel object MovePanel2: TMovePanel
Left = 416 Left = 584
Top = 192 Top = 224
Width = 289 Width = 289
Height = 49 Height = 49
BevelInner = bvLowered BevelInner = bvLowered
@ -1205,8 +1211,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
Visible = False Visible = False
end end
object Panel5: TPanel object Panel5: TPanel
Left = 736 Left = 720
Top = 188 Top = 268
Width = 273 Width = 273
Height = 101 Height = 101
Color = clSkyBlue Color = clSkyBlue
@ -1220,8 +1226,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
Caption = #25968#37327#21333#20301 Caption = #25968#37327#21333#20301
end end
object ComboBox5: TComboBox object ComboBox5: TComboBox
Left = 100 Left = 92
Top = 24 Top = 32
Width = 145 Width = 145
Height = 20 Height = 20
Style = csDropDownList Style = csDropDownList
@ -1604,8 +1610,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
end end
end end
object Panel9: TPanel object Panel9: TPanel
Left = 804 Left = 1076
Top = 244 Top = 260
Width = 225 Width = 225
Height = 117 Height = 117
Color = clSkyBlue Color = clSkyBlue
@ -1862,6 +1868,53 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
'4') '4')
end end
end end
object Panel14: TPanel
Left = 196
Top = 376
Width = 225
Height = 101
Color = clSkyBlue
TabOrder = 14
Visible = False
object Label37: TLabel
Left = 16
Top = 28
Width = 24
Height = 12
Caption = #31867#22411
end
object ComboBox4: TComboBox
Left = 56
Top = 24
Width = 145
Height = 20
Style = csDropDownList
ItemHeight = 12
TabOrder = 0
Items.Strings = (
#27491#21697
#27425#21697
'')
end
object Button15: TButton
Left = 24
Top = 64
Width = 60
Height = 25
Caption = #30830#23450
TabOrder = 1
OnClick = Button15Click
end
object Button16: TButton
Left = 136
Top = 64
Width = 60
Height = 25
Caption = #20851#38381
TabOrder = 2
OnClick = Button16Click
end
end
object cxGridPopupMenu1: TcxGridPopupMenu object cxGridPopupMenu1: TcxGridPopupMenu
Grid = cxGrid1 Grid = cxGrid1
PopupMenus = <> PopupMenus = <>

View File

@ -11,20 +11,7 @@ uses
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, Menus, MovePanel, cxTextEdit, RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, MovePanel, cxTextEdit,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxContainer, ShellAPI, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxContainer, ShellAPI,
cxCurrencyEdit, MMSystem, dxSkinsCore, dxSkinBlack, dxSkinBlue, cxCurrencyEdit, MMSystem;
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
TfrmJYOrderCDOne = class(TForm) TfrmJYOrderCDOne = class(TForm)
@ -222,6 +209,12 @@ type
Label36: TLabel; Label36: TLabel;
ComboBox3: TComboBox; ComboBox3: TComboBox;
Edit6: TEdit; Edit6: TEdit;
ToolButton14: TToolButton;
Panel14: TPanel;
Label37: TLabel;
ComboBox4: TComboBox;
Button15: TButton;
Button16: TButton;
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);
@ -283,6 +276,9 @@ type
procedure Button8Click(Sender: TObject); procedure Button8Click(Sender: TObject);
procedure Button14Click(Sender: TObject); procedure Button14Click(Sender: TObject);
procedure Button13Click(Sender: TObject); procedure Button13Click(Sender: TObject);
procedure ToolButton14Click(Sender: TObject);
procedure Button15Click(Sender: TObject);
procedure Button16Click(Sender: TObject);
// procedure Edit5Click(Sender: TObject); // procedure Edit5Click(Sender: TObject);
// procedure CheckBox3Click(Sender: TObject); // procedure CheckBox3Click(Sender: TObject);
private private
@ -436,8 +432,7 @@ begin
sumP := sumP + 1; sumP := sumP + 1;
sumLen := RoundFloat(sumLen + Order_Main.fieldbyname('mjlen').AsFloat, 2); sumLen := RoundFloat(sumLen + Order_Main.fieldbyname('mjlen').AsFloat, 2);
sumMZ := RoundFloat(sumMZ + Order_Main.fieldbyname('mjmaoz').AsFloat, 2); sumMZ := RoundFloat(sumMZ + Order_Main.fieldbyname('mjmaoz').AsFloat, 2);
sumJZ := RoundFloat(sumJZ + Order_Main.fieldbyname('mjqty4').AsFloat, 2) sumJZ := RoundFloat(sumJZ + Order_Main.fieldbyname('mjqty4').AsFloat, 2)// sumMZ := sumMZ + Order_Main.fieldbyname('mjmaoz').AsFloat;
// sumMZ := sumMZ + Order_Main.fieldbyname('mjmaoz').AsFloat;
// sumJZ := sumJZ + Order_Main.fieldbyname('mjqty4').AsFloat; // sumJZ := sumJZ + Order_Main.fieldbyname('mjqty4').AsFloat;
end; end;
@ -2274,5 +2269,59 @@ begin
end; end;
procedure TfrmJYOrderCDOne.ToolButton14Click(Sender: TObject);
begin
Panel14.Left := (self.Width - Panel14.Width) div 2;
Panel14.Visible := true;
end;
procedure TfrmJYOrderCDOne.Button15Click(Sender: TObject);
begin
if Order_Main.IsEmpty then
Exit;
if Order_Main.Locate('SSel', True, []) = False then
begin
Application.MessageBox('没有选择数据!', '提示', 0);
Exit;
end;
try
Order_Main.DisableControls;
ADOQueryCmd.Connection.BeginTrans;
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 WFB_MJJY Set MJType=''' + trim(ComboBox4.Text) + ''' ');
sql.Add('where MJID=''' + Trim(Order_Main.fieldbyname('MJID').AsString) + '''');
ExecSQL;
end;
end;
Next;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
Order_Main.EnableControls;
application.MessageBox('数据修改成功!', '提示信息');
Panel14.Visible := false;
TBRafresh.Click;
except
ADOQueryCmd.Connection.RollbackTrans;
Order_Main.EnableControls;
application.MessageBox('数据修改失败!', '提示信息', 0);
end;
end;
procedure TfrmJYOrderCDOne.Button16Click(Sender: TObject);
begin
Panel14.Visible := false;
end;
end. end.

View File

@ -1394,7 +1394,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 51 Left = 51
Top = 377 Top = 377
Width = 86 Width = 86
Height = 32 Height = 41
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -32 Font.Height = -32
@ -1749,7 +1749,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 79 Left = 79
Top = 440 Top = 440
Width = 80 Width = 80
Height = 30 Height = 36
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -28 Font.Height = -28
@ -1759,14 +1759,13 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
TabOrder = 22 TabOrder = 22
OnClick = MJXHClick OnClick = MJXHClick
OnExit = MJStr4Exit
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
object CheckKZ: TEdit object CheckKZ: TEdit
Left = 79 Left = 79
Top = 470 Top = 470
Width = 80 Width = 80
Height = 29 Height = 36
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -28 Font.Height = -28
@ -1776,7 +1775,6 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
ParentFont = False ParentFont = False
TabOrder = 23 TabOrder = 23
OnClick = MJXHClick OnClick = MJXHClick
OnExit = MJStr4Exit
OnKeyPress = MJstr3KeyPress OnKeyPress = MJstr3KeyPress
end end
end end

View File

@ -10,21 +10,7 @@ uses
cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport, cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport,
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;
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
TfrmMJManageNewFDNewSF = class(TForm) TfrmMJManageNewFDNewSF = class(TForm)
@ -1756,7 +1742,13 @@ begin
MJLen.SetFocus; MJLen.SetFocus;
// MJQty4.OnClick(MJQty4); // MJQty4.OnClick(MJQty4);
MJLen.OnClick(Mjlen); MJLen.OnClick(Mjlen);
CheckMF.Text := '';
CheckKZ.Text := '';
if Trim(Edit4.Text) = '£' then
begin
Edit3.Text := ''; // 헌왕Edit3
Edit3.Text := '£'; // 뭅朞Edit3
end;
end; end;
procedure TfrmMJManageNewFDNewSF.PrtData(FMJID: string); procedure TfrmMJManageNewFDNewSF.PrtData(FMJID: string);