From b70e1519bbbb22ad58bcd21db760a0ba94eb6701 Mon Sep 17 00:00:00 2001 From: LZC <990351646@qq.com> Date: Mon, 24 Feb 2025 15:04:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=E4=BF=A1=E6=81=AF=E4=B8=A4?= =?UTF-8?q?=E4=B8=AA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- A02基础产品管理/U_ClothInfo.dfm | 65 ++++++++++---- A02基础产品管理/U_ClothInfo.pas | 151 ++++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+), 16 deletions(-) diff --git a/A02基础产品管理/U_ClothInfo.dfm b/A02基础产品管理/U_ClothInfo.dfm index bc6e29a..91c9949 100644 --- a/A02基础产品管理/U_ClothInfo.dfm +++ b/A02基础产品管理/U_ClothInfo.dfm @@ -10,7 +10,6 @@ inherited frmClothInfo: TfrmClothInfo FormStyle = fsMDIChild Position = poScreenCenter Visible = True - ExplicitLeft = -349 ExplicitWidth = 1556 ExplicitHeight = 884 PixelsPerInch = 96 @@ -23,7 +22,7 @@ inherited frmClothInfo: TfrmClothInfo Height = 30 AutoSize = True ButtonHeight = 30 - ButtonWidth = 99 + ButtonWidth = 83 Caption = 'ToolBar1' DisabledImages = DataLink_ClothInfo.cxImageList_bar Images = DataLink_ClothInfo.cxImageList_bar @@ -39,7 +38,7 @@ inherited frmClothInfo: TfrmClothInfo OnClick = TBRafreshClick end object TBAdd: TToolButton - Left = 71 + Left = 63 Top = 0 AutoSize = True Caption = #26032#22686 @@ -47,7 +46,7 @@ inherited frmClothInfo: TfrmClothInfo OnClick = TBAddClick end object TBCopy: TToolButton - Left = 142 + Left = 126 Top = 0 AutoSize = True Caption = #22797#21046 @@ -55,7 +54,7 @@ inherited frmClothInfo: TfrmClothInfo OnClick = TBCopyClick end object TBEdit: TToolButton - Left = 213 + Left = 189 Top = 0 AutoSize = True Caption = #20462#25913 @@ -63,7 +62,7 @@ inherited frmClothInfo: TfrmClothInfo OnClick = TBEditClick end object ToolButton1: TToolButton - Left = 284 + Left = 252 Top = 0 AutoSize = True Caption = #26597#30475 @@ -71,15 +70,31 @@ inherited frmClothInfo: TfrmClothInfo OnClick = ToolButton1Click end object TBMLEdit: TToolButton - Left = 355 + Left = 315 Top = 0 AutoSize = True Caption = #30446#24405#20462#25913 ImageIndex = 3 OnClick = TBMLEditClick end + object ToolButton8: TToolButton + Left = 402 + Top = 0 + AutoSize = True + Caption = #35774#20026#28909#38144 + ImageIndex = 3 + OnClick = ToolButton8Click + end + object ToolButton9: TToolButton + Left = 489 + Top = 0 + AutoSize = True + Caption = #21462#28040#28909#38144 + ImageIndex = 3 + OnClick = ToolButton9Click + end object TBDel: TToolButton - Left = 458 + Left = 576 Top = 0 AutoSize = True Caption = #21024#38500 @@ -87,15 +102,23 @@ inherited frmClothInfo: TfrmClothInfo OnClick = TBDelClick end object ToolButton3: TToolButton - Left = 529 + Left = 639 Top = 0 AutoSize = True Caption = #26631#31614#25171#21360 ImageIndex = 21 OnClick = ToolButton3Click end + object ToolButton7: TToolButton + Left = 726 + Top = 0 + AutoSize = True + Caption = #25209#37327#23548#20986 + ImageIndex = 21 + OnClick = ToolButton7Click + end object ToolButton4: TToolButton - Left = 632 + Left = 813 Top = 0 AutoSize = True Caption = #23548#20837 @@ -103,7 +126,7 @@ inherited frmClothInfo: TfrmClothInfo OnClick = ToolButton4Click end object TBExport: TToolButton - Left = 703 + Left = 876 Top = 0 AutoSize = True Caption = #23548#20986 @@ -111,7 +134,7 @@ inherited frmClothInfo: TfrmClothInfo OnClick = TBExportClick end object TBUP: TToolButton - Left = 774 + Left = 939 Top = 0 AutoSize = True Caption = #22270#29255#19978#20256 @@ -119,7 +142,7 @@ inherited frmClothInfo: TfrmClothInfo OnClick = TBUPClick end object ToolButton5: TToolButton - Left = 877 + Left = 1026 Top = 0 AutoSize = True Caption = #25805#20316#26085#24535 @@ -127,7 +150,7 @@ inherited frmClothInfo: TfrmClothInfo OnClick = ToolButton5Click end object ToolButton6: TToolButton - Left = 980 + Left = 1113 Top = 0 AutoSize = True Caption = #20462#25913#21382#21490 @@ -135,7 +158,7 @@ inherited frmClothInfo: TfrmClothInfo OnClick = ToolButton6Click end object ToolButton2: TToolButton - Left = 1083 + Left = 1200 Top = 0 AutoSize = True Caption = #20445#23384#26684#24335 @@ -143,7 +166,7 @@ inherited frmClothInfo: TfrmClothInfo OnClick = ToolButton2Click end object TBClose: TToolButton - Left = 1186 + Left = 1287 Top = 0 AutoSize = True Caption = #20851#38381 @@ -516,6 +539,8 @@ inherited frmClothInfo: TfrmClothInfo Align = alBottom Caption = 'Panel9' TabOrder = 1 + ExplicitLeft = -267 + ExplicitTop = 512 object Panel10: TPanel Left = 1 Top = 1 @@ -553,6 +578,7 @@ inherited frmClothInfo: TfrmClothInfo Align = alClient PopupMenu = PM_1 TabOrder = 2 + ExplicitLeft = 9 object Tv1: TcxGridDBTableView OnMouseDown = Tv1MouseDown Navigator.Buttons.CustomButtons = <> @@ -586,6 +612,13 @@ inherited frmClothInfo: TfrmClothInfo Options.Editing = False Width = 70 end + object Tv1Column11: TcxGridDBColumn + Caption = #28909#38144#27454 + DataBinding.FieldName = 'isrx' + DataBinding.IsNullValueType = True + HeaderAlignmentHorz = taCenter + Width = 76 + end object v1CYNo: TcxGridDBColumn Caption = #20135#21697#32534#21495 DataBinding.FieldName = 'C_Code' diff --git a/A02基础产品管理/U_ClothInfo.pas b/A02基础产品管理/U_ClothInfo.pas index b8ff1e2..b3a59cc 100644 --- a/A02基础产品管理/U_ClothInfo.pas +++ b/A02基础产品管理/U_ClothInfo.pas @@ -151,6 +151,10 @@ type cxGridLevel2: TcxGridLevel; cxSplitter2: TcxSplitter; cxSplitter3: TcxSplitter; + ToolButton7: TToolButton; + Tv1Column11: TcxGridDBColumn; + ToolButton8: TToolButton; + ToolButton9: TToolButton; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBCloseClick(Sender: TObject); procedure TBDelClick(Sender: TObject); @@ -184,6 +188,9 @@ type procedure ToolButton5Click(Sender: TObject); procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure ToolButton6Click(Sender: TObject); + procedure ToolButton7Click(Sender: TObject); + procedure ToolButton8Click(Sender: TObject); + procedure ToolButton9Click(Sender: TObject); private { Private declarations } CurrentPage, RecordsNumber: Integer; @@ -979,6 +986,150 @@ begin end; end; +procedure TfrmClothInfo.ToolButton7Click(Sender: TObject); +var + WSql: string; +begin + if CDS_1.IsEmpty then + Exit; + Tv1.OnFocusedRecordChanged := nil; + if CDS_1.Locate('SSel', True, []) = False then + begin +// Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged; + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + + WSql := ''; + CDS_1.DisableControls; + + with CDS_1 do + begin + First; + while not Eof do + begin + if CDS_1.fieldbyname('SSel').AsBoolean then + begin + if WSql <> '' then + begin + WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString)); + end + else + begin + WSql := QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString)); + end; + end; + Next; + end; + end; + + CDS_1.Locate('SSel', True, []); +// Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged; + CDS_1.EnableControls; + + try + frmLabelPrint := TfrmLabelPrint.Create(Application); + with frmLabelPrint do + begin + FLMType := 'ClothInfoPrint2'; + FFiltration1 := WSql; + if ShowModal = 1 then + begin +// Self.InitGrid(); + end; + end; + finally + frmLabelPrint.Free; + end; +end; + +procedure TfrmClothInfo.ToolButton8Click(Sender: TObject); +var + MCTID: string; +begin + if CDS_1.IsEmpty then + exit; + if CDS_1.Locate('ssel', true, []) = false then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + + try + with CDS_1 do + begin + DisableControls; + First; + while not eof do + begin + if fieldbyname('ssel').AsBoolean then + begin + with ADOQueryCmd do + begin + close; + sql.Clear; + sql.Add('update BS_Cloth_Info SET isrx='''' '); + sql.Add('where BCIID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString))); + execsql; + end; + end; + next; + end; + First; + EnableControls; + end; + application.MessageBox('ɹ', 'ʾϢ'); + initGrid(); + except + CDS_1.EnableControls; + application.MessageBox('ʧܣ', 'ʾϢ', 0); + end; + +end; + +procedure TfrmClothInfo.ToolButton9Click(Sender: TObject); +var + MCTID: string; +begin + if CDS_1.IsEmpty then + exit; + if CDS_1.Locate('ssel', true, []) = false then + begin + Application.MessageBox('ûѡ!', 'ʾ', 0); + Exit; + end; + + try + with CDS_1 do + begin + DisableControls; + First; + while not eof do + begin + if fieldbyname('ssel').AsBoolean then + begin + with ADOQueryCmd do + begin + close; + sql.Clear; + sql.Add('update BS_Cloth_Info SET isrx=NULL '); + sql.Add('where BCIID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString))); + execsql; + end; + end; + next; + end; + First; + EnableControls; + end; + application.MessageBox('ɹ', 'ʾϢ'); + initGrid(); + except + CDS_1.EnableControls; + application.MessageBox('ʧܣ', 'ʾϢ', 0); + end; +end; + procedure TfrmClothInfo.Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin InitImage();