纱线出库加备注筛选

This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-09-18 10:45:39 +08:00
parent 532355b157
commit fd0cb5fec9
2 changed files with 54 additions and 8 deletions

View File

@ -1,6 +1,6 @@
object frmShaOutList: TfrmShaOutList object frmShaOutList: TfrmShaOutList
Left = 261 Left = 363
Top = 167 Top = 647
Width = 1356 Width = 1356
Height = 667 Height = 667
Caption = #32433#32447#20986#24211#21015#34920 Caption = #32433#32447#20986#24211#21015#34920
@ -21,7 +21,7 @@ object frmShaOutList: TfrmShaOutList
object ToolBar1: TToolBar object ToolBar1: TToolBar
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1340 Width = 1348
Height = 33 Height = 33
ButtonHeight = 30 ButtonHeight = 30
ButtonWidth = 59 ButtonWidth = 59
@ -107,7 +107,7 @@ object frmShaOutList: TfrmShaOutList
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Top = 33 Top = 33
Width = 1340 Width = 1348
Height = 61 Height = 61
Align = alTop Align = alTop
BevelInner = bvRaised BevelInner = bvRaised
@ -198,6 +198,13 @@ object frmShaOutList: TfrmShaOutList
Height = 12 Height = 12
Caption = #25260' '#22836 Caption = #25260' '#22836
end end
object Label7: TLabel
Left = 911
Top = 14
Width = 48
Height = 12
Caption = #22791' '#27880
end
object BegDate: TDateTimePicker object BegDate: TDateTimePicker
Left = 77 Left = 77
Top = 9 Top = 9
@ -315,12 +322,21 @@ object frmShaOutList: TfrmShaOutList
Height = 20 Height = 20
TabOrder = 11 TabOrder = 11
end end
object Note: TEdit
Tag = 1
Left = 963
Top = 9
Width = 92
Height = 20
TabOrder = 12
OnKeyPress = NoteKeyPress
end
end end
object cxGrid2: TcxGrid object cxGrid2: TcxGrid
Left = 0 Left = 0
Top = 116 Top = 116
Width = 1340 Width = 1348
Height = 512 Height = 520
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
@ -528,6 +544,7 @@ object frmShaOutList: TfrmShaOutList
Tag = 2 Tag = 2
Caption = #22791#27880 Caption = #22791#27880
DataBinding.FieldName = 'Note' DataBinding.FieldName = 'Note'
HeaderAlignmentHorz = taCenter
Width = 79 Width = 79
end end
object v1BCSPName: TcxGridDBColumn object v1BCSPName: TcxGridDBColumn
@ -552,7 +569,7 @@ object frmShaOutList: TfrmShaOutList
object cxTabControl1: TcxTabControl object cxTabControl1: TcxTabControl
Left = 0 Left = 0
Top = 94 Top = 94
Width = 1340 Width = 1348
Height = 22 Height = 22
Align = alTop Align = alTop
TabOrder = 3 TabOrder = 3
@ -565,7 +582,7 @@ object frmShaOutList: TfrmShaOutList
#24050#20316#24223#25968#25454) #24050#20316#24223#25968#25454)
OnChange = cxTabControl1Change OnChange = cxTabControl1Change
ClientRectBottom = 23 ClientRectBottom = 23
ClientRectRight = 1340 ClientRectRight = 1348
ClientRectTop = 23 ClientRectTop = 23
end end
object ADOQueryCmd: TADOQuery object ADOQueryCmd: TADOQuery

View File

@ -103,6 +103,8 @@ type
Tv1Column1: TcxGridDBColumn; Tv1Column1: TcxGridDBColumn;
cxStyleRepository1: TcxStyleRepository; cxStyleRepository1: TcxStyleRepository;
cxStyle1: TcxStyle; cxStyle1: TcxStyle;
Note: TEdit;
Label7: TLabel;
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
@ -123,6 +125,7 @@ type
procedure Y_SpecChange(Sender: TObject); procedure Y_SpecChange(Sender: TObject);
procedure cxTabControl1Change(Sender: TObject); procedure cxTabControl1Change(Sender: TObject);
procedure BatchNoKeyPress(Sender: TObject; var Key: Char); procedure BatchNoKeyPress(Sender: TObject; var Key: Char);
procedure NoteKeyPress(Sender: TObject; var Key: Char);
procedure ToolButton1Click(Sender: TObject); procedure ToolButton1Click(Sender: TObject);
procedure v1Column9CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); procedure v1Column9CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
procedure v2Column6CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean); procedure v2Column6CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
@ -494,6 +497,32 @@ begin
end; end;
end; end;
procedure TfrmShaOutList.NoteKeyPress(Sender: TObject; var Key: Char);
begin
if Key <> #13 then
Exit;
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Filtered := False;
Close;
sql.Clear;
sql.Add(' select A.* ');
sql.Add(' from CK_Yarn_CR A');
sql.Add('WHERE A.Note LIKE ' + QuotedStr('%' + Trim(Note.Text) + '%'));
sql.Add(' and isnull(CKName,'''')=''É´Ïß''');
SQL.Add(' and CRFlag=''³ö¿â'' ');
Open;
//ShowMessage(SQL.Text);
end;
SCreateCDS20(ADOQueryMain, CDS_Main);
SInitCDSData20(ADOQueryMain, CDS_Main);
finally
ADOQueryMain.EnableControls;
end;
end;
procedure TfrmShaOutList.ToolButton1Click(Sender: TObject); procedure TfrmShaOutList.ToolButton1Click(Sender: TObject);
var var
filepath: string; filepath: string;