From 093744eaa9669f0908cd3646d6279631eef4ad47 Mon Sep 17 00:00:00 2001 From: funa <1559646174@qq.com> Date: Mon, 28 Sep 2026 17:25:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81=20=E6=A3=80=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- A02基础产品管理/U_TatClothInfo.dfm | 4 +-- A02基础产品管理/U_TatClothInfoInput.dfm | 14 ++++++--- A02基础产品管理/U_TatClothInfoInput.pas | 13 +++++++++ E03梭织坯布检验/U_TatInspEdit.dfm | 13 +++++++-- E03梭织坯布检验/U_TatInspEdit.pas | 2 +- E03梭织坯布检验/U_TatMachInsp.dfm | 4 ++- E03梭织坯布检验/U_TatMachInsp.pas | 39 +++++++++++++++++++++++++ 7 files changed, 77 insertions(+), 12 deletions(-) diff --git a/A02基础产品管理/U_TatClothInfo.dfm b/A02基础产品管理/U_TatClothInfo.dfm index 74a9b73..e60f4a7 100644 --- a/A02基础产品管理/U_TatClothInfo.dfm +++ b/A02基础产品管理/U_TatClothInfo.dfm @@ -7,6 +7,7 @@ inherited frmTatClothInfo: TfrmTatClothInfo FormStyle = fsMDIChild Position = poScreenCenter Visible = True + ExplicitLeft = -271 ExplicitWidth = 1460 ExplicitHeight = 741 PixelsPerInch = 96 @@ -346,8 +347,6 @@ inherited frmTatClothInfo: TfrmTatClothInfo Align = alClient PopupMenu = PM_1 TabOrder = 0 - ExplicitTop = 42 - ExplicitHeight = 370 object Tv1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> Navigator.Buttons.Delete.Enabled = False @@ -552,7 +551,6 @@ inherited frmTatClothInfo: TfrmTatClothInfo Align = alTop BevelOuter = bvNone TabOrder = 1 - ExplicitTop = 2 object Panel4: TPanel Left = 0 Top = 0 diff --git a/A02基础产品管理/U_TatClothInfoInput.dfm b/A02基础产品管理/U_TatClothInfoInput.dfm index 0cbd16a..88d3cd7 100644 --- a/A02基础产品管理/U_TatClothInfoInput.dfm +++ b/A02基础产品管理/U_TatClothInfoInput.dfm @@ -24,7 +24,7 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput Height = 38 AutoSize = True ButtonHeight = 38 - ButtonWidth = 75 + ButtonWidth = 91 Caption = 'ToolBar1' Color = clWhite DisabledImages = DataLink_ClothInfo.ImageList_new32 @@ -50,10 +50,18 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput ImageIndex = 22 OnClick = ToolButton6Click end - object TBClose: TToolButton + object ToolButton9: TToolButton Left = 142 Top = 0 AutoSize = True + Caption = #20445#23384#26684#24335 + ImageIndex = 16 + OnClick = ToolButton9Click + end + object TBClose: TToolButton + Left = 237 + Top = 0 + AutoSize = True Caption = #20851#38381 ImageIndex = 7 OnClick = TBCloseClick @@ -72,8 +80,6 @@ object frmTatClothInfoInput: TfrmTatClothInfoInput ParentColor = False ParentCtl3D = False TabOrder = 1 - ExplicitLeft = -8 - ExplicitTop = 32 object Label1: TLabel Left = 31 Top = 11 diff --git a/A02基础产品管理/U_TatClothInfoInput.pas b/A02基础产品管理/U_TatClothInfoInput.pas index 66f1d87..95172d9 100644 --- a/A02基础产品管理/U_TatClothInfoInput.pas +++ b/A02基础产品管理/U_TatClothInfoInput.pas @@ -223,6 +223,7 @@ type C_LatitudeBatchNo: TEdit; Label14: TLabel; Label16: TLabel; + ToolButton9: TToolButton; procedure FormShow(Sender: TObject); procedure TBCloseClick(Sender: TObject); procedure ToolButton1Click(Sender: TObject); @@ -242,6 +243,7 @@ type procedure ToolButton8Click(Sender: TObject); procedure Edit1KeyPress(Sender: TObject; var Key: Char); procedure Button1Click(Sender: TObject); + procedure ToolButton9Click(Sender: TObject); private canshu1: string; Fint: Integer; @@ -397,6 +399,9 @@ end; procedure TfrmTatClothInfoInput.FormShow(Sender: TObject); begin + inherited; + ReadCxGrid(self.Caption + 'TV1', Tv1, '¾­ɴÅä±È'); + ReadCxGrid(self.Caption + 'TV2', Tv2, 'γɴÅä±È'); InitGrid(); if CopyInt = 1 then begin @@ -985,5 +990,13 @@ begin CALCYarnQty(); end; +procedure TfrmTatClothInfoInput.ToolButton9Click(Sender: TObject); +begin + + inherited; + WriteCxGrid(self.Caption + 'TV1', Tv1, '¾­ɴÅä±È'); + WriteCxGrid(self.Caption + 'TV2', Tv2, 'γɴÅä±È'); +end; + end. diff --git a/E03梭织坯布检验/U_TatInspEdit.dfm b/E03梭织坯布检验/U_TatInspEdit.dfm index de49e4b..7d6de7f 100644 --- a/E03梭织坯布检验/U_TatInspEdit.dfm +++ b/E03梭织坯布检验/U_TatInspEdit.dfm @@ -91,7 +91,6 @@ object frmTatInspEdit: TfrmTatInspEdit Color = clWhite ParentBackground = False TabOrder = 1 - ExplicitTop = 18 object Label1: TLabel Left = 745 Top = 55 @@ -265,10 +264,9 @@ object frmTatInspEdit: TfrmTatInspEdit Height = 344 Align = alClient TabOrder = 2 - ExplicitTop = 97 - ExplicitHeight = 364 object TV1: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> + ScrollbarAnnotations.CustomAnnotations = <> DataController.Filter.AutoDataSetFilter = True DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] DataController.Summary.DefaultGroupSummaryItems = <> @@ -295,6 +293,7 @@ object frmTatInspEdit: TfrmTatInspEdit object TV1Column1: TcxGridDBColumn Caption = #30133#28857 DataBinding.FieldName = 'CIFName' + DataBinding.IsNullValueType = True PropertiesClassName = 'TcxButtonEditProperties' Properties.Buttons = < item @@ -308,6 +307,7 @@ object frmTatInspEdit: TfrmTatInspEdit object cxGridDBColumn2: TcxGridDBColumn Caption = #30133#28857#21517#31216 DataBinding.FieldName = 'CIFName' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter Options.Focusing = False Options.Sorting = False @@ -316,6 +316,7 @@ object frmTatInspEdit: TfrmTatInspEdit object cxGridDBColumn3: TcxGridDBColumn Caption = #20301#32622#36215 DataBinding.FieldName = 'CIFbeg' + DataBinding.IsNullValueType = True PropertiesClassName = 'TcxTextEditProperties' Properties.OnEditValueChanged = cxGridDBColumn3PropertiesEditValueChanged HeaderAlignmentHorz = taCenter @@ -326,6 +327,7 @@ object frmTatInspEdit: TfrmTatInspEdit object cxGridDBColumn4: TcxGridDBColumn Caption = #20301#32622#27490 DataBinding.FieldName = 'CIFend' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter HeaderGlyphAlignmentHorz = taCenter Width = 79 @@ -333,6 +335,7 @@ object frmTatInspEdit: TfrmTatInspEdit object cxGridDBColumn5: TcxGridDBColumn Caption = #38271#24230 DataBinding.FieldName = 'CIFQty' + DataBinding.IsNullValueType = True PropertiesClassName = 'TcxTextEditProperties' HeaderAlignmentHorz = taCenter Options.Sorting = False @@ -341,6 +344,7 @@ object frmTatInspEdit: TfrmTatInspEdit object cxGridDBColumn6: TcxGridDBColumn Caption = #21407#22240 DataBinding.FieldName = 'CDReason' + DataBinding.IsNullValueType = True Visible = False HeaderAlignmentHorz = taCenter Options.Sorting = False @@ -348,12 +352,14 @@ object frmTatInspEdit: TfrmTatInspEdit end object cxGridDBColumn7: TcxGridDBColumn DataBinding.FieldName = 'CDQty' + DataBinding.IsNullValueType = True Visible = False Width = 60 end object cxGridDBColumn8: TcxGridDBColumn Caption = #25187#20998 DataBinding.FieldName = 'CIFPoints' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter Options.Editing = False Width = 73 @@ -361,6 +367,7 @@ object frmTatInspEdit: TfrmTatInspEdit object cxGridDBColumn9: TcxGridDBColumn Caption = #20010#25968 DataBinding.FieldName = 'CIFNumber' + DataBinding.IsNullValueType = True HeaderAlignmentHorz = taCenter Options.Editing = False Width = 69 diff --git a/E03梭织坯布检验/U_TatInspEdit.pas b/E03梭织坯布检验/U_TatInspEdit.pas index 57edac6..6f43c82 100644 --- a/E03梭织坯布检验/U_TatInspEdit.pas +++ b/E03梭织坯布检验/U_TatInspEdit.pas @@ -9,7 +9,7 @@ uses cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxButtonEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore, - dxSkinsDefaultPainters, dxDateRanges; + dxSkinsDefaultPainters, dxDateRanges, dxSkinWXI, dxScrollbarAnnotations; type TfrmTatInspEdit = class(TForm) diff --git a/E03梭织坯布检验/U_TatMachInsp.dfm b/E03梭织坯布检验/U_TatMachInsp.dfm index c530a44..4489a85 100644 --- a/E03梭织坯布检验/U_TatMachInsp.dfm +++ b/E03梭织坯布检验/U_TatMachInsp.dfm @@ -7,6 +7,7 @@ FormStyle = fsMDIChild Position = poScreenCenter Visible = True + ExplicitTop = -137 ExplicitWidth = 1556 ExplicitHeight = 807 PixelsPerInch = 96 @@ -2734,7 +2735,7 @@ Height = 193 Align = alBottom TabOrder = 1 - Properties.ActivePage = 查看 + Properties.ActivePage = cxTabSheet1 Properties.CustomButtons.Buttons = <> ClientRectBottom = 191 ClientRectLeft = 2 @@ -2753,6 +2754,7 @@ object Tv2: TcxGridDBTableView Navigator.Buttons.CustomButtons = <> ScrollbarAnnotations.CustomAnnotations = <> + OnCellDblClick = Tv2CellDblClick DataController.DataSource = DS_2 DataController.Filter.AutoDataSetFilter = True DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost] diff --git a/E03梭织坯布检验/U_TatMachInsp.pas b/E03梭织坯布检验/U_TatMachInsp.pas index 3a86216..060ff80 100644 --- a/E03梭织坯布检验/U_TatMachInsp.pas +++ b/E03梭织坯布检验/U_TatMachInsp.pas @@ -367,6 +367,7 @@ type procedure Button6Click(Sender: TObject); procedure Button8Click(Sender: TObject); procedure Tv3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + procedure Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); procedure edtYJClick(Sender: TObject); procedure Pic_Image1DblClick(Sender: TObject); procedure Tv3CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); @@ -1483,6 +1484,44 @@ begin InitCDGridCX(CDS_3.FieldByName('CIID').AsString); end; +procedure TfrmTatMachInsp.Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean); +begin + if CDS_2.IsEmpty then + Exit; + if Application.MessageBox('ȷ¶¨Ҫɾ³ý¸ÃÌõ´õãÊý¾ÝÂð£¿', 'Ìáʾ', 32 + 4) <> IDYES then + Exit; + //Òѱ£´æ¹ýµĴõ㣨CIFID·ǿգ©ֱ½Óɾ³ýÊý¾ݿâ¼Ç¼ + if Trim(CDS_2.fieldbyname('CIFID').AsString) <> '' then + begin + ADOCmd.Connection.BeginTrans; + try + with ADOCmd do + begin + Close; + sql.Clear; + sql.Add('delete Tat_Cloth_Inspect_Flaw where CIFID=' + quotedstr(Trim(CDS_2.fieldbyname('CIFID').AsString))); + ExecSQL; + end; +////////////////// ¸üоíºŴõãÐÅϢ ////////////////// + with ADOCmd do + begin + Close; + sql.Clear; + sql.Add('exec P_Tat_Insp_Up @CIID=' + quotedstr(Trim(CDS_2.fieldbyname('CIID').AsString))); + sql.Add(',@InspType=' + QuotedStr('µ¥¾íÐ޸Ä')); + ExecSQL; + end; +////////////////// ¸üоíºŴõãÐÅϢ ////////////////// + ADOCmd.Connection.CommitTrans; + except + ADOCmd.Connection.RollbackTrans; + application.MessageBox(PChar(Exception(ExceptObject).Message), 'ÌáʾÐÅϢ', 0); + Exit; + end; + end; + CDS_2.Delete; +end; + function TfrmTatMachInsp.SaveData(): Boolean; var maxno, MCIID, strsql: string;