From da9fa0cc4afdcfd9e5d72eead053ea7d99264039 Mon Sep 17 00:00:00 2001 From: "DESKTOP-E401PHE\\Administrator" Date: Wed, 22 Oct 2025 16:34:08 +0800 Subject: [PATCH] ` --- 打卷检验管理/TradeManage.dof | 2 +- 打卷检验管理/U_ProductOrderLBNameSet.dfm | 46 ++++-- 打卷检验管理/U_ProductOrderLBNameSet.pas | 182 ++++++++++++++++++++++- 3 files changed, 216 insertions(+), 14 deletions(-) diff --git a/打卷检验管理/TradeManage.dof b/打卷检验管理/TradeManage.dof index 2de4de3..7b89544 100644 --- a/打卷检验管理/TradeManage.dof +++ b/打卷检验管理/TradeManage.dof @@ -101,7 +101,7 @@ DebugSourceDirs= UsePackages=0 [Parameters] RunParams= -HostApplication=D:\Ŀ\Ŀ\÷\\testDll.exe +HostApplication=D:\Dp7Repo\Ŀ\D7DJxindefeng\\testDll.exe Launcher= UseLauncher=0 DebugCWD= diff --git a/打卷检验管理/U_ProductOrderLBNameSet.dfm b/打卷检验管理/U_ProductOrderLBNameSet.dfm index 47e932a..6e38f6b 100644 --- a/打卷检验管理/U_ProductOrderLBNameSet.dfm +++ b/打卷检验管理/U_ProductOrderLBNameSet.dfm @@ -24,7 +24,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet Height = 62 AutoSize = True ButtonHeight = 30 - ButtonWidth = 107 + ButtonWidth = 119 Caption = 'ToolBar1' Color = clSkyBlue Flat = True @@ -134,19 +134,19 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet AutoSize = True Caption = #38271#24230#20301#25968 ImageIndex = 60 - Wrap = True OnClick = ToolButton6Click end object ToolButton9: TToolButton - Left = 0 - Top = 30 + Left = 984 + Top = 0 AutoSize = True Caption = #37325#37327#20301#25968 ImageIndex = 60 + Wrap = True OnClick = ToolButton9Click end object ToolButton13: TToolButton - Left = 87 + Left = 0 Top = 30 AutoSize = True Caption = #27599#21253#21367#25968 @@ -154,7 +154,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet OnClick = ToolButton13Click end object ToolButton14: TToolButton - Left = 174 + Left = 87 Top = 30 AutoSize = True Caption = #27599#21367#38271#24230 @@ -162,7 +162,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet OnClick = ToolButton14Click end object ToolButton7: TToolButton - Left = 261 + Left = 174 Top = 30 AutoSize = True Caption = #39044#35272#21367#26631#31614 @@ -170,14 +170,14 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet OnClick = ToolButton7Click end object ToolButton15: TToolButton - Left = 360 + Left = 273 Top = 30 Caption = #39044#35272#20013#25991#26631#31614 ImageIndex = 57 OnClick = ToolButton15Click end object ToolButton8: TToolButton - Left = 467 + Left = 392 Top = 30 AutoSize = True Caption = #39044#35272#21253#26631#31614 @@ -185,7 +185,7 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet OnClick = ToolButton8Click end object PiZhong: TEdit - Left = 566 + Left = 491 Top = 30 Width = 121 Height = 30 @@ -197,8 +197,32 @@ object frmProductOrderLBNameSet: TfrmProductOrderLBNameSet ParentFont = False TabOrder = 0 end + object ToolButton16: TToolButton + Left = 612 + Top = 30 + AutoSize = True + Caption = #26159#35835#21462#30721#34920#21333#20301 + ImageIndex = 56 + OnClick = ToolButton16Click + end + object ToolButton18: TToolButton + Left = 735 + Top = 30 + AutoSize = True + Caption = #21542#35835#21462#30721#34920#21333#20301 + ImageIndex = 58 + OnClick = ToolButton18Click + end + object ToolButton17: TToolButton + Left = 858 + Top = 30 + AutoSize = True + Caption = #25171#21367#38271#24230#21333#20301 + ImageIndex = 57 + OnClick = ToolButton17Click + end object TBClose: TToolButton - Left = 687 + Left = 969 Top = 30 AutoSize = True Caption = #20851#38381 diff --git a/打卷检验管理/U_ProductOrderLBNameSet.pas b/打卷检验管理/U_ProductOrderLBNameSet.pas index b4b8247..3663d1c 100644 --- a/打卷检验管理/U_ProductOrderLBNameSet.pas +++ b/打卷检验管理/U_ProductOrderLBNameSet.pas @@ -1,7 +1,7 @@ unit U_ProductOrderLBNameSet; interface - + uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData, @@ -132,6 +132,9 @@ type ToolButton15: TToolButton; Tv1Column6: TcxGridDBColumn; Tv1Column7: TcxGridDBColumn; + ToolButton16: TToolButton; + ToolButton17: TToolButton; + ToolButton18: TToolButton; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); @@ -170,6 +173,9 @@ type procedure ToolButton15Click(Sender: TObject); procedure Tv1Column6PropertiesEditValueChanged(Sender: TObject); procedure Tv1Column7PropertiesEditValueChanged(Sender: TObject); + procedure ToolButton17Click(Sender: TObject); + procedure ToolButton16Click(Sender: TObject); + procedure ToolButton18Click(Sender: TObject); private DQdate: TDateTime; procedure InitGrid(); @@ -1585,7 +1591,7 @@ begin end; tv1.Controller.EditingController.ShowEdit(); - with ADOQueryCmd do + with ADOQueryCmd do begin Close; sql.Clear; @@ -1621,5 +1627,177 @@ begin end; end; +procedure TfrmProductOrderLBNameSet.ToolButton17Click(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; + + 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 DJDW=' + Trim(PiZhong.Text)); + sql.Add(' where Subid=''' + Trim(Order_Main.fieldbyname('Subid').AsString) + ''''); + ExecSQL; + end; + with Order_Main do + begin + Edit; + FieldByName('DJDW').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; + + +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; + + 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 PRTdqdw='''''); + sql.Add(' where Subid=''' + Trim(Order_Main.fieldbyname('Subid').AsString) + ''''); + ExecSQL; + end; + with Order_Main do + begin + Edit; + FieldByName('PRTdqdw').Value := ''; + 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; + +procedure TfrmProductOrderLBNameSet.ToolButton18Click(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; + + 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 PRTdqdw='''''); + sql.Add(' where Subid=''' + Trim(Order_Main.fieldbyname('Subid').AsString) + ''''); + ExecSQL; + end; + with Order_Main do + begin + Edit; + FieldByName('PRTdqdw').Value := ''; + 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.