This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-05-26 14:27:08 +08:00
parent 0a5d2461f5
commit 19acdae3f5
19 changed files with 1456 additions and 413 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@
*.~dpr *.~dpr
*.identcache *.identcache
*.local *.local
T02贸易汇总仓库.zip

View File

@ -48,7 +48,8 @@ uses
U_ClothInfoLog in 'U_ClothInfoLog.pas' {frmClothInfoLog}, U_ClothInfoLog in 'U_ClothInfoLog.pas' {frmClothInfoLog},
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas', uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp}, U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel}; U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel},
U_Edit in 'U_Edit.pas' {frmEdit};
{$R *.res} {$R *.res}

View File

@ -246,6 +246,10 @@
<Form>frmCompanySel</Form> <Form>frmCompanySel</Form>
<FormType>dfm</FormType> <FormType>dfm</FormType>
</DCCReference> </DCCReference>
<DCCReference Include="U_Edit.pas">
<Form>frmEdit</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Debug"> <BuildConfiguration Include="Debug">
<Key>Cfg_2</Key> <Key>Cfg_2</Key>
<CfgParent>Base</CfgParent> <CfgParent>Base</CfgParent>

View File

@ -3,8 +3,8 @@ object frmClothInfoInput: TfrmClothInfoInput
Top = 231 Top = 231
Anchors = [] Anchors = []
Caption = #20135#21697#20449#24687#24405#20837 Caption = #20135#21697#20449#24687#24405#20837
ClientHeight = 676 ClientHeight = 800
ClientWidth = 1284 ClientWidth = 1301
Color = clBtnFace Color = clBtnFace
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
Font.Color = clWindowText Font.Color = clWindowText
@ -19,7 +19,7 @@ object frmClothInfoInput: TfrmClothInfoInput
object ToolBar1: TToolBar object ToolBar1: TToolBar
Left = 0 Left = 0
Top = 0 Top = 0
Width = 1284 Width = 1301
Height = 30 Height = 30
AutoSize = True AutoSize = True
ButtonHeight = 30 ButtonHeight = 30
@ -68,7 +68,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 0 Left = 0
Top = 30 Top = 30
Width = 751 Width = 751
Height = 646 Height = 770
Align = alLeft Align = alLeft
BevelInner = bvNone BevelInner = bvNone
BevelOuter = bvNone BevelOuter = bvNone
@ -95,9 +95,11 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 0 Left = 0
Top = 0 Top = 0
Width = 749 Width = 749
Height = 385 Height = 529
Align = alTop Align = alTop
TabOrder = 1 TabOrder = 1
ExplicitLeft = -4
ExplicitTop = -4
object Label1: TLabel object Label1: TLabel
Left = 37 Left = 37
Top = 18 Top = 18
@ -134,8 +136,8 @@ object frmClothInfoInput: TfrmClothInfoInput
Caption = #33457#22411#32534#21495 Caption = #33457#22411#32534#21495
end end
object Label7: TLabel object Label7: TLabel
Left = 385 Left = 377
Top = 454 Top = 598
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #20013#25991#25104#20998 Caption = #20013#25991#25104#20998
@ -156,16 +158,16 @@ object frmClothInfoInput: TfrmClothInfoInput
Caption = #22791#27880 Caption = #22791#27880
end end
object Label11: TLabel object Label11: TLabel
Left = 364 Left = 356
Top = 454 Top = 598
Width = 32 Width = 32
Height = 21 Height = 21
Caption = #24067#31181 Caption = #24067#31181
Visible = False Visible = False
end end
object Label10: TLabel object Label10: TLabel
Left = 468 Left = 460
Top = 462 Top = 606
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #33521#25991#25104#20998 Caption = #33521#25991#25104#20998
@ -193,8 +195,8 @@ object frmClothInfoInput: TfrmClothInfoInput
Caption = #20379#24212#21830 Caption = #20379#24212#21830
end end
object Label21: TLabel object Label21: TLabel
Left = 309 Left = 301
Top = 454 Top = 598
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #33521#25991#21697#21517 Caption = #33521#25991#21697#21517
@ -250,11 +252,11 @@ object frmClothInfoInput: TfrmClothInfoInput
Caption = #20027#24067 Caption = #20027#24067
end end
object Label24: TLabel object Label24: TLabel
Left = 425 Left = 34
Top = 347 Top = 385
Width = 32 Width = 41
Height = 21 Height = 21
Caption = #27425#24067 Caption = #27425#24067'1'
end end
object Label25: TLabel object Label25: TLabel
Left = 37 Left = 37
@ -264,13 +266,69 @@ object frmClothInfoInput: TfrmClothInfoInput
Caption = #35745#20215#21333#20301 Caption = #35745#20215#21333#20301
end end
object Label12: TLabel object Label12: TLabel
Left = 363 Left = 355
Top = 481 Top = 625
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #32433#32447#24418#24577 Caption = #32433#32447#24418#24577
Visible = False Visible = False
end end
object Label26: TLabel
Left = 32
Top = 421
Width = 41
Height = 21
Caption = #27425#24067'2'
end
object Label27: TLabel
Left = 34
Top = 457
Width = 41
Height = 21
Caption = #27425#24067'3'
end
object Label28: TLabel
Left = 34
Top = 492
Width = 41
Height = 21
Caption = #27425#24067'4'
end
object Label29: TLabel
Left = 419
Top = 385
Width = 73
Height = 21
Caption = #21152#24037#26041#24335'1'
end
object Label30: TLabel
Left = 419
Top = 421
Width = 73
Height = 21
Caption = #21152#24037#26041#24335'2'
end
object Label31: TLabel
Left = 419
Top = 457
Width = 73
Height = 21
Caption = #21152#24037#26041#24335'3'
end
object Label32: TLabel
Left = 419
Top = 492
Width = 73
Height = 21
Caption = #21152#24037#26041#24335'4'
end
object Label33: TLabel
Left = 419
Top = 348
Width = 64
Height = 21
Caption = #21152#24037#26041#24335
end
object C_Code: TcxTextEdit object C_Code: TcxTextEdit
Tag = 2 Tag = 2
Left = 119 Left = 119
@ -307,8 +365,8 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object C_Composition: TcxButtonEdit object C_Composition: TcxButtonEdit
Tag = 2 Tag = 2
Left = 467 Left = 459
Top = 454 Top = 598
Hint = 'C_Composition/'#25104#20998 Hint = 'C_Composition/'#25104#20998
Properties.Buttons = < Properties.Buttons = <
item item
@ -325,8 +383,8 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object C_Spec: TcxButtonEdit object C_Spec: TcxButtonEdit
Tag = 2 Tag = 2
Left = 504 Left = 510
Top = 91 Top = 88
Hint = 'C_Spec/'#35268#26684 Hint = 'C_Spec/'#35268#26684
Properties.Buttons = < Properties.Buttons = <
item item
@ -400,8 +458,8 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object GC_Name: TcxTextEdit object GC_Name: TcxTextEdit
Tag = 2 Tag = 2
Left = 446 Left = 438
Top = 454 Top = 598
TabOrder = 9 TabOrder = 9
Visible = False Visible = False
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
@ -409,8 +467,8 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object C_EComposition: TcxButtonEdit object C_EComposition: TcxButtonEdit
Tag = 2 Tag = 2
Left = 472 Left = 464
Top = 454 Top = 598
Hint = 'C_EComposition/'#25104#20998 Hint = 'C_EComposition/'#25104#20998
Properties.Buttons = < Properties.Buttons = <
item item
@ -435,8 +493,8 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object FtyNo: TcxTextEdit object FtyNo: TcxTextEdit
Tag = 2 Tag = 2
Left = 81 Left = 73
Top = 474 Top = 618
TabOrder = 12 TabOrder = 12
Visible = False Visible = False
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
@ -452,8 +510,8 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object C_EName: TcxTextEdit object C_EName: TcxTextEdit
Tag = 2 Tag = 2
Left = 491 Left = 483
Top = 454 Top = 598
TabOrder = 14 TabOrder = 14
Visible = False Visible = False
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
@ -496,8 +554,8 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object C_FromName2: TcxButtonEdit object C_FromName2: TcxButtonEdit
Tag = 7 Tag = 7
Left = 510 Left = 119
Top = 343 Top = 381
Properties.Buttons = < Properties.Buttons = <
item item
Default = True Default = True
@ -532,26 +590,159 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object C_YarnSpec: TcxTextEdit object C_YarnSpec: TcxTextEdit
Tag = 2 Tag = 2
Left = 364 Left = 356
Top = 510 Top = 654
TabOrder = 22 TabOrder = 22
Visible = False Visible = False
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
Width = 234 Width = 234
end end
object C_FromName3: TcxButtonEdit
Tag = 7
Left = 119
Top = 417
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
Properties.OnButtonClick = C_FromName3PropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 23
OnDblClick = C_GramWeightDblClick
Width = 234
end
object C_FromName4: TcxButtonEdit
Tag = 7
Left = 119
Top = 453
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
Properties.OnButtonClick = C_FromName2PropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 24
OnDblClick = C_GramWeightDblClick
Width = 234
end
object C_FromName5: TcxButtonEdit
Tag = 7
Left = 119
Top = 488
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
Properties.OnButtonClick = C_FromName2PropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 25
OnDblClick = C_GramWeightDblClick
Width = 234
end
object Process2: TcxButtonEdit
Tag = 7
Left = 504
Top = 381
Hint = 'Process2/'#21152#24037#26041#24335'1'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 26
OnDblClick = C_GramWeightDblClick
Width = 234
end
object Process3: TcxButtonEdit
Tag = 7
Left = 504
Top = 418
Hint = 'Process3/'#21152#24037#26041#24335'2'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 27
OnDblClick = C_GramWeightDblClick
Width = 234
end
object Process4: TcxButtonEdit
Tag = 7
Left = 504
Top = 453
Hint = 'Process4/'#21152#24037#26041#24335'3'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 28
OnDblClick = C_GramWeightDblClick
Width = 234
end
object Process5: TcxButtonEdit
Tag = 7
Left = 504
Top = 488
Hint = 'Process5/'#21152#24037#26041#24335'4'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 29
OnDblClick = C_GramWeightDblClick
Width = 234
end
object Process: TcxButtonEdit
Tag = 7
Left = 504
Top = 344
Hint = 'Process/'#21152#24037#26041#24335
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 30
OnDblClick = C_GramWeightDblClick
Width = 234
end
end end
object Panel3: TPanel object Panel3: TPanel
Left = 0 Left = 0
Top = 385 Top = 529
Width = 749 Width = 749
Height = 259 Height = 239
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
object Panel4: TPanel object Panel4: TPanel
Left = 1 Left = 1
Top = 1 Top = 1
Width = 395 Width = 395
Height = 257 Height = 237
Align = alLeft Align = alLeft
Caption = 'Panel4' Caption = 'Panel4'
TabOrder = 0 TabOrder = 0
@ -590,11 +781,9 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 1 Left = 1
Top = 31 Top = 31
Width = 393 Width = 393
Height = 225 Height = 205
Align = alClient Align = alClient
TabOrder = 1 TabOrder = 1
ExplicitLeft = -3
ExplicitTop = 37
object TV2: TcxGridDBTableView object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <> ScrollbarAnnotations.CustomAnnotations = <>
@ -646,12 +835,10 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 396 Left = 396
Top = 1 Top = 1
Width = 352 Width = 352
Height = 257 Height = 237
Align = alClient Align = alClient
Caption = 'Panel5' Caption = 'Panel5'
TabOrder = 1 TabOrder = 1
ExplicitLeft = 393
ExplicitTop = 6
object ToolBar4: TToolBar object ToolBar4: TToolBar
Left = 1 Left = 1
Top = 1 Top = 1
@ -687,11 +874,9 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 1 Left = 1
Top = 31 Top = 31
Width = 350 Width = 350
Height = 225 Height = 205
Align = alClient Align = alClient
TabOrder = 1 TabOrder = 1
ExplicitLeft = -2
ExplicitTop = 37
object TV3: TcxGridDBTableView object TV3: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <> ScrollbarAnnotations.CustomAnnotations = <>
@ -744,18 +929,18 @@ object frmClothInfoInput: TfrmClothInfoInput
object Panel1: TPanel object Panel1: TPanel
Left = 751 Left = 751
Top = 30 Top = 30
Width = 533 Width = 550
Height = 646 Height = 770
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
object ToolBar2: TToolBar object ToolBar2: TToolBar
Left = 1 Left = 1
Top = 1 Top = 1
Width = 531 Width = 548
Height = 30 Height = 30
AutoSize = True AutoSize = True
ButtonHeight = 30 ButtonHeight = 30
ButtonWidth = 67 ButtonWidth = 99
Caption = 'ToolBar1' Caption = 'ToolBar1'
DisabledImages = DataLink_ClothInfo.cxImageList_bar DisabledImages = DataLink_ClothInfo.cxImageList_bar
Images = DataLink_ClothInfo.cxImageList_bar Images = DataLink_ClothInfo.cxImageList_bar
@ -786,12 +971,29 @@ object frmClothInfoInput: TfrmClothInfoInput
ImageIndex = 6 ImageIndex = 6
OnClick = ToolButton4Click OnClick = ToolButton4Click
end end
object ToolButton11: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #23548#20837
ImageIndex = 28
Visible = False
OnClick = ToolButton11Click
end
object ToolButton12: TToolButton
Left = 284
Top = 0
AutoSize = True
Caption = #20840#37096#21024#38500
ImageIndex = 33
OnClick = ToolButton12Click
end
end end
object cxGrid1: TcxGrid object cxGrid1: TcxGrid
Left = 1 Left = 1
Top = 31 Top = 31
Width = 531 Width = 548
Height = 614 Height = 738
Align = alClient Align = alClient
TabOrder = 1 TabOrder = 1
object TV1: TcxGridDBTableView object TV1: TcxGridDBTableView
@ -864,132 +1066,6 @@ object frmClothInfoInput: TfrmClothInfoInput
GridView = TV1 GridView = TV1
end end
end end
object Panel6: TPanel
Left = 6
Top = 182
Width = 523
Height = 294
Caption = 'Panel6'
TabOrder = 2
Visible = False
object Panel7: TPanel
Left = 1
Top = 1
Width = 521
Height = 35
Align = alTop
Color = clGradientActiveCaption
ParentBackground = False
TabOrder = 0
object Button1: TButton
Left = 224
Top = 2
Width = 91
Height = 35
Caption = #20445#23384#24182#20851#38381
TabOrder = 0
OnClick = Button1Click
end
object Button2: TButton
Left = 337
Top = 2
Width = 88
Height = 35
Caption = #20445#23384#24182#32487#32493
TabOrder = 1
OnClick = Button2Click
end
object Button3: TButton
Left = 447
Top = 2
Width = 74
Height = 35
Caption = #20851#38381
TabOrder = 2
OnClick = Button1Click
end
end
object cxGrid4: TcxGrid
Left = 1
Top = 36
Width = 521
Height = 257
Align = alClient
TabOrder = 1
ExplicitLeft = 0
ExplicitTop = 0
ExplicitHeight = 251
object TV4: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_4
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = 'C_Code'
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.FocusCellOnTab = True
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsView.GroupByBox = False
object cxGridDBColumn5: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 54
end
object cxGridDBColumn6: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'C_ColorNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 80
end
object cxGridDBColumn7: TcxGridDBColumn
Caption = #28014#21160#20215
DataBinding.FieldName = 'floatPrice'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = TV1Column5PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Width = 68
end
object cxGridDBColumn8: TcxGridDBColumn
Caption = #21442#32771#23450#20215
DataBinding.FieldName = 'referencePrice'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 94
end
object cxGridDBColumn9: TcxGridDBColumn
Caption = #20215#26684#19978#38480'(%)'
DataBinding.FieldName = 'MAXPRICE'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 106
end
object cxGridDBColumn10: TcxGridDBColumn
Caption = #20215#26684#19979#38480'(%)'
DataBinding.FieldName = 'MinPRICE'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 100
end
end
object cxGridLevel4: TcxGridLevel
GridView = TV4
end
end
end
end end
object ADOQueryCmd: TADOQuery object ADOQueryCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink Connection = DataLink_ClothInfo.ADOLink
@ -1087,4 +1163,14 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 690 Left = 690
Top = 473 Top = 473
end end
object OpenDialog1: TOpenDialog
Left = 935
Top = 166
end
object CDS_LM: TClientDataSet
Aggregates = <>
Params = <>
Left = 980
Top = 389
end
end end

View File

@ -11,7 +11,8 @@ uses
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList, cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges,
dxBarBuiltInMenu, cxCheckBox, cxDropDownEdit, cxContainer, cxMaskEdit, dxBarBuiltInMenu, cxCheckBox, cxDropDownEdit, cxContainer, cxMaskEdit,
dxScrollbarAnnotations, cxMemo, dxSkinsCore, dxSkinsDefaultPainters, cxMRUEdit; dxScrollbarAnnotations, cxMemo, dxSkinsCore, dxSkinsDefaultPainters, cxMRUEdit,
ComObj;
type type
TfrmClothInfoInput = class(TForm) TfrmClothInfoInput = class(TForm)
@ -116,24 +117,30 @@ type
ADO_3: TADOQuery; ADO_3: TADOQuery;
DS_3: TDataSource; DS_3: TDataSource;
CDS_3: TClientDataSet; CDS_3: TClientDataSet;
Panel6: TPanel;
Panel7: TPanel;
cxGrid4: TcxGrid;
TV4: TcxGridDBTableView;
cxGridDBColumn5: TcxGridDBColumn;
cxGridDBColumn6: TcxGridDBColumn;
cxGridDBColumn7: TcxGridDBColumn;
cxGridDBColumn8: TcxGridDBColumn;
cxGridDBColumn9: TcxGridDBColumn;
cxGridDBColumn10: TcxGridDBColumn;
cxGridLevel4: TcxGridLevel;
DS_4: TDataSource; DS_4: TDataSource;
CDS_4: TClientDataSet; CDS_4: TClientDataSet;
Button1: TButton;
Button2: TButton;
ADO_4: TADOQuery; ADO_4: TADOQuery;
ToolButton10: TToolButton; ToolButton10: TToolButton;
Button3: TButton; ToolButton11: TToolButton;
OpenDialog1: TOpenDialog;
CDS_LM: TClientDataSet;
ToolButton12: TToolButton;
Label26: TLabel;
C_FromName3: TcxButtonEdit;
Label27: TLabel;
C_FromName4: TcxButtonEdit;
Label28: TLabel;
C_FromName5: TcxButtonEdit;
Label29: TLabel;
Process2: TcxButtonEdit;
Label30: TLabel;
Process3: TcxButtonEdit;
Label31: TLabel;
Process4: TcxButtonEdit;
Label32: TLabel;
Process5: TcxButtonEdit;
Label33: TLabel;
Process: TcxButtonEdit;
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure TBCloseClick(Sender: TObject); procedure TBCloseClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject); procedure ToolButton1Click(Sender: TObject);
@ -158,7 +165,11 @@ type
procedure cxGridDBColumn3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); procedure cxGridDBColumn3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure Button1Click(Sender: TObject); procedure Button1Click(Sender: TObject);
procedure ToolButton10Click(Sender: TObject); procedure ToolButton10Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure ToolButton11Click(Sender: TObject);
procedure ToolButton12Click(Sender: TObject);
procedure C_FromName3PropertiesButtonClick(Sender: TObject;
AButtonIndex: Integer);
private private
canshu1: string; canshu1: string;
Fint: Integer; Fint: Integer;
@ -183,7 +194,7 @@ implementation
uses uses
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_ClothInfoSel, U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload, U_ClothInfoSel,
U_CompanySel; U_CompanySel, U_Edit;
{$R *.dfm} {$R *.dfm}
procedure TfrmClothInfoInput.addColor(); procedure TfrmClothInfoInput.addColor();
@ -288,6 +299,19 @@ begin
C_FromName2.Properties.LookupItems.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName2').AsString); //坯布编号 C_FromName2.Properties.LookupItems.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName2').AsString); //坯布编号
C_FromName2.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName2').AsString); //坯布名称 C_FromName2.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName2').AsString); //坯布名称
Process2.Text :=Trim(ADOQueryTemp.fieldbyname('Process2').AsString); //加工方式
C_FromName3.Properties.LookupItems.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName3').AsString); //坯布编号
C_FromName3.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName3').AsString); //坯布名称
Process3.Text :=Trim(ADOQueryTemp.fieldbyname('Process3').AsString); //加工方式
C_FromName4.Properties.LookupItems.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName4').AsString); //坯布编号
C_FromName4.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName4').AsString); //坯布名称
Process4.Text :=Trim(ADOQueryTemp.fieldbyname('Process4').AsString); //加工方式
C_FromName5.Properties.LookupItems.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName5').AsString); //坯布编号
C_FromName5.Text := Trim(ADOQueryTemp.fieldbyname('C_FromName5').AsString); //坯布名称
Process5.Text :=Trim(ADOQueryTemp.fieldbyname('Process5').AsString); //加工方式
if ADOQueryTemp.fieldbyname('CJDATE').AsInteger <= 7 then if ADOQueryTemp.fieldbyname('CJDATE').AsInteger <= 7 then
begin begin
@ -332,6 +356,26 @@ begin
end; end;
end; end;
procedure TfrmClothInfoInput.C_FromName3PropertiesButtonClick(Sender: TObject;
AButtonIndex: Integer);
begin
try
frmClothInfoSel := TfrmClothInfoSel.Create(Application);
with frmClothInfoSel do
begin
// FCTType := '坯布';
if ShowModal = 1 then
begin
C_FromName3.Properties.LookupItems.Text := Trim(CDS_1.fieldbyname('BCIID').AsString);
C_FromName3.Text := Trim(CDS_1.fieldbyname('C_Name').AsString);
setName();
end;
end;
finally
frmClothInfoSel.Free;
end;
end;
procedure TfrmClothInfoInput.C_FromNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); procedure TfrmClothInfoInput.C_FromNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin begin
try try
@ -440,6 +484,16 @@ begin
qtyunit.ItemIndex := -1; qtyunit.ItemIndex := -1;
end; end;
with CDS_LM do
begin
FieldDefs.Clear;
FieldDefs.Add('LXH', ftInteger, 0);
FieldDefs.Add('lCode', ftString, 40);
FieldDefs.Add('LName', ftString, 40);
close;
CreateDataSet;
end;
// InitGrid2(); // InitGrid2();
InitGrid1(); InitGrid1();
InitGrid(); InitGrid();
@ -550,9 +604,11 @@ begin
FieldByName('ToID').Value := Trim(MaxBCIID); FieldByName('ToID').Value := Trim(MaxBCIID);
FieldByName('SerialNo').Value := 1; FieldByName('SerialNo').Value := 1;
FieldByName('FromID').Value := Trim(C_FromName.Properties.LookupItems.Text); // 坯布编号 FieldByName('FromID').Value := Trim(C_FromName.Properties.LookupItems.Text); // 坯布编号
FieldByName('Process').Value := Trim(Process.Text); // 工艺
Post; Post;
end; end;
end; end;
if Trim(C_FromName2.Properties.LookupItems.Text) <> '' then if Trim(C_FromName2.Properties.LookupItems.Text) <> '' then
begin begin
with ADOQueryCmd do with ADOQueryCmd do
@ -568,9 +624,72 @@ begin
FieldByName('ToID').Value := Trim(MaxBCIID); FieldByName('ToID').Value := Trim(MaxBCIID);
FieldByName('SerialNo').Value := 2; FieldByName('SerialNo').Value := 2;
FieldByName('FromID').Value := Trim(C_FromName2.Properties.LookupItems.Text); // 坯布编号 FieldByName('FromID').Value := Trim(C_FromName2.Properties.LookupItems.Text); // 坯布编号
FieldByName('Process').Value := Trim(Process2.Text); // 工艺
Post; Post;
end; end;
end; end;
if Trim(C_FromName3.Properties.LookupItems.Text) <> '' then
begin
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from BS_Cloth_Info_Link where 1=2');
Open;
end;
with ADOQueryCmd do
begin
Append;
FieldByName('ToID').Value := Trim(MaxBCIID);
FieldByName('SerialNo').Value := 3;
FieldByName('FromID').Value := Trim(C_FromName3.Properties.LookupItems.Text); // 坯布编号
FieldByName('Process').Value := Trim(Process3.Text); // 工艺
Post;
end;
end;
if Trim(C_FromName4.Properties.LookupItems.Text) <> '' then
begin
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from BS_Cloth_Info_Link where 1=2');
Open;
end;
with ADOQueryCmd do
begin
Append;
FieldByName('ToID').Value := Trim(MaxBCIID);
FieldByName('SerialNo').Value := 4;
FieldByName('FromID').Value := Trim(C_FromName4.Properties.LookupItems.Text); // 坯布编号
FieldByName('Process').Value := Trim(Process4.Text); // 工艺
Post;
end;
end;
if Trim(C_FromName5.Properties.LookupItems.Text) <> '' then
begin
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from BS_Cloth_Info_Link where 1=2');
Open;
end;
with ADOQueryCmd do
begin
Append;
FieldByName('ToID').Value := Trim(MaxBCIID);
FieldByName('SerialNo').Value := 5;
FieldByName('FromID').Value := Trim(C_FromName5.Properties.LookupItems.Text); // 坯布编号
FieldByName('Process').Value := Trim(Process5.Text); // 工艺
Post;
end;
end;
with ADOQueryTemp do with ADOQueryTemp do
begin begin
Close; Close;
@ -792,7 +911,7 @@ end;
procedure TfrmClothInfoInput.ToolButton10Click(Sender: TObject); procedure TfrmClothInfoInput.ToolButton10Click(Sender: TObject);
var var
maxno: string; // maxno: string;
SqlStr: string; SqlStr: string;
begin begin
if FBCIID = '' then if FBCIID = '' then
@ -800,22 +919,36 @@ begin
Application.MessageBox('请先保存产品信息!', '提示', 0); Application.MessageBox('请先保存产品信息!', '提示', 0);
Exit; Exit;
end; end;
try
frmEdit := TfrmEdit.Create(Application);
with frmEdit do
begin
FBCIID := Self.FBCIID;
FBCISID := CDS_1.FieldByName('BCISID').Value;
FPrice :=StrToFloatDef(CostPrice.Text, 0);
if ShowModal = 1 then
begin
InitGrid1();
end;
end;
finally
frmEdit.Free;
end;
// if GetLSNo(ADOQueryCmd, maxno, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then // if GetLSNo(ADOQueryCmd, maxno, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then
// begin // begin
// Application.MessageBox('取号失败!', '提示', 0); // Application.MessageBox('取号失败!', '提示', 0);
// Exit; // Exit;
// end; // end;
SqlStr := 'select A.* from BS_Cloth_Info_Sub A '; // SqlStr := 'select A.* from BS_Cloth_Info_Sub A ';
SqlStr := SqlStr + ' where A.BCIID=''' + Trim(FBCIID) + ''''; // SqlStr := SqlStr + ' where A.BCIID=''' + Trim(FBCIID) + '''';
SqlStr := SqlStr + ' ORDER BY CASE WHEN C_COLORNO NOT LIKE ''%[^0-9]%'' THEN dbo.getNum(C_Colorno) ELSE 9999999999 '; // SqlStr := SqlStr + ' ORDER BY CASE WHEN C_COLORNO NOT LIKE ''%[^0-9]%'' THEN dbo.getNum(C_Colorno) ELSE 9999999999 ';
SqlStr := SqlStr + ' END ,C_ColorNo'; // SqlStr := SqlStr + ' END ,C_ColorNo';
//
InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', ''); // InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', '');
//
Panel6.Visible := True; // Panel6.Visible := True;
// CopyAddRow(Tv4, CDS_4); // CopyAddRow(Tv4, CDS_4);
// with CDS_4 do // with CDS_4 do
// begin // begin
// append; // append;
@ -825,11 +958,117 @@ begin
// fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0); // fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0);
// Post; // Post;
// end; // end;
// TV1Column5PropertiesEditValueChanged(Sender); // TV1Column5PropertiesEditValueChanged(Sender);
end; end;
procedure TfrmClothInfoInput.ToolButton11Click(Sender: TObject);
var
excelApp, WorkBook: Variant;
i, j, k, LX, ExcelRowCount: integer;
maxId, FCPID, FCPName, t1, t2, t3, FFID: string;
begin
try
excelApp := CreateOleObject('Excel.Application');
openDialog1.Filter := '*.CSV;*.xls';
if opendialog1.Execute then
begin
WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName);
end
else
exit;
excelApp.Visible := false;
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
except
application.MessageBox('加载EXCEL错误', '错误信息', MB_ICONERROR);
exit;
end;
CDS_LM.EmptyDataSet;
for j := 0 to Tv1.ColumnCount - 1 do
begin
with CDS_LM do
begin
Append;
FieldByName('LCode').Value := trim(Tv1.Columns[j].DataBinding.FieldName);
FieldByName('LName').Value := trim(Tv1.Columns[j].Caption);
Post;
end;
end;
try
for i := 1 to 50 do
begin
if trim(WorkBook.WorkSheets[1].Cells[1, i].value) = '' then
continue;
if CDS_LM.Locate('LName', trim(WorkBook.WorkSheets[1].Cells[1, i].value), []) then
begin
with CDS_LM do
begin
Edit;
FieldByName('LXH').Value := i;
Post;
end;
end;
end;
except
application.MessageBox('加载数组错误!', '错误信息', MB_ICONERROR);
exit;
end;
try
for i := 2 to ExcelRowCount do
begin
with CDS_1 do
begin
Append;
CDS_LM.First;
while not CDS_LM.Eof do
begin
if CDS_LM.FieldByName('LXH').AsInteger > 0 then
CDS_1.fieldbyname(CDS_LM.FieldByName('LCode').AsString).Value := WorkBook.WorkSheets[1].Cells[i, CDS_LM.FieldByName('LXH').AsInteger].Value;
CDS_LM.Next;
end;
Post;
end;
end;
WorkBook.Close;
excelApp.Quit;
excelApp := Unassigned;
WorkBook := Unassigned;
except
WorkBook.Close;
excelApp.Quit;
excelApp := Unassigned;
WorkBook := Unassigned;
exit;
end;
end;
procedure TfrmClothInfoInput.ToolButton12Click(Sender: TObject);
begin
if CDS_1.IsEmpty then
Exit;
if Application.MessageBox('确定要全部删除吗?', '提示', 32 + 4) <> IDYES then
Exit;
if Application.MessageBox('确认后即将全部删除是否确定操作', '提示', 32 + 4) <> IDYES then
Exit;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('delete from BS_Cloth_Info_Sub where BCIID=''' + Trim(FBCIID) + '''');
ExecSQL;
end;
CDS_1.EmptyDataSet;
end;
procedure TfrmClothInfoInput.ToolButton1Click(Sender: TObject); procedure TfrmClothInfoInput.ToolButton1Click(Sender: TObject);
var var
MC_Code: string; MC_Code: string;
@ -845,11 +1084,11 @@ begin
C_Code.Text := MC_Code; C_Code.Text := MC_Code;
end; end;
if CDS_1.IsEmpty then // if CDS_1.IsEmpty then
begin // begin
Application.MessageBox('请输入产品颜色明细!', '提示', 0); // Application.MessageBox('请输入产品颜色明细!', '提示', 0);
Exit; // Exit;
end; // end;
if FCTID = 'CT2412300005' then if FCTID = 'CT2412300005' then
begin begin
@ -889,6 +1128,7 @@ begin
if SaveData() then if SaveData() then
begin begin
Application.MessageBox('保存成功!', '提示', 0); Application.MessageBox('保存成功!', '提示', 0);
if not CDS_1.IsEmpty then
ModalResult := 1; ModalResult := 1;
end; end;
end; end;
@ -900,7 +1140,6 @@ end;
procedure TfrmClothInfoInput.ToolButton3Click(Sender: TObject); procedure TfrmClothInfoInput.ToolButton3Click(Sender: TObject);
var var
maxno: string;
SqlStr: string; SqlStr: string;
begin begin
if FBCIID = '' then if FBCIID = '' then
@ -908,31 +1147,38 @@ begin
Application.MessageBox('请先保存产品信息!', '提示', 0); Application.MessageBox('请先保存产品信息!', '提示', 0);
Exit; Exit;
end; end;
// if GetLSNo(ADOQueryCmd, maxno, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then
// begin
// Application.MessageBox('取号失败!', '提示', 0);
// Exit;
// end;
SqlStr := 'select A.* from BS_Cloth_Info_Sub A ';
SqlStr := SqlStr + ' where 1<>1 ';
try
InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', ''); frmEdit := TfrmEdit.Create(Application);
with frmEdit do
Panel6.Visible := True;
// CopyAddRow(Tv4, CDS_4);
with CDS_4 do
begin begin
append; FBCIID := Self.FBCIID;
fieldbyname('BCIID').Value := FBCIID; FBCISID := '';
fieldbyname('BCISID').Value := maxno; FPrice :=StrToFloatDef(CostPrice.Text, 0);
fieldbyname('floatPrice').Value := 0; if ShowModal = 1 then
fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0); begin
Post; InitGrid1();
end;
end;
finally
frmEdit.Free;
end; end;
// SqlStr := 'select A.* from BS_Cloth_Info_Sub A ';
// SqlStr := SqlStr + ' where 1<>1 ';
//
// InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', '');
// Panel6.Visible := True;
// CopyAddRow(Tv4, CDS_4);
// with CDS_4 do
// begin
// append;
// fieldbyname('BCIID').Value := FBCIID;
//// fieldbyname('BCISID').Value := maxno;
// fieldbyname('floatPrice').Value := 0;
// fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0);
// Post;
// end;
// TV1Column5PropertiesEditValueChanged(Sender); // TV1Column5PropertiesEditValueChanged(Sender);
end; end;
@ -983,105 +1229,11 @@ end;
procedure TfrmClothInfoInput.Button1Click(Sender: TObject); procedure TfrmClothInfoInput.Button1Click(Sender: TObject);
begin begin
CDS_4.EmptyDataSet; CDS_4.EmptyDataSet;
Panel6.Visible:=False; // Panel6.Visible := False;
end; end;
procedure TfrmClothInfoInput.Button2Click(Sender: TObject);
var
maxId4 :string;
begin
try
ADOQueryCmd.Connection.BeginTrans;
//////////////////////// 保存子表 //////////////////////////
with CDS_4 do
begin
First;
while not Eof do
begin
if Trim(CDS_4.fieldbyname('BCISID').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxId4, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('取子流水号失败!', '提示', 0);
Exit;
end;
end
else
begin
maxId4 := Trim(CDS_4.fieldbyname('BCISID').AsString);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add(' select * from BS_Cloth_Info_Sub where ');
sql.Add(' BCISID=''' + Trim(maxId4) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(CDS_4.fieldbyname('BCISID').AsString) = '' then
begin
Append;
FieldByName('FillID').Value := Trim(DCode);
FieldByName('Filler').Value := Trim(DName);
FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
FieldByName('EditID').Value := Trim(DCode);
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('BCIID').Value := Trim(FBCIID);
FieldByName('BCISID').Value := Trim(maxId4);
RTSetSaveDataCDS(ADOQueryCmd, Tv4, CDS_4, 'BS_Cloth_Info_Sub', 0);
Post;
end;
Next;
end;
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select count(BCISID) as AA from BS_Cloth_Info_Sub where BCIID=''' + Trim(FBCIID) + '''');
sql.Add(' group by C_Color,C_ColorNo having count(BCISID)>1');
// ShowMessage(sql.Text);
Open;
end;
if StrToFloatDef(ADOQueryTemp.fieldbyname('AA').asstring, 1) > 1 then
begin
ADOQueryCmd.Connection.RollbackTrans;
// Result := False;
Application.MessageBox('颜色色号重复!', '提示', 0);
Exit;
end;
//////////////////////// 保存子表 //////////////////////////
ADOQueryCmd.Connection.CommitTrans;
InitGrid1();
ToolButton3.Click;
// Panel6.Visible:=false;
// Result := True;
except
// Result := False;
ADOQueryCmd.Connection.RollbackTrans;
InitGrid1();
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
end;
end;
procedure TfrmClothInfoInput.CostPricePropertiesEditValueChanged(Sender: TObject); procedure TfrmClothInfoInput.CostPricePropertiesEditValueChanged(Sender: TObject);
var var
mvalue, FFieldName: string; mvalue, FFieldName: string;

View File

@ -0,0 +1,219 @@
object frmEdit: TfrmEdit
Left = 682
Top = 315
Caption = #33394#21495#32500#25252
ClientHeight = 404
ClientWidth = 625
Color = clWhite
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 13
object Panel6: TPanel
Left = 0
Top = 30
Width = 625
Height = 374
Align = alClient
Caption = 'Panel6'
TabOrder = 0
object cxGrid4: TcxGrid
Left = 1
Top = 1
Width = 623
Height = 372
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 0
object TV4: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_4
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = 'C_Code'
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.FocusCellOnTab = True
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsView.GroupByBox = False
object cxGridDBColumn5: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 54
end
object cxGridDBColumn6: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'C_ColorNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 80
end
object cxGridDBColumn7: TcxGridDBColumn
Caption = #28014#21160#20215
DataBinding.FieldName = 'floatPrice'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Width = 68
end
object cxGridDBColumn8: TcxGridDBColumn
Caption = #21442#32771#23450#20215
DataBinding.FieldName = 'referencePrice'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 94
end
object cxGridDBColumn9: TcxGridDBColumn
Caption = #20215#26684#19978#38480'(%)'
DataBinding.FieldName = 'MAXPRICE'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 106
end
object cxGridDBColumn10: TcxGridDBColumn
Caption = #20215#26684#19979#38480'(%)'
DataBinding.FieldName = 'MinPRICE'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 100
end
end
object cxGridLevel4: TcxGridLevel
GridView = TV4
end
end
end
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 625
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 59
Caption = 'ToolBar1'
DisabledImages = DataLink_ClothInfo.cxImageList_bar
Images = DataLink_ClothInfo.cxImageList_bar
List = True
ShowCaptions = True
TabOrder = 1
object ToolButton1: TToolButton
Tag = 1
Left = 0
Top = 0
AutoSize = True
Caption = #20445#23384
ImageIndex = 16
OnClick = ToolButton1Click
end
object ToolButton2: TToolButton
Left = 63
Top = 0
AutoSize = True
Caption = #22686#34892
ImageIndex = 2
OnClick = ToolButton2Click
end
object ToolButton3: TToolButton
Left = 126
Top = 0
AutoSize = True
Caption = #21024#34892
ImageIndex = 6
OnClick = ToolButton3Click
end
object TBClose: TToolButton
Left = 189
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
object ToolButton4: TToolButton
Left = 252
Top = 0
AutoSize = True
Caption = #23548#20837
ImageIndex = 28
OnClick = ToolButton4Click
end
end
object ADOQueryMain: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 301
Top = 165
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 205
Top = 165
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Parameters = <>
Left = 109
Top = 165
end
object DS_4: TDataSource
DataSet = CDS_4
Left = 166
Top = 251
end
object CDS_4: TClientDataSet
Aggregates = <>
Params = <>
Left = 214
Top = 253
end
object ADO_4: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Parameters = <>
Left = 109
Top = 261
end
object PopupMenu1: TPopupMenu
Left = 336
Top = 254
object N1: TMenuItem
Caption = #28155#21152
OnClick = N1Click
end
object N2: TMenuItem
Caption = #21024#38500
OnClick = N2Click
end
end
object CDS_LM: TClientDataSet
Aggregates = <>
Params = <>
Left = 262
Top = 309
end
object OpenDialog1: TOpenDialog
Left = 416
Top = 166
end
end

View File

@ -0,0 +1,367 @@
unit U_Edit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, DB, ADODB, cxGraphics, cxControls, cxLookAndFeels,
cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters, cxStyles,
cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator,
dxDateRanges, dxScrollbarAnnotations, cxDBData, cxTextEdit, cxGridLevel,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
cxGridCustomView, cxGrid, Vcl.ToolWin, Vcl.ComCtrls, Datasnap.DBClient,
Vcl.Menus, ComObj;
type
TfrmEdit = class(TForm)
ADOQueryMain: TADOQuery;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
Panel6: TPanel;
cxGrid4: TcxGrid;
TV4: TcxGridDBTableView;
cxGridDBColumn5: TcxGridDBColumn;
cxGridDBColumn6: TcxGridDBColumn;
cxGridDBColumn7: TcxGridDBColumn;
cxGridDBColumn8: TcxGridDBColumn;
cxGridDBColumn9: TcxGridDBColumn;
cxGridDBColumn10: TcxGridDBColumn;
cxGridLevel4: TcxGridLevel;
DS_4: TDataSource;
CDS_4: TClientDataSet;
ToolBar1: TToolBar;
ToolButton1: TToolButton;
TBClose: TToolButton;
ADO_4: TADOQuery;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
ToolButton4: TToolButton;
CDS_LM: TClientDataSet;
OpenDialog1: TOpenDialog;
procedure Button2Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
function SaveData(): Boolean;
procedure ToolButton1Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure ToolButton4Click(Sender: TObject);
private
{ Private declarations }
public
FBCIID, FBCISID: string;
FPrice: double;
{ Public declarations }
end;
var
frmEdit: TfrmEdit;
implementation
uses
U_DataLink, U_RTFun;
{$R *.dfm}
procedure TfrmEdit.Button2Click(Sender: TObject);
begin
Close;
end;
procedure TfrmEdit.FormShow(Sender: TObject);
var
SqlStr: string;
begin
SqlStr := 'select A.* from BS_Cloth_Info_Sub A ';
if FBCISID = '' then
begin
SqlStr := SqlStr + ' where 1<>1';
end
else
begin
SqlStr := SqlStr + ' where A.BCIID=''' + Trim(FBCIID) + '''';
end;
SqlStr := SqlStr + ' ORDER BY CASE WHEN C_COLORNO NOT LIKE ''%[^0-9]%'' THEN dbo.getNum(C_Colorno) ELSE 9999999999 ';
SqlStr := SqlStr + ' END ,C_ColorNo';
InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', '');
with CDS_LM do
begin
FieldDefs.Clear;
FieldDefs.Add('LXH', ftInteger, 0);
FieldDefs.Add('lCode', ftString, 40);
FieldDefs.Add('LName', ftString, 40);
close;
CreateDataSet;
end;
end;
procedure TfrmEdit.N1Click(Sender: TObject);
begin
with CDS_4 do
begin
append;
fieldbyname('BCIID').Value := FBCIID;
// fieldbyname('BCISID').Value := maxno;
fieldbyname('floatPrice').Value := 0;
fieldbyname('referencePrice').value := FPrice;
Post;
end;
end;
procedure TfrmEdit.N2Click(Sender: TObject);
begin
if CDS_4.IsEmpty then
Exit;
if Trim(CDS_4.fieldbyname('BCISID').AsString) <> '' then
begin
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('delete BS_Cloth_Info_Sub where BCISID=''' + Trim(CDS_4.fieldbyname('BCISID').AsString) + '''');
ExecSQL;
end;
end;
CDS_4.Delete;
end;
procedure TfrmEdit.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmEdit.ToolButton1Click(Sender: TObject);
begin
ToolBar1.SetFocus;
if SaveData() then
begin
Application.MessageBox('保存成功!', '提示', 0);
if not CDS_4.IsEmpty then
ModalResult := 1;
end;
end;
procedure TfrmEdit.ToolButton2Click(Sender: TObject);
begin
with CDS_4 do
begin
append;
fieldbyname('BCIID').Value := FBCIID;
// fieldbyname('BCISID').Value := maxno;
fieldbyname('floatPrice').Value := 0;
fieldbyname('referencePrice').value := FPrice;
Post;
end;
end;
procedure TfrmEdit.ToolButton3Click(Sender: TObject);
begin
if CDS_4.IsEmpty then
Exit;
if Trim(CDS_4.fieldbyname('BCISID').AsString) <> '' then
begin
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('delete BS_Cloth_Info_Sub where BCISID=''' + Trim(CDS_4.fieldbyname('BCISID').AsString) + '''');
ExecSQL;
end;
end;
CDS_4.Delete;
end;
procedure TfrmEdit.ToolButton4Click(Sender: TObject);
var
excelApp, WorkBook: Variant;
i, j, k, LX, ExcelRowCount: integer;
maxId, FCPID, FCPName, t1, t2, t3, FFID: string;
begin
try
excelApp := CreateOleObject('Excel.Application');
openDialog1.Filter := '*.CSV;*.xls';
if opendialog1.Execute then
begin
WorkBook := excelApp.WorkBooks.Open(OpenDialog1.FileName);
end
else
exit;
excelApp.Visible := false;
ExcelRowCount := WorkBook.WorkSheets[1].UsedRange.Rows.Count;
except
application.MessageBox('加载EXCEL错误', '错误信息', MB_ICONERROR);
exit;
end;
CDS_LM.EmptyDataSet;
for j := 0 to Tv4.ColumnCount - 1 do
begin
with CDS_LM do
begin
Append;
FieldByName('LCode').Value := trim(Tv4.Columns[j].DataBinding.FieldName);
FieldByName('LName').Value := trim(Tv4.Columns[j].Caption);
Post;
end;
end;
try
for i := 1 to 50 do
begin
if trim(WorkBook.WorkSheets[1].Cells[1, i].value) = '' then
continue;
if CDS_LM.Locate('LName', trim(WorkBook.WorkSheets[1].Cells[1, i].value), []) then
begin
with CDS_LM do
begin
Edit;
FieldByName('LXH').Value := i;
Post;
end;
end;
end;
except
application.MessageBox('加载数组错误!', '错误信息', MB_ICONERROR);
exit;
end;
try
for i := 2 to ExcelRowCount do
begin
with CDS_4 do
begin
Append;
CDS_LM.First;
while not CDS_LM.Eof do
begin
if CDS_LM.FieldByName('LXH').AsInteger > 0 then
CDS_4.fieldbyname(CDS_LM.FieldByName('LCode').AsString).Value := WorkBook.WorkSheets[1].Cells[i, CDS_LM.FieldByName('LXH').AsInteger].Value;
CDS_LM.Next;
end;
Post;
end;
end;
WorkBook.Close;
excelApp.Quit;
excelApp := Unassigned;
WorkBook := Unassigned;
except
WorkBook.Close;
excelApp.Quit;
excelApp := Unassigned;
WorkBook := Unassigned;
exit;
end;
end;
function TfrmEdit.SaveData(): Boolean;
var
maxId4: string;
begin
try
ADOQueryCmd.Connection.BeginTrans;
//////////////////////// 保存子表 //////////////////////////
with CDS_4 do
begin
First;
while not Eof do
begin
if Trim(CDS_4.fieldbyname('BCISID').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxId4, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('取子流水号失败!', '提示', 0);
Exit;
end;
end
else
begin
maxId4 := Trim(CDS_4.fieldbyname('BCISID').AsString);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add(' select * from BS_Cloth_Info_Sub where ');
sql.Add(' BCISID=''' + Trim(maxId4) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(CDS_4.fieldbyname('BCISID').AsString) = '' then
begin
Append;
FieldByName('FillID').Value := Trim(DCode);
FieldByName('Filler').Value := Trim(DName);
FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
FieldByName('EditID').Value := Trim(DCode);
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('BCIID').Value := Trim(FBCIID);
FieldByName('BCISID').Value := Trim(maxId4);
RTSetSaveDataCDS(ADOQueryCmd, Tv4, CDS_4, 'BS_Cloth_Info_Sub', 0);
Post;
end;
Next;
end;
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select count(BCISID) as AA from BS_Cloth_Info_Sub where BCIID=''' + Trim(FBCIID) + '''');
sql.Add(' group by C_Color,C_ColorNo having count(BCISID)>1');
// ShowMessage(sql.Text);
Open;
end;
if StrToFloatDef(ADOQueryTemp.fieldbyname('AA').asstring, 1) > 1 then
begin
ADOQueryCmd.Connection.RollbackTrans;
// Result := False;
Application.MessageBox('颜色色号重复!', '提示', 0);
Exit;
end;
//////////////////////// 保存子表 //////////////////////////
ADOQueryCmd.Connection.CommitTrans;
Result := True;
except
Result := False;
ADOQueryCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
end;
end;
end.

View File

@ -18,7 +18,7 @@ inherited frmPositionInPut: TfrmPositionInPut
Height = 254 Height = 254
Align = alClient Align = alClient
TabOrder = 0 TabOrder = 0
ExplicitTop = 80 ExplicitTop = 85
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <> ScrollbarAnnotations.CustomAnnotations = <>
@ -268,4 +268,18 @@ inherited frmPositionInPut: TfrmPositionInPut
Left = 302 Left = 302
Top = 239 Top = 239
end end
object ADOQuery1: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 112
Top = 104
end
object ADOQuery2: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 176
Top = 112
end
end end

View File

@ -46,6 +46,8 @@ type
OpenDialog1: TOpenDialog; OpenDialog1: TOpenDialog;
ToolButton2: TToolButton; ToolButton2: TToolButton;
Tv1Column2: TcxGridDBColumn; Tv1Column2: TcxGridDBColumn;
ADOQuery1: TADOQuery;
ADOQuery2: TADOQuery;
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBAddClick(Sender: TObject); procedure TBAddClick(Sender: TObject);
procedure TBCloseClick(Sender: TObject); procedure TBCloseClick(Sender: TObject);
@ -121,11 +123,43 @@ begin
begin begin
if GetLSNo(ADOQueryCmd, MaxNo, 'M', 'BS_Position', 4, 1) = False then if GetLSNo(ADOQueryCmd, MaxNo, 'M', 'BS_Position', 4, 1) = False then
raise Exception.Create('È¡×î´óºÅʧ°Ü£¡'); raise Exception.Create('È¡×î´óºÅʧ°Ü£¡');
with ADOQuery1 do
begin
Close;
sql.Clear;
sql.Add('select count(*) as AA from BS_Position where POSNO=''' + Trim(CDS_Sub.FieldByName('POSNO').ASString) + '''');
Open;
if FieldByName('AA').AsInteger > 0 then
begin
ADOQueryCmd.Connection.RollbackTrans;
Result := False;
Application.MessageBox('编号重复!', '提示', 0);
CDS_Sub.EnableControls;
Exit;
end;
end;
with ADOQuery2 do
begin
Close;
sql.Clear;
sql.Add('select count(*) as KW from BS_Position where POSName=''' + Trim(CDS_Sub.FieldByName('POSName').ASString) + '''');
Open;
if FieldByName('KW').AsInteger > 0 then
begin
ADOQueryCmd.Connection.RollbackTrans;
Result := False;
Application.MessageBox('库位重复!', '提示', 0);
CDS_Sub.EnableControls;
Exit;
end;
end;
end end
else else
begin begin
MaxNo := Trim(MWBID); MaxNo := Trim(MWBID);
end; end;
with ADOQueryCmd do with ADOQueryCmd do
begin begin
Close; Close;
@ -161,6 +195,7 @@ begin
end; end;
end; end;
CDS_Sub.EnableControls; CDS_Sub.EnableControls;
ADOQueryCmd.Connection.CommitTrans; ADOQueryCmd.Connection.CommitTrans;
Result := True; Result := True;
except except

View File

@ -133,8 +133,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
Align = alClient Align = alClient
PopupMenu = PopupMenu2 PopupMenu = PopupMenu2
TabOrder = 0 TabOrder = 0
ExplicitLeft = 2
ExplicitTop = 5
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
OnDblClick = Tv1DblClick OnDblClick = Tv1DblClick
OnMouseDown = Tv1MouseDown OnMouseDown = Tv1MouseDown
@ -312,12 +310,13 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
Caption = #21333#20301 Caption = #21333#20301
DataBinding.FieldName = 'TISUnit' DataBinding.FieldName = 'TISUnit'
DataBinding.IsNullValueType = True DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxComboBoxProperties' PropertiesClassName = 'TcxButtonEditProperties'
Properties.DropDownListStyle = lsEditFixedList Properties.Buttons = <
Properties.Items.Strings = ( item
'M' Default = True
'Y' Kind = bkEllipsis
'Kg') end>
Properties.OnButtonClick = Tv1Column8PropertiesButtonClick
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Width = 55 Width = 55
end end
@ -354,7 +353,6 @@ inherited frmItemizedListInPut: TfrmItemizedListInPut
Ctl3D = False Ctl3D = False
ParentCtl3D = False ParentCtl3D = False
TabOrder = 3 TabOrder = 3
ExplicitTop = 36
object Label3: TLabel object Label3: TLabel
Left = 377 Left = 377
Top = 11 Top = 11

View File

@ -113,6 +113,7 @@ type
procedure ToolButton5Click(Sender: TObject); procedure ToolButton5Click(Sender: TObject);
procedure Tv1Column6PropertiesEditValueChanged(Sender: TObject); procedure Tv1Column6PropertiesEditValueChanged(Sender: TObject);
procedure ToolButton1Click(Sender: TObject); procedure ToolButton1Click(Sender: TObject);
procedure Tv1Column8PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
private private
FSCXDH: string; FSCXDH: string;
FShowKeyid: integer; FShowKeyid: integer;
@ -127,6 +128,7 @@ type
public public
PState, CopyInt, PriceFlag: Integer; PState, CopyInt, PriceFlag: Integer;
FTIMID, FFTMMID, FTMMNo, MTMSId: string; FTIMID, FFTMMID, FTMMNo, MTMSId: string;
FName, FColor, FColorNo: string;
FXS: Integer; FXS: Integer;
canshu1: string; canshu1: string;
fFlileFlag: string; fFlileFlag: string;
@ -1242,9 +1244,32 @@ begin
end; end;
procedure TfrmItemizedListInPut.Tv1Column8PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'qtyunit';
flagname := 'ÊýÁ¿µ¥Î»';
if ShowModal = 1 then
begin
CDS_1.Edit;
CDS_1.fieldbyname('TISUnit').Value := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
// Order_Sub.fieldbyname('PRTCode').Value:=Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
CDS_1.Post;
end;
end;
finally
frmZDYHelp.Free;
end;
tv1.Controller.EditingController.ShowEdit();
end;
procedure TfrmItemizedListInPut.Tv1DblClick(Sender: TObject); procedure TfrmItemizedListInPut.Tv1DblClick(Sender: TObject);
var var
MTISId, MQtyUnit: string; MTISId, MQtyUnit: string;
begin begin
if Trim(CDS_1.FieldByName('TISUnit').AsString) = '' then if Trim(CDS_1.FieldByName('TISUnit').AsString) = '' then
begin begin
@ -1253,6 +1278,9 @@ begin
end; end;
MTISId := Trim(Self.CDS_1.FieldByName('TISId').AsString); MTISId := Trim(Self.CDS_1.FieldByName('TISId').AsString);
MQtyUnit := Trim(Self.CDS_1.FieldByName('TISUnit').AsString); MQtyUnit := Trim(Self.CDS_1.FieldByName('TISUnit').AsString);
FName := CDS_1.FieldByName('C_Name').ASString;
FColor := CDS_1.FieldByName('C_Color').ASString;
FColorNo := CDS_1.FieldByName('C_colorNo').ASString;
if SaveData() then if SaveData() then
begin begin
@ -1263,6 +1291,9 @@ begin
FTIMId := Self.FTIMId; FTIMId := Self.FTIMId;
FTISId := MTISId; FTISId := MTISId;
FQtyUnit := MQtyUnit; FQtyUnit := MQtyUnit;
FName := Self.FName;
FColor := Self.FColor;
FColorNo := Self.FColorNo;
if ShowModal = 1 then if ShowModal = 1 then
begin begin
Self.initGrid1(Self.FTIMID); Self.initGrid1(Self.FTIMID);

View File

@ -148,10 +148,38 @@ inherited frmItemizedListList: TfrmItemizedListList
Height = 21 Height = 21
Caption = #23545#26041#21333#20301 Caption = #23545#26041#21333#20301
end end
object Label4: TLabel
Left = 416
Top = 51
Width = 64
Height = 21
Caption = #33394#24067#21517#31216
end
object Label5: TLabel
Left = 632
Top = 51
Width = 32
Height = 21
Caption = #39068#33394
end
object Label6: TLabel
Left = 822
Top = 51
Width = 32
Height = 21
Caption = #33394#21495
end
object Label2: TLabel
Left = 1014
Top = 51
Width = 32
Height = 21
Caption = #32568#21495
end
object TIMNo: TcxTextEdit object TIMNo: TcxTextEdit
Tag = 2 Tag = 2
Left = 76 Left = 76
Top = 45 Top = 47
TabOrder = 0 TabOrder = 0
OnKeyPress = TIMNoKeyPress OnKeyPress = TIMNoKeyPress
Width = 120 Width = 120
@ -159,7 +187,7 @@ inherited frmItemizedListList: TfrmItemizedListList
object OOPCoName: TcxTextEdit object OOPCoName: TcxTextEdit
Tag = 2 Tag = 2
Left = 268 Left = 268
Top = 45 Top = 47
TabOrder = 1 TabOrder = 1
OnKeyPress = TIMNoKeyPress OnKeyPress = TIMNoKeyPress
Width = 120 Width = 120
@ -185,6 +213,38 @@ inherited frmItemizedListList: TfrmItemizedListList
ExplicitHeight = 21 ExplicitHeight = 21
end end
end end
object C_Name: TcxTextEdit
Tag = 2
Left = 486
Top = 47
TabOrder = 3
OnKeyPress = TIMNoKeyPress
Width = 120
end
object C_Color: TcxTextEdit
Tag = 2
Left = 676
Top = 47
TabOrder = 4
OnKeyPress = TIMNoKeyPress
Width = 120
end
object C_ColorNo: TcxTextEdit
Tag = 2
Left = 868
Top = 47
TabOrder = 5
OnKeyPress = TIMNoKeyPress
Width = 120
end
object FtyPCId: TcxTextEdit
Tag = 2
Left = 1060
Top = 47
TabOrder = 6
OnKeyPress = TIMNoKeyPress
Width = 120
end
end end
object cxTabControl1: TcxTabControl [2] object cxTabControl1: TcxTabControl [2]
Left = 0 Left = 0
@ -488,6 +548,13 @@ inherited frmItemizedListList: TfrmItemizedListList
Options.Editing = False Options.Editing = False
Width = 66 Width = 66
end end
object TV1Column16: TcxGridDBColumn
Caption = #24405#20837#20154
DataBinding.FieldName = 'Filler'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 66
end
end end
object cxGridLevel1: TcxGridLevel object cxGridLevel1: TcxGridLevel
GridView = TV1 GridView = TV1
@ -596,6 +663,7 @@ inherited frmItemizedListList: TfrmItemizedListList
Top = 307 Top = 307
end end
object GPM_3: TcxGridPopupMenu object GPM_3: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <> PopupMenus = <>
Left = 691 Left = 691
Top = 401 Top = 401

View File

@ -85,6 +85,15 @@ type
TV1Column13: TcxGridDBColumn; TV1Column13: TcxGridDBColumn;
TV1Column14: TcxGridDBColumn; TV1Column14: TcxGridDBColumn;
TV1Column15: TcxGridDBColumn; TV1Column15: TcxGridDBColumn;
TV1Column16: TcxGridDBColumn;
Label4: TLabel;
C_Name: TcxTextEdit;
Label5: TLabel;
Label6: TLabel;
C_Color: TcxTextEdit;
C_ColorNo: TcxTextEdit;
Label2: TLabel;
FtyPCId: TcxTextEdit;
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);

View File

@ -29,6 +29,8 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
Align = alClient Align = alClient
PopupMenu = PopupMenu1 PopupMenu = PopupMenu1
TabOrder = 0 TabOrder = 0
ExplicitLeft = 0
ExplicitTop = 69
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
OnKeyDown = Tv1KeyDown OnKeyDown = Tv1KeyDown
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
@ -206,6 +208,18 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
Height = 21 Height = 21
Caption = #25968#37327 Caption = #25968#37327
end end
object Label1: TLabel
Left = 377
Top = 6
Width = 5
Height = 22
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #24494#36719#38597#40657
Font.Style = [fsBold]
ParentFont = False
end
object inPiece: TcxCurrencyEdit object inPiece: TcxCurrencyEdit
Left = 71 Left = 71
Top = 3 Top = 3
@ -299,7 +313,6 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
end end
object ADOQueryBatch: TADOQuery object ADOQueryBatch: TADOQuery
Connection = DataLink_TradeTotalClothStk.ADOLink Connection = DataLink_TradeTotalClothStk.ADOLink
LockType = ltBatchOptimistic
Parameters = <> Parameters = <>
Left = 60 Left = 60
Top = 274 Top = 274

View File

@ -49,6 +49,7 @@ type
TBClose: TToolButton; TBClose: TToolButton;
Tv1Column1: TcxGridDBColumn; Tv1Column1: TcxGridDBColumn;
ADOQueryBatch: TADOQuery; ADOQueryBatch: TADOQuery;
Label1: TLabel;
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure TBDelClick(Sender: TObject); procedure TBDelClick(Sender: TObject);
@ -70,6 +71,7 @@ type
public public
{ Public declarations } { Public declarations }
FTIMId, FTISId, FQtyUnit: string; FTIMId, FTISId, FQtyUnit: string;
FName, FColor, FColorNo: string;
end; end;
var var
@ -434,7 +436,7 @@ begin
end; end;
if ADOQueryBatch.FieldByName('intReturn').AsInteger = -1 then if ADOQueryBatch.FieldByName('intReturn').AsInteger = -1 then
raise Exception.Create(pchar(trim(ADOQueryBatch.FieldByName('ShowMsg').AsString))); raise Exception.Create(pchar(trim(ADOQueryBatch.FieldByName('ShowMsg').AsString)));
ADOQueryBatch.UpdateBatch; // ADOQueryBatch.UpdateBatch;
ADOQueryBatch.Connection.CommitTrans; ADOQueryBatch.Connection.CommitTrans;
Result := True; Result := True;
@ -450,7 +452,7 @@ procedure TfrmItemizedListQtyInPut.FormShow(Sender: TObject);
begin begin
inherited; inherited;
ReadCxGrid('Âëµ¥µÇ¼Ç', Tv1, 'óÒ×»ã×ֿܲâ'); ReadCxGrid('Âëµ¥µÇ¼Ç', Tv1, 'óÒ×»ã×ֿܲâ');
Label1.Caption := '色布名称:' + FName + ' 颜色:' + FColor + ' 色号:' + FColorNo;
with CDS_LM do with CDS_LM do
begin begin
FieldDefs.Clear; FieldDefs.Clear;

View File

@ -8,8 +8,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Font.Height = -16 Font.Height = -16
Position = poMainFormCenter Position = poMainFormCenter
WindowState = wsMaximized WindowState = wsMaximized
ExplicitWidth = 1368 ExplicitWidth = 1376
ExplicitHeight = 683 ExplicitHeight = 691
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 21 TextHeight = 21
object ToolBar1: TToolBar [0] object ToolBar1: TToolBar [0]
@ -28,7 +28,6 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
List = True List = True
ShowCaptions = True ShowCaptions = True
TabOrder = 0 TabOrder = 0
ExplicitTop = 3
object TBSave: TToolButton object TBSave: TToolButton
Left = 0 Left = 0
Top = 0 Top = 0
@ -57,9 +56,9 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
object ToolBar2: TToolBar [1] object ToolBar2: TToolBar [1]
Tag = 1 Tag = 1
Left = 0 Left = 0
Top = 224 Top = 225
Width = 1360 Width = 1360
Height = 30 Height = 24
ButtonHeight = 30 ButtonHeight = 30
ButtonWidth = 67 ButtonWidth = 67
Caption = 'ToolBar1' Caption = 'ToolBar1'
@ -69,6 +68,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
List = True List = True
ShowCaptions = True ShowCaptions = True
TabOrder = 1 TabOrder = 1
ExplicitTop = 391
object ToolButton1: TToolButton object ToolButton1: TToolButton
Left = 0 Left = 0
Top = 0 Top = 0
@ -88,29 +88,31 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
end end
object Panel2: TPanel [2] object Panel2: TPanel [2]
Left = 0 Left = 0
Top = 254 Top = 249
Width = 1360 Width = 1360
Height = 398 Height = 403
Align = alClient Align = alClient
Caption = 'Panel2' Caption = 'Panel2'
TabOrder = 2 TabOrder = 2
ExplicitTop = 254
ExplicitHeight = 398
object Panel3: TPanel object Panel3: TPanel
Left = 1 Left = 1
Top = 1 Top = 1
Width = 1072 Width = 1072
Height = 396 Height = 401
Align = alClient Align = alClient
Caption = 'Panel2' Caption = 'Panel2'
TabOrder = 0 TabOrder = 0
ExplicitHeight = 396
object cxGrid1: TcxGrid object cxGrid1: TcxGrid
Left = 1 Left = 1
Top = 1 Top = 1
Width = 1070 Width = 1070
Height = 394 Height = 399
Align = alClient Align = alClient
TabOrder = 0 TabOrder = 0
ExplicitLeft = -1 ExplicitHeight = 394
ExplicitTop = 5
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
OnMouseDown = Tv1MouseDown OnMouseDown = Tv1MouseDown
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
@ -340,10 +342,11 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Left = 1073 Left = 1073
Top = 1 Top = 1
Width = 286 Width = 286
Height = 396 Height = 401
Align = alRight Align = alRight
Caption = 'Panel4' Caption = 'Panel4'
TabOrder = 1 TabOrder = 1
ExplicitHeight = 396
object Panel5: TPanel object Panel5: TPanel
Left = 1 Left = 1
Top = 1 Top = 1
@ -377,17 +380,19 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Left = 1 Left = 1
Top = 42 Top = 42
Width = 284 Width = 284
Height = 353 Height = 358
Align = alClient Align = alClient
Caption = #21452#20987#21024#38500#26126#32454#20449#24687 Caption = #21452#20987#21024#38500#26126#32454#20449#24687
TabOrder = 1 TabOrder = 1
ExplicitHeight = 353
object cxGrid2: TcxGrid object cxGrid2: TcxGrid
Left = 2 Left = 2
Top = 23 Top = 23
Width = 280 Width = 280
Height = 328 Height = 333
Align = alClient Align = alClient
TabOrder = 0 TabOrder = 0
ExplicitHeight = 328
object TvMX: TcxGridDBTableView object TvMX: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False Navigator.Buttons.Delete.Enabled = False
@ -451,7 +456,7 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Left = 0 Left = 0
Top = 30 Top = 30
Width = 1360 Width = 1360
Height = 194 Height = 195
Align = alTop Align = alTop
BevelInner = bvNone BevelInner = bvNone
BevelOuter = bvNone BevelOuter = bvNone
@ -461,80 +466,91 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
TabOrder = 3 TabOrder = 3
OnClick = ScrollBox1Click OnClick = ScrollBox1Click
object Label3: TLabel object Label3: TLabel
Left = 722 Left = 730
Top = 13 Top = 70
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #21046#21333#26085#26399 Caption = #21046#21333#26085#26399
end end
object Label25: TLabel object Label25: TLabel
Left = 363 Left = 352
Top = 13 Top = 21
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #20132#36135#26085#26399 Caption = #20132#36135#26085#26399
Visible = False
end end
object Label1: TLabel object Label1: TLabel
Left = 21 Left = 29
Top = 126 Top = 119
Width = 77 Width = 77
Height = 21 Height = 21
Caption = #22791' '#27880 Caption = #22791' '#27880
end end
object Label2: TLabel object Label2: TLabel
Left = 21 Left = 721
Top = 13 Top = 21
Width = 48 Width = 64
Height = 21 Height = 21
Caption = #35746#21333#21495 Caption = #21333#25454#32534#21495
end end
object Label14: TLabel object Label14: TLabel
Left = 363 Left = 24
Top = 49 Top = 65
Width = 72 Width = 72
Height = 21 Height = 21
Caption = #23458' '#25143 Caption = #23458' '#25143
end end
object Label20: TLabel object Label20: TLabel
Left = 21 Left = 29
Top = 49 Top = 21
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #32463#33829#21333#20301 Caption = #32463#33829#21333#20301
Visible = False
end end
object Label19: TLabel object Label19: TLabel
Left = 363 Left = 371
Top = 87 Top = 247
Width = 80 Width = 80
Height = 21 Height = 21
Caption = #32852#31995#26041#24335#65306 Caption = #32852#31995#26041#24335#65306
Visible = False
end end
object Label37: TLabel object Label37: TLabel
Left = 21 Left = 29
Top = 87 Top = 247
Width = 80 Width = 80
Height = 21 Height = 21
Caption = #35746#21333#31867#22411#65306 Caption = #35746#21333#31867#22411#65306
Visible = False
end end
object Label18: TLabel object Label18: TLabel
Left = 722 Left = 730
Top = 49 Top = 121
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #21457#36135#22320#22336 Caption = #21457#36135#22320#22336
end end
object Label4: TLabel
Left = 352
Top = 66
Width = 48
Height = 21
Caption = #35746#21333#21495
end
object TMMNo: TcxTextEdit object TMMNo: TcxTextEdit
Tag = 2 Tag = 2
Left = 114 Left = 814
Top = 10 Top = 17
Enabled = False Enabled = False
TabOrder = 0 TabOrder = 0
Width = 200 Width = 200
end end
object TMMDate: TDateTimePicker object TMMDate: TDateTimePicker
Tag = 2 Tag = 2
Left = 806 Left = 814
Top = 9 Top = 66
Width = 200 Width = 200
Height = 29 Height = 29
BevelInner = bvNone BevelInner = bvNone
@ -545,8 +561,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
end end
object DLYDate: TDateTimePicker object DLYDate: TDateTimePicker
Tag = 2 Tag = 2
Left = 461 Left = 436
Top = 9 Top = 17
Width = 200 Width = 200
Height = 29 Height = 29
BevelInner = bvNone BevelInner = bvNone
@ -555,12 +571,13 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Time = 0.670856296288548000 Time = 0.670856296288548000
ShowCheckbox = True ShowCheckbox = True
TabOrder = 2 TabOrder = 2
Visible = False
end end
object OrdNote: TMemo object OrdNote: TMemo
Tag = 2 Tag = 2
Left = 114 Left = 122
Top = 126 Top = 119
Width = 894 Width = 511
Height = 58 Height = 58
Hint = 'OrdNote/'#22791#27880 Hint = 'OrdNote/'#22791#27880
ScrollBars = ssVertical ScrollBars = ssVertical
@ -569,8 +586,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
end end
object OrdType: TComboBox object OrdType: TComboBox
Tag = 2 Tag = 2
Left = 114 Left = 122
Top = 83 Top = 243
Width = 200 Width = 200
Height = 29 Height = 29
Style = csDropDownList Style = csDropDownList
@ -580,13 +597,14 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
ParentCtl3D = False ParentCtl3D = False
TabOrder = 4 TabOrder = 4
Text = #27491#24120#21333 Text = #27491#24120#21333
Visible = False
Items.Strings = ( Items.Strings = (
#27491#24120#21333) #27491#24120#21333)
end end
object OurCoName: TcxButtonEdit object OurCoName: TcxButtonEdit
Tag = 2 Tag = 2
Left = 114 Left = 122
Top = 45 Top = 17
Properties.Buttons = < Properties.Buttons = <
item item
Default = True Default = True
@ -596,13 +614,14 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Properties.OnButtonClick = OurCoNamePropertiesButtonClick Properties.OnButtonClick = OurCoNamePropertiesButtonClick
Style.ButtonStyle = btsDefault Style.ButtonStyle = btsDefault
TabOrder = 5 TabOrder = 5
Visible = False
OnDblClick = OurCoNameDblClick OnDblClick = OurCoNameDblClick
Width = 200 Width = 200
end end
object CustName: TcxButtonEdit object CustName: TcxButtonEdit
Tag = 2 Tag = 2
Left = 461 Left = 122
Top = 48 Top = 64
Properties.Buttons = < Properties.Buttons = <
item item
Default = True Default = True
@ -617,8 +636,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
end end
object ShippingAddress: TcxButtonEdit object ShippingAddress: TcxButtonEdit
Tag = 2 Tag = 2
Left = 806 Left = 814
Top = 48 Top = 120
Hint = 'ShippingAddress/'#21457#36135#22320#22336 Hint = 'ShippingAddress/'#21457#36135#22320#22336
Properties.Buttons = < Properties.Buttons = <
item item
@ -634,8 +653,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
end end
object CONTACT: TcxButtonEdit object CONTACT: TcxButtonEdit
Tag = 2 Tag = 2
Left = 461 Left = 469
Top = 83 Top = 243
Hint = 'CONTACT/'#32852#31995#26041#24335 Hint = 'CONTACT/'#32852#31995#26041#24335
Properties.Buttons = < Properties.Buttons = <
item item
@ -646,9 +665,17 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Properties.OnButtonClick = ShippingAddressPropertiesButtonClick Properties.OnButtonClick = ShippingAddressPropertiesButtonClick
Style.ButtonStyle = btsDefault Style.ButtonStyle = btsDefault
TabOrder = 8 TabOrder = 8
Visible = False
OnDblClick = OurCoNameDblClick OnDblClick = OurCoNameDblClick
Width = 545 Width = 545
end end
object BuyOrdNo: TcxTextEdit
Tag = 2
Left = 436
Top = 62
TabOrder = 9
Width = 200
end
end end
inherited ADOQueryBaseCmd: TADOQuery inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink Connection = DataLink_TradeMarket.ADOLink
@ -770,8 +797,8 @@ inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Connection = DataLink_TradeMarket.ADOLink Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly LockType = ltReadOnly
Parameters = <> Parameters = <>
Left = 643 Left = 739
Top = 188 Top = 204
end end
object ADO_RCPM: TADOQuery object ADO_RCPM: TADOQuery
Connection = DataLink_TradeMarket.ADOLink Connection = DataLink_TradeMarket.ADOLink

View File

@ -99,6 +99,8 @@ type
DS_PM: TDataSource; DS_PM: TDataSource;
Tv1Column12: TcxGridDBColumn; Tv1Column12: TcxGridDBColumn;
ADO_1: TADOQuery; ADO_1: TADOQuery;
Label4: TLabel;
BuyOrdNo: TcxTextEdit;
procedure TBCloseClick(Sender: TObject); procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure TBSaveClick(Sender: TObject); procedure TBSaveClick(Sender: TObject);
@ -130,6 +132,7 @@ type
procedure Tv1Column7PropertiesEditValueChanged(Sender: TObject); procedure Tv1Column7PropertiesEditValueChanged(Sender: TObject);
procedure Tv1Column12PropertiesEditValueChanged(Sender: TObject); procedure Tv1Column12PropertiesEditValueChanged(Sender: TObject);
procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Tv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure FormCreate(Sender: TObject);
private private
FSCXDH: string; FSCXDH: string;
procedure InitData(); procedure InitData();
@ -293,6 +296,13 @@ var
begin begin
end; end;
procedure TfrmTradeMarketInPut.FormCreate(Sender: TObject);
begin
inherited;
OurCoName.Properties.LookupItems.Text := 'W0001';
OurCoName.Text := '¸ñÃÀ';
end;
procedure TfrmTradeMarketInPut.FormShow(Sender: TObject); procedure TfrmTradeMarketInPut.FormShow(Sender: TObject);
var var
i: Integer; i: Integer;

View File

@ -9,8 +9,8 @@ inherited frmTradeMarketList: TfrmTradeMarketList
FormStyle = fsMDIChild FormStyle = fsMDIChild
Position = poScreenCenter Position = poScreenCenter
Visible = True Visible = True
ExplicitWidth = 1548 ExplicitWidth = 1556
ExplicitHeight = 625 ExplicitHeight = 633
PixelsPerInch = 96 PixelsPerInch = 96
TextHeight = 21 TextHeight = 21
object ToolBar1: TToolBar [0] object ToolBar1: TToolBar [0]
@ -171,7 +171,7 @@ inherited frmTradeMarketList: TfrmTradeMarketList
Top = 51 Top = 51
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #35745#21010#21333#21495 Caption = #21333#25454#32534#21495
end end
object Label1: TLabel object Label1: TLabel
Left = 408 Left = 408
@ -196,8 +196,8 @@ inherited frmTradeMarketList: TfrmTradeMarketList
end end
object TMMNo: TcxTextEdit object TMMNo: TcxTextEdit
Tag = 2 Tag = 2
Left = 92 Left = 90
Top = 47 Top = 45
TabOrder = 0 TabOrder = 0
OnKeyPress = TMMNoKeyPress OnKeyPress = TMMNoKeyPress
Width = 120 Width = 120
@ -256,7 +256,6 @@ inherited frmTradeMarketList: TfrmTradeMarketList
Align = alClient Align = alClient
PopupMenu = PM_1 PopupMenu = PM_1
TabOrder = 3 TabOrder = 3
ExplicitTop = 154
object Tv1: TcxGridDBTableView object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <> ScrollbarAnnotations.CustomAnnotations = <>
@ -290,6 +289,13 @@ inherited frmTradeMarketList: TfrmTradeMarketList
HeaderAlignmentHorz = taCenter HeaderAlignmentHorz = taCenter
Width = 50 Width = 50
end end
object Tv1Column7: TcxGridDBColumn
Caption = #21333#25454#32534#21495
DataBinding.FieldName = 'TMMNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 116
end
object v1OrdDate: TcxGridDBColumn object v1OrdDate: TcxGridDBColumn
Caption = #21046#21333#26085#26399 Caption = #21046#21333#26085#26399
DataBinding.FieldName = 'TMMDate' DataBinding.FieldName = 'TMMDate'
@ -434,7 +440,6 @@ inherited frmTradeMarketList: TfrmTradeMarketList
Align = alClient Align = alClient
PopupMenu = PopupMenu2 PopupMenu = PopupMenu2
TabOrder = 0 TabOrder = 0
ExplicitTop = -2
object TV2: TcxGridDBTableView object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <> Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <> ScrollbarAnnotations.CustomAnnotations = <>

View File

@ -97,6 +97,7 @@ type
Tv1Column3: TcxGridDBColumn; Tv1Column3: TcxGridDBColumn;
Tv1Column5: TcxGridDBColumn; Tv1Column5: TcxGridDBColumn;
frmFrameDateSel1: TfrmFrameDateSel; frmFrameDateSel1: TfrmFrameDateSel;
Tv1Column7: TcxGridDBColumn;
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);