0508
This commit is contained in:
parent
d6aa739201
commit
0a5d2461f5
|
|
@ -10,8 +10,8 @@ inherited frmClothInfo: TfrmClothInfo
|
||||||
FormStyle = fsMDIChild
|
FormStyle = fsMDIChild
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
Visible = True
|
Visible = True
|
||||||
ExplicitWidth = 1548
|
ExplicitWidth = 1556
|
||||||
ExplicitHeight = 612
|
ExplicitHeight = 620
|
||||||
PixelsPerInch = 96
|
PixelsPerInch = 96
|
||||||
TextHeight = 21
|
TextHeight = 21
|
||||||
object ToolBar1: TToolBar [0]
|
object ToolBar1: TToolBar [0]
|
||||||
|
|
|
||||||
|
|
@ -470,7 +470,7 @@ object frmClothInfoInput: TfrmClothInfoInput
|
||||||
object CostPrice: TcxCurrencyEdit
|
object CostPrice: TcxCurrencyEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
Left = 119
|
Left = 119
|
||||||
Top = 207
|
Top = 210
|
||||||
EditValue = 0.000000000000000000
|
EditValue = 0.000000000000000000
|
||||||
Properties.AssignedValues.DisplayFormat = True
|
Properties.AssignedValues.DisplayFormat = True
|
||||||
Properties.OnEditValueChanged = CostPricePropertiesEditValueChanged
|
Properties.OnEditValueChanged = CostPricePropertiesEditValueChanged
|
||||||
|
|
@ -547,91 +547,196 @@ object frmClothInfoInput: TfrmClothInfoInput
|
||||||
Height = 259
|
Height = 259
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
ExplicitTop = 357
|
object Panel4: TPanel
|
||||||
ExplicitHeight = 287
|
|
||||||
object ToolBar3: TToolBar
|
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 747
|
Width = 395
|
||||||
Height = 30
|
Height = 257
|
||||||
AutoSize = True
|
Align = alLeft
|
||||||
ButtonHeight = 30
|
Caption = 'Panel4'
|
||||||
ButtonWidth = 67
|
|
||||||
Caption = 'ToolBar1'
|
|
||||||
DisabledImages = DataLink_ClothInfo.cxImageList_bar
|
|
||||||
Images = DataLink_ClothInfo.cxImageList_bar
|
|
||||||
List = True
|
|
||||||
ShowCaptions = True
|
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object ToolButton5: TToolButton
|
object ToolBar3: TToolBar
|
||||||
Left = 0
|
Left = 1
|
||||||
Top = 0
|
Top = 1
|
||||||
|
Width = 393
|
||||||
|
Height = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #22686#34892
|
ButtonHeight = 30
|
||||||
ImageIndex = 2
|
ButtonWidth = 67
|
||||||
OnClick = ToolButton5Click
|
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
|
end
|
||||||
object ToolButton7: TToolButton
|
object cxGrid2: TcxGrid
|
||||||
Left = 71
|
Left = 1
|
||||||
Top = 0
|
Top = 31
|
||||||
AutoSize = True
|
Width = 393
|
||||||
Caption = #21024#34892
|
Height = 225
|
||||||
ImageIndex = 6
|
Align = alClient
|
||||||
OnClick = ToolButton7Click
|
TabOrder = 1
|
||||||
|
ExplicitLeft = -3
|
||||||
|
ExplicitTop = 37
|
||||||
|
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 cxGrid2: TcxGrid
|
object Panel5: TPanel
|
||||||
Left = 1
|
Left = 396
|
||||||
Top = 31
|
Top = 1
|
||||||
Width = 747
|
Width = 352
|
||||||
Height = 227
|
Height = 257
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
Caption = 'Panel5'
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
ExplicitHeight = 255
|
ExplicitLeft = 393
|
||||||
object TV2: TcxGridDBTableView
|
ExplicitTop = 6
|
||||||
Navigator.Buttons.CustomButtons = <>
|
object ToolBar4: TToolBar
|
||||||
ScrollbarAnnotations.CustomAnnotations = <>
|
Left = 1
|
||||||
DataController.DataSource = DS_2
|
Top = 1
|
||||||
DataController.Filter.AutoDataSetFilter = True
|
Width = 350
|
||||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
Height = 30
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <
|
AutoSize = True
|
||||||
item
|
ButtonHeight = 30
|
||||||
Format = 'C_Code'
|
ButtonWidth = 67
|
||||||
end>
|
Caption = 'ToolBar1'
|
||||||
DataController.Summary.FooterSummaryItems = <
|
DisabledImages = DataLink_ClothInfo.cxImageList_bar
|
||||||
item
|
Images = DataLink_ClothInfo.cxImageList_bar
|
||||||
Kind = skSum
|
List = True
|
||||||
end>
|
ShowCaptions = True
|
||||||
DataController.Summary.SummaryGroups = <>
|
TabOrder = 0
|
||||||
OptionsBehavior.FocusCellOnTab = True
|
object ToolButton8: TToolButton
|
||||||
OptionsBehavior.GoToNextCellOnEnter = True
|
Left = 0
|
||||||
OptionsBehavior.FocusCellOnCycle = True
|
Top = 0
|
||||||
OptionsCustomize.ColumnFiltering = False
|
AutoSize = True
|
||||||
OptionsView.GroupByBox = False
|
Caption = #22686#34892
|
||||||
object cxGridDBColumn1: TcxGridDBColumn
|
ImageIndex = 2
|
||||||
Caption = #20379#24212#21830
|
OnClick = ToolButton8Click
|
||||||
DataBinding.FieldName = 'FACTORYNAME'
|
|
||||||
DataBinding.IsNullValueType = True
|
|
||||||
PropertiesClassName = 'TcxButtonEditProperties'
|
|
||||||
Properties.Buttons = <
|
|
||||||
item
|
|
||||||
Default = True
|
|
||||||
Kind = bkEllipsis
|
|
||||||
end>
|
|
||||||
Properties.OnButtonClick = cxGridDBColumn1PropertiesButtonClick
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 104
|
|
||||||
end
|
end
|
||||||
object cxGridDBColumn2: TcxGridDBColumn
|
object ToolButton9: TToolButton
|
||||||
Caption = #20379#24212#21830#21697#21517
|
Left = 71
|
||||||
DataBinding.FieldName = 'C_GYSNAME'
|
Top = 0
|
||||||
DataBinding.IsNullValueType = True
|
AutoSize = True
|
||||||
HeaderAlignmentHorz = taCenter
|
Caption = #21024#34892
|
||||||
Width = 117
|
ImageIndex = 6
|
||||||
|
OnClick = ToolButton9Click
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object cxGridLevel1: TcxGridLevel
|
object cxGrid3: TcxGrid
|
||||||
GridView = TV2
|
Left = 1
|
||||||
|
Top = 31
|
||||||
|
Width = 350
|
||||||
|
Height = 225
|
||||||
|
Align = alClient
|
||||||
|
TabOrder = 1
|
||||||
|
ExplicitLeft = -2
|
||||||
|
ExplicitTop = 37
|
||||||
|
object TV3: TcxGridDBTableView
|
||||||
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
ScrollbarAnnotations.CustomAnnotations = <>
|
||||||
|
DataController.DataSource = DS_3
|
||||||
|
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 cxGridDBColumn3: TcxGridDBColumn
|
||||||
|
Caption = #21333#20301
|
||||||
|
DataBinding.FieldName = 'CICUnit'
|
||||||
|
DataBinding.IsNullValueType = True
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = cxGridDBColumn3PropertiesButtonClick
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 104
|
||||||
|
end
|
||||||
|
object cxGridDBColumn4: TcxGridDBColumn
|
||||||
|
Caption = #31995#25968
|
||||||
|
DataBinding.FieldName = 'CICQty'
|
||||||
|
DataBinding.IsNullValueType = True
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 117
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object cxGridLevel3: TcxGridLevel
|
||||||
|
GridView = TV3
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -665,10 +770,18 @@ object frmClothInfoInput: TfrmClothInfoInput
|
||||||
ImageIndex = 2
|
ImageIndex = 2
|
||||||
OnClick = ToolButton3Click
|
OnClick = ToolButton3Click
|
||||||
end
|
end
|
||||||
object ToolButton4: TToolButton
|
object ToolButton10: TToolButton
|
||||||
Left = 71
|
Left = 71
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
|
Caption = #20462#25913
|
||||||
|
ImageIndex = 3
|
||||||
|
OnClick = ToolButton10Click
|
||||||
|
end
|
||||||
|
object ToolButton4: TToolButton
|
||||||
|
Left = 142
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
Caption = #21024#34892
|
Caption = #21024#34892
|
||||||
ImageIndex = 6
|
ImageIndex = 6
|
||||||
OnClick = ToolButton4Click
|
OnClick = ToolButton4Click
|
||||||
|
|
@ -751,6 +864,132 @@ 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
|
||||||
|
|
@ -794,7 +1033,6 @@ object frmClothInfoInput: TfrmClothInfoInput
|
||||||
Top = 371
|
Top = 371
|
||||||
end
|
end
|
||||||
object cxGridPopupMenu1: TcxGridPopupMenu
|
object cxGridPopupMenu1: TcxGridPopupMenu
|
||||||
Grid = cxGrid2
|
|
||||||
PopupMenus = <>
|
PopupMenus = <>
|
||||||
Left = 816
|
Left = 816
|
||||||
Top = 277
|
Top = 277
|
||||||
|
|
@ -813,4 +1051,40 @@ object frmClothInfoInput: TfrmClothInfoInput
|
||||||
Left = 576
|
Left = 576
|
||||||
Top = 481
|
Top = 481
|
||||||
end
|
end
|
||||||
|
object ADO_3: TADOQuery
|
||||||
|
Connection = DataLink_ClothInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 658
|
||||||
|
Top = 465
|
||||||
|
end
|
||||||
|
object DS_3: TDataSource
|
||||||
|
DataSet = CDS_3
|
||||||
|
Left = 716
|
||||||
|
Top = 363
|
||||||
|
end
|
||||||
|
object CDS_3: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 778
|
||||||
|
Top = 373
|
||||||
|
end
|
||||||
|
object DS_4: TDataSource
|
||||||
|
DataSet = CDS_4
|
||||||
|
Left = 1030
|
||||||
|
Top = 283
|
||||||
|
end
|
||||||
|
object CDS_4: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 972
|
||||||
|
Top = 285
|
||||||
|
end
|
||||||
|
object ADO_4: TADOQuery
|
||||||
|
Connection = DataLink_ClothInfo.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 690
|
||||||
|
Top = 473
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,12 @@ type
|
||||||
Label12: TLabel;
|
Label12: TLabel;
|
||||||
C_YarnSpec: TcxTextEdit;
|
C_YarnSpec: TcxTextEdit;
|
||||||
Panel3: TPanel;
|
Panel3: TPanel;
|
||||||
|
CDS_2: TClientDataSet;
|
||||||
|
DS_2: TDataSource;
|
||||||
|
cxGridPopupMenu1: TcxGridPopupMenu;
|
||||||
|
ADO_2: TADOQuery;
|
||||||
|
ADO_1: TADOQuery;
|
||||||
|
Panel4: TPanel;
|
||||||
ToolBar3: TToolBar;
|
ToolBar3: TToolBar;
|
||||||
ToolButton5: TToolButton;
|
ToolButton5: TToolButton;
|
||||||
ToolButton7: TToolButton;
|
ToolButton7: TToolButton;
|
||||||
|
|
@ -98,11 +104,36 @@ type
|
||||||
cxGridDBColumn1: TcxGridDBColumn;
|
cxGridDBColumn1: TcxGridDBColumn;
|
||||||
cxGridDBColumn2: TcxGridDBColumn;
|
cxGridDBColumn2: TcxGridDBColumn;
|
||||||
cxGridLevel1: TcxGridLevel;
|
cxGridLevel1: TcxGridLevel;
|
||||||
CDS_2: TClientDataSet;
|
Panel5: TPanel;
|
||||||
DS_2: TDataSource;
|
ToolBar4: TToolBar;
|
||||||
cxGridPopupMenu1: TcxGridPopupMenu;
|
ToolButton8: TToolButton;
|
||||||
ADO_2: TADOQuery;
|
ToolButton9: TToolButton;
|
||||||
ADO_1: TADOQuery;
|
cxGrid3: TcxGrid;
|
||||||
|
TV3: TcxGridDBTableView;
|
||||||
|
cxGridDBColumn3: TcxGridDBColumn;
|
||||||
|
cxGridDBColumn4: TcxGridDBColumn;
|
||||||
|
cxGridLevel3: TcxGridLevel;
|
||||||
|
ADO_3: TADOQuery;
|
||||||
|
DS_3: TDataSource;
|
||||||
|
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;
|
||||||
|
CDS_4: TClientDataSet;
|
||||||
|
Button1: TButton;
|
||||||
|
Button2: TButton;
|
||||||
|
ADO_4: TADOQuery;
|
||||||
|
ToolButton10: TToolButton;
|
||||||
|
Button3: TButton;
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
procedure ToolButton1Click(Sender: TObject);
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
|
@ -122,11 +153,18 @@ type
|
||||||
procedure ToolButton5Click(Sender: TObject);
|
procedure ToolButton5Click(Sender: TObject);
|
||||||
procedure ToolButton7Click(Sender: TObject);
|
procedure ToolButton7Click(Sender: TObject);
|
||||||
procedure cxGridDBColumn1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
procedure cxGridDBColumn1PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure ToolButton8Click(Sender: TObject);
|
||||||
|
procedure ToolButton9Click(Sender: TObject);
|
||||||
|
procedure cxGridDBColumn3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure Button1Click(Sender: TObject);
|
||||||
|
procedure ToolButton10Click(Sender: TObject);
|
||||||
|
procedure Button2Click(Sender: TObject);
|
||||||
private
|
private
|
||||||
canshu1: string;
|
canshu1: string;
|
||||||
Fint: Integer;
|
Fint: Integer;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
procedure InitGrid1();
|
procedure InitGrid1();
|
||||||
|
// procedure InitGrid2();
|
||||||
function SaveData(): Boolean;
|
function SaveData(): Boolean;
|
||||||
procedure setName();
|
procedure setName();
|
||||||
procedure addColor();
|
procedure addColor();
|
||||||
|
|
@ -224,6 +262,10 @@ begin
|
||||||
|
|
||||||
InitCDSData(ADO_2, CDS_2, Tv2, SqlStr, '', '');
|
InitCDSData(ADO_2, CDS_2, Tv2, SqlStr, '', '');
|
||||||
|
|
||||||
|
SqlStr := 'select A.* from Bs_Cloth_Info_Coefficient A ';
|
||||||
|
SqlStr := SqlStr + ' where A.BCIID=''' + Trim(FBCIID) + '''';
|
||||||
|
|
||||||
|
InitCDSData(ADO_3, CDS_3, Tv3, SqlStr, '', '');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmClothInfoInput.InitGrid();
|
procedure TfrmClothInfoInput.InitGrid();
|
||||||
|
|
@ -398,6 +440,7 @@ begin
|
||||||
qtyunit.ItemIndex := -1;
|
qtyunit.ItemIndex := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// InitGrid2();
|
||||||
InitGrid1();
|
InitGrid1();
|
||||||
InitGrid();
|
InitGrid();
|
||||||
|
|
||||||
|
|
@ -423,7 +466,7 @@ end;
|
||||||
|
|
||||||
function TfrmClothInfoInput.SaveData(): Boolean;
|
function TfrmClothInfoInput.SaveData(): Boolean;
|
||||||
var
|
var
|
||||||
MaxBCIID, MaxBCPID, maxId2, MAXID3: string;
|
MaxBCIID, MaxBCPID, maxId2, MAXID3, MAXID4: string;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
ADOQueryCmd.Connection.BeginTrans;
|
ADOQueryCmd.Connection.BeginTrans;
|
||||||
|
|
@ -545,75 +588,74 @@ begin
|
||||||
|
|
||||||
|
|
||||||
////////////////////////// ±£´æ×Ó±í //////////////////////////
|
////////////////////////// ±£´æ×Ó±í //////////////////////////
|
||||||
with CDS_1 do
|
// with CDS_1 do
|
||||||
begin
|
// begin
|
||||||
First;
|
// First;
|
||||||
while not Eof do
|
// while not Eof do
|
||||||
begin
|
// begin
|
||||||
if Trim(CDS_1.fieldbyname('BCISID').AsString) = '' then
|
// if Trim(CDS_1.fieldbyname('BCISID').AsString) = '' then
|
||||||
begin
|
// begin
|
||||||
if GetLSNo(ADOQueryTemp, maxId2, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then
|
// if GetLSNo(ADOQueryTemp, maxId2, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then
|
||||||
begin
|
// begin
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
// ADOQueryCmd.Connection.RollbackTrans;
|
||||||
Application.MessageBox('取子流水号失败!', '提示', 0);
|
// Application.MessageBox('取子流水号失败!', '提示', 0);
|
||||||
Exit;
|
// Exit;
|
||||||
end;
|
// end;
|
||||||
end
|
// end
|
||||||
else
|
// else
|
||||||
begin
|
// begin
|
||||||
maxId2 := Trim(CDS_1.fieldbyname('BCISID').AsString);
|
// maxId2 := Trim(CDS_1.fieldbyname('BCISID').AsString);
|
||||||
end;
|
// end;
|
||||||
|
//
|
||||||
with ADOQueryCmd do
|
// with ADOQueryCmd do
|
||||||
begin
|
// begin
|
||||||
Close;
|
// Close;
|
||||||
SQL.Clear;
|
// SQL.Clear;
|
||||||
sql.Add(' select * from BS_Cloth_Info_Sub where ');
|
// sql.Add(' select * from BS_Cloth_Info_Sub where ');
|
||||||
sql.Add(' BCISID=''' + Trim(maxId2) + '''');
|
// sql.Add(' BCISID=''' + Trim(maxId2) + '''');
|
||||||
Open;
|
// Open;
|
||||||
end;
|
// end;
|
||||||
with ADOQueryCmd do
|
// with ADOQueryCmd do
|
||||||
begin
|
// begin
|
||||||
if Trim(CDS_1.fieldbyname('BCISID').AsString) = '' then
|
// if Trim(CDS_1.fieldbyname('BCISID').AsString) = '' then
|
||||||
begin
|
// begin
|
||||||
Append;
|
// Append;
|
||||||
FieldByName('FillID').Value := Trim(DCode);
|
// FieldByName('FillID').Value := Trim(DCode);
|
||||||
FieldByName('Filler').Value := Trim(DName);
|
// FieldByName('Filler').Value := Trim(DName);
|
||||||
FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp);
|
// FieldByName('FillTime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||||
end
|
// end
|
||||||
else
|
// else
|
||||||
begin
|
// begin
|
||||||
Edit;
|
// Edit;
|
||||||
FieldByName('EditID').Value := Trim(DCode);
|
// FieldByName('EditID').Value := Trim(DCode);
|
||||||
FieldByName('Editer').Value := Trim(DName);
|
// FieldByName('Editer').Value := Trim(DName);
|
||||||
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
|
// FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
|
||||||
end;
|
// end;
|
||||||
FieldByName('BCIID').Value := Trim(MaxBCIID);
|
// FieldByName('BCIID').Value := Trim(MaxBCIID);
|
||||||
FieldByName('BCISID').Value := Trim(maxId2);
|
// FieldByName('BCISID').Value := Trim(maxId2);
|
||||||
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_1, 'BS_Cloth_Info_Sub', 0);
|
// RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_1, 'BS_Cloth_Info_Sub', 0);
|
||||||
Post;
|
// Post;
|
||||||
end;
|
// end;
|
||||||
Next;
|
// Next;
|
||||||
end;
|
// end;
|
||||||
end;
|
// end;
|
||||||
|
// with ADOQueryTemp do
|
||||||
with ADOQueryTemp do
|
// begin
|
||||||
begin
|
// Close;
|
||||||
Close;
|
// sql.Clear;
|
||||||
sql.Clear;
|
// sql.Add('select count(BCISID) as AA from BS_Cloth_Info_Sub where BCIID=''' + Trim(MaxBCIID) + '''');
|
||||||
sql.Add('select count(BCISID) as AA from BS_Cloth_Info_Sub where BCIID=''' + Trim(MaxBCIID) + '''');
|
// sql.Add(' group by C_Color,C_ColorNo having count(BCISID)>1');
|
||||||
sql.Add(' group by C_Color,C_ColorNo having count(BCISID)>1');
|
//// ShowMessage(sql.Text);
|
||||||
// ShowMessage(sql.Text);
|
// Open;
|
||||||
Open;
|
//
|
||||||
|
// end;
|
||||||
end;
|
// if StrToFloatDef(ADOQueryTemp.fieldbyname('AA').asstring, 1) > 1 then
|
||||||
if StrToFloatDef(ADOQueryTemp.fieldbyname('AA').asstring, 1) > 1 then
|
// begin
|
||||||
begin
|
// ADOQueryCmd.Connection.RollbackTrans;
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
// Result := False;
|
||||||
Result := False;
|
// Application.MessageBox('颜色色号重复!', '提示', 0);
|
||||||
Application.MessageBox('颜色色号重复!', '提示', 0);
|
// Exit;
|
||||||
Exit;
|
// end;
|
||||||
end;
|
|
||||||
////////////////////////// ±£´æ×Ó±í //////////////////////////
|
////////////////////////// ±£´æ×Ó±í //////////////////////////
|
||||||
///
|
///
|
||||||
///
|
///
|
||||||
|
|
@ -669,6 +711,57 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
////////////////////////// 保存单位系数子表 //////////////////////////
|
||||||
|
with CDS_3 do
|
||||||
|
begin
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_3.fieldbyname('CICID').AsString) = '' then
|
||||||
|
begin
|
||||||
|
if GetLSNo(ADOQueryTemp, MAXID4, 'CIC', 'Bs_Cloth_Info_Coefficient', 4, 1) = False then
|
||||||
|
begin
|
||||||
|
ADOQueryCmd.Connection.RollbackTrans;
|
||||||
|
Application.MessageBox('取子流水号失败!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
MAXID4 := Trim(CDS_3.fieldbyname('CICID').AsString);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
sql.Add(' select * from Bs_Cloth_Info_Coefficient where ');
|
||||||
|
sql.Add(' CICID=''' + Trim(MAXID4) + '''');
|
||||||
|
Open;
|
||||||
|
end;
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
if Trim(CDS_3.fieldbyname('CICID').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('CICID').Value := Trim(MAXID4);
|
||||||
|
RTSetSaveDataCDS(ADOQueryCmd, Tv3, CDS_3, 'Bs_Cloth_Info_Coefficient', 0);
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
ADOQueryCmd.Connection.CommitTrans;
|
ADOQueryCmd.Connection.CommitTrans;
|
||||||
|
|
||||||
// with ADOQueryCmd do
|
// with ADOQueryCmd do
|
||||||
|
|
@ -697,6 +790,46 @@ begin
|
||||||
TBtnEditC(Sender).Text := '';
|
TBtnEditC(Sender).Text := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothInfoInput.ToolButton10Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
maxno: string;
|
||||||
|
SqlStr: string;
|
||||||
|
begin
|
||||||
|
if FBCIID = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('请先保存产品信息!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
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 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 + ' END ,C_ColorNo';
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmClothInfoInput.ToolButton1Click(Sender: TObject);
|
procedure TfrmClothInfoInput.ToolButton1Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
MC_Code: string;
|
MC_Code: string;
|
||||||
|
|
@ -747,11 +880,11 @@ begin
|
||||||
// Application.MessageBox('ÇëÊäÈëÑÕÉ«!', 'Ìáʾ', 0);
|
// Application.MessageBox('ÇëÊäÈëÑÕÉ«!', 'Ìáʾ', 0);
|
||||||
// Exit;
|
// Exit;
|
||||||
// end;
|
// end;
|
||||||
if CDS_1.Locate('C_ColorNo', null, []) = True then
|
// if CDS_1.Locate('C_ColorNo', null, []) = True then
|
||||||
begin
|
// begin
|
||||||
Application.MessageBox('请输入色号!', '提示', 0);
|
// Application.MessageBox('请输入色号!', '提示', 0);
|
||||||
Exit;
|
// Exit;
|
||||||
end;
|
// end;
|
||||||
setName();
|
setName();
|
||||||
if SaveData() then
|
if SaveData() then
|
||||||
begin
|
begin
|
||||||
|
|
@ -768,20 +901,33 @@ end;
|
||||||
procedure TfrmClothInfoInput.ToolButton3Click(Sender: TObject);
|
procedure TfrmClothInfoInput.ToolButton3Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
maxno: string;
|
maxno: string;
|
||||||
|
SqlStr: string;
|
||||||
begin
|
begin
|
||||||
|
if FBCIID = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('请先保存产品信息!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
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 := SqlStr + ' where 1<>1 ';
|
||||||
|
|
||||||
CopyAddRow(Tv1, CDS_1);
|
|
||||||
|
|
||||||
with CDS_1 do
|
InitCDSData(ADO_4, CDS_4, Tv4, SqlStr, '', '');
|
||||||
|
|
||||||
|
Panel6.Visible := True;
|
||||||
|
|
||||||
|
// CopyAddRow(Tv4, CDS_4);
|
||||||
|
|
||||||
|
with CDS_4 do
|
||||||
begin
|
begin
|
||||||
Edit;
|
append;
|
||||||
fieldbyname('BCISID').Value := NULL;
|
fieldbyname('BCIID').Value := FBCIID;
|
||||||
|
fieldbyname('BCISID').Value := maxno;
|
||||||
fieldbyname('floatPrice').Value := 0;
|
fieldbyname('floatPrice').Value := 0;
|
||||||
fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0);
|
fieldbyname('referencePrice').value := StrToFloatDef(CostPrice.Text, 0);
|
||||||
Post;
|
Post;
|
||||||
|
|
@ -834,6 +980,108 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothInfoInput.Button1Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
CDS_4.EmptyDataSet;
|
||||||
|
Panel6.Visible:=False;
|
||||||
|
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;
|
||||||
|
|
@ -887,6 +1135,29 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothInfoInput.cxGridDBColumn3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||||
|
with frmZDYHelp do
|
||||||
|
begin
|
||||||
|
flag := 'CICUnit';
|
||||||
|
flagname := '单位';
|
||||||
|
MainType := '单位系数';
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
with Self.CDS_3 do
|
||||||
|
begin
|
||||||
|
Edit;
|
||||||
|
FieldByName('CICUnit').Value := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmZDYHelp.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
|
||||||
|
|
@ -938,6 +1209,48 @@ begin
|
||||||
CDS_2.Delete;
|
CDS_2.Delete;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothInfoInput.ToolButton8Click(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_3 do
|
||||||
|
begin
|
||||||
|
APPEND;
|
||||||
|
fieldbyname('CICID').Value := NULL;
|
||||||
|
|
||||||
|
Post;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmClothInfoInput.ToolButton9Click(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if CDS_3.IsEmpty then
|
||||||
|
Exit;
|
||||||
|
|
||||||
|
if Trim(CDS_3.fieldbyname('CICID').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_Coefficient where CICID=''' + Trim(CDS_1.fieldbyname('CICID').AsString) + '''');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CDS_3.Delete;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmClothInfoInput.TV1Column5PropertiesEditValueChanged(Sender: TObject);
|
procedure TfrmClothInfoInput.TV1Column5PropertiesEditValueChanged(Sender: TObject);
|
||||||
var
|
var
|
||||||
mvalue, FFieldName: string;
|
mvalue, FFieldName: string;
|
||||||
|
|
|
||||||
|
|
@ -297,4 +297,11 @@ inherited frmItemizedListQtyInPut: TfrmItemizedListQtyInPut
|
||||||
OnClick = N1Click
|
OnClick = N1Click
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object ADOQueryBatch: TADOQuery
|
||||||
|
Connection = DataLink_TradeTotalClothStk.ADOLink
|
||||||
|
LockType = ltBatchOptimistic
|
||||||
|
Parameters = <>
|
||||||
|
Left = 60
|
||||||
|
Top = 274
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ type
|
||||||
TBSave: TToolButton;
|
TBSave: TToolButton;
|
||||||
TBClose: TToolButton;
|
TBClose: TToolButton;
|
||||||
Tv1Column1: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
ADOQueryBatch: TADOQuery;
|
||||||
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);
|
||||||
|
|
@ -354,7 +355,7 @@ var
|
||||||
Maxno, MBCIOID: string;
|
Maxno, MBCIOID: string;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
ADOQueryCmd.Connection.BeginTrans;
|
ADOQueryBatch.Connection.BeginTrans;
|
||||||
CDS_Sub.DisableControls;
|
CDS_Sub.DisableControls;
|
||||||
with CDS_Sub do
|
with CDS_Sub do
|
||||||
begin
|
begin
|
||||||
|
|
@ -371,21 +372,21 @@ begin
|
||||||
MBCIOID := Trim(ADOQueryTemp.fieldbyname('BCIOID').AsString);
|
MBCIOID := Trim(ADOQueryTemp.fieldbyname('BCIOID').AsString);
|
||||||
if Trim(MBCIOID) = '' then
|
if Trim(MBCIOID) = '' then
|
||||||
begin
|
begin
|
||||||
if not GetLSNo(ADOQueryCmd, Maxno, 'MR', 'BS_Cloth_IO', 4, 1) then
|
if not GetLSNo(ADOQueryBatch, Maxno, 'MR', 'BS_Cloth_IO', 4, 1) then
|
||||||
raise Exception.Create('取染色坯布入库编号失败!');
|
raise Exception.Create('取染色坯布入库编号失败!');
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Maxno := Trim(MBCIOID);
|
Maxno := Trim(MBCIOID);
|
||||||
end;
|
end;
|
||||||
with ADOQueryCmd do
|
with ADOQueryBatch do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add('select * from BS_Cloth_IO where BCIOID=''' + Trim(Maxno) + '''');
|
sql.Add('select * from BS_Cloth_IO where BCIOID=''' + Trim(Maxno) + '''');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
with ADOQueryCmd do
|
with ADOQueryBatch do
|
||||||
begin
|
begin
|
||||||
if Trim(MBCIOID) = '' then
|
if Trim(MBCIOID) = '' then
|
||||||
begin
|
begin
|
||||||
|
|
@ -403,7 +404,7 @@ begin
|
||||||
FieldByName('Editer').Value := Trim(DName);
|
FieldByName('Editer').Value := Trim(DName);
|
||||||
FieldByName('EditTime').Value := SGetServerDate(ADOQueryTemp);
|
FieldByName('EditTime').Value := SGetServerDate(ADOQueryTemp);
|
||||||
end;
|
end;
|
||||||
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_Sub, 'BS_Cloth_IO', 0);
|
RTSetSaveDataCDS(ADOQueryBatch, Tv1, CDS_Sub, 'BS_Cloth_IO', 0);
|
||||||
FieldByName('STKName').Value := '贸易布匹';
|
FieldByName('STKName').Value := '贸易布匹';
|
||||||
FieldByName('IOFlag').Value := '入库';
|
FieldByName('IOFlag').Value := '入库';
|
||||||
FieldByName('IOQtyFlag').Value := 1;
|
FieldByName('IOQtyFlag').Value := 1;
|
||||||
|
|
@ -420,7 +421,7 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
CDS_Sub.EnableControls;
|
CDS_Sub.EnableControls;
|
||||||
with ADOQueryCmd do
|
with ADOQueryBatch do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
Sql.Clear;
|
Sql.Clear;
|
||||||
|
|
@ -431,15 +432,15 @@ begin
|
||||||
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
|
Sql.Add(',@DName=' + quotedstr(Trim(DName)));
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
if ADOQueryCmd.FieldByName('intReturn').AsInteger = -1 then
|
if ADOQueryBatch.FieldByName('intReturn').AsInteger = -1 then
|
||||||
raise Exception.Create(pchar(trim(ADOQueryCmd.FieldByName('ShowMsg').AsString)));
|
raise Exception.Create(pchar(trim(ADOQueryBatch.FieldByName('ShowMsg').AsString)));
|
||||||
|
ADOQueryBatch.UpdateBatch;
|
||||||
ADOQueryCmd.Connection.CommitTrans;
|
ADOQueryBatch.Connection.CommitTrans;
|
||||||
|
|
||||||
Result := True;
|
Result := True;
|
||||||
except
|
except
|
||||||
Result := False;
|
Result := False;
|
||||||
ADOQueryCmd.Connection.RollbackTrans;
|
ADOQueryBatch.Connection.RollbackTrans;
|
||||||
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user