diff --git a/纱线仓库/U_ShaOutList.dfm b/纱线仓库/U_ShaOutList.dfm index ab5cb65..98b050e 100644 --- a/纱线仓库/U_ShaOutList.dfm +++ b/纱线仓库/U_ShaOutList.dfm @@ -1,6 +1,6 @@ object frmShaOutList: TfrmShaOutList - Left = 261 - Top = 167 + Left = 363 + Top = 647 Width = 1356 Height = 667 Caption = #32433#32447#20986#24211#21015#34920 @@ -21,7 +21,7 @@ object frmShaOutList: TfrmShaOutList object ToolBar1: TToolBar Left = 0 Top = 0 - Width = 1340 + Width = 1348 Height = 33 ButtonHeight = 30 ButtonWidth = 59 @@ -107,7 +107,7 @@ object frmShaOutList: TfrmShaOutList object Panel1: TPanel Left = 0 Top = 33 - Width = 1340 + Width = 1348 Height = 61 Align = alTop BevelInner = bvRaised @@ -198,6 +198,13 @@ object frmShaOutList: TfrmShaOutList Height = 12 Caption = #25260' '#22836 end + object Label7: TLabel + Left = 911 + Top = 14 + Width = 48 + Height = 12 + Caption = #22791' '#27880 + end object BegDate: TDateTimePicker Left = 77 Top = 9 @@ -315,12 +322,21 @@ object frmShaOutList: TfrmShaOutList Height = 20 TabOrder = 11 end + object Note: TEdit + Tag = 1 + Left = 963 + Top = 9 + Width = 92 + Height = 20 + TabOrder = 12 + OnKeyPress = NoteKeyPress + end end object cxGrid2: TcxGrid Left = 0 Top = 116 - Width = 1340 - Height = 512 + Width = 1348 + Height = 520 Align = alClient TabOrder = 2 object Tv1: TcxGridDBTableView @@ -528,6 +544,7 @@ object frmShaOutList: TfrmShaOutList Tag = 2 Caption = #22791#27880 DataBinding.FieldName = 'Note' + HeaderAlignmentHorz = taCenter Width = 79 end object v1BCSPName: TcxGridDBColumn @@ -552,7 +569,7 @@ object frmShaOutList: TfrmShaOutList object cxTabControl1: TcxTabControl Left = 0 Top = 94 - Width = 1340 + Width = 1348 Height = 22 Align = alTop TabOrder = 3 @@ -565,7 +582,7 @@ object frmShaOutList: TfrmShaOutList #24050#20316#24223#25968#25454) OnChange = cxTabControl1Change ClientRectBottom = 23 - ClientRectRight = 1340 + ClientRectRight = 1348 ClientRectTop = 23 end object ADOQueryCmd: TADOQuery diff --git a/纱线仓库/U_ShaOutList.pas b/纱线仓库/U_ShaOutList.pas index 29352a7..5edc278 100644 --- a/纱线仓库/U_ShaOutList.pas +++ b/纱线仓库/U_ShaOutList.pas @@ -103,6 +103,8 @@ type Tv1Column1: TcxGridDBColumn; cxStyleRepository1: TcxStyleRepository; cxStyle1: TcxStyle; + Note: TEdit; + Label7: TLabel; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); @@ -123,6 +125,7 @@ type procedure Y_SpecChange(Sender: TObject); procedure cxTabControl1Change(Sender: TObject); procedure BatchNoKeyPress(Sender: TObject; var Key: Char); + procedure NoteKeyPress(Sender: TObject; var Key: Char); procedure ToolButton1Click(Sender: TObject); procedure v1Column9CustomDrawCell(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; +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); var filepath: string;