菜比超超

This commit is contained in:
“ddf” 2025-02-25 16:04:43 +08:00
parent 28f20e2612
commit f0e334c02c
10 changed files with 15929 additions and 529 deletions

View File

@ -16,9 +16,8 @@ uses
U_cxGridCustomCss in '..\..\..\public10\design\U_cxGridCustomCss.pas', U_cxGridCustomCss in '..\..\..\public10\design\U_cxGridCustomCss.pas',
U_CompressionFun in '..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas', U_CompressionFun in '..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas',
U_RTFun in '..\..\..\public10\ThreeFun\Fun\U_RTFun.pas', U_RTFun in '..\..\..\public10\ThreeFun\Fun\U_RTFun.pas',
U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp}, U_GYSCPNAME in 'U_GYSCPNAME.pas' {frmGYSCPNAME},
U_AttachmentUpload in '..\A00通用窗体\U_AttachmentUpload.pas' {frmFjList_RZ}, U_AttachmentUpload in '..\A00通用窗体\U_AttachmentUpload.pas' {frmFjList_RZ},
U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel},
U_EmployeeSel in '..\A00通用窗体\U_EmployeeSel.pas' {frmEmployeeSel}, U_EmployeeSel in '..\A00通用窗体\U_EmployeeSel.pas' {frmEmployeeSel},
U_CloInfoFileUp in 'U_CloInfoFileUp.pas' {frmCloInfoFileUp}, U_CloInfoFileUp in 'U_CloInfoFileUp.pas' {frmCloInfoFileUp},
U_TatClothInfo in 'U_TatClothInfo.pas' {frmTatClothInfo}, U_TatClothInfo in 'U_TatClothInfo.pas' {frmTatClothInfo},
@ -47,7 +46,9 @@ uses
U_ClothInfoInput2 in 'U_ClothInfoInput2.pas' {frmClothInfoInput2}, U_ClothInfoInput2 in 'U_ClothInfoInput2.pas' {frmClothInfoInput2},
FrameDateSel in '..\A00通用组件\FrameDateSel.pas' {frmFrameDateSel: TFrame}, FrameDateSel in '..\A00通用组件\FrameDateSel.pas' {frmFrameDateSel: TFrame},
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_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel};
{$R *.res} {$R *.res}

View File

@ -148,15 +148,12 @@
<DCCReference Include="..\..\..\public10\design\U_cxGridCustomCss.pas"/> <DCCReference Include="..\..\..\public10\design\U_cxGridCustomCss.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas"/> <DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_RTFun.pas"/> <DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_RTFun.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas"> <DCCReference Include="U_GYSCPNAME.pas">
<Form>frmZDYHelp</Form> <Form>frmGYSCPNAME</Form>
</DCCReference> </DCCReference>
<DCCReference Include="..\A00通用窗体\U_AttachmentUpload.pas"> <DCCReference Include="..\A00通用窗体\U_AttachmentUpload.pas">
<Form>frmFjList_RZ</Form> <Form>frmFjList_RZ</Form>
</DCCReference> </DCCReference>
<DCCReference Include="..\A00通用窗体\U_CompanySel.pas">
<Form>frmCompanySel</Form>
</DCCReference>
<DCCReference Include="..\A00通用窗体\U_EmployeeSel.pas"> <DCCReference Include="..\A00通用窗体\U_EmployeeSel.pas">
<Form>frmEmployeeSel</Form> <Form>frmEmployeeSel</Form>
</DCCReference> </DCCReference>
@ -241,6 +238,14 @@
<FormType>dfm</FormType> <FormType>dfm</FormType>
</DCCReference> </DCCReference>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/> <DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas">
<Form>frmZDYHelp</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\A00通用窗体\U_CompanySel.pas">
<Form>frmCompanySel</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

@ -9,6 +9,7 @@ inherited frmClothInfo: TfrmClothInfo
Font.Height = -16 Font.Height = -16
FormStyle = fsMDIChild FormStyle = fsMDIChild
Position = poScreenCenter Position = poScreenCenter
Visible = True
ExplicitWidth = 1556 ExplicitWidth = 1556
ExplicitHeight = 884 ExplicitHeight = 884
PixelsPerInch = 96 PixelsPerInch = 96

View File

@ -3,7 +3,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Top = 231 Top = 231
Anchors = [] Anchors = []
Caption = #20135#21697#20449#24687#24405#20837 Caption = #20135#21697#20449#24687#24405#20837
ClientHeight = 523 ClientHeight = 676
ClientWidth = 1284 ClientWidth = 1284
Color = clBtnFace Color = clBtnFace
Font.Charset = GB2312_CHARSET Font.Charset = GB2312_CHARSET
@ -68,13 +68,36 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 0 Left = 0
Top = 30 Top = 30
Width = 751 Width = 751
Height = 493 Height = 646
Align = alLeft Align = alLeft
BevelInner = bvNone BevelInner = bvNone
BevelOuter = bvNone BevelOuter = bvNone
Ctl3D = False Ctl3D = False
ParentCtl3D = False ParentCtl3D = False
TabOrder = 1 TabOrder = 1
object Label3: TLabel
Left = 999
Top = 181
Width = 48
Height = 21
Caption = #26465#30721#65306
Visible = False
end
object BCIID: TcxTextEdit
Left = 1048
Top = 172
Enabled = False
TabOrder = 0
Visible = False
Width = 218
end
object Panel2: TPanel
Left = 0
Top = 0
Width = 749
Height = 357
Align = alTop
TabOrder = 1
object Label1: TLabel object Label1: TLabel
Left = 37 Left = 37
Top = 18 Top = 18
@ -110,17 +133,9 @@ object frmClothInfoInput: TfrmClothInfoInput
Height = 21 Height = 21
Caption = #33457#22411#32534#21495 Caption = #33457#22411#32534#21495
end end
object Label3: TLabel
Left = 999
Top = 181
Width = 48
Height = 21
Caption = #26465#30721#65306
Visible = False
end
object Label7: TLabel object Label7: TLabel
Left = 385 Left = 385
Top = 462 Top = 454
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #20013#25991#25104#20998 Caption = #20013#25991#25104#20998
@ -134,15 +149,15 @@ object frmClothInfoInput: TfrmClothInfoInput
Caption = #35268#26684 Caption = #35268#26684
end end
object Label9: TLabel object Label9: TLabel
Left = 39 Left = 38
Top = 322 Top = 293
Width = 32 Width = 32
Height = 21 Height = 21
Caption = #22791#27880 Caption = #22791#27880
end end
object Label11: TLabel object Label11: TLabel
Left = 364 Left = 364
Top = 465 Top = 454
Width = 32 Width = 32
Height = 21 Height = 21
Caption = #24067#31181 Caption = #24067#31181
@ -150,20 +165,12 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object Label10: TLabel object Label10: TLabel
Left = 386 Left = 386
Top = 463 Top = 454
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #33521#25991#25104#20998 Caption = #33521#25991#25104#20998
Visible = False Visible = False
end end
object Label12: TLabel
Left = 364
Top = 502
Width = 64
Height = 21
Caption = #32433#32447#24418#24577
Visible = False
end
object Label16: TLabel object Label16: TLabel
Left = 420 Left = 420
Top = 170 Top = 170
@ -172,8 +179,8 @@ object frmClothInfoInput: TfrmClothInfoInput
Caption = #24037#33402 Caption = #24037#33402
end end
object Label18: TLabel object Label18: TLabel
Left = 39 Left = 426
Top = 210 Top = 282
Width = 80 Width = 80
Height = 21 Height = 21
Caption = #20379#24212#21830#20195#21495 Caption = #20379#24212#21830#20195#21495
@ -187,7 +194,7 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object Label21: TLabel object Label21: TLabel
Left = 389 Left = 389
Top = 453 Top = 454
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #33521#25991#21697#21517 Caption = #33521#25991#21697#21517
@ -201,8 +208,8 @@ object frmClothInfoInput: TfrmClothInfoInput
Caption = #26579#33394#26041#24335 Caption = #26579#33394#26041#24335
end end
object Label2: TLabel object Label2: TLabel
Left = 39 Left = 37
Top = 246 Top = 212
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #26631#20934#25253#20215 Caption = #26631#20934#25253#20215
@ -237,7 +244,7 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object Label17: TLabel object Label17: TLabel
Left = 37 Left = 37
Top = 456 Top = 454
Width = 41 Width = 41
Height = 21 Height = 21
Caption = #21697#21517'1' Caption = #21697#21517'1'
@ -245,19 +252,27 @@ object frmClothInfoInput: TfrmClothInfoInput
end end
object Label24: TLabel object Label24: TLabel
Left = 433 Left = 433
Top = 456 Top = 454
Width = 41 Width = 41
Height = 21 Height = 21
Caption = #21697#21517'2' Caption = #21697#21517'2'
Visible = False Visible = False
end end
object Label25: TLabel object Label25: TLabel
Left = 39 Left = 37
Top = 281 Top = 247
Width = 64 Width = 64
Height = 21 Height = 21
Caption = #35745#20215#21333#20301 Caption = #35745#20215#21333#20301
end end
object Label12: TLabel
Left = 364
Top = 477
Width = 64
Height = 21
Caption = #32433#32447#24418#24577
Visible = False
end
object C_Code: TcxTextEdit object C_Code: TcxTextEdit
Tag = 2 Tag = 2
Left = 119 Left = 119
@ -275,14 +290,6 @@ object frmClothInfoInput: TfrmClothInfoInput
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
Width = 234 Width = 234
end end
object BCIID: TcxTextEdit
Left = 1048
Top = 172
Enabled = False
TabOrder = 2
Visible = False
Width = 218
end
object C_GramWeight: TcxButtonEdit object C_GramWeight: TcxButtonEdit
Tag = 2 Tag = 2
Left = 507 Left = 507
@ -296,14 +303,14 @@ object frmClothInfoInput: TfrmClothInfoInput
Properties.ReadOnly = False Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault Style.ButtonStyle = btsDefault
TabOrder = 3 TabOrder = 2
OnDblClick = C_GramWeightDblClick OnDblClick = C_GramWeightDblClick
Width = 234 Width = 234
end end
object C_Composition: TcxButtonEdit object C_Composition: TcxButtonEdit
Tag = 2 Tag = 2
Left = 467 Left = 467
Top = 456 Top = 454
Hint = 'C_Composition/'#25104#20998 Hint = 'C_Composition/'#25104#20998
Properties.Buttons = < Properties.Buttons = <
item item
@ -313,7 +320,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Properties.ReadOnly = False Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault Style.ButtonStyle = btsDefault
TabOrder = 4 TabOrder = 3
Visible = False Visible = False
OnDblClick = C_GramWeightDblClick OnDblClick = C_GramWeightDblClick
Width = 234 Width = 234
@ -331,14 +338,14 @@ object frmClothInfoInput: TfrmClothInfoInput
Properties.ReadOnly = False Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault Style.ButtonStyle = btsDefault
TabOrder = 5 TabOrder = 4
OnDblClick = C_GramWeightDblClick OnDblClick = C_GramWeightDblClick
Width = 234 Width = 234
end end
object C_FromName: TcxButtonEdit object C_FromName: TcxButtonEdit
Tag = 7 Tag = 7
Left = 119 Left = 119
Top = 450 Top = 454
Properties.Buttons = < Properties.Buttons = <
item item
Default = True Default = True
@ -347,7 +354,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Properties.ReadOnly = False Properties.ReadOnly = False
Properties.OnButtonClick = C_FromNamePropertiesButtonClick Properties.OnButtonClick = C_FromNamePropertiesButtonClick
Style.ButtonStyle = btsDefault Style.ButtonStyle = btsDefault
TabOrder = 6 TabOrder = 5
Visible = False Visible = False
OnDblClick = C_GramWeightDblClick OnDblClick = C_GramWeightDblClick
Width = 234 Width = 234
@ -365,7 +372,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Properties.ReadOnly = False Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault Style.ButtonStyle = btsDefault
TabOrder = 7 TabOrder = 6
OnDblClick = C_GramWeightDblClick OnDblClick = C_GramWeightDblClick
Width = 234 Width = 234
end end
@ -382,23 +389,23 @@ object frmClothInfoInput: TfrmClothInfoInput
Properties.ReadOnly = False Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault Style.ButtonStyle = btsDefault
TabOrder = 8 TabOrder = 7
OnDblClick = C_GramWeightDblClick OnDblClick = C_GramWeightDblClick
Width = 234 Width = 234
end end
object CINote: TcxMemo object CINote: TcxMemo
Tag = 2 Tag = 2
Left = 119 Left = 116
Top = 318 Top = 285
TabOrder = 9 TabOrder = 8
Height = 57 Height = 57
Width = 622 Width = 622
end end
object GC_Name: TcxTextEdit object GC_Name: TcxTextEdit
Tag = 2 Tag = 2
Left = 446 Left = 446
Top = 459 Top = 454
TabOrder = 10 TabOrder = 9
Visible = False Visible = False
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
Width = 234 Width = 234
@ -406,7 +413,7 @@ object frmClothInfoInput: TfrmClothInfoInput
object C_EComposition: TcxButtonEdit object C_EComposition: TcxButtonEdit
Tag = 2 Tag = 2
Left = 472 Left = 472
Top = 457 Top = 454
Hint = 'C_EComposition/'#25104#20998 Hint = 'C_EComposition/'#25104#20998
Properties.Buttons = < Properties.Buttons = <
item item
@ -416,33 +423,24 @@ object frmClothInfoInput: TfrmClothInfoInput
Properties.ReadOnly = False Properties.ReadOnly = False
Properties.OnButtonClick = C_WidthPropertiesButtonClick Properties.OnButtonClick = C_WidthPropertiesButtonClick
Style.ButtonStyle = btsDefault Style.ButtonStyle = btsDefault
TabOrder = 11 TabOrder = 10
Visible = False Visible = False
OnDblClick = C_GramWeightDblClick OnDblClick = C_GramWeightDblClick
Width = 234 Width = 234
end end
object C_YarnSpec: TcxTextEdit
Tag = 2
Left = 446
Top = 496
TabOrder = 12
Visible = False
OnKeyPress = CYColorKeyPress
Width = 234
end
object CraftCode: TcxTextEdit object CraftCode: TcxTextEdit
Tag = 2 Tag = 2
Left = 507 Left = 507
Top = 167 Top = 167
TabOrder = 13 TabOrder = 11
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
Width = 234 Width = 234
end end
object FtyNo: TcxTextEdit object FtyNo: TcxTextEdit
Tag = 2 Tag = 2
Left = 119 Left = 506
Top = 206 Top = 278
TabOrder = 14 TabOrder = 12
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
Width = 234 Width = 234
end end
@ -450,15 +448,15 @@ object frmClothInfoInput: TfrmClothInfoInput
Tag = 2 Tag = 2
Left = 507 Left = 507
Top = 244 Top = 244
TabOrder = 15 TabOrder = 13
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
Width = 234 Width = 234
end end
object C_EName: TcxTextEdit object C_EName: TcxTextEdit
Tag = 2 Tag = 2
Left = 475 Left = 475
Top = 447 Top = 454
TabOrder = 16 TabOrder = 14
Visible = False Visible = False
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
Width = 234 Width = 234
@ -467,18 +465,18 @@ object frmClothInfoInput: TfrmClothInfoInput
Tag = 2 Tag = 2
Left = 507 Left = 507
Top = 206 Top = 206
TabOrder = 17 TabOrder = 15
OnKeyPress = CYColorKeyPress OnKeyPress = CYColorKeyPress
Width = 234 Width = 234
end end
object CostPrice: TcxCurrencyEdit object CostPrice: TcxCurrencyEdit
Tag = 2 Tag = 2
Left = 120 Left = 118
Top = 242 Top = 208
EditValue = 0.000000000000000000 EditValue = 0.000000000000000000
Properties.AssignedValues.DisplayFormat = True Properties.AssignedValues.DisplayFormat = True
Properties.OnEditValueChanged = CostPricePropertiesEditValueChanged Properties.OnEditValueChanged = CostPricePropertiesEditValueChanged
TabOrder = 18 TabOrder = 16
Width = 234 Width = 234
end end
object distributionCoefficient: TcxCurrencyEdit object distributionCoefficient: TcxCurrencyEdit
@ -486,7 +484,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 119 Left = 119
Top = 167 Top = 167
Properties.AssignedValues.DisplayFormat = True Properties.AssignedValues.DisplayFormat = True
TabOrder = 19 TabOrder = 17
Width = 234 Width = 234
end end
object quota: TcxCurrencyEdit object quota: TcxCurrencyEdit
@ -495,13 +493,13 @@ object frmClothInfoInput: TfrmClothInfoInput
Top = 129 Top = 129
EditValue = 10.000000000000000000 EditValue = 10.000000000000000000
Properties.AssignedValues.DisplayFormat = True Properties.AssignedValues.DisplayFormat = True
TabOrder = 20 TabOrder = 18
Width = 210 Width = 210
end end
object C_FromName2: TcxButtonEdit object C_FromName2: TcxButtonEdit
Tag = 7 Tag = 7
Left = 505 Left = 505
Top = 452 Top = 454
Properties.Buttons = < Properties.Buttons = <
item item
Default = True Default = True
@ -510,7 +508,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Properties.ReadOnly = False Properties.ReadOnly = False
Properties.OnButtonClick = C_FromName2PropertiesButtonClick Properties.OnButtonClick = C_FromName2PropertiesButtonClick
Style.ButtonStyle = btsDefault Style.ButtonStyle = btsDefault
TabOrder = 21 TabOrder = 19
Visible = False Visible = False
OnDblClick = C_GramWeightDblClick OnDblClick = C_GramWeightDblClick
Width = 234 Width = 234
@ -529,12 +527,12 @@ object frmClothInfoInput: TfrmClothInfoInput
Style.Font.Name = #23435#20307 Style.Font.Name = #23435#20307
Style.Font.Style = [] Style.Font.Style = []
Style.IsFontAssigned = True Style.IsFontAssigned = True
TabOrder = 22 TabOrder = 20
Width = 233 Width = 233
end end
object qtyunit: TcxMRUEdit object qtyunit: TcxMRUEdit
Left = 120 Left = 118
Top = 282 Top = 248
Hint = 'qtyunit/'#25968#37327#21333#20301 Hint = 'qtyunit/'#25968#37327#21333#20301
ParentFont = False ParentFont = False
Properties.ImmediatePost = True Properties.ImmediatePost = True
@ -546,15 +544,117 @@ object frmClothInfoInput: TfrmClothInfoInput
Style.Font.Name = #23435#20307 Style.Font.Name = #23435#20307
Style.Font.Style = [] Style.Font.Style = []
Style.IsFontAssigned = True Style.IsFontAssigned = True
TabOrder = 23 TabOrder = 21
Width = 233 Width = 233
end end
object C_YarnSpec: TcxTextEdit
Tag = 2
Left = 446
Top = 477
TabOrder = 22
Visible = False
OnKeyPress = CYColorKeyPress
Width = 234
end
end
object Panel3: TPanel
Left = 0
Top = 357
Width = 749
Height = 287
Align = alClient
TabOrder = 2
object ToolBar3: TToolBar
Left = 1
Top = 1
Width = 747
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 67
Caption = 'ToolBar1'
DisabledImages = DataLink_ClothInfo.cxImageList_bar
Images = DataLink_ClothInfo.cxImageList_bar
List = True
ShowCaptions = True
TabOrder = 0
object ToolButton5: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #22686#34892
ImageIndex = 2
OnClick = ToolButton5Click
end
object ToolButton7: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #21024#34892
ImageIndex = 6
OnClick = ToolButton7Click
end
end
object cxGrid2: TcxGrid
Left = 1
Top = 31
Width = 747
Height = 255
Align = alClient
TabOrder = 1
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_2
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 cxGridDBColumn1: TcxGridDBColumn
Caption = #20379#24212#21830
DataBinding.FieldName = 'FACTORYNAME'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.OnButtonClick = cxGridDBColumn1PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 104
end
object cxGridDBColumn2: TcxGridDBColumn
Caption = #20379#24212#21830#21697#21517
DataBinding.FieldName = 'C_GYSNAME'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 117
end
end
object cxGridLevel1: TcxGridLevel
GridView = TV2
end
end
end
end end
object Panel1: TPanel object Panel1: TPanel
Left = 751 Left = 751
Top = 30 Top = 30
Width = 533 Width = 533
Height = 493 Height = 646
Align = alClient Align = alClient
TabOrder = 2 TabOrder = 2
object ToolBar2: TToolBar object ToolBar2: TToolBar
@ -592,7 +692,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Left = 1 Left = 1
Top = 31 Top = 31
Width = 531 Width = 531
Height = 461 Height = 614
Align = alClient Align = alClient
TabOrder = 1 TabOrder = 1
object TV1: TcxGridDBTableView object TV1: TcxGridDBTableView
@ -670,37 +770,61 @@ object frmClothInfoInput: TfrmClothInfoInput
Connection = DataLink_ClothInfo.ADOLink Connection = DataLink_ClothInfo.ADOLink
Parameters = <> Parameters = <>
Left = 440 Left = 440
Top = 200 Top = 277
end end
object ADOQueryTemp: TADOQuery object ADOQueryTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly LockType = ltReadOnly
Parameters = <> Parameters = <>
Left = 534 Left = 534
Top = 200 Top = 277
end end
object DS_1: TDataSource object DS_1: TDataSource
DataSet = CDS_1 DataSet = CDS_1
Left = 816 Left = 534
Top = 200 Top = 371
end end
object CDS_1: TClientDataSet object CDS_1: TClientDataSet
Aggregates = <> Aggregates = <>
Params = <> Params = <>
Left = 628 Left = 628
Top = 200 Top = 277
end end
object GPM_1: TcxGridPopupMenu object GPM_1: TcxGridPopupMenu
Grid = cxGrid1 Grid = cxGrid1
PopupMenus = <> PopupMenus = <>
Left = 440
Top = 371
end
object CDS_2: TClientDataSet
Aggregates = <>
Params = <>
Left = 722 Left = 722
Top = 200 Top = 277
end
object DS_2: TDataSource
DataSet = CDS_2
Left = 628
Top = 371
end
object cxGridPopupMenu1: TcxGridPopupMenu
Grid = cxGrid2
PopupMenus = <>
Left = 816
Top = 277
end end
object ADO_1: TADOQuery object ADO_1: TADOQuery
Connection = DataLink_ClothInfo.ADOLink Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly LockType = ltReadOnly
Parameters = <> Parameters = <>
Left = 536 Left = 326
Top = 264 Top = 495
end
object ADO_2: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 522
Top = 499
end end
end end

View File

@ -21,41 +21,9 @@ type
ADOQueryCmd: TADOQuery; ADOQueryCmd: TADOQuery;
ADOQueryTemp: TADOQuery; ADOQueryTemp: TADOQuery;
ScrollBox1: TScrollBox; ScrollBox1: TScrollBox;
Label1: TLabel;
Label5: TLabel;
Label15: TLabel;
Label22: TLabel;
Label4: TLabel;
Label3: TLabel; Label3: TLabel;
C_Code: TcxTextEdit;
C_Name: TcxTextEdit;
Label7: TLabel;
ToolButton6: TToolButton; ToolButton6: TToolButton;
BCIID: TcxTextEdit; BCIID: TcxTextEdit;
Label6: TLabel;
Label9: TLabel;
C_GramWeight: TcxButtonEdit;
C_Composition: TcxButtonEdit;
C_Spec: TcxButtonEdit;
Label11: TLabel;
C_FromName: TcxButtonEdit;
C_Width: TcxButtonEdit;
C_Pattern: TcxButtonEdit;
CINote: TcxMemo;
GC_Name: TcxTextEdit;
Label10: TLabel;
C_EComposition: TcxButtonEdit;
Label12: TLabel;
C_YarnSpec: TcxTextEdit;
Label16: TLabel;
CraftCode: TcxTextEdit;
Label18: TLabel;
Label19: TLabel;
FtyNo: TcxTextEdit;
FtyName: TcxTextEdit;
Label21: TLabel;
Label23: TLabel;
DyeingMethod: TcxTextEdit;
Panel1: TPanel; Panel1: TPanel;
ToolBar2: TToolBar; ToolBar2: TToolBar;
ToolButton3: TToolButton; ToolButton3: TToolButton;
@ -69,25 +37,72 @@ type
CDS_1: TClientDataSet; CDS_1: TClientDataSet;
GPM_1: TcxGridPopupMenu; GPM_1: TcxGridPopupMenu;
ToolButton2: TToolButton; ToolButton2: TToolButton;
CostPrice: TcxCurrencyEdit; TV1Column5: TcxGridDBColumn;
TV1Column6: TcxGridDBColumn;
TV1Column3: TcxGridDBColumn;
TV1Column4: TcxGridDBColumn;
Panel2: TPanel;
Label1: TLabel;
Label5: TLabel;
Label15: TLabel;
Label22: TLabel;
Label4: TLabel;
Label7: TLabel;
Label6: TLabel;
Label9: TLabel;
Label11: TLabel;
Label10: TLabel;
Label16: TLabel;
Label18: TLabel;
Label19: TLabel;
Label21: TLabel;
Label23: TLabel;
Label2: TLabel; Label2: TLabel;
distributionCoefficient: TcxCurrencyEdit;
Label8: TLabel; Label8: TLabel;
quota: TcxCurrencyEdit;
Label13: TLabel; Label13: TLabel;
Label14: TLabel; Label14: TLabel;
Label20: TLabel; Label20: TLabel;
TV1Column5: TcxGridDBColumn;
TV1Column6: TcxGridDBColumn;
C_FromName2: TcxButtonEdit;
Label17: TLabel; Label17: TLabel;
Label24: TLabel; Label24: TLabel;
TV1Column3: TcxGridDBColumn;
TV1Column4: TcxGridDBColumn;
StkPosition: TcxMRUEdit;
Label25: TLabel; Label25: TLabel;
C_Code: TcxTextEdit;
C_Name: TcxTextEdit;
C_GramWeight: TcxButtonEdit;
C_Composition: TcxButtonEdit;
C_Spec: TcxButtonEdit;
C_FromName: TcxButtonEdit;
C_Width: TcxButtonEdit;
C_Pattern: TcxButtonEdit;
CINote: TcxMemo;
GC_Name: TcxTextEdit;
C_EComposition: TcxButtonEdit;
CraftCode: TcxTextEdit;
FtyNo: TcxTextEdit;
FtyName: TcxTextEdit;
C_EName: TcxTextEdit;
DyeingMethod: TcxTextEdit;
CostPrice: TcxCurrencyEdit;
distributionCoefficient: TcxCurrencyEdit;
quota: TcxCurrencyEdit;
C_FromName2: TcxButtonEdit;
StkPosition: TcxMRUEdit;
qtyunit: TcxMRUEdit; qtyunit: TcxMRUEdit;
Label12: TLabel;
C_YarnSpec: TcxTextEdit;
Panel3: TPanel;
ToolBar3: TToolBar;
ToolButton5: TToolButton;
ToolButton7: TToolButton;
cxGrid2: TcxGrid;
TV2: TcxGridDBTableView;
cxGridDBColumn1: TcxGridDBColumn;
cxGridDBColumn2: TcxGridDBColumn;
cxGridLevel1: TcxGridLevel;
CDS_2: TClientDataSet;
DS_2: TDataSource;
cxGridPopupMenu1: TcxGridPopupMenu;
ADO_1: TADOQuery; ADO_1: TADOQuery;
ADO_2: TADOQuery;
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure TBCloseClick(Sender: TObject); procedure TBCloseClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject); procedure ToolButton1Click(Sender: TObject);
@ -104,6 +119,9 @@ type
procedure C_FromName2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer); procedure C_FromName2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure CostPricePropertiesEditValueChanged(Sender: TObject); procedure CostPricePropertiesEditValueChanged(Sender: TObject);
procedure StkPositionPropertiesButtonClick(Sender: TObject); procedure StkPositionPropertiesButtonClick(Sender: TObject);
procedure ToolButton5Click(Sender: TObject);
procedure ToolButton7Click(Sender: TObject);
procedure cxGridDBColumn1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
private private
canshu1: string; canshu1: string;
Fint: Integer; Fint: Integer;
@ -125,7 +143,8 @@ var
implementation 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;
{$R *.dfm} {$R *.dfm}
procedure TfrmClothInfoInput.setName(); procedure TfrmClothInfoInput.setName();
@ -169,6 +188,10 @@ begin
InitCDSData(ADO_1, CDS_1, Tv1, SqlStr, '', ''); InitCDSData(ADO_1, CDS_1, Tv1, SqlStr, '', '');
SqlStr := 'select A.* from BS_Cloth_Info_GYSCP A ';
SqlStr := SqlStr + ' where A.BCIID=''' + Trim(FBCIID) + '''';
InitCDSData(ADO_2, CDS_2, Tv2, SqlStr, '', '');
end; end;
procedure TfrmClothInfoInput.InitGrid(); procedure TfrmClothInfoInput.InitGrid();
@ -182,7 +205,7 @@ begin
Open; Open;
end; end;
SCSHData(ADOQueryTemp, ScrollBox1, 2); SCSHData(ADOQueryTemp, panel2, 2);
StkPosition.Text := ADOQueryTemp.FieldByName('StkPosition').AsString; StkPosition.Text := ADOQueryTemp.FieldByName('StkPosition').AsString;
qtyunit.Text := ADOQueryTemp.FieldByName('qtyunit').AsString; qtyunit.Text := ADOQueryTemp.FieldByName('qtyunit').AsString;
// SCSHData(ADOQueryTemp, ScrollBox1, 0); // SCSHData(ADOQueryTemp, ScrollBox1, 0);
@ -357,7 +380,7 @@ end;
function TfrmClothInfoInput.SaveData(): Boolean; function TfrmClothInfoInput.SaveData(): Boolean;
var var
MaxBCIID, MaxBCPID, maxId2: string; MaxBCIID, MaxBCPID, maxId2, MAXID3: string;
begin begin
try try
ADOQueryCmd.Connection.BeginTrans; ADOQueryCmd.Connection.BeginTrans;
@ -416,7 +439,7 @@ begin
if trim(C_Code.Text) = '' then if trim(C_Code.Text) = '' then
C_Code.Text := Trim(MaxBCIID); C_Code.Text := Trim(MaxBCIID);
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', ScrollBox1, 2); RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', panel2, 2);
Post; Post;
end; end;
with ADOQueryCmd do with ADOQueryCmd do
@ -551,6 +574,58 @@ begin
////////////////////////// ±£´æ×Ó±í ////////////////////////// ////////////////////////// ±£´æ×Ó±í //////////////////////////
/// ///
/// ///
///
////////////////////////// 保存子表 //////////////////////////
with CDS_2 do
begin
First;
while not Eof do
begin
if Trim(CDS_2.fieldbyname('BCIGID').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, MAXID3, 'GS', 'BS_Cloth_Info_GYSCP', 4, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('取子流水号失败!', '提示', 0);
Exit;
end;
end
else
begin
MAXID3 := Trim(CDS_2.fieldbyname('BCIGID').AsString);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add(' select * from BS_Cloth_Info_GYSCP where ');
sql.Add(' BCIGID=''' + Trim(MAXID3) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(CDS_2.fieldbyname('BCIGID').AsString) = '' then
begin
Append;
FieldByName('FillID').Value := Trim(DCode);
FieldByName('Filler').Value := Trim(DName);
FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
end;
FieldByName('BCIID').Value := Trim(MaxBCIID);
FieldByName('BCIGID').Value := Trim(MAXID3);
RTSetSaveDataCDS(ADOQueryCmd, Tv2, CDS_2, 'BS_Cloth_Info_GYSCP', 0);
Post;
end;
Next;
end;
end;
ADOQueryCmd.Connection.CommitTrans; ADOQueryCmd.Connection.CommitTrans;
// with ADOQueryCmd do // with ADOQueryCmd do
@ -675,6 +750,27 @@ begin
end; end;
procedure TfrmClothInfoInput.ToolButton5Click(Sender: TObject);
var
maxno: string;
begin
// if GetLSNo(ADOQueryCmd, maxno, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then
// begin
// Application.MessageBox('取号失败!', '提示', 0);
// Exit;
// end;
with CDS_2 do
begin
APPEND;
fieldbyname('BCIGID').Value := NULL;
Post;
end;
end;
procedure TfrmClothInfoInput.CostPricePropertiesEditValueChanged(Sender: TObject); procedure TfrmClothInfoInput.CostPricePropertiesEditValueChanged(Sender: TObject);
var var
mvalue, FFieldName: string; mvalue, FFieldName: string;
@ -706,6 +802,28 @@ begin
end; end;
end; end;
procedure TfrmClothInfoInput.cxGridDBColumn1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmCompanySel := TfrmCompanySel.Create(Application);
with frmCompanySel do
begin
FCoType := '供应商';
if ShowModal = 1 then
begin
with CDS_2 do
begin
edit;
FieldByName('FACTORYNAME').AsString := Trim(CDS_1.fieldbyname('CoName').AsString);
end;
end;
end;
finally
frmCompanySel.Free;
end;
end;
procedure TfrmClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char); procedure TfrmClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
begin begin
if Key = #13 then if Key = #13 then
@ -736,6 +854,27 @@ begin
end; end;
end; end;
procedure TfrmClothInfoInput.ToolButton7Click(Sender: TObject);
begin
if CDS_2.IsEmpty then
Exit;
if Trim(CDS_2.fieldbyname('BCIGID').AsString) <> '' then
begin
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('delete from BS_Cloth_Info_GYSCP where BCIGID=''' + Trim(CDS_1.fieldbyname('BCIGID').AsString) + '''');
ExecSQL;
end;
end;
CDS_2.Delete;
end;
procedure TfrmClothInfoInput.TV1Column5PropertiesEditValueChanged(Sender: TObject); procedure TfrmClothInfoInput.TV1Column5PropertiesEditValueChanged(Sender: TObject);
var var
mvalue, FFieldName: string; mvalue, FFieldName: string;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,655 @@
unit U_GYSCPNAME;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ToolWin, ComCtrls, U_BaseInput, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
cxLookAndFeelPainters, cxNavigator, dxDateRanges, dxScrollbarAnnotations,
cxContainer, dxBarBuiltInMenu, cxImageList, System.ImageList,
dxSkinsDefaultPainters, dxSkinsCore;
type
TfrmGYSCPNAME = class(TfrmBaseInput)
ToolBar1: TToolBar;
ADOQueryMain: TADOQuery;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
DataSource1: TDataSource;
ClientDataSet1: TClientDataSet;
TBAdd: TToolButton;
TBSave: TToolButton;
TBDel: TToolButton;
TBClose: TToolButton;
ToolButton1: TToolButton;
TBEdit: TToolButton;
ADOConnection1: TADOConnection;
Panel1: TPanel;
Label1: TLabel;
ZDYName: TcxTextEdit;
ThreeImgList: TImageList;
Label2: TLabel;
cxGridPopupMenu1: TcxGridPopupMenu;
ImageList1: TImageList;
cxGrid1: TcxGrid;
TV1: TcxGridDBTableView;
TV1Column1: TcxGridDBColumn;
TV1Column2: TcxGridDBColumn;
cxGridLevel2: TcxGridLevel;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBAddClick(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
procedure TBDelClick(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure TBEditClick(Sender: TObject);
procedure TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure V1NamePropertiesEditValueChanged(Sender: TObject);
procedure V1OrderNoPropertiesEditValueChanged(Sender: TObject);
procedure V1NotePropertiesEditValueChanged(Sender: TObject);
procedure V1Column1PropertiesEditValueChanged(Sender: TObject);
procedure V1HelpTypePropertiesEditValueChanged(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ZDYNamePropertiesChange(Sender: TObject);
private
procedure InitGrid();
{ Private declarations }
public
flag, flagname, snote, MainType: string;
fnote, forderno, fZdyFlag, ViewFlag, fnote1, FHelpType: Boolean;
PPSTE: integer;
{ Public declarations }
end;
var
frmGYSCPNAME: TfrmGYSCPNAME;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp;
{$R *.dfm}
procedure TfrmGYSCPNAME.FormCreate(Sender: TObject);
begin
inherited;
with ADOConnection1 do
begin
Connected := false;
ConnectionString := DConString;
Connected := true;
end;
ADOQueryBaseCmd.Connection := ADOConnection1;
ADOQueryBaseTemp.Connection := ADOConnection1;
end;
procedure TfrmGYSCPNAME.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ZDYName.SetFocus;
Action := cahide;
end;
procedure TfrmGYSCPNAME.InitGrid();
begin
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Close;
sql.Clear;
sql.Add('select A.*,ZJM=dbo.getPinYin(A.ZdyName) from KH_ZDY A where A.Type=''' + flag + '''');
if Trim(MainType) <> '' then
begin
sql.Add(' and A.MainType=''' + Trim(MainType) + '''');
end;
Open;
end;
SCreateCDS(ADOQueryMain, ClientDataSet1);
SInitCDSData(ADOQueryMain, ClientDataSet1);
finally
ADOQueryMain.EnableControls;
end;
end;
procedure TfrmGYSCPNAME.TBAddClick(Sender: TObject);
var
i: Integer;
begin
ZDYName.SetFocus;
TV1.OptionsData.Editing := True;
TV1.OptionsSelection.CellSelect := True;
for i := 0 to 5 do
begin
with ClientDataSet1 do
begin
Append;
Post;
end;
end;
end;
procedure TfrmGYSCPNAME.TBSaveClick(Sender: TObject);
var
maxno: string;
begin
if ClientDataSet1.IsEmpty then
Exit;
ZDYName.SetFocus;
if ClientDataSet1.Locate('ZDYName', null, []) then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
if ClientDataSet1.Locate('ZDYName', '', []) then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
try
ADOQueryCmd.Connection.BeginTrans;
with ADOQueryTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from KH_ZDY where ZdyNo=''' + Trim(flag) + '''');
open;
end;
if ADOQueryTemp.IsEmpty then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('select * from KH_ZDY where 1=2');
open;
ADOQueryCmd.Append;
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(flag);
ADOQueryCmd.FieldByName('ZDYName').Value := trim(flagname);
ADOQueryCmd.FieldByName('Type').Value := 'Main';
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
ADOQueryCmd.Post;
{ sql.Add('insert into KH_ZDY(ZDYNo,ZDYName,Type,MainType) select :ZDYNo,:ZDYName,:Type,:MainType ');
Parameters.ParamByName('ZDYNo').Value:=Trim(flag);
Parameters.ParamByName('ZDYName').Value:=Trim(flagname);
Parameters.ParamByName('Type').Value:='Main';
Parameters.ParamByName('MainType').Value:=Trim(MainType);
ExecSQL; }
end;
end;
with ADOQueryCmd do
begin
ClientDataSet1.DisableControls;
with ClientDataSet1 do
begin
First;
while not eof do
begin
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxno, 'SY', 'KH_ZDY', 3, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
ClientDataSet1.EnableControls;
Application.MessageBox('取最大编号失败!', '提示', 0);
Exit;
end;
end
else
begin
maxno := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.add('select * from KH_Zdy where Type=''' + Trim(flag) + '''');
if Trim(MainType) <> '' then
SQL.Add(' and MainType=''' + Trim(MainType) + '''');
sql.Add(' and ZdyName=''' + Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) + '''');
Open;
end;
if ADOQueryTemp.IsEmpty = False then
begin
if ADOQueryTemp.RecordCount > 1 then
begin
ADOQueryCmd.Connection.RollbackTrans;
ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end;
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) = '' then
begin
ADOQueryCmd.Connection.RollbackTrans;
ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end
else
begin
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString) <> Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
begin
ADOQueryCmd.Connection.RollbackTrans;
ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end;
end;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
SQL.Add('delete KH_ZDY where ZDYNO=''' + Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString) + '''');
ExecSQL;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('select * from KH_ZDY where 1<>1');
Open;
end;
ADOQueryCmd.Append;
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(maxno);
ADOQueryCmd.FieldByName('ZDYName').Value := ClientDataSet1.fieldbyname('ZDYName').Value;
ADOQueryCmd.FieldByName('note').Value := Trim(snote);
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
ADOQueryCmd.FieldByName('Type').Value := flag;
ADOQueryCmd.FieldByName('valid').Value := 'Y';
if Trim(MainType) <> '' then
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
//ADOQueryCmd.FieldByName('sel').Value:=0;
ADOQueryCmd.Post;
ClientDataSet1.Edit;
ClientDataSet1.FieldByName('ZDYNo').Value := Trim(maxno);
ClientDataSet1.Post;
Next;
end;
end;
ClientDataSet1.EnableControls;
end;
ADOQueryCmd.Connection.CommitTrans;
Application.MessageBox('保存成功!', '提示', 0);
TV1.OptionsData.Editing := False;
TV1.OptionsSelection.CellSelect := False;
except
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
end;
procedure TfrmGYSCPNAME.TBDelClick(Sender: TObject);
begin
if ClientDataSet1.IsEmpty then
Exit;
if (Trim(ClientDataSet1.FieldByName('ZDYNo').AsString) <> '') or (Trim(ClientDataSet1.FieldByName('ZDYname').AsString) <> '') then
begin
if application.MessageBox('确定要删除吗?', '提示信息', 1) = 2 then
exit;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('delete KH_ZDY where ZDYNo=''' + Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString) + '''');
SQL.Add(' and Type=''' + Trim(flag) + '''');
ExecSQL;
end;
end;
ClientDataSet1.Delete;
end;
procedure TfrmGYSCPNAME.TBCloseClick(Sender: TObject);
begin
ModalResult := 2;
ZDYName.SetFocus;
Close;
end;
procedure TfrmGYSCPNAME.FormShow(Sender: TObject);
var
fsj, fsj1: string;
begin
// inherited;
InitGrid();
fsj := Trim(flag) + '01';
fsj1 := Trim(flagname) + '01';
ReadCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
frmZDYHelp.Caption := Trim(flagname);
if ViewFlag = True then
begin
TBAdd.Visible := False;
TBSave.Visible := False;
TBDel.Visible := False;
TBEdit.Visible := False;
Label2.Visible := False;
end;
end;
procedure TfrmGYSCPNAME.ToolButton1Click(Sender: TObject);
begin
ZDYName.SetFocus;
// WriteCxGrid('自定义'+Trim(flag),TV1,'自定义数据');
ModalResult := 1;
end;
procedure TfrmGYSCPNAME.TBEditClick(Sender: TObject);
begin
TV1.OptionsData.Editing := True;
TV1.OptionsSelection.CellSelect := True;
end;
procedure TfrmGYSCPNAME.TV1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
begin
if TV1.OptionsData.Editing = False then
begin
ModalResult := 1;
end;
end;
procedure TfrmGYSCPNAME.ZDYNamePropertiesChange(Sender: TObject);
var
fsj: string;
begin
if Trim(ZDYName.Text) <> '' then
begin
fsj := ' zdyname like ''' + '%' + Trim(ZDYName.Text) + '%' + '''' + ' or Note like ''' + '%' + Trim(ZDYName.Text) + '%' + '''' + ' or ZJM like ''' + '%' + Trim(ZDYName.Text) + '%' + '''';
end;
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, fsj);
SCreateCDS(ADOQueryMain, ClientDataSet1);
SInitCDSData(ADOQueryMain, ClientDataSet1);
end;
end;
procedure TfrmGYSCPNAME.V1NamePropertiesEditValueChanged(Sender: TObject);
var
maxno, mvalue: string;
begin
mvalue := TcxTextEdit(Sender).EditingText;
if Trim(mvalue) = '' then
begin
//Application.MessageBox('名称不能为空!','提示',0);
Exit;
end;
with ClientDataSet1 do
begin
Edit;
FieldByName('ZdyName').Value := Trim(mvalue);
//Post;
end;
try
ADOQueryCmd.Connection.BeginTrans;
with ADOQueryTemp do
begin
Close;
SQL.Clear;
SQL.Add('select * from KH_ZDY where ZdyNo=''' + Trim(flag) + '''');
open;
end;
if ADOQueryTemp.IsEmpty then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('select * from KH_ZDY where 1=2');
open;
ADOQueryCmd.Append;
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(flag);
ADOQueryCmd.FieldByName('ZDYName').Value := trim(flagname);
ADOQueryCmd.FieldByName('Type').Value := 'Main';
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
ADOQueryCmd.Post;
end;
end;
with ADOQueryCmd do
begin
//ClientDataSet1.DisableControls;
//with ClientDataSet1 do
//begin
//First;
//while not eof do
//begin
if Trim(ClientDataSet1.FieldByName('ZDYNO').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxno, 'SY', 'KH_ZDY', 3, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
//ClientDataSet1.EnableControls;
Application.MessageBox('取最大编号失败!', '提示', 0);
Exit;
end;
end
else
begin
maxno := Trim(ClientDataSet1.fieldbyname('ZDYNo').AsString);
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.add('select * from KH_Zdy where Type=''' + Trim(flag) + '''');
if Trim(MainType) <> '' then
SQL.Add(' and MainType=''' + Trim(MainType) + '''');
sql.Add(' and ZdyName=''' + Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) + '''');
sql.Add(' and note=''' + Trim(ClientDataSet1.fieldbyname('note').AsString) + '''');
Open;
end;
if ADOQueryTemp.IsEmpty = False then
begin
if ADOQueryTemp.RecordCount > 1 then
begin
ADOQueryCmd.Connection.RollbackTrans;
//ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end;
if Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) = '' then
begin
ADOQueryCmd.Connection.RollbackTrans;
//ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end
else
begin
if Trim(ADOQueryTemp.fieldbyname('ZdyNo').AsString) <> Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) then
begin
ADOQueryCmd.Connection.RollbackTrans;
//ClientDataSet1.EnableControls;
Application.MessageBox('名称重复!', '提示', 0);
Exit;
end;
end;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
SQL.Add('delete KH_ZDY where ZDYNO=''' + Trim(ClientDataSet1.fieldbyname('ZDYNO').AsString) + '''');
ExecSQL;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('select * from KH_ZDY where 1<>1');
Open;
end;
ADOQueryCmd.Append;
ADOQueryCmd.FieldByName('ZDYNo').Value := Trim(maxno);
ADOQueryCmd.FieldByName('ZDYName').Value := ClientDataSet1.fieldbyname('ZDYName').AsString;
ADOQueryCmd.FieldByName('note').Value := Trim(snote);
//ADOQueryCmd.FieldByName('orderno').Value:=ClientDataSet1.fieldbyname('Name').AsString;
ADOQueryCmd.FieldByName('Type').Value := flag;
ADOQueryCmd.FieldByName('valid').Value := 'Y';
if Trim(MainType) <> '' then
ADOQueryCmd.FieldByName('MainType').Value := Trim(MainType);
//ADOQueryCmd.FieldByName('sel').Value:=0;
ADOQueryCmd.Post;
ClientDataSet1.Edit;
ClientDataSet1.FieldByName('ZDYNo').Value := Trim(maxno);
//ClientDataSet1.Post;
// Next;
//end;
//end;
// ClientDataSet1.EnableControls;
end;
ADOQueryCmd.Connection.CommitTrans;
//Application.MessageBox('保存成功!','提示',0);
//TV1.OptionsData.Editing:=False;
//TV1.OptionsSelection.CellSelect:=False;
except
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
end;
procedure TfrmGYSCPNAME.V1OrderNoPropertiesEditValueChanged(Sender: TObject);
var
mvalue: string;
begin
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
mvalue := TcxTextEdit(Sender).EditingText;
if Trim(mvalue) = '' then
begin
mvalue := '0';
end;
with ClientDataSet1 do
begin
Edit;
FieldByName('OrderNo').Value := mvalue;
Post;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('Update KH_Zdy Set OrderNo=' + mvalue);
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
ExecSQL;
end;
end;
procedure TfrmGYSCPNAME.V1NotePropertiesEditValueChanged(Sender: TObject);
var
mvalue: string;
begin
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
mvalue := TcxTextEdit(Sender).EditingText;
if Trim(mvalue) = '' then
begin
mvalue := '';
end;
with ClientDataSet1 do
begin
Edit;
FieldByName('Note').Value := mvalue;
Post;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('Update KH_Zdy Set Note=''' + Trim(mvalue) + '''');
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
ExecSQL;
end;
end;
procedure TfrmGYSCPNAME.V1Column1PropertiesEditValueChanged(Sender: TObject);
var
mvalue: string;
fieldname: string;
begin
fieldname := Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName;
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
mvalue := TcxTextEdit(Sender).EditingText;
with ClientDataSet1 do
begin
Edit;
FieldByName(fieldname).Value := mvalue;
Post;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('Update KH_Zdy Set ' + fieldname + '=''' + Trim(mvalue) + ''' ');
sql.Add('where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
ExecSQL;
end;
end;
procedure TfrmGYSCPNAME.V1HelpTypePropertiesEditValueChanged(Sender: TObject);
var
mvalue: string;
begin
if Trim(ClientDataSet1.fieldbyname('ZdyName').AsString) = '' then
begin
Application.MessageBox('名称不能为空!', '提示', 0);
Exit;
end;
mvalue := TcxTextEdit(Sender).EditingText;
if Trim(mvalue) = '' then
begin
mvalue := '0';
end;
with ClientDataSet1 do
begin
Edit;
FieldByName('HelpType').Value := mvalue;
Post;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('Update KH_Zdy Set HelpType=''' + Trim(mvalue) + '''');
sql.Add(' where ZdyNo=''' + Trim(ClientDataSet1.fieldbyname('ZdyNo').AsString) + '''');
ExecSQL;
end;
end;
procedure TfrmGYSCPNAME.FormDestroy(Sender: TObject);
begin
inherited;
WriteCxGrid('自定义' + Trim(flag), TV1, '自定义数据');
frmZDYHelp := nil;
end;
end.

View File

@ -0,0 +1,69 @@
[TBDel]
Coordinates=374,214,50,36
[Label2]
Coordinates=298,146,53,58
[ToolButton1]
Coordinates=280,214,84,36
[TBEdit]
Coordinates=217,214,53,36
[ADOQueryCmd]
Coordinates=121,146,104,58
[TBAdd]
Coordinates=153,214,54,36
[TBClose]
Coordinates=79,214,64,36
[Panel1]
Coordinates=333,78,55,58
[ZDYName]
Coordinates=249,78,74,58
[ADOQueryTemp]
Coordinates=233,10,109,58
[cxGridPopupMenu1]
Coordinates=504,188,128,36
[ADOConnection1]
Coordinates=504,243,114,36
[ThreeImgList]
Coordinates=504,298,90,36
[ClientDataSet1]
Coordinates=10,146,101,58
[DataSource1]
Coordinates=219,78,89,36
[Label1]
Coordinates=235,146,53,58
[TBSave]
Coordinates=438,146,60,36
[ADOQueryMain]
Coordinates=398,78,105,58
[DataLink_TradeManage.AdoDataLink]
Coordinates=10,78,229,58
[ToolBar1]
Coordinates=361,146,67,36
[frmBaseInput.ADOQueryBaseTemp]
Coordinates=352,10,219,58
[frmBaseInput.ADOQueryBaseCmd]
Coordinates=10,10,213,58
[]
Coordinates=10,214,59,36

View File

@ -936,7 +936,7 @@ inherited frmMachRollMain: TfrmMachRollMain
Height = 30 Height = 30
AutoSize = True AutoSize = True
ButtonHeight = 30 ButtonHeight = 30
ButtonWidth = 99 ButtonWidth = 107
Caption = 'ToolBar1' Caption = 'ToolBar1'
EdgeInner = esNone EdgeInner = esNone
EdgeOuter = esNone EdgeOuter = esNone
@ -953,7 +953,7 @@ inherited frmMachRollMain: TfrmMachRollMain
OnClick = ToolButton3Click OnClick = ToolButton3Click
end end
object Trolldel: TToolButton object Trolldel: TToolButton
Left = 71 Left = 63
Top = 0 Top = 0
AutoSize = True AutoSize = True
Caption = #21024#38500 Caption = #21024#38500
@ -961,14 +961,22 @@ inherited frmMachRollMain: TfrmMachRollMain
OnClick = TrolldelClick OnClick = TrolldelClick
end end
object ToolButton4: TToolButton object ToolButton4: TToolButton
Left = 142 Left = 126
Top = 0 Top = 0
AutoSize = True AutoSize = True
Caption = #30133#28857#31649#29702 Caption = #30133#28857#31649#29702
ImageIndex = 2 ImageIndex = 2
end end
object ToolButton2: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #25171#21360#24211#23384#26631#31614
ImageIndex = 21
OnClick = ToolButton2Click
end
object ToolButton1: TToolButton object ToolButton1: TToolButton
Left = 245 Left = 324
Top = 0 Top = 0
AutoSize = True AutoSize = True
Caption = #25171#21367#35774#32622 Caption = #25171#21367#35774#32622
@ -976,7 +984,7 @@ inherited frmMachRollMain: TfrmMachRollMain
OnClick = ToolButton1Click OnClick = ToolButton1Click
end end
object ToolButton7: TToolButton object ToolButton7: TToolButton
Left = 348 Left = 411
Top = 0 Top = 0
AutoSize = True AutoSize = True
Caption = #20445#23384#26684#24335 Caption = #20445#23384#26684#24335
@ -984,14 +992,14 @@ inherited frmMachRollMain: TfrmMachRollMain
OnClick = ToolButton7Click OnClick = ToolButton7Click
end end
object Tlog: TToolButton object Tlog: TToolButton
Left = 451 Left = 498
Top = 0 Top = 0
AutoSize = True AutoSize = True
Caption = #26085#24535 Caption = #26085#24535
ImageIndex = 30 ImageIndex = 30
end end
object ToolButton8: TToolButton object ToolButton8: TToolButton
Left = 522 Left = 561
Top = 0 Top = 0
AutoSize = True AutoSize = True
Caption = #20851#38381 Caption = #20851#38381

View File

@ -175,6 +175,7 @@ type
frxOLEObject1: TfrxOLEObject; frxOLEObject1: TfrxOLEObject;
frxRichObject1: TfrxRichObject; frxRichObject1: TfrxRichObject;
frxBarCodeObject1: TfrxBarCodeObject; frxBarCodeObject1: TfrxBarCodeObject;
ToolButton2: TToolButton;
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject); procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
@ -198,6 +199,7 @@ type
procedure dxLayoutControl_packDblClick(Sender: TObject); procedure dxLayoutControl_packDblClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject); procedure ToolButton1Click(Sender: TObject);
procedure FrameKeyBoard1SpeedButton1Click(Sender: TObject); procedure FrameKeyBoard1SpeedButton1Click(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
private private
FCIID, FCIFName, FWorkshop: string; FCIID, FCIFName, FWorkshop: string;
FBCIOID, FQtyUnit, FLenUnit: string; FBCIOID, FQtyUnit, FLenUnit: string;
@ -746,6 +748,46 @@ begin
end; end;
end; end;
procedure TfrmMachRollMain.ToolButton2Click(Sender: TObject);
var
fPrintFile: string;
Txt, fImagePath, Txt2, fImagePath2: string;
Moudle: Thandle;
Makebar: TMakebar;
Mixtext: TMixtext;
begin
with ADOQueryPrint do
begin
Close;
SQL.Clear;
SQL.Add(' EXEC P_BS_Cloth_Prt2 ');
SQL.Add(' @Filtration=''' + trim(FBCIOID) + '''');
Open;
end;
if ADOQueryPrint.IsEmpty then
begin
Application.MessageBox('标签内容未找到!', '提示信息', MB_ICONERROR);
exit;
end;
ExportFtErpFile('库存标签.fr3', ADOQueryBaseTemp);
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\库存标签.fr3';
if FileExists(fPrintFile) then
begin
frxReport1.LoadFromFile(fPrintFile);
frxReport1.PrintOptions.Copies := cds_params.fieldbyName('labNumber').AsInteger;
frxReport1.PrintOptions.ShowDialog := false;
frxReport1.PrepareReport(True);
frxReport1.Print();
end
else
begin
Application.MessageBox(PChar('没有找到' + fPrintFile), '提示', 0);
end;
end;
procedure TfrmMachRollMain.ToolButton3Click(Sender: TObject); procedure TfrmMachRollMain.ToolButton3Click(Sender: TObject);
begin begin
if cds_3.IsEmpty then if cds_3.IsEmpty then