This commit is contained in:
libingpeng 2025-11-10 17:29:28 +08:00
parent 813586e31e
commit 2c80dbf4aa
4 changed files with 58 additions and 14 deletions

View File

@ -1,6 +1,6 @@
object frmFinishedClothInspection: TfrmFinishedClothInspection
Left = 98
Top = 236
Left = 53
Top = 333
Width = 1357
Height = 721
Caption = #25104#21697#26816#39564#25253#21578

View File

@ -1,6 +1,6 @@
object frmFinishedClothStatistical: TfrmFinishedClothStatistical
Left = 98
Top = 65
Left = 102
Top = 230
Width = 1357
Height = 692
Caption = #25377#36710#24037#20135#37327
@ -398,7 +398,7 @@ object frmFinishedClothStatistical: TfrmFinishedClothStatistical
end
end
object Panel2: TPanel
Left = 693
Left = 781
Top = 70
Width = 497
Height = 417

View File

@ -1,6 +1,6 @@
object frmMJEdit: TfrmMJEdit
Left = 439
Top = 182
Left = 519
Top = 358
Width = 722
Height = 500
Caption = #24067#21305#31649#29702
@ -19,7 +19,7 @@ object frmMJEdit: TfrmMJEdit
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 706
Width = 714
Height = 30
ButtonHeight = 30
ButtonWidth = 59
@ -75,7 +75,7 @@ object frmMJEdit: TfrmMJEdit
object Panel1: TPanel
Left = 0
Top = 30
Width = 706
Width = 714
Height = 132
Align = alTop
BevelInner = bvRaised
@ -96,8 +96,8 @@ object frmMJEdit: TfrmMJEdit
ParentFont = False
end
object Label2: TLabel
Left = 33
Top = 48
Left = 401
Top = 24
Width = 7
Height = 12
Font.Charset = GB2312_CHARSET
@ -416,8 +416,8 @@ object frmMJEdit: TfrmMJEdit
object cxGrid2: TcxGrid
Left = 0
Top = 162
Width = 706
Height = 299
Width = 714
Height = 307
Align = alClient
TabOrder = 2
object Tv2: TcxGridDBTableView

View File

@ -8,7 +8,8 @@ uses
cxEdit, DB, cxDBData, cxTextEdit, DBClient, ADODB, cxGridLevel,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
cxControls, cxGridCustomView, cxGrid, StdCtrls, ExtCtrls, ComCtrls, ToolWin,
cxButtonEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
cxButtonEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinsDefaultPainters, dxSkinscxPCPainter;
type
TfrmMJEdit = class(TForm)
@ -437,6 +438,49 @@ procedure TfrmMJEdit.ToolButton2Click(Sender: TObject);
begin
if Trim(Label2.Caption) = '' then
Exit;
if (strtofloatdef(trim(JYLen1.Text), 0) + strtofloatdef(trim(JYLen2.Text), 0) + strtofloatdef(trim(JYLen3.Text), 0) + strtofloatdef(trim(JYLen4.Text), 0) + strtofloatdef(trim(JYLen5.Text), 0)) <= 0.00 then
Application.MessageBox('总长度不能小于等于0!', '提示', 0);
Exit;
if (Trim(JYLen1.Text) <> '') or (Trim(JYLen2.Text) <> '') or (Trim(JYLen3.Text) <> '') or (Trim(JYLen4.Text) <> '') or (Trim(JYLen5.Text) <> '') then
begin
if (strtofloatdef(trim(JYLen1.Text), 0) > 400) or (strtofloatdef(trim(JYLen2.Text), 0) > 400) or (strtofloatdef(trim(JYLen3.Text), 0) > 400) or (strtofloatdef(trim(JYLen4.Text), 0) > 400) or (strtofloatdef(trim(JYLen5.Text), 0) > 400) then
Application.MessageBox('长度不能大于400!', '提示', 0);
Exit;
end;
if (person1.Text <> '') and (JYLen1.Text = '') then
Application.MessageBox('选了挡车工1长度不能为0!', '提示', 0);
Exit;
if (person2.Text <> '') and (JYLen2.Text = '') then
Application.MessageBox('选了挡车工2长度不能为0!', '提示', 0);
Exit;
if (person3.Text <> '') and (JYLen3.Text = '') then
Application.MessageBox('选了挡车工3长度不能为0!', '提示', 0);
Exit;
if (person4.Text <> '') and (JYLen4.Text = '') then
Application.MessageBox('选了挡车工4长度不能为0!', '提示', 0);
Exit;
if (person5.Text <> '') and (JYLen5.Text = '') then
Application.MessageBox('选了挡车工5长度不能为0!', '提示', 0);
Exit;
if (strtofloatdef(trim(JYLen1.Text), 0) = 0) and (strtofloatdef(trim(JYLen2.Text), 0) = 0) and (strtofloatdef(trim(JYLen3.Text), 0) = 0) and (strtofloatdef(trim(JYLen4.Text), 0) = 0) and (strtofloatdef(trim(JYLen5.Text), 0) = 0) then
Application.MessageBox('长度不能为0!!', '提示', 0);
Exit;
if (strtofloatdef(trim(JYLen.Text), 0) <= 0.00) then
Application.MessageBox('长度不能小于等于0!!', '提示', 0);
Exit;
if (strtofloatdef(trim(JYLen2.Text), 0) + strtofloatdef(trim(JYLen1.Text), 0) + strtofloatdef(trim(JYLen3.Text), 0) + strtofloatdef(trim(JYLen4.Text), 0) + strtofloatdef(trim(JYLen5.Text), 0)) > (strtofloatdef(trim(JYLen.Text), 0) + 3) then
Application.MessageBox('产量和不能大于检验长度!!', '提示', 0);
Exit;
if SaveData() then
begin
Application.MessageBox('保存成功!', '提示', 0);