From 0148a8eeda38e16d749cfef9bc0ed676cba873dd Mon Sep 17 00:00:00 2001 From: "DESKTOP-E401PHE\\Administrator" Date: Sat, 11 Oct 2025 13:30:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=BF=87chkbox=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E8=83=BD=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../U_ClothSCDCGAnPai.dfm | 18 ++++++++++++++---- .../U_ClothSCDCGAnPai.pas | 17 ++++++++++------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.dfm b/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.dfm index 86f561c..137d5ff 100644 --- a/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.dfm +++ b/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.dfm @@ -151,7 +151,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai end object Label5: TLabel Left = 826 - Top = 10 + Top = 11 Width = 132 Height = 21 Caption = #8594#24050#23433#25490#21305#25968 @@ -164,7 +164,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai end object Label8: TLabel Left = 1064 - Top = 10 + Top = 11 Width = 88 Height = 21 Caption = #21305#25968#19978#38480 @@ -177,7 +177,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai end object Label10: TLabel Left = 696 - Top = 10 + Top = 11 Width = 66 Height = 21 Caption = #35746#21333#21495 @@ -228,7 +228,7 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai end object APPS: TEdit Left = 958 - Top = 6 + Top = 7 Width = 91 Height = 29 Font.Charset = GB2312_CHARSET @@ -254,6 +254,16 @@ object frmClothSCDCGAnPai: TfrmClothSCDCGAnPai ReadOnly = True TabOrder = 1 end + object chksave: TCheckBox + Left = 1272 + Top = 14 + Width = 49 + Height = 17 + Caption = 'save' + Checked = True + State = cbChecked + TabOrder = 6 + end end object Panel2: TPanel Left = 689 diff --git a/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.pas b/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.pas index 6a9f39b..592eab9 100644 --- a/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.pas +++ b/坯布生产计划(WeavingSchedule)/U_ClothSCDCGAnPai.pas @@ -111,6 +111,7 @@ type ADOQuery1: TADOQuery; Tv3Column1: TcxGridDBColumn; ToolButton4: TToolButton; + chksave: TCheckBox; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBCloseClick(Sender: TObject); procedure TBRafreshClick(Sender: TObject); @@ -216,7 +217,7 @@ begin finally ADOQueryMain.EnableControls; end; - Button2.Enabled := true; + chksave.Checked := true; cxGrid3.Enabled := true; end; @@ -291,13 +292,16 @@ var FFDS: Integer; FGYCarNo: string; begin - Button2.Enabled := False; + if not chksave.Checked then + Exit; + chksave.Checked := False; + if ClientDataSet3.IsEmpty then Exit; if ClientDataSet3.Locate('SSel', True, []) = False then begin Application.MessageBox('ûѡ!', 'ʾ', 0); - Button2.Enabled := True; + chksave.Checked := True; Exit; end else @@ -343,13 +347,13 @@ begin if Trim(PS.Text) = '' then begin Application.MessageBox('ƥΪ!', 'ʾ', 0); - Button2.Enabled := True; + chksave.Checked := True; Exit; end; if TryStrToInt(Trim(PS.Text), FFDS) = False then begin Application.MessageBox('ƥǷ', 'ʾ', 0); - Button2.Enabled := True; + chksave.Checked := True; Exit; end; // if Trim(JXPerson.Text) = '' then @@ -382,7 +386,7 @@ begin if FFDS * strtoint(PS.Text) + strtoint(APPS.Text) > StrToInt(PSSX.Text) then begin Application.MessageBox('ƥ࣬!', 'ʾ', 0); - Button2.Enabled := True; + chksave.Checked := True; Exit; end; @@ -1099,7 +1103,6 @@ procedure TfrmClothSCDCGAnPai.PSKeyPress(Sender: TObject; var Key: Char); begin if Key = #13 then begin - Button2.Enabled := False; Button2.Click; end; end;