退货申请

This commit is contained in:
“ddf” 2024-12-17 17:25:32 +08:00
parent 56b1ef408f
commit 5f2b9ee6fe
92 changed files with 13848 additions and 7529 deletions

View File

@ -2,22 +2,22 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 372
Top = 106
Caption = #20135#21697#20449#24687#36873#25321
ClientHeight = 611
ClientWidth = 1519
ClientHeight = 813
ClientWidth = 1807
Font.Charset = GB2312_CHARSET
Font.Height = -16
Font.Name = #24494#36719#38597#40657
Position = poScreenCenter
OnClose = FormClose
ExplicitWidth = 1535
ExplicitHeight = 650
ExplicitWidth = 1823
ExplicitHeight = 852
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1519
Width = 1807
Height = 30
AutoSize = True
ButtonHeight = 30
@ -28,6 +28,7 @@ inherited frmClothInfoSel: TfrmClothInfoSel
List = True
ShowCaptions = True
TabOrder = 0
ExplicitWidth = 1519
object ToolButton1: TToolButton
Left = 0
Top = 0
@ -57,7 +58,7 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 0
Top = 119
Width = 216
Height = 492
Height = 694
Align = alLeft
Bands = <
item
@ -75,6 +76,7 @@ inherited frmClothInfoSel: TfrmClothInfoSel
ScrollbarAnnotations.CustomAnnotations = <>
TabOrder = 1
OnDblClick = cxDBTreeList1DblClick
ExplicitHeight = 492
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
DataBinding.FieldName = 'CTName'
Width = 210
@ -88,32 +90,38 @@ inherited frmClothInfoSel: TfrmClothInfoSel
object Panel3: TPanel [2]
Left = 216
Top = 119
Width = 1303
Height = 492
Width = 1591
Height = 694
Align = alClient
BevelInner = bvRaised
BevelOuter = bvLowered
Caption = 'Panel3'
TabOrder = 2
ExplicitLeft = 530
ExplicitTop = 120
ExplicitWidth = 1303
ExplicitHeight = 492
object Panel7: TPanel
Left = 2
Top = 2
Width = 1299
Width = 1587
Height = 40
Align = alTop
BevelOuter = bvNone
TabOrder = 0
ExplicitWidth = 1299
object Panel4: TPanel
Left = 0
Top = 0
Width = 1299
Width = 1587
Height = 40
Align = alClient
AutoSize = True
ParentColor = True
TabOrder = 0
ExplicitWidth = 1299
DesignSize = (
1299
1587
40)
object Label14: TLabel
Left = 19
@ -193,7 +201,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 661
Top = 2
ParentColor = True
ParentFont = False
TabOrder = 3
OnKeyPress = cxtxtdtscanKeyPress
Width = 172
@ -203,16 +210,18 @@ inherited frmClothInfoSel: TfrmClothInfoSel
object cxGrid1: TcxGrid
Left = 2
Top = 42
Width = 982
Height = 448
Width = 919
Height = 650
Align = alClient
TabOrder = 1
ExplicitTop = 40
object Tv1: TcxGridDBTableView
OnDblClick = Tv1DblClick
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
ScrollbarAnnotations.CustomAnnotations = <>
OnFocusedRecordChanged = Tv1FocusedRecordChanged
DataController.DataSource = DS_1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
@ -246,7 +255,7 @@ inherited frmClothInfoSel: TfrmClothInfoSel
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
Width = 124
end
object v1Column9: TcxGridDBColumn
Caption = #20013#25991#21697#21517
@ -459,10 +468,10 @@ inherited frmClothInfoSel: TfrmClothInfoSel
end
end
object GroupBox1: TGroupBox
Left = 984
Left = 1272
Top = 42
Width = 317
Height = 448
Height = 650
Align = alRight
Caption = #20505#36873#21462
Color = clWhite
@ -470,13 +479,16 @@ inherited frmClothInfoSel: TfrmClothInfoSel
ParentColor = False
TabOrder = 2
Visible = False
ExplicitLeft = 984
ExplicitHeight = 448
object cxGrid2: TcxGrid
Left = 2
Top = 23
Width = 313
Height = 423
Height = 625
Align = alClient
TabOrder = 0
ExplicitHeight = 423
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
@ -532,17 +544,91 @@ inherited frmClothInfoSel: TfrmClothInfoSel
end
end
end
object cxGrid3: TcxGrid
Left = 921
Top = 42
Width = 351
Height = 650
Align = alRight
TabOrder = 3
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.Footer = True
OptionsView.GroupByBox = False
object TV3Column1: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'ssel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
HeaderAlignmentHorz = taCenter
end
object cxGridDBColumn1: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object cxGridDBColumn2: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'C_ColorNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 58
end
object cxGridDBColumn3: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 75
end
object cxGridDBColumn8: TcxGridDBColumn
Caption = #27454#21495
DataBinding.FieldName = 'C_StyleNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 58
end
end
object cxGridLevel2: TcxGridLevel
GridView = TV3
end
end
end
object Panel1: TPanel [3]
Left = 0
Top = 30
Width = 1519
Width = 1807
Height = 89
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
ParentColor = True
TabOrder = 3
ExplicitWidth = 1519
object Label3: TLabel
Left = 1010
Top = 53
@ -618,7 +704,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 1078
Top = 47
ParentColor = True
ParentFont = False
TabOrder = 0
OnKeyPress = GC_NameKeyPress
Width = 150
@ -628,7 +713,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 1078
Top = 7
ParentColor = True
ParentFont = False
TabOrder = 1
OnKeyPress = GC_NameKeyPress
Width = 150
@ -638,7 +722,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 571
Top = 47
ParentColor = True
ParentFont = False
TabOrder = 2
OnKeyPress = GC_NameKeyPress
Width = 150
@ -648,7 +731,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 371
Top = 47
ParentColor = True
ParentFont = False
TabOrder = 3
OnKeyPress = GC_NameKeyPress
Width = 150
@ -658,7 +740,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 115
Top = 7
ParentColor = True
ParentFont = False
TabOrder = 4
OnKeyPress = GC_NameKeyPress
Width = 150
@ -668,7 +749,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 115
Top = 47
ParentColor = True
ParentFont = False
TabOrder = 5
OnKeyPress = GC_NameKeyPress
Width = 150
@ -678,7 +758,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 574
Top = 7
ParentColor = True
ParentFont = False
TabOrder = 6
OnKeyPress = GC_NameKeyPress
Width = 150
@ -688,7 +767,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 371
Top = 7
ParentColor = True
ParentFont = False
TabOrder = 7
OnKeyPress = GC_NameKeyPress
Width = 150
@ -698,7 +776,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 840
Top = 47
ParentColor = True
ParentFont = False
TabOrder = 8
OnKeyPress = GC_NameKeyPress
Width = 150
@ -708,7 +785,6 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 840
Top = 7
ParentColor = True
ParentFont = False
TabOrder = 9
OnKeyPress = GC_NameKeyPress
Width = 150
@ -10880,4 +10956,28 @@ inherited frmClothInfoSel: TfrmClothInfoSel
Left = 592
Top = 432
end
object CDS_3: TClientDataSet
Aggregates = <>
Params = <>
Left = 518
Top = 602
end
object GPM_3: TcxGridPopupMenu
Grid = cxGrid3
PopupMenus = <>
Left = 430
Top = 636
end
object DS_3: TDataSource
DataSet = CDS_3
Left = 608
Top = 578
end
object ADO_3: TADOQuery
Connection = ADOConnection1
LockType = ltReadOnly
Parameters = <>
Left = 290
Top = 528
end
end

View File

@ -9,26 +9,10 @@ uses
cxGridTableView, cxGridDBTableView, cxGridLevel, cxClasses, cxControls,
cxGridCustomView, cxGrid, DBClient, ADODB, ImgList, StdCtrls, ExtCtrls,
cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
cxLookAndFeelPainters, cxNavigator,
dxDateRanges, dxBarBuiltInMenu, System.ImageList, U_BaseInput, cxTL,
cxMaskEdit, cxTLdxBarBuiltInMenu, cxCheckBox, cxInplaceContainer, cxDBTL,
cxTLData, math,
dxScrollbarAnnotations, cxImageList, cxContainer;
cxLookAndFeelPainters, cxNavigator, dxDateRanges, dxBarBuiltInMenu,
System.ImageList, U_BaseInput, cxTL, cxMaskEdit, cxTLdxBarBuiltInMenu,
cxCheckBox, cxInplaceContainer, cxDBTL, cxTLData, math, dxScrollbarAnnotations,
cxImageList, cxContainer;
type
TfrmClothInfoSel = class(TfrmBaseHelp)
@ -140,6 +124,18 @@ type
DS_2: TDataSource;
cxtxtdtscan: TcxTextEdit;
Label11: TLabel;
cxGrid3: TcxGrid;
TV3: TcxGridDBTableView;
cxGridDBColumn1: TcxGridDBColumn;
cxGridDBColumn2: TcxGridDBColumn;
cxGridDBColumn3: TcxGridDBColumn;
cxGridDBColumn8: TcxGridDBColumn;
cxGridLevel2: TcxGridLevel;
TV3Column1: TcxGridDBColumn;
CDS_3: TClientDataSet;
GPM_3: TcxGridPopupMenu;
DS_3: TDataSource;
ADO_3: TADOQuery;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormShow(Sender: TObject);
@ -155,6 +151,9 @@ type
procedure cxDBTreeList1DblClick(Sender: TObject);
procedure cxtxtdtscanKeyPress(Sender: TObject; var Key: Char);
procedure GC_NameKeyPress(Sender: TObject; var Key: Char);
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView;
APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord;
ANewItemRecordFocusingChanged: Boolean);
private
IsOnShow: Boolean;
CurrentPage, RecordsNumber: Integer;
@ -363,6 +362,7 @@ begin
FCTType := '通用';
ReadCxGrid(trim(self.Caption) + 'TV1', TV1, '自定义数据');
ReadCxGrid(trim(self.Caption) + 'TV2', TV2, '自定义数据');
ReadCxGrid(trim(self.Caption) + 'TV3', TV3, '×Ô¶¨ÒåÊý¾Ý');
InitTree();
InitGrid('');
@ -385,6 +385,7 @@ procedure TfrmClothInfoSel.TBSaveClick(Sender: TObject);
begin
WriteCxGrid(trim(self.Caption) + 'TV1', TV1, '自定义数据');
WriteCxGrid(trim(self.Caption) + 'TV2', TV2, '自定义数据');
WriteCxGrid(trim(self.Caption) + 'TV3', TV3, '×Ô¶¨ÒåÊý¾Ý');
end;
procedure TfrmClothInfoSel.TCBNOR1Change(Sender: TObject);
@ -412,6 +413,24 @@ begin
ModalResult := 1;
end;
procedure TfrmClothInfoSel.Tv1FocusedRecordChanged(
Sender: TcxCustomGridTableView; APrevFocusedRecord,
AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
var
SqlStr: string;
begin
if CDS_1.IsEmpty then
exit;
SqlStr := 'select * from BS_Cloth_Info_Sub A where BCIID =' + quotedstr((CDS_1.fieldbyname('BCIID').AsString));
InitCDSData(ADO_3,CDS_3, Tv3, SqlStr, '', '');
end;
procedure TfrmClothInfoSel.FormDestroy(Sender: TObject);
begin
inherited;

View File

@ -9,6 +9,7 @@ inherited frmClothInfo: TfrmClothInfo
Font.Height = -16
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitWidth = 1871
ExplicitHeight = 965
PixelsPerInch = 96
@ -563,8 +564,6 @@ inherited frmClothInfo: TfrmClothInfo
Align = alClient
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
TabOrder = 0
ExplicitLeft = 1
ExplicitWidth = 1619
object ScrollBox1: TScrollBox
Left = 2
Top = 23
@ -574,7 +573,6 @@ inherited frmClothInfo: TfrmClothInfo
BevelInner = bvLowered
BorderStyle = bsNone
TabOrder = 0
ExplicitWidth = 1615
end
end
object cxGrid2: TcxGrid
@ -584,7 +582,8 @@ inherited frmClothInfo: TfrmClothInfo
Height = 201
Align = alLeft
TabOrder = 1
ExplicitLeft = 3
ExplicitLeft = 7
ExplicitTop = 5
object Tv2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -653,8 +652,6 @@ inherited frmClothInfo: TfrmClothInfo
Align = alClient
PopupMenu = PM_1
TabOrder = 2
ExplicitLeft = 0
ExplicitTop = 44
object Tv1: TcxGridDBTableView
OnMouseDown = Tv1MouseDown
Navigator.Buttons.CustomButtons = <>

View File

@ -23,7 +23,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 83
ButtonWidth = 99
Caption = 'ToolBar1'
Color = clWhite
DisabledImages = DataLink_ClothInfo.cxImageList_bar
@ -32,7 +32,6 @@ object frmClothInfoInput: TfrmClothInfoInput
ParentColor = False
ShowCaptions = True
TabOrder = 0
ExplicitWidth = 812
object ToolButton1: TToolButton
Tag = 1
Left = 0
@ -43,7 +42,7 @@ object frmClothInfoInput: TfrmClothInfoInput
OnClick = ToolButton1Click
end
object ToolButton6: TToolButton
Left = 63
Left = 71
Top = 0
AutoSize = True
Caption = #38468#20214
@ -51,7 +50,7 @@ object frmClothInfoInput: TfrmClothInfoInput
OnClick = ToolButton6Click
end
object ToolButton2: TToolButton
Left = 126
Left = 142
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
@ -59,7 +58,7 @@ object frmClothInfoInput: TfrmClothInfoInput
OnClick = ToolButton2Click
end
object TBClose: TToolButton
Left = 213
Left = 245
Top = 0
AutoSize = True
Caption = #20851#38381
@ -78,7 +77,6 @@ object frmClothInfoInput: TfrmClothInfoInput
Ctl3D = False
ParentCtl3D = False
TabOrder = 1
ExplicitHeight = 733
object Label1: TLabel
Left = 33
Top = 19
@ -550,10 +548,6 @@ object frmClothInfoInput: TfrmClothInfoInput
Height = 499
Align = alClient
TabOrder = 2
ExplicitLeft = 581
ExplicitTop = 32
ExplicitWidth = 185
ExplicitHeight = 733
object ToolBar2: TToolBar
Left = 1
Top = 1
@ -570,8 +564,6 @@ object frmClothInfoInput: TfrmClothInfoInput
ParentColor = False
ShowCaptions = True
TabOrder = 0
ExplicitTop = 507
ExplicitWidth = 183
object ToolButton3: TToolButton
Left = 0
Top = 0
@ -596,9 +588,7 @@ object frmClothInfoInput: TfrmClothInfoInput
Height = 467
Align = alClient
TabOrder = 1
ExplicitLeft = -1
ExplicitWidth = 185
ExplicitHeight = 701
ExplicitLeft = 3
object TV1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>

View File

@ -1,266 +0,0 @@
object frmCloInfoFileUp: TfrmCloInfoFileUp
Left = 612
Top = 236
Caption = #19978#20256#25991#20214
ClientHeight = 595
ClientWidth = 929
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poMainFormCenter
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object cxGrid7: TcxGrid
Left = 0
Top = 41
Width = 858
Height = 554
Align = alClient
TabOrder = 0
object TV7: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
DataController.DataSource = DataSource1
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsData.Editing = False
OptionsView.GroupByBox = False
OptionsView.Indicator = True
object FileName: TcxGridDBColumn
Tag = 1
Caption = #25991#20214#21517#31216
DataBinding.FieldName = 'FileName'
FooterAlignmentHorz = taCenter
HeaderAlignmentHorz = taCenter
Width = 121
end
object TV7Column1: TcxGridDBColumn
Caption = #33457#22411#21517#31216
DataBinding.FieldName = 'HXName'
GroupSummaryAlignment = taCenter
HeaderAlignmentHorz = taCenter
Width = 91
end
object FileDate: TcxGridDBColumn
Tag = 1
Caption = #19978#20256#26085#26399
DataBinding.FieldName = 'TFDate'
FooterAlignmentHorz = taCenter
HeaderAlignmentHorz = taCenter
Width = 104
end
end
object cxGridLevel6: TcxGridLevel
GridView = TV7
end
end
object Panel16: TPanel
Left = 190
Top = 126
Width = 138
Height = 30
BevelInner = bvRaised
Caption = #27491#22312#19978#20256#12290#12290#12290
Color = clSkyBlue
TabOrder = 1
Visible = False
end
object ToolBar6: TToolBar
Left = 858
Top = 41
Width = 71
Height = 554
Align = alRight
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
Caption = 'ToolBar1'
Images = DataLink_ClothInfo.ImageList_new32
List = True
ShowCaptions = True
TabOrder = 2
object FileUp: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #19978#20256
ImageIndex = 2
Wrap = True
OnClick = FileUpClick
end
object FileDel: TToolButton
Left = 0
Top = 38
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
Wrap = True
OnClick = FileDelClick
end
end
object Panel1: TPanel
Left = 0
Top = 0
Width = 929
Height = 41
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 3
object Label1: TLabel
Left = 8
Top = 14
Width = 72
Height = 17
Caption = #20135#21697#32534#21495
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Image2: TImage
Left = 773
Top = 7
Width = 60
Height = 28
Visible = False
end
object Image1: TImage
Left = 861
Top = 6
Width = 60
Height = 28
Visible = False
end
object Label2: TLabel
Left = 336
Top = 14
Width = 36
Height = 17
Caption = #33457#22411
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object Code: TEdit
Left = 78
Top = 10
Width = 211
Height = 25
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -17
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
ReadOnly = True
TabOrder = 0
end
object HXName: TBtnEditC
Tag = 2
Left = 378
Top = 8
Width = 168
Height = 29
Hint = 'CYKZ/'#20811#37325
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -20
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
Visible = False
OnBtnUpClick = HXNameBtnUpClick
OnBtnDnClick = HXNameBtnDnClick
end
end
object ODPat: TOpenDialog
Filter =
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
Options = [ofHideReadOnly, ofAllowMultiSelect, ofEnableSizing]
Left = 380
Top = 333
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 261
Top = 244
end
object SaveDialog1: TSaveDialog
Filter =
'All (*.svg;*.jpg;*.jpeg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.j' +
'peg;*.png;*.bmp;*.ico;*.emf;*.wmf;*.tif;*.tiff)|*.svg;*.jpg;*.jp' +
'eg;*.gif;*.tif;*.tiff;*.png;*.gif;*.jpg;*.jpeg;*.png;*.bmp;*.ico' +
';*.emf;*.wmf;*.tif;*.tiff|SVG graphics from DevExpress (*.svg)|*' +
'.svg|JPEG graphics from DevExpress (*.jpg)|*.jpg|JPEG graphics f' +
'rom DevExpress (*.jpeg)|*.jpeg|GIF graphics from DevExpress (*.g' +
'if)|*.gif|TIFF graphics from DevExpress (*.tif)|*.tif|TIFF graph' +
'ics from DevExpress (*.tiff)|*.tiff|PNG graphics from DevExpress' +
' (*.png)|*.png|GIF Image (*.gif)|*.gif|JPEG Image File (*.jpg)|*' +
'.jpg|JPEG Image File (*.jpeg)|*.jpeg|Portable Network Graphics (' +
'*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced ' +
'Metafiles (*.emf)|*.emf|Metafiles (*.wmf)|*.wmf|TIFF Images (*.t' +
'if)|*.tif|TIFF Images (*.tiff)|*.tiff'
Left = 305
Top = 333
end
object ADOQueryFile: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 488
Top = 144
end
object DataSource1: TDataSource
DataSet = ADOQueryFile
Left = 376
Top = 136
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Parameters = <>
Left = 584
Top = 256
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 432
Top = 224
end
end

View File

@ -1,382 +0,0 @@
unit U_CloInfoFileUp;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ComCtrls, ToolWin, ExtCtrls, cxGridLevel,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxClasses,
cxControls, cxGridCustomView, cxGrid, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdFTP, StdCtrls, ADODB, jpeg, BtnEdit, IniFiles,
strutils, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxSkinsCore,
dxSkinsDefaultPainters, dxDateRanges, IdExplicitTLSClientServerBase,
Vcl.ExtDlgs;
type
TfrmCloInfoFileUp = class(TForm)
cxGrid7: TcxGrid;
TV7: TcxGridDBTableView;
FileName: TcxGridDBColumn;
FileDate: TcxGridDBColumn;
cxGridLevel6: TcxGridLevel;
Panel16: TPanel;
ToolBar6: TToolBar;
FileUp: TToolButton;
FileDel: TToolButton;
Panel1: TPanel;
Label1: TLabel;
Code: TEdit;
ODPat: TOpenDialog;
IdFTP1: TIdFTP;
SaveDialog1: TSaveDialog;
ADOQueryFile: TADOQuery;
DataSource1: TDataSource;
ADOQueryCmd: TADOQuery;
ADOQueryTemp: TADOQuery;
Image2: TImage;
Image1: TImage;
TV7Column1: TcxGridDBColumn;
Label2: TLabel;
HXName: TBtnEditC;
procedure FileUpClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FileDelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HXNameBtnUpClick(Sender: TObject);
procedure HXNameBtnDnClick(Sender: TObject);
private
lstPat: TStringList;
AJpeg: TJPEGImage;
procedure CreThumb(Image1, Image2: TImage; Width, Height: Integer);
procedure SaveImageOther(FTFID: string);
procedure ReadINIFile10();
procedure InitTP();
{ Private declarations }
public
FBCIID: string;
FWidth, FHeight:Integer
{ Public declarations }
end;
var
frmCloInfoFileUp: TfrmCloInfoFileUp;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp;
{$R *.dfm} procedure TfrmCloInfoFileUp.InitTP();
begin
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName,HXName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''YP''');
Open;
end;
end;
procedure TfrmCloInfoFileUp.ReadINIFile10();
var
programIni: Tinifile; //配置文件名
FileName: string;
begin
FileName := ExtractFilePath(Paramstr(0)) + 'SYSTEMSET.INI';
programIni := Tinifile.create(FileName);
server := programIni.ReadString('SERVER', '服务器地址', '127.0.0.1');
programIni.Free;
end;
procedure TfrmCloInfoFileUp.FileUpClick(Sender: TObject);
var
i, j: Integer;
PatFile: string;
FTPPath, FConNo, MaxNo: string;
AJpeg: TJPEGImage;
myStream: TADOBlobStream;
begin
if Trim(Code.Text) = '' then
begin
Application.MessageBox('编号不能为空!', '提示', 0);
Exit;
end;
// if Trim(HXName.Text) = '' then
// begin
// if Application.MessageBox('花型确认为空吗?', '提示', 32 + 4) <> IDYES then
// Exit;
// end;
// ODPat
lstPat.Clear;
if ODPat.Execute then
begin
lstPat.AddStrings(ODPat.Files);
end;
if lstPat.Count > 0 then
begin
try
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
end;
Panel16.Visible := True;
Panel16.Refresh;
try
AJpeg := TJpegImage.Create();
ADOQueryCmd.Connection.BeginTrans;
for i := 0 to lstPat.Count - 1 do
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select isnull(max(abs(cast(right(left(FileName,charindex(''.'',FileName)-1),2) as int))),0)+1 as BH from TP_File');
sql.Add('where FileType =''YP'' and WBID=''' + trim(FBCIID) + ''' ');
open;
end;
PatFile := trim(Code.Text) + '-' + inttostr(ADOQueryTemp.fieldbyname('BH').AsInteger) + '.' + Copy(ExtractFileName(lstPat[i]), (Pos('.', ExtractFileName(lstPat[i])) + 1), (Length(ExtractFileName(lstPat[i])) - Pos('.', ExtractFileName(lstPat[i]))));
image1.Picture.LoadFromFile((lstPat[i]));
CreThumb(Image1, Image2, FWidth, FHeight);
if IdFTP1.Connected then
begin
try
IdFTP1.Put(lstPat[i], Trim(UserDataFlag + 'YP') + '\' + Trim(PatFile));
if GetLSNo(ADOQueryCmd, MaxNo, 'YP', 'XD_File', 4, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('取图片最大号失败!', '提示', 0);
Exit;
end;
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add(' select * from TP_File where TFID=''' + Trim(MaxNo) + '''');
open;
end;
with ADOQueryCmd do
begin
if ADOQueryCmd.IsEmpty then
begin
Append;
FieldByName('Filler').Value := Trim(DName);
FieldByName('TFDate').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('TFID').Value := Trim(MaxNo);
FieldByName('WBID').Value := Trim(FBCIID);
FieldByName('TFType').Value := '样品';
FieldByName('FileType').Value := 'YP';
FieldByName('HXName').Value := trim(HXName.Text);
FieldByName('filename').Value := Trim(PatFile);
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
AJpeg.Assign(Image2.Picture.Graphic);
AJpeg.SaveToStream(myStream);
myStream.Free;
Post;
end;
except
end;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
AJpeg.Free;
except
AJpeg.Free;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('图片上传失败!', '提示', 0);
end;
if IdFTP1.Connected then
IdFTP1.Quit;
InitTP();
Panel16.Visible := False;
if i > 0 then
Application.MessageBox(PChar(inttostr(i) + '个文件上传成功!'), '提示', 0);
ModalResult := 1;
end;
procedure TfrmCloInfoFileUp.CreThumb(Image1, Image2: TImage; Width, Height: Integer);
var
Bitmap: TBitmap;
Ratio: Double;
ARect: TRect;
AHeight, AHeightOffset: Integer;
AWidth, AWidthOffset: Integer;
begin
Bitmap := TBitmap.Create;
try
Ratio := Image1.Picture.Graphic.Width / Image1.Picture.Graphic.Height;
if Ratio > 1.333 then
begin
AHeight := Round(Width / Ratio);
AHeightOffset := (Height - AHeight) div 2;
AWidth := Width;
AWidthOffset := 0;
end
else
begin
AWidth := Round(Height * Ratio);
AWidthOffset := (Width - AWidth) div 2;
AHeight := Height;
AHeightOffset := 0;
end;
Bitmap.Width := Width;
Bitmap.Height := Height;
Bitmap.Canvas.Brush.Color := clBtnFace;
Bitmap.Canvas.FillRect(Rect(0, 0, Width, Height));
ARect := Rect(AWidthOffset, AHeightOffset, AWidth + AWidthOffset, AHeight + AHeightOffset);
Bitmap.Canvas.StretchDraw(ARect, Image1.Picture.Graphic);
Image2.Picture.Assign(Bitmap);
finally
Bitmap.Free;
end;
end;
procedure TfrmCloInfoFileUp.SaveImageOther(FTFID: string);
var
AJpeg: TJPEGImage;
myStream: TADOBlobStream;
ImgMaxNo: string;
i, j: Integer;
PatFile: string;
FConNo, MaxNo: string;
begin
if Image2.Picture = nil then
Exit;
AJpeg := TJpegImage.Create();
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add(' select * from TP_File where TFID=''' + Trim(FTFID) + '''');
open;
end;
with ADOQueryCmd do
begin
if Trim(FTFID) = '' then
begin
Append;
FieldByName('Filler').Value := Trim(DName);
end
else
begin
Edit;
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('TFID').Value := Trim(FTFID);
FieldByName('WBID').Value := Trim(FBCIID);
FieldByName('TFType').Value := '样品';
AJpeg.Assign(Image2.Picture.Graphic);
myStream := TADOBlobStream.Create(TBlobField(ADOQueryCmd.FieldByName('FilesOther')), bmWrite);
AJpeg.Assign(Image2.Picture.Graphic);
AJpeg.SaveToStream(myStream);
myStream.Free;
Post;
end;
end;
procedure TfrmCloInfoFileUp.FormCreate(Sender: TObject);
begin
lstPat := TStringList.Create;
if FWidth = 0 then
FWidth := 160;
if FHeight = 0 then
FHeight := 120;
end;
procedure TfrmCloInfoFileUp.FileDelClick(Sender: TObject);
begin
with ADOQueryCmd do
begin
Close;
sql.Clear;
SQL.Add(' Delete TP_File where TFID=''' + Trim(ADOQueryFile.fieldbyname('TFID').AsString) + '''');
ExecSQL;
end;
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''YP''');
Open;
end;
// with ADOQueryFile do
// begin
// Close;
// SQL.Clear;
// SQL.Add('select * from XD_File where FBCIID=''' + Trim(FBCIID) + '''');
// SQL.Add(' and FileType=''YP''');
// open;
// end;
// if ADOQueryFile.IsEmpty then
// begin
// with ADOQueryCmd do
// begin
// Close;
// sql.Clear;
// sql.Add('Update CP_YDang Set TPFlag=0 where FBCIID=''' + Trim(FBCIID) + '''');
// ExecSQL;
// end;
// end;
end;
procedure TfrmCloInfoFileUp.FormShow(Sender: TObject);
begin
with ADOQueryFile do
begin
Close;
SQL.Clear;
SQL.Add('select TFID,WBID,TFDate,Files,Filler,FillTime,FileName from TP_File where WBID=''' + Trim(FBCIID) + '''');
SQL.Add(' and FileType=''YP''');
Open;
end;
end;
procedure TfrmCloInfoFileUp.HXNameBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmCloInfoFileUp.HXNameBtnUpClick(Sender: TObject);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'HX' + Trim(Code.Text);
flagname := '花型';
if ShowModal = 1 then
begin
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
end.

View File

@ -1,950 +0,0 @@
inherited frmClothInfo: TfrmClothInfo
Left = 117
Top = 154
Caption = #20135#21697#26723#26696
ClientHeight = 754
ClientWidth = 1444
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitWidth = 1460
ExplicitHeight = 793
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1444
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 91
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_ClothInfo.ImageList_new32
Images = DataLink_ClothInfo.ImageList_new32
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 0
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 1
OnClick = TBRafreshClick
end
object TBFilter: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #36807#28388
ImageIndex = 0
OnClick = TBFilterClick
end
object TBAdd: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #26032#22686
ImageIndex = 9
OnClick = TBAddClick
end
object ToolButton1: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #26597#30475
ImageIndex = 4
OnClick = ToolButton1Click
end
object TBCopy: TToolButton
Left = 284
Top = 0
AutoSize = True
Caption = #22797#21046
ImageIndex = 13
OnClick = TBCopyClick
end
object TBEdit: TToolButton
Left = 355
Top = 0
AutoSize = True
Caption = #20462#25913
ImageIndex = 3
OnClick = TBEditClick
end
object TBMLEdit: TToolButton
Left = 426
Top = 0
AutoSize = True
Caption = #30446#24405#20462#25913
ImageIndex = 3
OnClick = TBMLEditClick
end
object TBDel: TToolButton
Left = 521
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
OnClick = TBDelClick
end
object ToolButton3: TToolButton
Left = 592
Top = 0
AutoSize = True
Caption = #26631#31614#25171#21360
ImageIndex = 21
OnClick = ToolButton3Click
end
object TBExport: TToolButton
Left = 687
Top = 0
AutoSize = True
Caption = #23548#20986
ImageIndex = 20
OnClick = TBExportClick
end
object TBUP: TToolButton
Left = 758
Top = 0
AutoSize = True
Caption = #22270#29255#19978#20256
ImageIndex = 19
OnClick = TBUPClick
end
object ToolButton2: TToolButton
Left = 853
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton2Click
end
object TBClose: TToolButton
Left = 948
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object cxSplitter1: TcxSplitter [1]
Left = 220
Top = 119
Width = 8
Height = 635
HotZoneClassName = 'TcxMediaPlayer9Style'
Control = Panel5
end
object Panel1: TPanel [2]
Left = 0
Top = 38
Width = 1444
Height = 81
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = 16242829
ParentBackground = False
TabOrder = 1
object Label3: TLabel
Left = 42
Top = 15
Width = 48
Height = 12
Caption = #20135#21697#32534#21495
end
object Label11: TLabel
Left = 1072
Top = 107
Width = 7
Height = 12
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label12: TLabel
Left = 1120
Top = 111
Width = 7
Height = 12
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label4: TLabel
Left = 42
Top = 47
Width = 48
Height = 12
Caption = #20135#21697#21517#31216
end
object Label9: TLabel
Left = 254
Top = 51
Width = 24
Height = 12
Caption = #20811#37325
end
object Label8: TLabel
Left = 254
Top = 15
Width = 24
Height = 12
Caption = #38376#24133
end
object Label1: TLabel
Left = 453
Top = 10
Width = 24
Height = 12
Caption = #22791#27880
end
object Label5: TLabel
Left = 453
Top = 51
Width = 36
Height = 12
Caption = #22635#21333#20154
end
object C_Code: TEdit
Tag = 2
Left = 115
Top = 11
Width = 89
Height = 20
TabOrder = 0
OnKeyPress = C_CodeKeyPress
end
object C_Name: TEdit
Tag = 2
Left = 115
Top = 43
Width = 89
Height = 20
TabOrder = 1
OnKeyPress = C_CodeKeyPress
end
object C_GramWeight: TEdit
Tag = 2
Left = 296
Top = 47
Width = 89
Height = 20
TabOrder = 3
OnKeyPress = C_CodeKeyPress
end
object C_Width: TEdit
Tag = 2
Left = 296
Top = 11
Width = 89
Height = 20
TabOrder = 2
OnKeyPress = C_CodeKeyPress
end
object Note: TEdit
Tag = 2
Left = 502
Top = 6
Width = 89
Height = 20
TabOrder = 4
OnKeyPress = C_CodeKeyPress
end
object filler: TEdit
Tag = 2
Left = 502
Top = 47
Width = 89
Height = 20
TabOrder = 5
OnKeyPress = C_CodeKeyPress
end
end
object Panel2: TPanel [3]
Left = 512
Top = 232
Width = 185
Height = 41
BevelInner = bvRaised
BevelOuter = bvLowered
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
Color = clSkyBlue
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 5
Visible = False
end
object Panel5: TPanel [4]
Left = 0
Top = 119
Width = 220
Height = 635
Align = alLeft
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 2
object cxDBTreeList1: TcxDBTreeList
Left = 2
Top = 2
Width = 216
Height = 631
Align = alClient
Bands = <
item
end>
DataController.DataSource = DS_Tree
DataController.ParentField = 'CTParent'
DataController.KeyField = 'CTID'
Navigator.Buttons.CustomButtons = <>
OptionsBehavior.CopyCaptionsToClipboard = False
OptionsBehavior.ExpandOnDblClick = False
OptionsSelection.CellSelect = False
OptionsView.CellAutoHeight = True
OptionsView.Headers = False
RootValue = -1
ScrollbarAnnotations.CustomAnnotations = <>
Styles.Inactive = DataLink_ClothInfo.Red
Styles.Selection = DataLink_ClothInfo.Red
Styles.IncSearch = DataLink_ClothInfo.Red
TabOrder = 0
OnDblClick = cxDBTreeList1DblClick
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
DataBinding.FieldName = 'CTName'
Width = 210
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
Summary.FooterSummaryItems = <>
Summary.GroupFooterSummaryItems = <>
end
end
end
object Panel3: TPanel [5]
Left = 228
Top = 119
Width = 1216
Height = 635
Align = alClient
BevelInner = bvRaised
BevelOuter = bvLowered
Caption = 'Panel3'
TabOrder = 4
object cxGrid1: TcxGrid
Left = 2
Top = 42
Width = 1212
Height = 386
Align = alClient
PopupMenu = PM_1
TabOrder = 0
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
ScrollbarAnnotations.CustomAnnotations = <>
OnFocusedRecordChanged = Tv1FocusedRecordChanged
DataController.DataSource = DS_1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsData.Deleting = False
OptionsData.DeletingConfirmation = False
OptionsView.GroupByBox = False
Styles.IncSearch = DataLink_ClothInfo.SHuangSe
Styles.Header = DataLink_ClothInfo.Default
Styles.Inactive = DataLink_ClothInfo.SHuangSe
Styles.Selection = DataLink_ClothInfo.SHuangSe
object v1SSel: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
HeaderAlignmentHorz = taCenter
Styles.Header = DataLink_ClothInfo.Default
Width = 41
end
object v1Column12: TcxGridDBColumn
Caption = #31867#21035
DataBinding.FieldName = 'CTName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_ClothInfo.Default
Width = 70
end
object v1CYNo: TcxGridDBColumn
Caption = #20135#21697#32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_ClothInfo.Default
Width = 92
end
object v1Column9: TcxGridDBColumn
Caption = #20135#21697#21517#31216
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 96
end
object v1Column3: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'C_Width'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_ClothInfo.Default
Width = 80
end
object v1Column1: TcxGridDBColumn
Caption = #20811#37325
DataBinding.FieldName = 'C_GramWeight'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object Tv1Column3: TcxGridDBColumn
Caption = #25104#20998
DataBinding.FieldName = 'C_Composition'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object Tv1Column11: TcxGridDBColumn
Caption = #35268#26684
DataBinding.FieldName = 'C_Spec'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object v1Column11: TcxGridDBColumn
Caption = #22270#29255
DataBinding.FieldName = 'IsImg'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 57
end
object Tv1Column5: TcxGridDBColumn
Caption = #22635#21333#20154
DataBinding.FieldName = 'filler'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 71
end
object Tv1Column6: TcxGridDBColumn
Caption = #20462#25913#20154
DataBinding.FieldName = 'editer'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 68
end
object Tv1Column7: TcxGridDBColumn
Caption = #20462#25913#26102#38388
DataBinding.FieldName = 'edittime'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 67
end
object Tv1Column9: TcxGridDBColumn
Caption = #24405#20837#26102#38388
DataBinding.FieldName = 'FILLTIME'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column4: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'Note'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 200
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object Panel7: TPanel
Left = 2
Top = 2
Width = 1212
Height = 40
Align = alTop
BevelOuter = bvNone
TabOrder = 1
object Panel4: TPanel
Left = 0
Top = 0
Width = 1212
Height = 40
Align = alClient
AutoSize = True
TabOrder = 0
DesignSize = (
1212
40)
object Label14: TLabel
Left = 19
Top = 13
Width = 84
Height = 13
Alignment = taCenter
Anchors = [akLeft]
Caption = #27599#39029#35760#24405#26465#25968
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Layout = tlCenter
end
object LBCPAP1: TLabel
Left = 276
Top = 9
Width = 85
Height = 21
Alignment = taCenter
Anchors = [akLeft]
AutoSize = False
Caption = #24403#21069#39029'/'#24635#39029#25968
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Layout = tlCenter
end
object Button1: TButton
Left = 195
Top = 8
Width = 75
Height = 23
Anchors = [akLeft]
Caption = #19978#19968#39029
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
OnClick = Button1Click
end
object Button2: TButton
Left = 367
Top = 9
Width = 78
Height = 22
Anchors = [akLeft]
Caption = #19979#19968#39029
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
OnClick = Button2Click
end
object TCBNOR1: TComboBox
Tag = 2
Left = 111
Top = 10
Width = 78
Height = 20
Anchors = [akLeft]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ItemIndex = 2
ParentFont = False
TabOrder = 2
Text = '500'
OnChange = TCBNOR1Change
Items.Strings = (
'100'
'300'
'500'
'1000'
'5000'
'10000')
end
end
end
object Panel9: TPanel
Left = 2
Top = 428
Width = 1212
Height = 205
Align = alBottom
Caption = 'Panel9'
TabOrder = 2
object Panel10: TPanel
Left = 1
Top = 1
Width = 1210
Height = 203
Align = alClient
Caption = 'Panel9'
TabOrder = 0
object GroupBox1: TGroupBox
Left = 608
Top = 42
Width = 601
Height = 160
Align = alRight
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
TabOrder = 0
object ScrollBox1: TScrollBox
Left = 2
Top = 14
Width = 597
Height = 144
Align = alClient
BevelInner = bvLowered
BorderStyle = bsNone
TabOrder = 0
end
end
object Panel11: TPanel
Left = 1
Top = 1
Width = 1208
Height = 41
Align = alTop
TabOrder = 1
Visible = False
DesignSize = (
1208
41)
object Label7: TLabel
Left = 33
Top = 8
Width = 88
Height = 21
Caption = #33457#22411#36873#25321
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -21
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object cbbHX: TComboBox
Left = 368
Top = 3
Width = 210
Height = 32
Style = csDropDownList
Anchors = []
Color = clWhite
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 0
OnChange = cbbHXChange
Items.Strings = (
#33457#22411)
end
end
object cxGrid2: TcxGrid
Left = 1
Top = 42
Width = 607
Height = 160
Align = alClient
TabOrder = 2
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.Footer = True
OptionsView.GroupByBox = False
object TV1Column1: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 150
end
object TV1Column2: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'C_ColorNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 150
end
object cxGridDBColumn1: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 150
end
object cxGridDBColumn2: TcxGridDBColumn
Caption = #27454#21495
DataBinding.FieldName = 'C_StyleNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 150
end
end
object cxGridLevel2: TcxGridLevel
GridView = Tv2
end
end
end
end
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Left = 161
Top = 240
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Left = 57
Top = 241
end
object DS_Tree: TDataSource
DataSet = CDS_Tree
Left = 155
Top = 131
end
object ADOQueryTree: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 53
Top = 137
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 899
Top = 192
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Parameters = <>
Left = 997
Top = 197
end
object GPM_1: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 888
Top = 360
end
object DS_1: TDataSource
DataSet = CDS_1
Left = 1043
Top = 395
end
object ADOQueryMain: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 1061
Top = 201
end
object CDS_1: TClientDataSet
Aggregates = <>
Params = <>
Left = 960
Top = 408
end
object RM1: TRMGridReport
ThreadPrepareReport = True
InitialZoom = pzDefault
PreviewButtons = [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbExport, rmpbNavigator]
DefaultCollate = False
ShowPrintDialog = False
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
PreviewOptions.RulerUnit = rmutScreenPixels
PreviewOptions.RulerVisible = False
PreviewOptions.DrawBorder = False
PreviewOptions.BorderPen.Color = clGray
PreviewOptions.BorderPen.Style = psDash
Dataset = RMDB_Main
CompressLevel = rmzcFastest
CompressThread = False
LaterBuildEvents = True
OnlyOwnerDataSet = False
Left = 312
Top = 216
ReportData = {}
end
object RMDB_Main: TRMDBDataSet
Visible = True
DataSet = ADOQueryPrint
Left = 952
Top = 296
end
object ODPat: TOpenDialog
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
Left = 324
Top = 285
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 381
Top = 380
end
object SaveDialog1: TSaveDialog
Left = 385
Top = 285
end
object DSCYNO: TDataSource
DataSet = CDS_CYNO
Left = 499
Top = 299
end
object CDS_CYNO: TClientDataSet
Aggregates = <>
Params = <>
Left = 496
Top = 240
end
object adoqueryPicture: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Parameters = <>
Left = 299
Top = 360
end
object OpenDialog1: TOpenDialog
Left = 458
Top = 354
end
object PM_1: TPopupMenu
Left = 1160
Top = 352
object N1: TMenuItem
Caption = #20840#36873
OnClick = N1Click
end
object N2: TMenuItem
Caption = #20840#24323
OnClick = N2Click
end
object N3: TMenuItem
Caption = #22797#21046
OnClick = N3Click
end
end
object RMBarCodeObject1: TRMBarCodeObject
Left = 1052
Top = 296
end
object DataSource3: TDataSource
DataSet = CDS_Sub
Left = 746
Top = 312
end
object CDS_Sub: TClientDataSet
Aggregates = <>
Params = <>
Left = 747
Top = 439
end
object GPM_2: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 525
Top = 494
end
object CDS_Tree: TClientDataSet
Aggregates = <>
Params = <>
Left = 96
Top = 136
end
object ADOQueryPrint: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 875
Top = 296
end
object CDS_Label: TClientDataSet
Aggregates = <>
Params = <>
Left = 520
Top = 426
end
object CDS_2: TClientDataSet
Aggregates = <>
Params = <>
Left = 586
Top = 492
end
object DS_2: TDataSource
DataSet = CDS_2
Left = 642
Top = 494
end
end

View File

@ -1,867 +0,0 @@
unit U_ClothInfo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, jpeg, U_SLT, ComObj, Menus,
cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, cxNavigator,
dxBarBuiltInMenu, cxPC, Math, RM_BarCode, dxSkinsCore, dxSkinsDefaultPainters,
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, cxContainer,
dxDBBarCode, dxBarCode, Vcl.Clipbrd, cxTextEdit, BtnEdit, StrUtils,
dxSkinBasic, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
dxSkinCoffee, dxSkinDarkroom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinOffice2016Colorful,
dxSkinOffice2016Dark, dxSkinOffice2019Black, dxSkinOffice2019Colorful,
dxSkinOffice2019DarkGray, dxSkinOffice2019White, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
dxSkinSpringtime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
dxSkinTheBezier, dxSkinValentine, dxSkinVisualStudio2013Blue,
dxSkinVisualStudio2013Dark, dxSkinVisualStudio2013Light, dxSkinVS2010,
dxSkinWhiteprint, dxSkinWXI, dxSkinXmas2008Blue, dxScrollbarAnnotations;
type
FdDy = record
inc: integer; //客户端套接字句柄
FDdys: string[32]; //客户端套接字
FdDysName: string[32]; //客户端套接字
end;
TfrmClothInfo = class(TfrmBaseList)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBDel: TToolButton;
TBClose: TToolButton;
DS_Tree: TDataSource;
ADOQueryTree: TADOQuery;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
GPM_1: TcxGridPopupMenu;
Tv1: TcxGridDBTableView;
cxGrid1Level1: TcxGridLevel;
cxGrid1: TcxGrid;
cxSplitter1: TcxSplitter;
Panel1: TPanel;
TBFilter: TToolButton;
v1CYNo: TcxGridDBColumn;
v1Column3: TcxGridDBColumn;
DS_1: TDataSource;
ADOQueryMain: TADOQuery;
CDS_1: TClientDataSet;
v1Column12: TcxGridDBColumn;
TBExport: TToolButton;
RM1: TRMGridReport;
RMDB_Main: TRMDBDataSet;
ODPat: TOpenDialog;
IdFTP1: TIdFTP;
SaveDialog1: TSaveDialog;
TBUP: TToolButton;
Label3: TLabel;
C_Code: TEdit;
TBCopy: TToolButton;
Panel2: TPanel;
v1SSel: TcxGridDBColumn;
DSCYNO: TDataSource;
CDS_CYNO: TClientDataSet;
Panel5: TPanel;
cxDBTreeList1: TcxDBTreeList;
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
Label11: TLabel;
Label12: TLabel;
Panel3: TPanel;
adoqueryPicture: TADOQuery;
v1Column1: TcxGridDBColumn;
v1Column9: TcxGridDBColumn;
Label4: TLabel;
C_Name: TEdit;
TBAdd: TToolButton;
TBEdit: TToolButton;
TBMLEdit: TToolButton;
OpenDialog1: TOpenDialog;
Label9: TLabel;
C_GramWeight: TEdit;
Label8: TLabel;
C_Width: TEdit;
PM_1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
v1Column11: TcxGridDBColumn;
Panel7: TPanel;
Panel4: TPanel;
Label14: TLabel;
LBCPAP1: TLabel;
Button1: TButton;
Button2: TButton;
TCBNOR1: TComboBox;
RMBarCodeObject1: TRMBarCodeObject;
Tv1Column5: TcxGridDBColumn;
Tv1Column6: TcxGridDBColumn;
Tv1Column7: TcxGridDBColumn;
ToolButton1: TToolButton;
DataSource3: TDataSource;
CDS_Sub: TClientDataSet;
Tv1Column9: TcxGridDBColumn;
Tv1Column11: TcxGridDBColumn;
GPM_2: TcxGridPopupMenu;
ToolButton2: TToolButton;
N3: TMenuItem;
Panel9: TPanel;
Panel10: TPanel;
GroupBox1: TGroupBox;
ScrollBox1: TScrollBox;
Panel11: TPanel;
cbbHX: TComboBox;
Label7: TLabel;
CDS_Tree: TClientDataSet;
ADOQueryPrint: TADOQuery;
CDS_Label: TClientDataSet;
ToolButton3: TToolButton;
Tv1Column3: TcxGridDBColumn;
Tv1Column4: TcxGridDBColumn;
Label1: TLabel;
Note: TEdit;
Label5: TLabel;
filler: TEdit;
cxGrid2: TcxGrid;
Tv2: TcxGridDBTableView;
TV1Column1: TcxGridDBColumn;
TV1Column2: TcxGridDBColumn;
cxGridDBColumn1: TcxGridDBColumn;
cxGridDBColumn2: TcxGridDBColumn;
cxGridLevel2: TcxGridLevel;
CDS_2: TClientDataSet;
DS_2: TDataSource;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure TBDelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure cxDBTreeList1DblClick(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure TBFilterClick(Sender: TObject);
procedure CYNoChange(Sender: TObject);
procedure TBExportClick(Sender: TObject);
procedure TBUPClick(Sender: TObject);
procedure TBCopyClick(Sender: TObject);
procedure C_CodeKeyPress(Sender: TObject; var Key: Char);
procedure TBAddClick(Sender: TObject);
procedure TBEditClick(Sender: TObject);
procedure TBMLEditClick(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure TCBNOR1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
procedure ToolButton2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure TextEdit(Sender: TObject);
procedure HXNameBtnUpClick(Sender: TObject);
procedure HXNameBtnDnClick(Sender: TObject);
procedure cbbHXChange(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
private
{ Private declarations }
CurrentPage, RecordsNumber: Integer;
CTID: string;
PState: Integer;
FCTID, FTopID: string;
procedure SetStatus();
procedure InitTree();
procedure InitGrid();
procedure ReadINIFile();
procedure InitImage();
procedure LookImage(FileName: string);
public
dFdDy: array[0..20] of FdDy; //客户端连接数组
FJurisdiction: string;
{ Public declarations }
end;
var
Mach: array of TfrmSlt;
implementation
uses
U_DataLink, U_RTFun, U_ClothInfoInput, U_CloInfoFileUp, U_YPTypeHelpCP,
U_ZDYHelp, U_LabelPrint;
{$R *.dfm}
procedure TfrmClothInfo.LookImage(FileName: string);
var
sFieldName: string;
begin
sFieldName := leftbstr(ExtractFilePath(Application.ExeName), 1) + ':\图片查看';
if not DirectoryExists(pchar(sFieldName)) then
CreateDirectory(pchar(sFieldName), nil);
sFieldName := sFieldName + '\' + trim(FileName);
try
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
end;
if IdFTP1.Connected then
begin
application.ProcessMessages;
try
// ShowMessage(PChar(Trim('D:\' + Trim(FileName))));
IdFTP1.Get(Trim(UserDataFlag + 'YP\' + FileName), sFieldName, true, false);
except
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
IdFTP1.Quit;
Exit;
end;
end
else
begin
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
IdFTP1.Quit;
Exit;
end;
if IdFTP1.Connected then
IdFTP1.Quit;
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
end;
procedure TfrmClothInfo.SetStatus();
begin
end;
procedure TfrmClothInfo.InitTree();
var
i: Integer;
begin
with ADOQueryTree do
begin
Close;
SQL.Clear;
SQL.Add('select * from BS_Cloth_Type');
Open;
end;
SCreateCDS(ADOQueryTree, CDS_Tree);
SInitCDSData(ADOQueryTree, CDS_Tree);
cxDBTreeList1.Items[0].Expand(false);
end;
procedure TfrmClothInfo.InitGrid();
var
fwhere, MBCIID, Pwhere: string;
begin
Panel2.Visible := True;
Panel2.Refresh;
if not CDS_1.IsEmpty then
MBCIID := Trim(CDS_1.FieldByName('BCIID').AsString)
else
MBCIID := '';
Pwhere := SGetFilters(Panel1, 1, 2);
if trim(Pwhere) <> '' then
begin
if fwhere <> '' then
fwhere := fwhere + ' and ' + trim(Pwhere)
else
fwhere := ' where ' + trim(Pwhere);
end;
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Close;
Filtered := False;
sql.Clear;
sql.Add(' exec P_BS_CloInfo_Get ');
sql.Add(' @CTID=' + quotedstr(Trim(CDS_Tree.fieldbyname('CTID').AsString)));
sql.Add(',@pageIndex=' + inttostr(CurrentPage));
sql.Add(',@pageSize=' + inttostr(RecordsNumber));
sql.Add(',@criteria= ' + quotedstr(fwhere));
// ShowMessage(sql.Text);
Open;
end;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_1);
SInitCDSData(ADOQueryMain, CDS_1);
TV1.DataController.Filter.Clear;
LBCPAP1.Caption := inttostr(CurrentPage) + '/' + inttostr(ceil(CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber));
finally
ADOQueryMain.EnableControls;
TV1.DataController.Filter.Clear;
end;
Panel2.Visible := False;
if MBCIID <> '' then
CDS_1.Locate('BCIID', MBCIID, []);
end;
procedure TfrmClothInfo.FormClose(Sender: TObject; var Action: TCloseAction);
var
i, j: integer;
begin
inherited;
j := length(Mach);
if j > 0 then
begin
for i := 0 to j - 1 do
begin
Mach[i].free;
end;
end;
SetLength(Mach, 0);
Action := cafree;
end;
procedure TfrmClothInfo.TBCloseClick(Sender: TObject);
begin
if DirectoryExists(ExtractFileDir('D:\Right1209')) then
winexec('cmd /c rd /s /q D:\Right1209', sw_hide);
Close;
end;
procedure TfrmClothInfo.TBDelClick(Sender: TObject);
begin
if CDS_1.IsEmpty then
Exit;
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
while CDS_1.Locate('SSel', true, []) do
begin
if Trim(CDS_1.fieldbyname('BCIID').AsString) <> '' then
begin
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('delete BS_Cloth_Info where BCIID=''' + Trim(CDS_1.fieldbyname('BCIID').AsString) + '''');
ExecSQL;
end;
end;
CDS_1.Delete;
end;
end;
procedure TfrmClothInfo.FormShow(Sender: TObject);
begin
inherited;
FJurisdiction := Self.fParameters1;
ReadCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
if trim(FJurisdiction) <> '管理' then
begin
filler.text := trim(DName);
filler.Enabled := false;
end;
// pnlreport.Top := FTop + 110;
application.ProcessMessages;
RecordsNumber := 500;
CurrentPage := 1;
InitTree();
SetStatus();
InitGrid();
end;
procedure TfrmClothInfo.cbbHXChange(Sender: TObject);
begin
InitImage();
end;
procedure TfrmClothInfo.cxDBTreeList1DblClick(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmClothInfo.TBRafreshClick(Sender: TObject);
begin
InitTree();
InitGrid();
end;
procedure TfrmClothInfo.TBFilterClick(Sender: TObject);
begin
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_1);
SInitCDSData(ADOQueryMain, CDS_1);
end;
end;
procedure TfrmClothInfo.CYNoChange(Sender: TObject);
begin
//if Length(Trim(TEdit(Sender).Text))<4 then Exit;
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_1);
SInitCDSData(ADOQueryMain, CDS_1);
end;
end;
procedure TfrmClothInfo.TBExportClick(Sender: TObject);
begin
if CDS_1.IsEmpty then
Exit;
TcxGridToExcel(self.Caption, cxGrid1);
end;
procedure TfrmClothInfo.TBUPClick(Sender: TObject);
begin
try
frmCloInfoFileUp := TfrmCloInfoFileUp.Create(Application);
with frmCloInfoFileUp do
begin
Code.Text := Trim(Self.CDS_1.fieldbyname('C_Code').AsString);
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
// Self.CDS_1.Locate('BCIID', BCIID, []);
end;
end;
finally
frmCloInfoFileUp.Free;
end;
InitImage();
end;
procedure TfrmClothInfo.ReadINIFile();
var
programIni: Tinifile; //配置文件名
FileName: string;
begin
FileName := ExtractFilePath(Paramstr(0)) + 'SYSTEMSET.INI';
programIni := Tinifile.create(FileName);
server := programIni.ReadString('SERVER', '服务器地址', '127.0.0.1');
programIni.Free;
end;
procedure TfrmClothInfo.InitImage();
var
i, j: integer;
jpg: TJpegImage;
myStream: TADOBlobStream;
begin
j := length(Mach);
if j > 0 then
begin
for i := 0 to j - 1 do
begin
Mach[i].free;
end;
end;
SetLength(Mach, 0);
if CDS_1.IsEmpty then
exit;
try
with adoqueryPicture do
begin
close;
sql.Clear;
sql.Add(' select A.TFID,A.WBID,A.FilesOther,A.FileName from TP_File A ');
sql.add('where A.WBID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
if Trim(cbbHX.Text) <> '' then
sql.add(' and A.HXName=' + quotedstr(trim(cbbHX.Text)));
open;
end;
j := adoqueryPicture.RecordCount;
if j < 1 then
exit;
adoqueryPicture.DisableControls;
adoqueryPicture.First;
SetLength(Mach, j);
jpg := TJpegImage.Create();
for i := 0 to j - 1 do
begin
if triM(adoqueryPicture.fieldbyname('FilesOther').AsString) <> '' then
begin
myStream := tadoblobstream.Create(tblobfield(adoqueryPicture.fieldbyname('FilesOther')), bmread);
jpg.LoadFromStream(myStream);
Mach[i] := TfrmSlt.Create(Self);
Mach[i].Name := trim(adoqueryPicture.fieldbyname('TFID').AsString);
Mach[i].Parent := ScrollBox1;
Mach[i].Left := 0 + i * 165;
Mach[i].Init(adoqueryPicture.fieldbyname('TFID').AsString, adoqueryPicture.fieldbyname('FileName').AsString, jpg);
end;
adoqueryPicture.Next;
end;
adoqueryPicture.EnableControls;
finally
jpg.free;
application.ProcessMessages;
end;
end;
procedure TfrmClothInfo.TBCopyClick(Sender: TObject);
begin
try
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
with frmClothInfoInput do
begin
CopyInt := 1;
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmClothInfoInput.Free;
end;
end;
procedure TfrmClothInfo.C_CodeKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then
begin
CurrentPage := 1;
InitGrid();
end;
end;
procedure TfrmClothInfo.TBAddClick(Sender: TObject);
var
i: Integer;
FieldName: string;
begin
try
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
with frmClothInfoInput do
begin
CopyInt := 0;
FBCIID := '';
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmClothInfoInput.Free;
end;
end;
procedure TfrmClothInfo.TBEditClick(Sender: TObject);
begin
if CDS_1.IsEmpty then
Exit;
try
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
with frmClothInfoInput do
begin
CopyInt := 0;
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmClothInfoInput.Free;
end;
end;
procedure TfrmClothInfo.TextEdit(Sender: TObject);
var
mvalue, FFieldName: string;
begin
mvalue := TcxTextEdit(Sender).EditingText;
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
with CDS_1 do
begin
Edit;
FieldByName(FFieldName).Value := mvalue;
Post;
end;
if mvalue = '' then
mvalue := '0';
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('update BS_Cloth_Info set ' + FFieldName + '=' + (Trim(mvalue)));
sql.Add('where BCIID=' + quotedstr(Trim(CDS_1.fieldbyname('BCIID').AsString)));
ExecSQL;
end;
Tv1.Controller.EditingController.ShowEdit();
end;
procedure TfrmClothInfo.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
var
fsj: string;
begin
fsj := 'select DISTINCT HXNAME name from TP_File where ISNULL(HXNAME,'''')<>'''' AND WBID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString));
SInitComBoxBySql(ADOQueryTemp, cbbHX, True, fsj);
InitImage();
if CDS_1.IsEmpty then
exit;
with ADOQueryTemp do
begin
close;
sql.Clear;
sql.Add('select * from BS_Cloth_Info_Sub A ');
sql.Add('where BCIID =' + quotedstr((CDS_1.fieldbyname('BCIID').AsString)));
// ShowMessage(sql.text);
open;
end;
SCreateCDS(ADOQueryTemp, CDS_2);
SInitCDSData(ADOQueryTemp, CDS_2);
end;
procedure TfrmClothInfo.TBMLEditClick(Sender: TObject);
var
fYPType: string;
begin
if CDS_1.IsEmpty then
exit;
if CDS_1.Locate('ssel', true, []) = false then
begin
Application.MessageBox('没有选择数据!', '提示', 0);
Exit;
end;
fYPType := '';
frmYPTypeHelpCP := TfrmYPTypeHelpCP.create(self);
with frmYPTypeHelpCP do
begin
if showmodal = 1 then
begin
fYPType := trim(ADOQueryHelp.fieldbyname('CTID').asstring);
end;
free;
end;
if trim(fYPType) = '' then
exit;
try
with CDS_1 do
begin
DisableControls;
First;
while not eof do
begin
if fieldbyname('ssel').AsBoolean then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('update BS_Cloth_Info SET CTID=''' + trim(fYPType) + ''' ');
sql.Add('where BCIID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
execsql;
end;
end;
next;
end;
First;
EnableControls;
end;
application.MessageBox('操作成功!', '提示信息');
initgrid();
except
CDS_1.EnableControls;
application.MessageBox('操作失败!', '提示信息', 0);
end;
end;
procedure TfrmClothInfo.N1Click(Sender: TObject);
begin
SelOKNoFiler(Tv1, True);
end;
procedure TfrmClothInfo.N2Click(Sender: TObject);
begin
SelOKNoFiler(Tv1, False);
end;
procedure TfrmClothInfo.N3Click(Sender: TObject);
begin
Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
end;
procedure TfrmClothInfo.TCBNOR1Change(Sender: TObject);
begin
RecordsNumber := StrToInt(TCBNOR1.Text);
CurrentPage := 1;
C_Code.SetFocus;
InitGrid();
end;
procedure TfrmClothInfo.HXNameBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmClothInfo.HXNameBtnUpClick(Sender: TObject);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'HX' + Trim(Self.CDS_1.fieldbyname('CYNO').AsString);
flagname := '花型';
if ShowModal = 1 then
begin
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
procedure TfrmClothInfo.Button1Click(Sender: TObject);
begin
if CurrentPage > 1 then
CurrentPage := CurrentPage - 1;
InitGrid();
end;
procedure TfrmClothInfo.Button2Click(Sender: TObject);
begin
if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then
CurrentPage := CurrentPage + 1;
InitGrid();
end;
procedure TfrmClothInfo.ToolButton1Click(Sender: TObject);
begin
try
frmClothInfoInput := TfrmClothInfoInput.Create(Application);
with frmClothInfoInput do
begin
CopyInt := 0;
ToolButton1.Visible := False;
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmClothInfoInput.Free;
end;
end;
procedure TfrmClothInfo.ToolButton2Click(Sender: TObject);
begin
WriteCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
end;
procedure TfrmClothInfo.ToolButton3Click(Sender: TObject);
var
WSql: string;
begin
if CDS_1.IsEmpty then
Exit;
Tv1.OnFocusedRecordChanged := nil;
if CDS_1.Locate('SSel', True, []) = False then
begin
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
Application.MessageBox('没有选择数据!', '提示', 0);
Exit;
end;
WSql := '';
CDS_1.DisableControls;
with CDS_1 do
begin
First;
while not Eof do
begin
if CDS_1.fieldbyname('SSel').AsBoolean then
begin
if WSql <> '' then
begin
WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
end
else
begin
WSql := QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
end;
end;
Next;
end;
end;
CDS_1.Locate('SSel', True, []);
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
CDS_1.EnableControls;
try
frmLabelPrint := TfrmLabelPrint.Create(Application);
with frmLabelPrint do
begin
FLMType := 'ClothInfoPrint';
FFiltration1 := WSql;
if ShowModal = 1 then
begin
// Self.InitGrid();
end;
end;
finally
frmLabelPrint.Free;
end;
end;
end.

View File

@ -1,435 +0,0 @@
object frmClothInfoInput: TfrmClothInfoInput
Left = 459
Top = 231
Anchors = []
Caption = #20135#21697#20449#24687#24405#20837
ClientHeight = 507
ClientWidth = 931
Color = clWhite
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = True
Position = poScreenCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 931
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
Caption = 'ToolBar1'
Color = clWhite
DisabledImages = DataLink_ClothInfo.ImageList_new32
Images = DataLink_ClothInfo.ImageList_new32
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 0
object ToolButton1: TToolButton
Tag = 1
Left = 0
Top = 0
AutoSize = True
Caption = #20445#23384
ImageIndex = 16
OnClick = ToolButton1Click
end
object TBClose: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object ScrollBox1: TScrollBox
Left = 0
Top = 38
Width = 931
Height = 469
Align = alClient
AutoSize = True
BevelInner = bvNone
BevelOuter = bvNone
Color = clWhite
Ctl3D = False
ParentColor = False
ParentCtl3D = False
TabOrder = 1
object Label1: TLabel
Left = 42
Top = 41
Width = 85
Height = 16
Caption = #20135#21697#32534#21495#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label5: TLabel
Left = 402
Top = 41
Width = 85
Height = 16
Caption = #20135#21697#21517#31216#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label15: TLabel
Left = 40
Top = 85
Width = 87
Height = 16
Caption = #38376' '#24133#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label22: TLabel
Left = 400
Top = 85
Width = 87
Height = 16
Caption = #20811' '#37325#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label3: TLabel
Left = 52
Top = 7
Width = 51
Height = 16
Caption = #26465#30721#65306
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object Label6: TLabel
Left = 400
Top = 132
Width = 87
Height = 16
Caption = #35268' '#26684#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label7: TLabel
Left = 40
Top = 132
Width = 87
Height = 16
Caption = #25104' '#20998#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label8: TLabel
Left = 40
Top = 185
Width = 87
Height = 16
Caption = #22791' '#27880#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object C_Code: TEdit
Tag = 2
Left = 129
Top = 38
Width = 240
Height = 22
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
OnKeyPress = CYColorKeyPress
end
object C_Name: TEdit
Tag = 2
Left = 497
Top = 38
Width = 240
Height = 22
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
OnKeyPress = CYColorKeyPress
end
object C_Width: TBtnEditC
Tag = 2
Left = 129
Top = 80
Width = 240
Height = 25
Hint = 'CYMF/'#38376#24133
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 2
OnBtnUpClick = C_WidthBtnUpClick
OnBtnDnClick = C_WidthBtnDnClick
end
object C_GramWeight: TBtnEditC
Tag = 2
Left = 497
Top = 81
Width = 240
Height = 25
Hint = 'CYKZ/'#20811#37325
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 3
OnBtnUpClick = C_WidthBtnUpClick
OnBtnDnClick = C_WidthBtnDnClick
end
object BCIID: TEdit
Left = 109
Top = 5
Width = 218
Height = 22
Enabled = False
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 4
Visible = False
end
object C_Spec: TBtnEditC
Tag = 2
Left = 497
Top = 128
Width = 240
Height = 25
Hint = 'C_Spec/'#35268#26684
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 5
OnBtnUpClick = C_WidthBtnUpClick
OnBtnDnClick = C_WidthBtnDnClick
end
object C_Composition: TBtnEditC
Tag = 2
Left = 129
Top = 128
Width = 240
Height = 25
Hint = 'CYCF/'#25104#20998
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 6
OnBtnUpClick = C_WidthBtnUpClick
OnBtnDnClick = C_WidthBtnDnClick
end
object Note: TBtnEditC
Tag = 2
Left = 129
Top = 180
Width = 615
Height = 25
Hint = 'YPNote/'#22791#27880
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 7
OnBtnUpClick = C_WidthBtnUpClick
OnBtnDnClick = C_WidthBtnDnClick
end
object cxGrid1: TcxGrid
Left = 0
Top = 272
Width = 929
Height = 195
Align = alBottom
TabOrder = 8
object TV1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_1
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.Footer = True
OptionsView.GroupByBox = False
object TV1Column1: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 150
end
object TV1Column2: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'C_ColorNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 150
end
object TV1Column3: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 150
end
object TV1Column4: TcxGridDBColumn
Caption = #27454#21495
DataBinding.FieldName = 'C_StyleNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 150
end
end
object cxGridLevel2: TcxGridLevel
GridView = TV1
end
end
object ToolBar2: TToolBar
Left = 0
Top = 234
Width = 929
Height = 38
Align = alBottom
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
Caption = 'ToolBar1'
Color = clWhite
DisabledImages = DataLink_ClothInfo.ImageList_new32
Images = DataLink_ClothInfo.ImageList_new32
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 9
object ToolButton3: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #22686#34892
ImageIndex = 2
OnClick = ToolButton3Click
end
object ToolButton4: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #21024#34892
ImageIndex = 6
OnClick = ToolButton4Click
end
end
end
object ADOQueryMain: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 393
Top = 1
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Parameters = <>
Left = 476
Top = 4
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 555
Top = 4
end
object DS_1: TDataSource
DataSet = CDS_1
Left = 852
Top = 353
end
object CDS_1: TClientDataSet
Aggregates = <>
Params = <>
Left = 819
Top = 349
end
object GPM_1: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 782
Top = 349
end
end

View File

@ -1,433 +0,0 @@
unit U_ClothInfoInput;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit,
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList,
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters,
cxNavigator, dxDateRanges, dxBarBuiltInMenu, dxSkinBasic, dxSkinBlack,
dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee, dxSkinDarkroom,
dxSkinDarkSide, dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinGlassOceans, dxSkinHighContrast, dxSkiniMaginary, dxSkinLilian,
dxSkinLiquidSky, dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis,
dxSkinMetropolisDark, dxSkinMoneyTwins, dxSkinOffice2007Black,
dxSkinOffice2007Blue, dxSkinOffice2007Green, dxSkinOffice2007Pink,
dxSkinOffice2007Silver, dxSkinOffice2010Black, dxSkinOffice2010Blue,
dxSkinOffice2010Silver, dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray,
dxSkinOffice2013White, dxSkinOffice2016Colorful, dxSkinOffice2016Dark,
dxSkinOffice2019Black, dxSkinOffice2019Colorful, dxSkinOffice2019DarkGray,
dxSkinOffice2019White, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringtime, dxSkinStardust,
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinTheBezier, dxSkinValentine,
dxSkinVisualStudio2013Blue, dxSkinVisualStudio2013Dark,
dxSkinVisualStudio2013Light, dxSkinVS2010, dxSkinWhiteprint, dxSkinWXI,
dxSkinXmas2008Blue, dxScrollbarAnnotations;
type
TfrmClothInfoInput = class(TForm)
ToolBar1: TToolBar;
ToolButton1: TToolButton;
TBClose: TToolButton;
ADOQueryMain: TADOQuery;
ADOQueryCmd: TADOQuery;
ADOQueryTemp: TADOQuery;
ScrollBox1: TScrollBox;
Label1: TLabel;
Label5: TLabel;
Label15: TLabel;
Label22: TLabel;
Label3: TLabel;
C_Code: TEdit;
C_Name: TEdit;
C_Width: TBtnEditC;
C_GramWeight: TBtnEditC;
BCIID: TEdit;
Label6: TLabel;
C_Spec: TBtnEditC;
Label7: TLabel;
C_Composition: TBtnEditC;
Label8: TLabel;
Note: TBtnEditC;
cxGrid1: TcxGrid;
TV1: TcxGridDBTableView;
cxGridLevel2: TcxGridLevel;
TV1Column1: TcxGridDBColumn;
TV1Column2: TcxGridDBColumn;
TV1Column3: TcxGridDBColumn;
TV1Column4: TcxGridDBColumn;
DS_1: TDataSource;
CDS_1: TClientDataSet;
GPM_1: TcxGridPopupMenu;
ToolBar2: TToolBar;
ToolButton3: TToolButton;
ToolButton4: TToolButton;
procedure FormShow(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure CYColorKeyPress(Sender: TObject; var Key: Char);
procedure CYJGGYBtnDnClick(Sender: TObject);
procedure C_WidthBtnDnClick(Sender: TObject);
procedure C_WidthBtnUpClick(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure ToolButton4Click(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
private
canshu1: string;
Fint: Integer;
procedure InitGrid();
function SaveData(): Boolean;
{ Private declarations }
public
FBCIID, FCTID: string;
CopyInt: Integer;
{ Public declarations }
end;
var
frmClothInfoInput: TfrmClothInfoInput;
implementation
uses
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload;
{$R *.dfm}
procedure TfrmClothInfoInput.InitGrid();
begin
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Close;
SQL.Clear;
SQL.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
Open;
end;
SCSHData(ADOQueryMain, ScrollBox1, 2);
SCSHData(ADOQueryMain, ScrollBox1, 0);
finally
ADOQueryMain.EnableControls;
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select A.* from BS_Cloth_Info_Sub A ');
sql.Add(' where A.BCIID=''' + Trim(FBCIID) + '''');
//ShowMessage(sql.text);
Open;
end;
SCreateCDS(ADOQueryTemp, CDS_1);
SInitCDSData(ADOQueryTemp, CDS_1);
end;
procedure TfrmClothInfoInput.FormShow(Sender: TObject);
var
maxno: string;
begin
InitGrid();
if CopyInt = 1 then
begin
FBCIID := '';
BCIID.text := '';
C_Code.text := '';
with CDS_1 do
begin
First;
while not Eof do
begin
if GetLSNo(ADOQueryCmd, maxno, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then
begin
Application.MessageBox('取子流水号失败!', '提示', 0);
Exit;
end;
Edit;
FieldByName('BCIID').Value := '';
FieldByName('YSID').Value := maxno;
Post;
Next;
end;
end;
end;
end;
function TfrmClothInfoInput.SaveData(): Boolean;
var
maxId, maxId2, maxno: string;
begin
try
ADOQueryCmd.Connection.BeginTrans;
if Trim(FBCIID) = '' then
begin
if GetLSNo(ADOQueryCmd, maxId, 'Y', 'BS_Cloth_Info', 4, 1) = False then
begin
Result := False;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('取最大号失败!', '提示', 0);
Exit;
end;
BCIID.Text := trim(maxId);
end
else
begin
maxId := Trim(FBCIID);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(FBCIID) = '' then
begin
Append;
FieldByName('CTID').Value := Trim(FCTID);
FieldByName('FILLID').Value := Trim(DCode);
FieldByName('FILLER').Value := Trim(DName);
FieldByName('FILLTIME').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
FieldByName('EDITER').Value := Trim(DName);
FieldByName('EDITTIME').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('BCIID').Value := Trim(maxId);
if trim(C_Code.Text) = '' then
C_Code.Text := Trim(maxId);
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', ScrollBox1, 2);
Post;
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select count(*) as AA from BS_Cloth_Info where C_Code=''' + Trim(C_Code.Text) + '''');
Open;
if FieldByName('AA').AsInteger > 1 then
begin
ADOQueryCmd.Connection.RollbackTrans;
Result := False;
Application.MessageBox('编号重复!', '提示', 0);
Exit;
end;
end;
////////////////////////// 保存子表 //////////////////////////
with CDS_1 do
begin
First;
while not Eof do
begin
if Trim(CDS_1.fieldbyname('YSID').AsString) = '' then
begin
if GetLSNo(ADOQueryTemp, maxId2, 'YS', 'BS_Cloth_Info_Sub', 4, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('取子流水号失败!', '提示', 0);
Exit;
end;
end
else
begin
maxId2 := Trim(CDS_1.fieldbyname('YSID').AsString);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add(' select * from BS_Cloth_Info_Sub where ');
sql.Add(' YSID=''' + Trim(maxId2) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(CDS_1.fieldbyname('YSID').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(maxId);
FieldByName('YSId').Value := Trim(maxId2);
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_1, 'BS_Cloth_Info_Sub', 0);
Post;
end;
CDS_1.Edit;
CDS_1.FieldByName('BCIID').Value := Trim(maxId);
CDS_1.FieldByName('YSId').Value := Trim(maxId2);
Next;
end;
end;
////////////////////////// 保存子表 //////////////////////////
ADOQueryCmd.Connection.CommitTrans;
FBCIID := maxId;
Result := True;
except
Result := False;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
end;
procedure TfrmClothInfoInput.CYJGGYBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
end;
procedure TfrmClothInfoInput.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmClothInfoInput.ToolButton1Click(Sender: TObject);
var
MC_Code: string;
begin
// if C_Name.Text = '' then
// begin
// Application.MessageBox('产品名称不能为空!', '提示', 0);
// Exit;
// end;
if CDS_1.IsEmpty then
begin
Application.MessageBox('颜色表不能为空!', '提示', 0);
Exit;
end;
if trim(C_Code.Text) = '' then
begin
if GetLSNo(ADOQueryCmd, MC_Code, 'C', 'BS_Cloth_Info', 4, 0) = False then
begin
Application.MessageBox('取最成品编号失败!', '提示', 0);
Exit;
end;
C_Code.Text := MC_Code;
end;
if SaveData() then
begin
Application.MessageBox('保存成功!', '提示', 0);
ModalResult := 1;
end;
end;
procedure TfrmClothInfoInput.ToolButton3Click(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;
CopyAddRow(Tv1, CDS_1);
with CDS_1 do
begin
Edit;
fieldbyname('YSID').Value := trim(maxno);
Post;
end;
end;
procedure TfrmClothInfoInput.ToolButton4Click(Sender: TObject);
begin
if CDS_1.IsEmpty then
Exit;
if Trim(CDS_1.fieldbyname('YSID').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_Sub where YSID=''' + Trim(CDS_1.fieldbyname('YSID').AsString) + '''');
ExecSQL;
end;
end;
CDS_1.Delete;
end;
procedure TfrmClothInfoInput.CYColorKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then
begin
Key := #0;
SelectNext(ActiveControl as TWinControl, True, True);
end;
end;
procedure TfrmClothInfoInput.C_WidthBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmClothInfoInput.C_WidthBtnUpClick(Sender: TObject);
var
fsj: string;
FWZ: Integer;
begin
fsj := Trim(TEdit(Sender).Hint);
FWZ := Pos('/', fsj);
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := Copy(fsj, 1, FWZ - 1);
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
if ShowModal = 1 then
begin
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
end.

View File

@ -1,410 +0,0 @@
object frmClothInfoInput_Tat: TfrmClothInfoInput_Tat
Left = 459
Top = 231
Anchors = []
Caption = #20135#21697#20449#24687#24405#20837
ClientHeight = 243
ClientWidth = 718
Color = clWhite
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = True
Position = poScreenCenter
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 718
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
Caption = 'ToolBar1'
Color = clWhite
DisabledImages = DataLink_ClothInfo.ImageList_new32
Images = DataLink_ClothInfo.ImageList_new32
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 0
ExplicitWidth = 735
object ToolButton1: TToolButton
Tag = 1
Left = 0
Top = 0
AutoSize = True
Caption = #20445#23384
ImageIndex = 16
OnClick = ToolButton1Click
end
object ToolButton6: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #38468#20214
ImageIndex = 22
OnClick = ToolButton6Click
end
object TBClose: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object ScrollBox1: TScrollBox
Left = 0
Top = 38
Width = 718
Height = 205
Align = alClient
AutoSize = True
BevelInner = bvNone
BevelOuter = bvNone
Color = clWhite
Ctl3D = False
ParentColor = False
ParentCtl3D = False
TabOrder = 1
ExplicitTop = 44
ExplicitWidth = 735
ExplicitHeight = 267
object Label1: TLabel
Left = 31
Top = 33
Width = 65
Height = 12
Caption = #20135#21697#32534#21495#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label5: TLabel
Left = 362
Top = 33
Width = 65
Height = 12
Caption = #20135#21697#21517#31216#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label15: TLabel
Left = 29
Top = 64
Width = 67
Height = 12
Caption = #38376' '#24133#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label22: TLabel
Left = 360
Top = 64
Width = 67
Height = 12
Caption = #20811' '#37325#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label2: TLabel
Left = 360
Top = 156
Width = 67
Height = 12
Caption = #22836' '#32441#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label4: TLabel
Left = 29
Top = 93
Width = 67
Height = 12
Caption = #32428' '#23494#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label3: TLabel
Left = 46
Top = 302
Width = 51
Height = 16
Caption = #26465#30721#65306
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Visible = False
end
object Label12: TLabel
Left = 360
Top = 93
Width = 67
Height = 12
Caption = #32463' '#23494#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label6: TLabel
Left = 29
Top = 156
Width = 67
Height = 12
Caption = #31576' '#21495#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label7: TLabel
Left = 31
Top = 125
Width = 65
Height = 12
Caption = #32428#32433#35268#26684#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label8: TLabel
Left = 362
Top = 125
Width = 65
Height = 12
Caption = #32463#32433#35268#26684#65306
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object C_Code: TEdit
Tag = 2
Left = 93
Top = 30
Width = 234
Height = 18
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
OnKeyPress = CYColorKeyPress
end
object C_Name: TEdit
Tag = 2
Left = 426
Top = 30
Width = 234
Height = 18
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
OnKeyPress = CYColorKeyPress
end
object C_EphalicStria: TEdit
Tag = 2
Left = 426
Top = 153
Width = 234
Height = 18
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 4
end
object C_FinishLatitudeDensity: TEdit
Tag = 2
Left = 93
Top = 90
Width = 234
Height = 18
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 5
end
object C_Width: TBtnEditC
Tag = 2
Left = 93
Top = 60
Width = 234
Height = 20
Hint = 'CYMF/'#38376#24133
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 2
OnBtnUpClick = C_WidthBtnUpClick
OnBtnDnClick = C_WidthBtnDnClick
end
object C_GramWeight: TBtnEditC
Tag = 2
Left = 426
Top = 60
Width = 234
Height = 20
Hint = 'CYKZ/'#20811#37325
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 3
OnBtnUpClick = C_WidthBtnUpClick
OnBtnDnClick = C_WidthBtnDnClick
end
object C_FinishLongitudeDensity: TEdit
Tag = 2
Left = 426
Top = 90
Width = 234
Height = 18
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 6
OnKeyPress = CYColorKeyPress
end
object BCIID: TEdit
Left = 103
Top = 300
Width = 218
Height = 22
Enabled = False
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 7
Visible = False
end
object C_LatitudeSpec: TEdit
Tag = 2
Left = 93
Top = 122
Width = 234
Height = 18
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 8
end
object C_LongitudeSpec: TEdit
Tag = 2
Left = 426
Top = 122
Width = 234
Height = 18
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 9
OnKeyPress = CYColorKeyPress
end
object C_ReedNo: TEdit
Tag = 2
Left = 93
Top = 152
Width = 234
Height = 18
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 10
end
end
object ADOQueryMain: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 421
Top = 9
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Parameters = <>
Left = 505
Top = 9
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 613
Top = 17
end
end

View File

@ -1,348 +0,0 @@
unit U_ClothInfoInput_Tat;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, ADODB, DBClient, cxGridLevel, cxGridCustomTableView,
cxGridTableView, cxGridDBTableView, cxClasses, cxControls, cxGridCustomView,
cxGrid, ComCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, cxTextEdit,
cxButtonEdit, StdCtrls, ExtCtrls, cxCurrencyEdit, BtnEdit, U_BaseList,
cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, dxSkinsDefaultPainters,
cxNavigator, dxDateRanges, dxBarBuiltInMenu;
type
TfrmClothInfoInput_Tat = class(TForm)
ToolBar1: TToolBar;
ToolButton1: TToolButton;
TBClose: TToolButton;
ADOQueryMain: TADOQuery;
ADOQueryCmd: TADOQuery;
ADOQueryTemp: TADOQuery;
ScrollBox1: TScrollBox;
Label1: TLabel;
Label5: TLabel;
Label15: TLabel;
Label22: TLabel;
Label2: TLabel;
Label4: TLabel;
Label3: TLabel;
C_Code: TEdit;
C_Name: TEdit;
C_EphalicStria: TEdit;
C_FinishLatitudeDensity: TEdit;
C_Width: TBtnEditC;
C_GramWeight: TBtnEditC;
Label12: TLabel;
C_FinishLongitudeDensity: TEdit;
ToolButton6: TToolButton;
BCIID: TEdit;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
C_LatitudeSpec: TEdit;
C_LongitudeSpec: TEdit;
C_ReedNo: TEdit;
procedure FormShow(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure CYColorKeyPress(Sender: TObject; var Key: Char);
procedure CYKZExit(Sender: TObject);
procedure CYMFExit(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure CYJGGYBtnDnClick(Sender: TObject);
procedure C_WidthBtnDnClick(Sender: TObject);
procedure C_WidthBtnUpClick(Sender: TObject);
procedure ToolButton6Click(Sender: TObject);
private
canshu1: string;
Fint: Integer;
procedure InitGrid();
function SaveData(): Boolean;
{ Private declarations }
public
FBCIID, FCTID: string;
CopyInt: Integer;
{ Public declarations }
end;
var
frmClothInfoInput_Tat: TfrmClothInfoInput_Tat;
implementation
uses
U_DataLink, U_RTFun, U_iniParam, U_ZDYHelp, U_AttachmentUpload;
{$R *.dfm}
procedure TfrmClothInfoInput_Tat.InitGrid();
begin
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Close;
SQL.Clear;
SQL.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
Open;
end;
SCSHData(ADOQueryMain, ScrollBox1, 2);
SCSHData(ADOQueryMain, ScrollBox1, 0);
finally
ADOQueryMain.EnableControls;
end;
end;
procedure TfrmClothInfoInput_Tat.FormShow(Sender: TObject);
begin
InitGrid();
if CopyInt = 1 then
begin
FBCIID := '';
BCIID.text := '';
C_Code.text := '';
end;
// if C_Code.text = '' then
// begin
// with ADOQueryTemp do
// begin
// Close;
// sql.Clear;
// sql.Add(' exec P_YP_Get_CPBH ');
// sql.Add('@CTID=' + quotedstr(Trim(FCTID)));
//
// Open;
// end;
// end;
// if trim(C_Code.Text) = '' then
// begin
// with ADOQueryTemp do
// begin
// Close;
// sql.Clear;
// sql.Add(' exec P_YP_Get_No @Str=''CP'' ');
// Open;
// end;
// C_Code.Text := trim(ADOQueryTemp.FieldByName('NewC_Code').asstring);
// end;
// if FCPName = '针织' then
// begin
// CYPUnit.text := 'KG';
// end;
// if FCPName = '梭织' then
// begin
// CYPUnit.text := 'M';
// end;
end;
procedure TfrmClothInfoInput_Tat.TBCloseClick(Sender: TObject);
begin
Close;
end;
function TfrmClothInfoInput_Tat.SaveData(): Boolean;
var
maxId, maxno: string;
begin
try
ADOQueryCmd.Connection.BeginTrans;
if Trim(FBCIID) = '' then
begin
if GetLSNo(ADOQueryCmd, maxId, 'Y', 'BS_Cloth_Info', 4, 1) = False then
begin
Result := False;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('取最大号失败!', '提示', 0);
Exit;
end;
BCIID.Text := trim(maxId);
end
else
begin
maxId := Trim(FBCIID);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from BS_Cloth_Info where BCIID=''' + Trim(FBCIID) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(FBCIID) = '' then
begin
Append;
FieldByName('CTID').Value := Trim(FCTID);
FieldByName('FILLID').Value := Trim(DCode);
FieldByName('FILLER').Value := Trim(DName);
FieldByName('FILLTIME').Value := SGetServerDateTime(ADOQueryTemp);
end
else
begin
Edit;
FieldByName('EDITER').Value := Trim(DName);
FieldByName('EDITTIME').Value := SGetServerDateTime(ADOQueryTemp);
end;
FieldByName('BCIID').Value := Trim(maxId);
if trim(C_Code.Text) = '' then
C_Code.Text := Trim(maxId);
RTSetsavedata(ADOQueryCmd, 'BS_Cloth_Info', ScrollBox1, 2);
Post;
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select count(*) as AA from BS_Cloth_Info where C_Code=''' + Trim(C_Code.Text) + '''');
Open;
if FieldByName('AA').AsInteger > 1 then
begin
ADOQueryCmd.Connection.RollbackTrans;
Result := False;
Application.MessageBox('编号重复!', '提示', 0);
Exit;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
FBCIID := maxId;
Result := True;
except
Result := False;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
end;
procedure TfrmClothInfoInput_Tat.CYJGGYBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
end;
procedure TfrmClothInfoInput_Tat.ToolButton1Click(Sender: TObject);
var
MC_Code: string;
begin
if C_Name.Text = '' then
begin
Application.MessageBox('产品名称不能为空!', '提示', 0);
Exit;
end;
if trim(C_Code.Text) = '' then
begin
if GetLSNo(ADOQueryCmd, MC_Code, 'C', 'BS_Cloth_Info', 4, 0) = False then
begin
Application.MessageBox('取最成品编号失败!', '提示', 0);
Exit;
end;
C_Code.Text := MC_Code;
end;
if SaveData() then
begin
Application.MessageBox('保存成功!', '提示', 0);
ModalResult := 1;
end;
end;
procedure TfrmClothInfoInput_Tat.CYColorKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then
begin
Key := #0;
SelectNext(ActiveControl as TWinControl, True, True);
end;
end;
procedure TfrmClothInfoInput_Tat.CYKZExit(Sender: TObject);
begin
// if pos('G/M2', trim(CYKZ.Text)) = 0 then
// begin
// if pos('G/M', trim(CYKZ.Text)) = 0 then
// begin
// CYKZ.Text := trim(CYKZ.Text) + 'G/M2';
// end;
// end;
end;
procedure TfrmClothInfoInput_Tat.C_WidthBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmClothInfoInput_Tat.C_WidthBtnUpClick(Sender: TObject);
var
fsj: string;
FWZ: Integer;
begin
fsj := Trim(TEdit(Sender).Hint);
FWZ := Pos('/', fsj);
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := Copy(fsj, 1, FWZ - 1);
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
if ShowModal = 1 then
begin
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
procedure TfrmClothInfoInput_Tat.CYMFExit(Sender: TObject);
begin
// if pos('"', trim(CYMF.Text)) = 0 then
// begin
// if pos('CM', trim(CYMF.Text)) = 0 then
// CYMF.Text := trim(CYMF.Text) + 'CM';
// end;
end;
procedure TfrmClothInfoInput_Tat.FormCreate(Sender: TObject);
begin
// LaYangDate.DateTime := SGetServerDateTime(ADOQueryTemp);
end;
procedure TfrmClothInfoInput_Tat.ToolButton6Click(Sender: TObject);
begin
if trim(C_Code.Text) = '' then
Exit;
try
frmAttachmentUpload := TfrmAttachmentUpload.Create(Application);
with frmAttachmentUpload do
begin
FEditAuthority := True;
fkeyNO := trim(C_Code.Text);
fType := '成品档案';
if ShowModal = 1 then
begin
end;
end;
finally
frmAttachmentUpload.Free;
end;
end;
end.

View File

@ -1,846 +0,0 @@
inherited frmClothInfo_Tat: TfrmClothInfo_Tat
Left = 117
Top = 154
Caption = #26797#32455#20135#21697#26723#26696
ClientHeight = 702
ClientWidth = 1444
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitWidth = 1460
ExplicitHeight = 741
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1444
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 91
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_ClothInfo.ImageList_new32
Images = DataLink_ClothInfo.ImageList_new32
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 0
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 1
OnClick = TBRafreshClick
end
object TBFilter: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #36807#28388
ImageIndex = 0
OnClick = TBFilterClick
end
object TBAdd: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #26032#22686
ImageIndex = 9
OnClick = TBAddClick
end
object ToolButton1: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #26597#30475
ImageIndex = 4
OnClick = ToolButton1Click
end
object TBCopy: TToolButton
Left = 284
Top = 0
AutoSize = True
Caption = #22797#21046
ImageIndex = 13
OnClick = TBCopyClick
end
object TBEdit: TToolButton
Left = 355
Top = 0
AutoSize = True
Caption = #20462#25913
ImageIndex = 3
OnClick = TBEditClick
end
object TBMLEdit: TToolButton
Left = 426
Top = 0
AutoSize = True
Caption = #30446#24405#20462#25913
ImageIndex = 3
OnClick = TBMLEditClick
end
object TBDel: TToolButton
Left = 521
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
OnClick = TBDelClick
end
object ToolButton3: TToolButton
Left = 592
Top = 0
AutoSize = True
Caption = #26631#31614#25171#21360
ImageIndex = 21
OnClick = ToolButton3Click
end
object TBExport: TToolButton
Left = 687
Top = 0
AutoSize = True
Caption = #23548#20986
ImageIndex = 20
OnClick = TBExportClick
end
object TBUP: TToolButton
Left = 758
Top = 0
AutoSize = True
Caption = #22270#29255#19978#20256
ImageIndex = 19
OnClick = TBUPClick
end
object ToolButton2: TToolButton
Left = 853
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton2Click
end
object TBClose: TToolButton
Left = 948
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object cxSplitter1: TcxSplitter [1]
Left = 220
Top = 83
Width = 8
Height = 619
HotZoneClassName = 'TcxMediaPlayer9Style'
Control = Panel5
end
object Panel1: TPanel [2]
Left = 0
Top = 38
Width = 1444
Height = 45
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = 16242829
ParentBackground = False
TabOrder = 1
object Label3: TLabel
Left = 42
Top = 15
Width = 48
Height = 12
Caption = #20135#21697#32534#21495
end
object Label11: TLabel
Left = 1072
Top = 107
Width = 7
Height = 12
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label12: TLabel
Left = 1120
Top = 111
Width = 7
Height = 12
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label4: TLabel
Left = 199
Top = 15
Width = 48
Height = 12
Caption = #20135#21697#21517#31216
end
object Label9: TLabel
Left = 509
Top = 15
Width = 24
Height = 12
Caption = #20811#37325
end
object Label8: TLabel
Left = 357
Top = 15
Width = 24
Height = 12
Caption = #38376#24133
end
object C_Code: TEdit
Tag = 2
Left = 91
Top = 11
Width = 89
Height = 20
TabOrder = 0
OnKeyPress = C_CodeKeyPress
end
object C_Name: TEdit
Tag = 2
Left = 248
Top = 11
Width = 89
Height = 20
TabOrder = 1
OnKeyPress = C_CodeKeyPress
end
object C_GramWeight: TEdit
Tag = 2
Left = 536
Top = 11
Width = 89
Height = 20
TabOrder = 3
OnKeyPress = C_CodeKeyPress
end
object C_Width: TEdit
Tag = 2
Left = 384
Top = 11
Width = 89
Height = 20
TabOrder = 2
OnKeyPress = C_CodeKeyPress
end
end
object Panel2: TPanel [3]
Left = 512
Top = 232
Width = 185
Height = 41
BevelInner = bvRaised
BevelOuter = bvLowered
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
Color = clSkyBlue
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 5
Visible = False
end
object Panel5: TPanel [4]
Left = 0
Top = 83
Width = 220
Height = 619
Align = alLeft
BevelInner = bvRaised
BevelOuter = bvLowered
TabOrder = 2
object cxDBTreeList1: TcxDBTreeList
Left = 2
Top = 2
Width = 216
Height = 615
Align = alClient
Bands = <
item
end>
DataController.DataSource = DS_Tree
DataController.ParentField = 'CTParent'
DataController.KeyField = 'CTID'
Navigator.Buttons.CustomButtons = <>
OptionsBehavior.CopyCaptionsToClipboard = False
OptionsBehavior.ExpandOnDblClick = False
OptionsSelection.CellSelect = False
OptionsView.CellAutoHeight = True
OptionsView.Headers = False
RootValue = -1
Styles.Inactive = DataLink_ClothInfo.Red
Styles.Selection = DataLink_ClothInfo.Red
Styles.IncSearch = DataLink_ClothInfo.Red
TabOrder = 0
OnDblClick = cxDBTreeList1DblClick
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
DataBinding.FieldName = 'CTName'
Width = 210
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
Summary.FooterSummaryItems = <>
Summary.GroupFooterSummaryItems = <>
end
end
end
object Panel3: TPanel [5]
Left = 228
Top = 83
Width = 1216
Height = 619
Align = alClient
BevelInner = bvRaised
BevelOuter = bvLowered
Caption = 'Panel3'
TabOrder = 4
object cxGrid1: TcxGrid
Left = 2
Top = 42
Width = 1212
Height = 370
Align = alClient
PopupMenu = PM_1
TabOrder = 0
ExplicitLeft = 6
ExplicitTop = 41
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
OnFocusedRecordChanged = Tv1FocusedRecordChanged
DataController.DataSource = DS_1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsData.Deleting = False
OptionsData.DeletingConfirmation = False
OptionsView.GroupByBox = False
Styles.IncSearch = DataLink_ClothInfo.SHuangSe
Styles.Header = DataLink_ClothInfo.Default
Styles.Inactive = DataLink_ClothInfo.SHuangSe
Styles.Selection = DataLink_ClothInfo.SHuangSe
object v1SSel: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
PropertiesClassName = 'TcxCheckBoxProperties'
HeaderAlignmentHorz = taCenter
Styles.Header = DataLink_ClothInfo.Default
Width = 41
end
object v1Column12: TcxGridDBColumn
Caption = #31867#21035
DataBinding.FieldName = 'CTName'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_ClothInfo.Default
Width = 70
end
object v1CYNo: TcxGridDBColumn
Caption = #20135#21697#32534#21495
DataBinding.FieldName = 'C_Code'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_ClothInfo.Default
Width = 92
end
object v1Column9: TcxGridDBColumn
Caption = #20135#21697#21517#31216
DataBinding.FieldName = 'C_Name'
HeaderAlignmentHorz = taCenter
Width = 96
end
object v1Column3: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'C_Width'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_ClothInfo.Default
Width = 66
end
object v1Column1: TcxGridDBColumn
Caption = #20811#37325
DataBinding.FieldName = 'C_GramWeight'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 81
end
object Tv1Column11: TcxGridDBColumn
Caption = #32428#23494
DataBinding.FieldName = 'C_FinishLatitudeDensity'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column3: TcxGridDBColumn
Caption = #32463#23494
DataBinding.FieldName = 'C_FinishLongitudeDensity'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object Tv1Column2: TcxGridDBColumn
Caption = #32428#32433#35268#26684
DataBinding.FieldName = 'C_LatitudeSpec'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object Tv1Column1: TcxGridDBColumn
Caption = #32463#32433#35268#26684
DataBinding.FieldName = 'C_LongitudeSpec'
HeaderAlignmentHorz = taCenter
Width = 80
end
object Tv1Column4: TcxGridDBColumn
Caption = #31576#21495
DataBinding.FieldName = 'C_ReedNo'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object Tv1Column8: TcxGridDBColumn
Caption = #22836#32441
DataBinding.FieldName = 'C_EphalicStria'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 80
end
object v1Column11: TcxGridDBColumn
Caption = #22270#29255
DataBinding.FieldName = 'IsImg'
PropertiesClassName = 'TcxCheckBoxProperties'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 57
end
object Tv1Column5: TcxGridDBColumn
Caption = #22635#21333#20154
DataBinding.FieldName = 'filler'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 71
end
object Tv1Column6: TcxGridDBColumn
Caption = #20462#25913#20154
DataBinding.FieldName = 'editer'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 68
end
object Tv1Column7: TcxGridDBColumn
Caption = #20462#25913#26102#38388
DataBinding.FieldName = 'edittime'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 67
end
object Tv1Column9: TcxGridDBColumn
Caption = #24405#20837#26102#38388
DataBinding.FieldName = 'FILLTIME'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object Panel7: TPanel
Left = 2
Top = 2
Width = 1212
Height = 40
Align = alTop
BevelOuter = bvNone
TabOrder = 1
object Panel4: TPanel
Left = 0
Top = 0
Width = 1212
Height = 40
Align = alClient
AutoSize = True
TabOrder = 0
DesignSize = (
1212
40)
object Label14: TLabel
Left = 19
Top = 13
Width = 84
Height = 13
Alignment = taCenter
Anchors = [akLeft]
Caption = #27599#39029#35760#24405#26465#25968
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -13
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Layout = tlCenter
end
object LBCPAP1: TLabel
Left = 276
Top = 9
Width = 85
Height = 21
Alignment = taCenter
Anchors = [akLeft]
AutoSize = False
Caption = #24403#21069#39029'/'#24635#39029#25968
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
Layout = tlCenter
end
object Button1: TButton
Left = 195
Top = 8
Width = 75
Height = 23
Anchors = [akLeft]
Caption = #19978#19968#39029
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
OnClick = Button1Click
end
object Button2: TButton
Left = 367
Top = 9
Width = 78
Height = 22
Anchors = [akLeft]
Caption = #19979#19968#39029
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
OnClick = Button2Click
end
object TCBNOR1: TComboBox
Tag = 2
Left = 111
Top = 10
Width = 78
Height = 20
Anchors = [akLeft]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ItemIndex = 2
ParentFont = False
TabOrder = 2
Text = '500'
OnChange = TCBNOR1Change
Items.Strings = (
'100'
'300'
'500'
'1000'
'5000'
'10000')
end
end
end
object Panel9: TPanel
Left = 2
Top = 412
Width = 1212
Height = 205
Align = alBottom
Caption = 'Panel9'
TabOrder = 2
object Panel10: TPanel
Left = 1
Top = 1
Width = 1210
Height = 203
Align = alClient
Caption = 'Panel9'
TabOrder = 0
object GroupBox1: TGroupBox
Left = 1
Top = 42
Width = 1208
Height = 160
Align = alClient
Caption = #26679#21697#32553#30053#22270#65288#21452#20987#22270#29255#26597#30475#21407#22270#65289
TabOrder = 0
object ScrollBox1: TScrollBox
Left = 2
Top = 14
Width = 1204
Height = 144
Align = alClient
BevelInner = bvLowered
BorderStyle = bsNone
TabOrder = 0
end
end
object Panel11: TPanel
Left = 1
Top = 1
Width = 1208
Height = 41
Align = alTop
TabOrder = 1
DesignSize = (
1208
41)
object Label7: TLabel
Left = 33
Top = 8
Width = 88
Height = 21
Caption = #33457#22411#36873#25321
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -21
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object cbbHX: TComboBox
Left = 368
Top = 3
Width = 210
Height = 32
Style = csDropDownList
Anchors = []
Color = clWhite
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 0
OnChange = cbbHXChange
Items.Strings = (
#33457#22411)
end
end
end
end
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Left = 161
Top = 240
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Left = 57
Top = 241
end
object DS_Tree: TDataSource
DataSet = CDS_Tree
Left = 155
Top = 131
end
object ADOQueryTree: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 53
Top = 137
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 899
Top = 192
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Parameters = <>
Left = 997
Top = 197
end
object GPM_1: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 888
Top = 360
end
object DS_1: TDataSource
DataSet = CDS_1
Left = 1043
Top = 395
end
object ADOQueryMain: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 1061
Top = 201
end
object CDS_1: TClientDataSet
Aggregates = <>
Params = <>
Left = 960
Top = 408
end
object RM1: TRMGridReport
ThreadPrepareReport = True
InitialZoom = pzDefault
PreviewButtons = [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbExport, rmpbNavigator]
DefaultCollate = False
ShowPrintDialog = False
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
PreviewOptions.RulerUnit = rmutScreenPixels
PreviewOptions.RulerVisible = False
PreviewOptions.DrawBorder = False
PreviewOptions.BorderPen.Color = clGray
PreviewOptions.BorderPen.Style = psDash
Dataset = RMDB_Main
CompressLevel = rmzcFastest
CompressThread = False
LaterBuildEvents = True
OnlyOwnerDataSet = False
Left = 312
Top = 216
ReportData = {}
end
object RMDB_Main: TRMDBDataSet
Visible = True
DataSet = ADOQueryPrint
Left = 952
Top = 296
end
object ODPat: TOpenDialog
Options = [ofReadOnly, ofAllowMultiSelect, ofPathMustExist, ofFileMustExist, ofEnableSizing]
Left = 324
Top = 285
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 381
Top = 380
end
object SaveDialog1: TSaveDialog
Left = 385
Top = 285
end
object DSCYNO: TDataSource
DataSet = CDS_CYNO
Left = 499
Top = 299
end
object CDS_CYNO: TClientDataSet
Aggregates = <>
Params = <>
Left = 496
Top = 240
end
object adoqueryPicture: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Parameters = <>
Left = 299
Top = 360
end
object OpenDialog1: TOpenDialog
Left = 458
Top = 354
end
object PM_1: TPopupMenu
Left = 1160
Top = 352
object N1: TMenuItem
Caption = #20840#36873
OnClick = N1Click
end
object N2: TMenuItem
Caption = #20840#24323
OnClick = N2Click
end
object N3: TMenuItem
Caption = #22797#21046
OnClick = N3Click
end
end
object RMBarCodeObject1: TRMBarCodeObject
Left = 1052
Top = 296
end
object DataSource3: TDataSource
DataSet = CDS_Sub
Left = 1019
Top = 627
end
object CDS_Sub: TClientDataSet
Aggregates = <>
Params = <>
Left = 1024
Top = 688
end
object cxGridPopupMenu2: TcxGridPopupMenu
PopupMenus = <>
Left = 928
Top = 688
end
object CDS_Tree: TClientDataSet
Aggregates = <>
Params = <>
Left = 96
Top = 136
end
object ADOQueryPrint: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 875
Top = 296
end
object CDS_Label: TClientDataSet
Aggregates = <>
Params = <>
Left = 520
Top = 426
end
end

View File

@ -1,822 +0,0 @@
unit U_ClothInfo_Tat;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
cxFilter, cxData, cxDataStorage, cxEdit, cxDBData, DBClient,
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, ExtCtrls,
cxSplitter, cxGridLevel, cxClasses, cxGridCustomView, cxGrid,
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, jpeg, U_SLT, ComObj, Menus,
cxLookAndFeels, cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, cxNavigator,
dxBarBuiltInMenu, cxPC, Math, RM_BarCode, dxSkinsCore, dxSkinsDefaultPainters,
dxDateRanges, IdExplicitTLSClientServerBase, U_BaseList, cxContainer,
dxDBBarCode, dxBarCode, Vcl.Clipbrd, cxTextEdit, BtnEdit, StrUtils;
type
FdDy = record
inc: integer; //客户端套接字句柄
FDdys: string[32]; //客户端套接字
FdDysName: string[32]; //客户端套接字
end;
TfrmClothInfo_Tat = class(TfrmBaseList)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBDel: TToolButton;
TBClose: TToolButton;
DS_Tree: TDataSource;
ADOQueryTree: TADOQuery;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
GPM_1: TcxGridPopupMenu;
Tv1: TcxGridDBTableView;
cxGrid1Level1: TcxGridLevel;
cxGrid1: TcxGrid;
cxSplitter1: TcxSplitter;
Panel1: TPanel;
TBFilter: TToolButton;
v1CYNo: TcxGridDBColumn;
v1Column3: TcxGridDBColumn;
DS_1: TDataSource;
ADOQueryMain: TADOQuery;
CDS_1: TClientDataSet;
v1Column12: TcxGridDBColumn;
TBExport: TToolButton;
RM1: TRMGridReport;
RMDB_Main: TRMDBDataSet;
ODPat: TOpenDialog;
IdFTP1: TIdFTP;
SaveDialog1: TSaveDialog;
TBUP: TToolButton;
Label3: TLabel;
C_Code: TEdit;
TBCopy: TToolButton;
Panel2: TPanel;
v1SSel: TcxGridDBColumn;
DSCYNO: TDataSource;
CDS_CYNO: TClientDataSet;
Panel5: TPanel;
cxDBTreeList1: TcxDBTreeList;
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
Label11: TLabel;
Label12: TLabel;
Panel3: TPanel;
adoqueryPicture: TADOQuery;
v1Column1: TcxGridDBColumn;
v1Column9: TcxGridDBColumn;
Label4: TLabel;
C_Name: TEdit;
TBAdd: TToolButton;
TBEdit: TToolButton;
TBMLEdit: TToolButton;
OpenDialog1: TOpenDialog;
Label9: TLabel;
C_GramWeight: TEdit;
Label8: TLabel;
C_Width: TEdit;
PM_1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
v1Column11: TcxGridDBColumn;
Panel7: TPanel;
Panel4: TPanel;
Label14: TLabel;
LBCPAP1: TLabel;
Button1: TButton;
Button2: TButton;
TCBNOR1: TComboBox;
RMBarCodeObject1: TRMBarCodeObject;
Tv1Column5: TcxGridDBColumn;
Tv1Column6: TcxGridDBColumn;
Tv1Column7: TcxGridDBColumn;
ToolButton1: TToolButton;
DataSource3: TDataSource;
CDS_Sub: TClientDataSet;
Tv1Column2: TcxGridDBColumn;
Tv1Column9: TcxGridDBColumn;
Tv1Column11: TcxGridDBColumn;
cxGridPopupMenu2: TcxGridPopupMenu;
ToolButton2: TToolButton;
N3: TMenuItem;
Panel9: TPanel;
Panel10: TPanel;
GroupBox1: TGroupBox;
ScrollBox1: TScrollBox;
Panel11: TPanel;
cbbHX: TComboBox;
Label7: TLabel;
CDS_Tree: TClientDataSet;
ADOQueryPrint: TADOQuery;
CDS_Label: TClientDataSet;
Tv1Column1: TcxGridDBColumn;
ToolButton3: TToolButton;
Tv1Column3: TcxGridDBColumn;
Tv1Column4: TcxGridDBColumn;
Tv1Column8: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure TBDelClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure cxDBTreeList1DblClick(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure TBFilterClick(Sender: TObject);
procedure CYNoChange(Sender: TObject);
procedure TBExportClick(Sender: TObject);
procedure TBUPClick(Sender: TObject);
procedure TBCopyClick(Sender: TObject);
procedure C_CodeKeyPress(Sender: TObject; var Key: Char);
procedure TBAddClick(Sender: TObject);
procedure TBEditClick(Sender: TObject);
procedure TBMLEditClick(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure TCBNOR1Change(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
procedure ToolButton2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure TextEdit(Sender: TObject);
procedure HXNameBtnUpClick(Sender: TObject);
procedure HXNameBtnDnClick(Sender: TObject);
procedure cbbHXChange(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
private
{ Private declarations }
CurrentPage, RecordsNumber: Integer;
CTID: string;
PState: Integer;
FCTID, FTopID: string;
FJurisdiction: string;
procedure SetStatus();
procedure InitTree();
procedure InitGrid();
procedure ReadINIFile();
procedure InitImage();
procedure LookImage(FileName: string);
public
dFdDy: array[0..20] of FdDy; //客户端连接数组
{ Public declarations }
end;
var
Mach: array of TfrmSlt;
implementation
uses
U_DataLink, U_RTFun, U_ClothInfoInput_Tat, U_CloInfoFileUp, U_YPTypeHelpCP,
U_ZDYHelp, U_LabelPrint;
{$R *.dfm}
procedure TfrmClothInfo_Tat.LookImage(FileName: string);
var
sFieldName: string;
begin
sFieldName := leftbstr(ExtractFilePath(Application.ExeName), 1) + ':\图片查看';
if not DirectoryExists(pchar(sFieldName)) then
CreateDirectory(pchar(sFieldName), nil);
sFieldName := sFieldName + '\' + trim(FileName);
try
IdFTP1.Host := ReadINIFileStr('SYSTEMSET.INI', 'SERVER', '服务器地址', '127.0.0.1');
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
end;
if IdFTP1.Connected then
begin
application.ProcessMessages;
try
// ShowMessage(PChar(Trim('D:\' + Trim(FileName))));
IdFTP1.Get(Trim(UserDataFlag + 'YP\' + FileName), sFieldName, true, false);
except
Application.MessageBox('客户图样文件不存在', '提示', MB_ICONWARNING);
IdFTP1.Quit;
Exit;
end;
end
else
begin
Application.MessageBox('无法连接文件服务器', '提示', MB_ICONWARNING);
IdFTP1.Quit;
Exit;
end;
if IdFTP1.Connected then
IdFTP1.Quit;
ShellExecute(Handle, 'open', PChar(sFieldName), '', '', SW_SHOWNORMAL);
end;
procedure TfrmClothInfo_Tat.SetStatus();
begin
end;
procedure TfrmClothInfo_Tat.InitTree();
var
i: Integer;
begin
with ADOQueryTree do
begin
Close;
SQL.Clear;
SQL.Add('select * from BS_Cloth_Type');
Open;
end;
SCreateCDS(ADOQueryTree, CDS_Tree);
SInitCDSData(ADOQueryTree, CDS_Tree);
cxDBTreeList1.Items[0].Expand(false);
end;
procedure TfrmClothInfo_Tat.InitGrid();
var
fwhere, MBCIID, Pwhere: string;
begin
Panel2.Visible := True;
Panel2.Refresh;
if not CDS_1.IsEmpty then
MBCIID := Trim(CDS_1.FieldByName('BCIID').AsString)
else
MBCIID := '';
Pwhere := SGetFilters(Panel1, 1, 2);
if trim(Pwhere) <> '' then
begin
if fwhere <> '' then
fwhere := fwhere + ' and ' + trim(Pwhere)
else
fwhere := ' where ' + trim(Pwhere);
end;
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Close;
Filtered := False;
sql.Clear;
sql.Add(' exec P_BS_CloInfo_Get ');
sql.Add(' @CTID=' + quotedstr(Trim(CDS_Tree.fieldbyname('CTID').AsString)));
sql.Add(',@pageIndex=' + inttostr(CurrentPage));
sql.Add(',@pageSize=' + inttostr(RecordsNumber));
sql.Add(',@criteria= ' + quotedstr(fwhere));
// ShowMessage(sql.Text);
Open;
end;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_1);
SInitCDSData(ADOQueryMain, CDS_1);
TV1.DataController.Filter.Clear;
LBCPAP1.Caption := inttostr(CurrentPage) + '/' + inttostr(ceil(CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber));
finally
ADOQueryMain.EnableControls;
TV1.DataController.Filter.Clear;
end;
Panel2.Visible := False;
if MBCIID <> '' then
CDS_1.Locate('BCIID', MBCIID, []);
end;
procedure TfrmClothInfo_Tat.FormClose(Sender: TObject; var Action: TCloseAction);
var
i, j: integer;
begin
inherited;
j := length(Mach);
if j > 0 then
begin
for i := 0 to j - 1 do
begin
Mach[i].free;
end;
end;
SetLength(Mach, 0);
Action := cafree;
end;
procedure TfrmClothInfo_Tat.TBCloseClick(Sender: TObject);
begin
if DirectoryExists(ExtractFileDir('D:\Right1209')) then
winexec('cmd /c rd /s /q D:\Right1209', sw_hide);
Close;
end;
procedure TfrmClothInfo_Tat.TBDelClick(Sender: TObject);
begin
if CDS_1.IsEmpty then
Exit;
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
while CDS_1.Locate('SSel', true, []) do
begin
if Trim(CDS_1.fieldbyname('BCIID').AsString) <> '' then
begin
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('delete BS_Cloth_Info where BCIID=''' + Trim(CDS_1.fieldbyname('BCIID').AsString) + '''');
ExecSQL;
end;
end;
CDS_1.Delete;
end;
end;
procedure TfrmClothInfo_Tat.FormShow(Sender: TObject);
begin
inherited;
FJurisdiction := Self.fParameters1;
ReadCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
// pnlreport.Top := FTop + 110;
application.ProcessMessages;
RecordsNumber := 500;
CurrentPage := 1;
InitTree();
SetStatus();
InitGrid();
end;
procedure TfrmClothInfo_Tat.cbbHXChange(Sender: TObject);
begin
InitImage();
end;
procedure TfrmClothInfo_Tat.cxDBTreeList1DblClick(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmClothInfo_Tat.TBRafreshClick(Sender: TObject);
begin
InitTree();
InitGrid();
end;
procedure TfrmClothInfo_Tat.TBFilterClick(Sender: TObject);
begin
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_1);
SInitCDSData(ADOQueryMain, CDS_1);
end;
end;
procedure TfrmClothInfo_Tat.CYNoChange(Sender: TObject);
begin
//if Length(Trim(TEdit(Sender).Text))<4 then Exit;
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, CDS_1);
SInitCDSData(ADOQueryMain, CDS_1);
end;
end;
procedure TfrmClothInfo_Tat.TBExportClick(Sender: TObject);
begin
if CDS_1.IsEmpty then
Exit;
TcxGridToExcel(self.Caption, cxGrid1);
end;
procedure TfrmClothInfo_Tat.TBUPClick(Sender: TObject);
begin
try
frmCloInfoFileUp := TfrmCloInfoFileUp.Create(Application);
with frmCloInfoFileUp do
begin
Code.Text := Trim(Self.CDS_1.fieldbyname('C_Code').AsString);
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
// Self.CDS_1.Locate('BCIID', BCIID, []);
end;
end;
finally
frmCloInfoFileUp.Free;
end;
InitImage();
end;
procedure TfrmClothInfo_Tat.ReadINIFile();
var
programIni: Tinifile; //配置文件名
FileName: string;
begin
FileName := ExtractFilePath(Paramstr(0)) + 'SYSTEMSET.INI';
programIni := Tinifile.create(FileName);
server := programIni.ReadString('SERVER', '服务器地址', '127.0.0.1');
programIni.Free;
end;
procedure TfrmClothInfo_Tat.InitImage();
var
i, j: integer;
jpg: TJpegImage;
myStream: TADOBlobStream;
begin
j := length(Mach);
if j > 0 then
begin
for i := 0 to j - 1 do
begin
Mach[i].free;
end;
end;
SetLength(Mach, 0);
if CDS_1.IsEmpty then
exit;
try
with adoqueryPicture do
begin
close;
sql.Clear;
sql.Add(' select A.TFID,A.WBID,A.FilesOther,A.FileName from TP_File A ');
sql.add('where A.WBID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
if Trim(cbbHX.Text) <> '' then
sql.add(' and A.HXName=' + quotedstr(trim(cbbHX.Text)));
open;
end;
j := adoqueryPicture.RecordCount;
if j < 1 then
exit;
adoqueryPicture.DisableControls;
adoqueryPicture.First;
SetLength(Mach, j);
jpg := TJpegImage.Create();
for i := 0 to j - 1 do
begin
if triM(adoqueryPicture.fieldbyname('FilesOther').AsString) <> '' then
begin
myStream := tadoblobstream.Create(tblobfield(adoqueryPicture.fieldbyname('FilesOther')), bmread);
jpg.LoadFromStream(myStream);
Mach[i] := TfrmSlt.Create(Self);
Mach[i].Name := trim(adoqueryPicture.fieldbyname('TFID').AsString);
Mach[i].Parent := ScrollBox1;
Mach[i].Left := 0 + i * 165;
Mach[i].Init(adoqueryPicture.fieldbyname('TFID').AsString, adoqueryPicture.fieldbyname('FileName').AsString, jpg);
end;
adoqueryPicture.Next;
end;
adoqueryPicture.EnableControls;
finally
jpg.free;
application.ProcessMessages;
end;
end;
procedure TfrmClothInfo_Tat.TBCopyClick(Sender: TObject);
begin
try
frmClothInfoInput_Tat := TfrmClothInfoInput_Tat.Create(Application);
with frmClothInfoInput_Tat do
begin
CopyInt := 1;
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if Trim(Self.CDS_Tree.fieldbyname('CPName').AsString) = '成品' then
begin
Application.MessageBox('请在左侧选择类别再复制', '提示', 0);
Exit;
end;
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmClothInfoInput_Tat.Free;
end;
end;
procedure TfrmClothInfo_Tat.C_CodeKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then
begin
CurrentPage := 1;
InitGrid();
end;
end;
procedure TfrmClothInfo_Tat.TBAddClick(Sender: TObject);
var
i: Integer;
FieldName: string;
begin
try
frmClothInfoInput_Tat := TfrmClothInfoInput_Tat.Create(Application);
with frmClothInfoInput_Tat do
begin
CopyInt := 0;
FBCIID := '';
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmClothInfoInput_Tat.Free;
end;
end;
procedure TfrmClothInfo_Tat.TBEditClick(Sender: TObject);
begin
if CDS_1.IsEmpty then
Exit;
try
frmClothInfoInput_Tat := TfrmClothInfoInput_Tat.Create(Application);
with frmClothInfoInput_Tat do
begin
CopyInt := 0;
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmClothInfoInput_Tat.Free;
end;
end;
procedure TfrmClothInfo_Tat.TextEdit(Sender: TObject);
var
mvalue, FFieldName: string;
begin
mvalue := TcxTextEdit(Sender).EditingText;
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
with CDS_1 do
begin
Edit;
FieldByName(FFieldName).Value := mvalue;
Post;
end;
if mvalue = '' then
mvalue := '0';
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('update BS_Cloth_Info set ' + FFieldName + '=' + (Trim(mvalue)));
sql.Add('where BCIID=' + quotedstr(Trim(CDS_1.fieldbyname('BCIID').AsString)));
ExecSQL;
end;
Tv1.Controller.EditingController.ShowEdit();
end;
procedure TfrmClothInfo_Tat.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
var
fsj: string;
begin
fsj := 'select DISTINCT HXNAME name from TP_File where ISNULL(HXNAME,'''')<>'''' AND WBID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString));
SInitComBoxBySql(ADOQueryTemp, cbbHX, True, fsj);
InitImage();
end;
procedure TfrmClothInfo_Tat.TBMLEditClick(Sender: TObject);
var
fYPType: string;
begin
if CDS_1.IsEmpty then
exit;
if CDS_1.Locate('ssel', true, []) = false then
begin
Application.MessageBox('没有选择数据!', '提示', 0);
Exit;
end;
fYPType := '';
frmYPTypeHelpCP := TfrmYPTypeHelpCP.create(self);
with frmYPTypeHelpCP do
begin
if showmodal = 1 then
begin
fYPType := trim(ADOQueryHelp.fieldbyname('CTID').asstring);
end;
free;
end;
if trim(fYPType) = '' then
exit;
try
with CDS_1 do
begin
DisableControls;
First;
while not eof do
begin
if fieldbyname('ssel').AsBoolean then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('update BS_Cloth_Info SET CTID=''' + trim(fYPType) + ''' ');
sql.Add('where BCIID=' + quotedstr(trim(CDS_1.fieldbyname('BCIID').AsString)));
execsql;
end;
end;
next;
end;
First;
EnableControls;
end;
application.MessageBox('操作成功!', '提示信息');
initgrid();
except
CDS_1.EnableControls;
application.MessageBox('操作失败!', '提示信息', 0);
end;
end;
procedure TfrmClothInfo_Tat.N1Click(Sender: TObject);
begin
SelOKNoFiler(Tv1, True);
end;
procedure TfrmClothInfo_Tat.N2Click(Sender: TObject);
begin
SelOKNoFiler(Tv1, False);
end;
procedure TfrmClothInfo_Tat.N3Click(Sender: TObject);
begin
Clipboard.SetTextBuf(PChar(Trim(CDS_1.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
end;
procedure TfrmClothInfo_Tat.TCBNOR1Change(Sender: TObject);
begin
RecordsNumber := StrToInt(TCBNOR1.Text);
CurrentPage := 1;
C_Code.SetFocus;
InitGrid();
end;
procedure TfrmClothInfo_Tat.HXNameBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmClothInfo_Tat.HXNameBtnUpClick(Sender: TObject);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
with frmZDYHelp do
begin
flag := 'HX' + Trim(Self.CDS_1.fieldbyname('CYNO').AsString);
flagname := '花型';
if ShowModal = 1 then
begin
TEdit(Sender).Text := Trim(ClientDataSet1.fieldbyname('ZDYName').AsString);
end;
end;
finally
frmZDYHelp.Free;
end;
end;
procedure TfrmClothInfo_Tat.Button1Click(Sender: TObject);
begin
if CurrentPage > 1 then
CurrentPage := CurrentPage - 1;
InitGrid();
end;
procedure TfrmClothInfo_Tat.Button2Click(Sender: TObject);
begin
if CurrentPage < CDS_1.FieldByName('TotalCount').AsInteger / RecordsNumber then
CurrentPage := CurrentPage + 1;
InitGrid();
end;
procedure TfrmClothInfo_Tat.ToolButton1Click(Sender: TObject);
begin
try
frmClothInfoInput_Tat := TfrmClothInfoInput_Tat.Create(Application);
with frmClothInfoInput_Tat do
begin
CopyInt := 0;
ToolButton1.Visible := False;
FBCIID := Trim(Self.CDS_1.fieldbyname('BCIID').AsString);
FCTID := Trim(Self.CDS_Tree.fieldbyname('CTID').AsString);
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmClothInfoInput_Tat.Free;
end;
end;
procedure TfrmClothInfo_Tat.ToolButton2Click(Sender: TObject);
begin
WriteCxGrid(self.Caption + 'TV1', Tv1, '样品管理');
end;
procedure TfrmClothInfo_Tat.ToolButton3Click(Sender: TObject);
var
WSql: string;
begin
if CDS_1.IsEmpty then
Exit;
Tv1.OnFocusedRecordChanged := nil;
if CDS_1.Locate('SSel', True, []) = False then
begin
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
Application.MessageBox('没有选择数据!', '提示', 0);
Exit;
end;
WSql := '';
CDS_1.DisableControls;
with CDS_1 do
begin
First;
while not Eof do
begin
if CDS_1.fieldbyname('SSel').AsBoolean then
begin
if WSql <> '' then
begin
WSql := WSql + ',' + QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
end
else
begin
WSql := QuotedStr(Trim(CDS_1.fieldbyname('BCIID').AsString));
end;
end;
Next;
end;
end;
CDS_1.Locate('SSel', True, []);
Tv1.OnFocusedRecordChanged := Tv1FocusedRecordChanged;
CDS_1.EnableControls;
try
frmLabelPrint := TfrmLabelPrint.Create(Application);
with frmLabelPrint do
begin
FLMType := 'ClothInfoPrint';
FFiltration1 := WSql;
if ShowModal = 1 then
begin
// Self.InitGrid();
end;
end;
finally
frmLabelPrint.Free;
end;
end;
end.

View File

@ -1,200 +0,0 @@
inherited frmClothType: TfrmClothType
Left = 192
Top = 155
Caption = #20135#21697#31867#21035
ClientHeight = 529
ClientWidth = 981
FormStyle = fsMDIChild
Visible = True
ExplicitWidth = 997
ExplicitHeight = 568
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 981
Height = 33
ButtonHeight = 38
ButtonWidth = 91
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_ClothInfo.ImageList_new32
Images = DataLink_ClothInfo.ImageList_new32
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 0
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 1
OnClick = TBRafreshClick
end
object TBAdd: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #26032#22686#23376#31867
ImageIndex = 2
OnClick = TBAddClick
end
object ToolButton1: TToolButton
Left = 166
Top = 0
AutoSize = True
Caption = #20445#23384
ImageIndex = 16
OnClick = ToolButton1Click
end
object TBDel: TToolButton
Left = 237
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
OnClick = TBDelClick
end
object TBClose: TToolButton
Left = 308
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object cxDBTreeList1: TcxDBTreeList [1]
Left = 0
Top = 33
Width = 249
Height = 496
Align = alLeft
Bands = <
item
end>
DataController.DataSource = DataSource1
DataController.ParentField = 'CTParent'
DataController.KeyField = 'CTID'
Navigator.Buttons.CustomButtons = <>
OptionsBehavior.CopyCaptionsToClipboard = False
OptionsBehavior.ExpandOnDblClick = False
OptionsSelection.CellSelect = False
OptionsView.CellAutoHeight = True
OptionsView.Headers = False
RootValue = -1
Styles.Inactive = DataLink_ClothInfo.FoneRed
Styles.Selection = DataLink_ClothInfo.FoneRed
Styles.IncSearch = DataLink_ClothInfo.FoneRed
TabOrder = 1
OnClick = cxDBTreeList1Click
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
DataBinding.FieldName = 'CTName'
Width = 210
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
Summary.FooterSummaryItems = <>
Summary.GroupFooterSummaryItems = <>
end
end
object Panel1: TPanel [2]
Left = 249
Top = 33
Width = 732
Height = 496
Align = alClient
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 2
object Label1: TLabel
Left = 66
Top = 24
Width = 48
Height = 12
Caption = #29238' '#31867
end
object Label2: TLabel
Left = 66
Top = 65
Width = 48
Height = 12
Caption = #31867#21035#21517#31216
end
object Label3: TLabel
Left = 170
Top = 137
Width = 48
Height = 12
Caption = #31867#21035#32534#30721
Visible = False
end
object CTTopName: TEdit
Left = 129
Top = 21
Width = 121
Height = 20
ReadOnly = True
TabOrder = 0
end
object CTName: TEdit
Left = 129
Top = 61
Width = 121
Height = 20
TabOrder = 1
OnKeyPress = CTNameKeyPress
end
object CTNo: TEdit
Left = 233
Top = 133
Width = 121
Height = 20
TabOrder = 2
Visible = False
end
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Left = 201
Top = 105
end
object DataSource1: TDataSource
DataSet = ADOQueryTree
Left = 91
Top = 355
end
object ADOQueryTree10: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 61
Top = 209
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 709
Top = 209
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_ClothInfo.ADOLink
Parameters = <>
Left = 677
Top = 137
end
object ADOQueryTree: TClientDataSet
Aggregates = <>
Params = <>
Left = 88
Top = 280
end
end

View File

@ -1,251 +0,0 @@
unit U_ClothType;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit, DB, ADODB,
cxInplaceContainer, cxDBTL, cxControls, cxTLData, ComCtrls, ToolWin, StdCtrls,
ExtCtrls, DBClient, U_BaseList, cxLookAndFeels, cxLookAndFeelPainters,
cxTLdxBarBuiltInMenu, dxSkinsCore, dxSkinsDefaultPainters;
type
TfrmClothType = class(TfrmBaseList)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBAdd: TToolButton;
TBDel: TToolButton;
TBClose: TToolButton;
cxDBTreeList1: TcxDBTreeList;
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
DataSource1: TDataSource;
ADOQueryTree10: TADOQuery;
ToolButton1: TToolButton;
ADOQueryTemp: TADOQuery;
ADOQueryCmd: TADOQuery;
Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
CTTopName: TEdit;
CTName: TEdit;
CTNo: TEdit;
ADOQueryTree: TClientDataSet;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBRafreshClick(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
procedure TBAddClick(Sender: TObject);
procedure cxDBTreeList1Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure TBDelClick(Sender: TObject);
procedure CTNameKeyPress(Sender: TObject; var Key: Char);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
PState: Integer;
FCTID, FTopID: string;
procedure InitTree();
public
{ Public declarations }
end;
var
frmClothType: TfrmClothType;
implementation
uses
U_DataLink, U_RTFun;
{$R *.dfm}
procedure TfrmClothType.InitTree();
var
i: Integer;
begin
with ADOQueryTree10 do
begin
Close;
SQL.Clear;
SQL.Add('select * from BS_Cloth_Type order by CTlevel,CTOrder,CTName');
Open;
end;
SCreateCDS(ADOQueryTree10, ADOQueryTree);
SInitCDSData(ADOQueryTree10, ADOQueryTree);
if ADOQueryTree.IsEmpty then
Exit;
cxDBTreeList1.Items[0].Expand(True);
end;
procedure TfrmClothType.FormDestroy(Sender: TObject);
begin
inherited;
frmClothType := nil;
end;
procedure TfrmClothType.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
Action := caFree;
end;
procedure TfrmClothType.TBRafreshClick(Sender: TObject);
begin
InitTree();
end;
procedure TfrmClothType.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmClothType.TBAddClick(Sender: TObject);
begin
PState := 11;
CTTopName.Text := Trim(ADOQueryTree.fieldbyname('CTName').AsString);
FCTID := '';
CTName.Text := '';
CTNo.Text := '';
CTName.SetFocus;
end;
procedure TfrmClothType.cxDBTreeList1Click(Sender: TObject);
begin
PState := 22;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select * from BS_Cloth_Type where CTID=''' + Trim(ADOQueryTree.fieldbyname('CTParent').AsString) + '''');
Open;
end;
FCTID := Trim(ADOQueryTree.fieldbyname('CTID').AsString);
CTTopName.Text := Trim(ADOQueryTemp.fieldbyname('CTName').AsString);
CTName.Text := Trim(ADOQueryTree.fieldbyname('CTName').AsString);
CTNo.Text := Trim(ADOQueryTree.fieldbyname('CTNo').AsString);
end;
procedure TfrmClothType.ToolButton1Click(Sender: TObject);
var
maxId, FLMainId: string;
begin
if Trim(CTName.Text) = '' then
begin
Application.MessageBox('类别名称不能为空!', '提示', 0);
Exit;
end;
try
ADOQueryCmd.Connection.BeginTrans;
if PState = 11 then
begin
if GetLSNo(ADOQueryCmd, maxId, 'CT', 'BS_Cloth_Type', 4, 1) = False then
begin
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('取最大号失败!', '提示', 0);
Exit;
end;
end
else
begin
maxId := Trim(FCTID);
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from BS_Cloth_Type where CTID=''' + Trim(FCTID) + '''');
Open;
end;
with ADOQueryCmd do
begin
if PState = 11 then
begin
Append;
FieldByName('CTID').Value := Trim(maxId);
FieldByName('CTName').Value := Trim(CTName.Text);
FieldByName('CTNo').Value := Trim(CTNo.Text);
FieldByName('CTParent').Value := Trim(ADOQueryTree.fieldbyname('CTID').AsString);
FieldByName('CTLevel').Value := ADOQueryTree.fieldbyname('CTLevel').AsInteger + 1;
Post;
end
else if PState = 22 then
begin
Edit;
FieldByName('CTID').Value := Trim(maxId);
FieldByName('CTName').Value := Trim(CTName.Text);
FieldByName('CTNo').Value := Trim(CTNo.Text);
//FieldByName('CTParent').Value:=Trim(ADOQueryTree.fieldbyname('CTID').AsString);
//FieldByName('CPOrder').Value:=ADOQueryTree.fieldbyname('CPOrder').AsInteger+1;
Post;
end;
end;
ADOQueryCmd.Connection.CommitTrans;
Application.MessageBox('保存成功!', '提示', 0);
FLMainId := Trim(ADOQueryTree.fieldbyname('CTID').AsString);
InitTree();
ADOQueryTree.Locate('CTID', FLMainId, []);
except
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end;
end;
procedure TfrmClothType.TBDelClick(Sender: TObject);
begin
if ADOQueryTree.FieldByName('CTLevel').AsInteger = 0 then
Exit;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select * from BS_Cloth_Type where CTParent=''' + Trim(ADOQueryTree.fieldbyname('CTID').AsString) + '''');
Open;
if not IsEmpty then
begin
Application.MessageBox('已经定义子类不能删除!', '提示', 0);
Exit;
end;
end;
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select * from BS_Cloth_Info where CTID=''' + Trim(ADOQueryTree.fieldbyname('CTID').AsString) + '''');
Open;
if not IsEmpty then
begin
Application.MessageBox('已经有产品属于此类不能删除!', '提示', 0);
Exit;
end;
end;
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('delete BS_Cloth_Type where CTID=''' + Trim(ADOQueryTree.fieldbyname('CTID').AsString) + '''');
sql.Add('delete BS_Cloth_Type where CTParent=''' + Trim(ADOQueryTree.fieldbyname('CTID').AsString) + '''');
ExecSQL;
end;
InitTree();
end;
procedure TfrmClothType.CTNameKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then
CTNo.SetFocus;
end;
procedure TfrmClothType.FormShow(Sender: TObject);
begin
inherited;
InitTree();
end;
end.

View File

@ -1,35 +0,0 @@
object frmSLT: TfrmSLT
Left = 0
Top = 0
Width = 161
Height = 138
TabOrder = 0
object Panel1: TPanel
Left = 0
Top = 121
Width = 161
Height = 17
Align = alClient
BevelOuter = bvNone
Caption = 'Panel1'
Color = clWindow
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 0
end
object cxImage1: TcxImage
Left = 0
Top = 0
Align = alTop
Style.BorderStyle = ebsOffice11
StyleHot.TextStyle = []
TabOrder = 1
OnDblClick = cxImage1DblClick
Height = 121
Width = 161
end
end

View File

@ -1,77 +0,0 @@
unit U_SLT;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, jpeg, cxControls, cxContainer, cxEdit, cxImage, IdFTP,
ShellAPI, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore,
dxSkinsDefaultPainters;
type
TfrmSLT = class(TFrame)
cxImage1: TcxImage;
Panel1: TPanel;
procedure cxImage1DblClick(Sender: TObject);
private
CYID, FileName: string;
{ Private declarations }
public
procedure Init(fCYID: string; fFileName: string; fPicture: TJpegImage);
{ Public declarations }
end;
implementation
uses
U_DataLink;
{$R *.dfm}
procedure TfrmSLT.Init(fCYID: string; fFileName: string; fPicture: TJpegImage);
begin
CYID := trim(fCYID);
FileName := trim(fFileName);
Panel1.Caption := FileName;
cxImage1.Picture.Assign(fPicture);
end;
procedure TfrmSLT.cxImage1DblClick(Sender: TObject);
var
IdFTP1: TIdFTP;
FPath, FFName: string;
FInt: integer;
begin
try
IdFTP1 := TIdFTP.Create(self);
IdFTP1.Host := PicSvr;
IdFTP1.Username := 'three';
IdFTP1.Password := '641010';
IdFTP1.Connect();
except
IdFTP1.Quit;
IdFTP1.Free;
Application.MessageBox('无法连接到文件服务器,请检查!', '提示', MB_ICONWARNING);
Exit;
end;
FPath := 'D:\Right1209\';
if not DirectoryExists(ExtractFileDir(FPath)) then
CreateDir(ExtractFileDir(FPath));
FFName := Trim(FileName);
FFName := FPath + FFName;
if FileExists(FFName) then
begin
FInt := 1;
end;
if FInt <> 1 then
IdFTP1.Get(UserDataFlag + 'YP\' + FileName, FFName);
if IdFTP1.Connected then
begin
IdFTP1.Quit;
IdFTP1.Free;
end;
ShellExecute(Handle, 'open', PChar(FFName), '', '', SW_SHOWNORMAL);
end;
end.

View File

@ -1,66 +0,0 @@
object frmYPTypeHelpCP: TfrmYPTypeHelpCP
Left = 561
Top = 284
Caption = #26679#21697#31867#21035#36873#25321#21015#34920
ClientHeight = 485
ClientWidth = 355
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 12
object cxDBTreeList1: TcxDBTreeList
Left = 0
Top = 0
Width = 249
Height = 485
Align = alLeft
Bands = <
item
end>
DataController.DataSource = DataSource1
DataController.ParentField = 'CTParent'
DataController.KeyField = 'CTID'
Navigator.Buttons.CustomButtons = <>
OptionsBehavior.CopyCaptionsToClipboard = False
OptionsBehavior.ExpandOnDblClick = False
OptionsSelection.CellSelect = False
OptionsView.CellAutoHeight = True
OptionsView.Headers = False
RootValue = -1
TabOrder = 0
OnDblClick = cxDBTreeList1DblClick
object cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn
DataBinding.FieldName = 'CTName'
Width = 210
Position.ColIndex = 0
Position.RowIndex = 0
Position.BandIndex = 0
Summary.FooterSummaryItems = <>
Summary.GroupFooterSummaryItems = <>
end
end
object ADOConnection1: TADOConnection
LoginPrompt = False
Left = 288
Top = 60
end
object DataSource1: TDataSource
DataSet = ADOQueryHelp
Left = 280
Top = 188
end
object ADOQueryHelp: TADOQuery
Connection = ADOConnection1
Parameters = <>
Left = 184
Top = 136
end
end

View File

@ -1,73 +0,0 @@
unit U_YPTypeHelpCP;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxCustomData, cxStyles, cxTL, cxMaskEdit,
cxInplaceContainer, cxDBTL, cxControls, cxTLData, DB, ADODB, cxLookAndFeels,
cxLookAndFeelPainters, cxTLdxBarBuiltInMenu, dxSkinsCore,
dxSkinsDefaultPainters;
type
TfrmYPTypeHelpCP = class(TForm)
ADOConnection1: TADOConnection;
cxDBTreeList1: TcxDBTreeList;
cxDBTreeList1cxDBTreeListColumn2: TcxDBTreeListColumn;
DataSource1: TDataSource;
ADOQueryHelp: TADOQuery;
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure cxDBTreeList1DblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmYPTypeHelpCP: TfrmYPTypeHelpCP;
implementation
uses
U_DataLink;
{$R *.dfm}
procedure TfrmYPTypeHelpCP.FormCreate(Sender: TObject);
begin
cxDBTreeList1.Align := alclient;
try
with ADOConnection1 do
begin
Connected := false;
ConnectionString := DConString;
//ConnectionString:='';
Connected := true;
end;
except
end;
end;
procedure TfrmYPTypeHelpCP.FormShow(Sender: TObject);
begin
with ADOQueryHelp do
begin
Close;
SQL.Clear;
SQL.Add('select * from BS_Cloth_Type order by CTlevel,CTOrder,CTName');
Open;
end;
cxDBTreeList1.Items[0].Expand(false);
end;
procedure TfrmYPTypeHelpCP.cxDBTreeList1DblClick(Sender: TObject);
begin
if ADOQueryHelp.IsEmpty then
exit;
ModalResult := 1;
end;
end.

Binary file not shown.

View File

@ -17,17 +17,20 @@ uses
U_BaseInput in '..\..\..\public10\design\U_BaseInput.pas' {frmBaseInput},
U_BaseList in '..\..\..\public10\design\U_BaseList.pas' {frmBaseList},
U_cxGridCustomCss in '..\..\..\public10\design\U_cxGridCustomCss.pas',
U_globalVar in '..\..\..\public10\design\U_globalVar.pas',
U_WindowFormdesign in '..\..\..\public10\design\U_WindowFormdesign.pas',
U_RTFun in '..\..\..\public10\ThreeFun\Fun\U_RTFun.pas',
U_MachineManage in 'U_MachineManage.pas' {frmMachineManage},
U_PositionList in 'U_PositionList.pas' {frmPositionList},
U_WarpBeamManage in 'U_WarpBeamManage.pas' {frmWarpBeamManage},
U_TrayManage in 'U_TrayManage.pas' {frmTrayManage},
U_LabelMapSet in '..\A00ͨÓô°Ìå\U_LabelMapSet.pas' {frmLabelMapSet},
U_LabelPrint in '..\A00ͨÓô°Ìå\U_LabelPrint.pas' {frmLabelPrint},
U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule},
U_PositionInPut in 'U_PositionInPut.pas' {frmPositionInPut},
U_PositionList in 'U_PositionList.pas' {frmPositionList},
U_cxGridCustomSet in '..\..\..\public10\design\U_cxGridCustomSet.pas',
U_FormLayOutDesign in '..\..\..\public10\design\U_FormLayOutDesign.pas',
U_globalVar in '..\..\..\public10\design\U_globalVar.pas',
U_WindowFormdesign in '..\..\..\public10\design\U_WindowFormdesign.pas',
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
U_printPdf in '..\..\..\public10\ThreeFun\Fun\U_printPdf.pas';
{$R *.res}

View File

@ -123,7 +123,7 @@
<BT_BuildType>Debug</BT_BuildType>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<Debugger_HostApplication>D:\Dp10RepoV1\项目代码\D10myXushang\A05基础资料管理\testDll.exe</Debugger_HostApplication>
<Debugger_HostApplication>D:\Dp10RepoV1\项目代码\D10xhGemei\A05基础资料管理\testDll.exe</Debugger_HostApplication>
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
</PropertyGroup>
<ItemGroup>
@ -158,17 +158,11 @@
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\..\..\public10\design\U_cxGridCustomCss.pas"/>
<DCCReference Include="..\..\..\public10\design\U_globalVar.pas"/>
<DCCReference Include="..\..\..\public10\design\U_WindowFormdesign.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_RTFun.pas"/>
<DCCReference Include="U_MachineManage.pas">
<Form>frmMachineManage</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_PositionList.pas">
<Form>frmPositionList</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_WarpBeamManage.pas">
<Form>frmWarpBeamManage</Form>
<FormType>dfm</FormType>
@ -185,8 +179,24 @@
<Form>frmLabelPrint</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\..\..\public10\design\U_BaseDataLink.pas">
<Form>BaseDataLink</Form>
<FormType>dfm</FormType>
<DesignClass>TDataModule</DesignClass>
</DCCReference>
<DCCReference Include="U_PositionInPut.pas">
<Form>frmPositionInPut</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_PositionList.pas">
<Form>frmPositionList</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\..\..\public10\design\U_cxGridCustomSet.pas"/>
<DCCReference Include="..\..\..\public10\design\U_FormLayOutDesign.pas"/>
<DCCReference Include="..\..\..\public10\design\U_globalVar.pas"/>
<DCCReference Include="..\..\..\public10\design\U_WindowFormdesign.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_printPdf.pas"/>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>

View File

@ -1,62 +1,62 @@
[ExpressSkins]
Default=1
Default=0
ShowNotifications=1
Enabled=1
dxSkinBasic=1
dxSkinBlack=1
dxSkinBlue=1
dxSkinBlueprint=1
dxSkinCaramel=1
dxSkinCoffee=1
dxSkinDarkroom=1
dxSkinDarkSide=1
dxSkinDevExpressDarkStyle=1
dxSkinDevExpressStyle=1
dxSkinFoggy=1
dxSkinGlassOceans=1
dxSkinHighContrast=1
dxSkiniMaginary=1
dxSkinLilian=1
dxSkinLiquidSky=1
dxSkinLondonLiquidSky=1
dxSkinMcSkin=1
dxSkinMetropolis=1
dxSkinMetropolisDark=1
dxSkinMoneyTwins=1
dxSkinOffice2007Black=1
dxSkinOffice2007Blue=1
dxSkinOffice2007Green=1
dxSkinOffice2007Pink=1
dxSkinOffice2007Silver=1
dxSkinOffice2010Black=1
dxSkinOffice2010Blue=1
dxSkinOffice2010Silver=1
dxSkinOffice2013DarkGray=1
dxSkinOffice2013LightGray=1
dxSkinOffice2013White=1
dxSkinOffice2016Colorful=1
dxSkinOffice2016Dark=1
dxSkinOffice2019Black=1
dxSkinOffice2019Colorful=1
dxSkinOffice2019DarkGray=1
dxSkinOffice2019White=1
dxSkinPumpkin=1
dxSkinSeven=1
dxSkinSevenClassic=1
dxSkinSharp=1
dxSkinSharpPlus=1
dxSkinSilver=1
dxSkinSpringtime=1
dxSkinStardust=1
dxSkinSummer2008=1
dxSkinTheAsphaltWorld=1
dxSkinTheBezier=1
dxSkinBasic=0
dxSkinBlack=0
dxSkinBlue=0
dxSkinBlueprint=0
dxSkinCaramel=0
dxSkinCoffee=0
dxSkinDarkroom=0
dxSkinDarkSide=0
dxSkinDevExpressDarkStyle=0
dxSkinDevExpressStyle=0
dxSkinFoggy=0
dxSkinGlassOceans=0
dxSkinHighContrast=0
dxSkiniMaginary=0
dxSkinLilian=0
dxSkinLiquidSky=0
dxSkinLondonLiquidSky=0
dxSkinMcSkin=0
dxSkinMetropolis=0
dxSkinMetropolisDark=0
dxSkinMoneyTwins=0
dxSkinOffice2007Black=0
dxSkinOffice2007Blue=0
dxSkinOffice2007Green=0
dxSkinOffice2007Pink=0
dxSkinOffice2007Silver=0
dxSkinOffice2010Black=0
dxSkinOffice2010Blue=0
dxSkinOffice2010Silver=0
dxSkinOffice2013DarkGray=0
dxSkinOffice2013LightGray=0
dxSkinOffice2013White=0
dxSkinOffice2016Colorful=0
dxSkinOffice2016Dark=0
dxSkinOffice2019Black=0
dxSkinOffice2019Colorful=0
dxSkinOffice2019DarkGray=0
dxSkinOffice2019White=0
dxSkinPumpkin=0
dxSkinSeven=0
dxSkinSevenClassic=0
dxSkinSharp=0
dxSkinSharpPlus=0
dxSkinSilver=0
dxSkinSpringtime=0
dxSkinStardust=0
dxSkinSummer2008=0
dxSkinTheAsphaltWorld=0
dxSkinTheBezier=0
dxSkinsDefaultPainters=1
dxSkinValentine=1
dxSkinVisualStudio2013Blue=1
dxSkinVisualStudio2013Dark=1
dxSkinVisualStudio2013Light=1
dxSkinVS2010=1
dxSkinWhiteprint=1
dxSkinValentine=0
dxSkinVisualStudio2013Blue=0
dxSkinVisualStudio2013Dark=0
dxSkinVisualStudio2013Light=0
dxSkinVS2010=0
dxSkinWhiteprint=0
dxSkinWXI=1
dxSkinXmas2008Blue=1
dxSkinXmas2008Blue=0

View File

@ -1,9 +1,26 @@
object DataLink_BaseInfo: TDataLink_BaseInfo
OldCreateOrder = False
OnCreate = DataModuleCreate
inherited DataLink_BaseInfo: TDataLink_BaseInfo
OldCreateOrder = True
OnDestroy = DataModuleDestroy
Height = 349
Width = 482
inherited cxEditStyleController1: TcxEditStyleController
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
PixelsPerInch = 96
end
inherited cxImageList_bar: TcxImageList
FormatVersion = 1
end
inherited ThreeColorBase: TcxStyleRepository
PixelsPerInch = 96
end
inherited dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList
inherited dxLayoutSkinLookAndFeel1: TdxLayoutSkinLookAndFeel
PixelsPerInch = 96
end
end
object AdoDataLink: TADOQuery
Connection = ADOLink
Parameters = <>
@ -10423,140 +10440,6 @@ object DataLink_BaseInfo: TDataLink_BaseInfo
FF800001000000F003FFFE00FFE0000300000000000000000000000000000000
000000000000}
end
object ThreeLookAndFeelCol: TcxLookAndFeelController
Kind = lfStandard
NativeStyle = False
Left = 252
Top = 13
end
object ThreeColorBase: TcxStyleRepository
Left = 147
Top = 80
PixelsPerInch = 96
object SHuangSe: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 4707838
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
TextColor = clBtnText
end
object SkyBlue: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = clSkyBlue
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
TextColor = clBlack
end
object Default: TcxStyle
AssignedValues = [svColor, svFont]
Color = clWhite
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object QHuangSe: TcxStyle
AssignedValues = [svColor, svFont]
Color = 8454143
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
end
object Red: TcxStyle
AssignedValues = [svColor, svFont]
Color = clRed
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
end
object FontBlue: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clBlue
end
object TextSHuangSe: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clOlive
end
object FonePurple: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clWindow
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clPurple
end
object FoneClMaroon: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clMaroon
end
object FoneRed: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clRed
end
object RowColor: TcxStyle
AssignedValues = [svColor]
Color = 16311512
end
object handBlack: TcxStyle
AssignedValues = [svFont]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object cxBlue: TcxStyle
AssignedValues = [svColor, svFont]
Color = 16711731
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
end
object SHuangSeCu: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 4707838
Font.Charset = GB2312_CHARSET
Font.Color = clBlack
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clRed
end
end
object Timer_link: TTimer
Interval = 15000
OnTimer = Timer_linkTimer

View File

@ -5,7 +5,8 @@ interface
uses
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
Windows, Messages, forms, OleCtnrs, DateUtils, ExtCtrls, SyncObjs, cxClasses,
System.ImageList;
System.ImageList, U_BaseDataLink, dxCore, cxLocalization, dxLayoutLookAndFeels,
cxImageList, cxGraphics, cxEdit, cxContainer, dxSkinsForm;
type
TMyThread = class(TThread)
@ -34,26 +35,10 @@ var
PicSvr: string;
type
TDataLink_BaseInfo = class(TDataModule)
TDataLink_BaseInfo = class(TBaseDataLink)
AdoDataLink: TADOQuery;
ADOLink: TADOConnection;
ThreeImgList: TImageList;
ThreeLookAndFeelCol: TcxLookAndFeelController;
ThreeColorBase: TcxStyleRepository;
SHuangSe: TcxStyle;
SkyBlue: TcxStyle;
Default: TcxStyle;
QHuangSe: TcxStyle;
Red: TcxStyle;
FontBlue: TcxStyle;
TextSHuangSe: TcxStyle;
FonePurple: TcxStyle;
FoneClMaroon: TcxStyle;
FoneRed: TcxStyle;
RowColor: TcxStyle;
handBlack: TcxStyle;
cxBlue: TcxStyle;
SHuangSeCu: TcxStyle;
Timer_link: TTimer;
ImageList_new32: TImageList;
procedure DataModuleDestroy(Sender: TObject);
@ -109,6 +94,7 @@ end;
procedure TDataLink_BaseInfo.DataModuleDestroy(Sender: TObject);
begin
inherited;
CriticalSection.Free;
DataLink_BaseInfo := nil;
end;
@ -120,6 +106,7 @@ end;
procedure TDataLink_BaseInfo.DataModuleCreate(Sender: TObject);
begin
inherited;
CriticalSection := TCriticalSection.Create;
end;

View File

@ -67,12 +67,13 @@ begin
if trim(DataBaseStr) = '' then
begin
server := '101.132.143.144,7781';
dtbase := 'RTBasicsData';
dtbase := 'gemeiData';
user := 'rtsa';
pswd := 'rightsoft@5740';
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
// DParameters1:='高权限';
// Parameters2 := '梭织';
end
else
begin
@ -115,6 +116,7 @@ begin
/////////////////////
//调用子模块窗口
case FormID of
111: //库位管理
begin
with TfrmPositionList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do
@ -127,7 +129,7 @@ begin
end;
end;
112: //机台管理
112: //车辆管理
begin
with TfrmMachineManage.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do
begin
@ -141,9 +143,6 @@ begin
{
141: //经轴管理
begin
with TfrmWarpBeamManage.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do

View File

@ -0,0 +1,183 @@
inherited frmMachineInPut: TfrmMachineInPut
Left = 88
Top = 141
Caption = #26426#21488#24405#20837
ClientHeight = 333
ClientWidth = 632
Color = clWhite
Font.Height = -16
Position = poMainFormCenter
ExplicitWidth = 648
ExplicitHeight = 372
PixelsPerInch = 96
TextHeight = 21
object cxGrid2: TcxGrid [0]
Left = 0
Top = 30
Width = 632
Height = 303
Align = alClient
TabOrder = 0
ExplicitLeft = -8
ExplicitTop = 71
ExplicitHeight = 262
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DataSource3
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skCount
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsView.GroupByBox = False
object v1Column2: TcxGridDBColumn
Caption = #36710#29260#21495
DataBinding.FieldName = 'VNO'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 100
end
object Tv1Column1: TcxGridDBColumn
Caption = #36710#36742#31867#22411
DataBinding.FieldName = 'VType'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 100
end
object Tv1Column2: TcxGridDBColumn
Caption = #21496#26426
DataBinding.FieldName = 'Driver'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 226
end
end
object cxGrid2Level1: TcxGridLevel
GridView = Tv1
end
end
object ToolBar1: TToolBar [1]
Tag = 1
Left = 0
Top = 0
Width = 632
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 99
Caption = 'ToolBar1'
Images = DataLink_BaseInfo.cxImageList_bar
List = True
ShowCaptions = True
TabOrder = 1
object TBSave: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #20445#23384
ImageIndex = 16
OnClick = TBSaveClick
end
object TBAdd: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #26032#22686
ImageIndex = 2
OnClick = TBAddClick
end
object TBDel: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 6
OnClick = TBDelClick
end
object ToolButton1: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton1Click
end
object TBClose: TToolButton
Left = 316
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
Left = 225
Top = 136
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
Left = 73
Top = 161
end
inherited ImageList_new32: TImageList
Left = 248
Top = 288
end
inherited cxImageList_bar: TcxImageList
FormatVersion = 1
end
object DataSource3: TDataSource
DataSet = CDS_Sub
Left = 576
Top = 136
end
object CDS_Sub: TClientDataSet
Aggregates = <>
Params = <>
Left = 528
Top = 192
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
Parameters = <>
Left = 328
Top = 136
end
object ADOQueryMain: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 408
Top = 136
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 496
Top = 136
end
object cxGridPopupMenu2: TcxGridPopupMenu
Grid = cxGrid2
PopupMenus = <>
Left = 160
Top = 192
end
end

View File

@ -0,0 +1,235 @@
unit U_MachineInPut;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, cxCalendar, cxDropDownEdit, ComCtrls, ToolWin,
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
cxClasses, cxControls, cxGridCustomView, cxGrid, cxGridCustomPopupMenu,
cxGridPopupMenu, ADODB, DBClient, cxButtonEdit, cxTextEdit, StdCtrls, ExtCtrls,
StrUtils, U_BaseInput, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
dxDateRanges, dxScrollbarAnnotations, cxContainer, dxBarBuiltInMenu,
System.ImageList, Vcl.ImgList, cxImageList;
type
TfrmMachineInPut = class(TfrmBaseInput)
cxGrid2: TcxGrid;
Tv1: TcxGridDBTableView;
v1Column2: TcxGridDBColumn;
cxGrid2Level1: TcxGridLevel;
ToolBar1: TToolBar;
TBAdd: TToolButton;
TBDel: TToolButton;
TBSave: TToolButton;
TBClose: TToolButton;
DataSource3: TDataSource;
CDS_Sub: TClientDataSet;
ADOQueryCmd: TADOQuery;
ADOQueryMain: TADOQuery;
ADOQueryTemp: TADOQuery;
cxGridPopupMenu2: TcxGridPopupMenu;
ToolButton1: TToolButton;
Tv1Column1: TcxGridDBColumn;
Tv1Column2: TcxGridDBColumn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBDelClick(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure TBAddClick(Sender: TObject);
private
{ Private declarations }
function SaveCKData(): Boolean;
public
{ Public declarations }
FBCId, FSTKName: string;
end;
var
frmMachineInPut: TfrmMachineInPut;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp;
{$R *.dfm}
procedure TfrmMachineInPut.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
Action := caFree;
end;
function TfrmMachineInPut.SaveCKData(): Boolean;
var
MaxNo, MWBID: string;
begin
try
ADOQueryCmd.Connection.BeginTrans;
CDS_Sub.DisableControls;
with CDS_Sub do
begin
First;
while not eof do
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select * from Bs_Vehicle where VID=''' + Trim(CDS_Sub.fieldbyname('VID').AsString) + '''');
open;
end;
MWBID := Trim(ADOQueryTemp.fieldbyname('VID').AsString);
if Trim(MWBID) = '' then
begin
if GetLSNo(ADOQueryCmd, MaxNo, 'M', 'Bs_Vehicle', 4, 1) = False then
raise Exception.Create('取最大号失败!');
end
else
begin
MaxNo := Trim(MWBID);
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('select * from Bs_Vehicle where VID=''' + Trim(MaxNo) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(MWBID) = '' then
begin
Append;
FieldByName('Fillid').Value := Trim(Dcode);
FieldByName('Filler').Value := Trim(DName)
end
else
begin
Edit;
FieldByName('Editid').Value := Trim(Dcode);
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDate(ADOQueryTemp);
end;
FieldByName('VID').Value := Trim(MaxNo);
// FieldByName('STKName').Value := Trim(FSTKName);
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_Sub, 'Bs_Vehicle', 0);
Post;
end;
Edit;
FieldByName('VID').Value := Trim(MaxNo);
Post;
Next;
end;
end;
CDS_Sub.EnableControls;
ADOQueryCmd.Connection.CommitTrans;
Result := True;
except
Result := False;
ADOQueryCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
end;
end;
procedure TfrmMachineInPut.TBAddClick(Sender: TObject);
begin
with CDS_Sub do
begin
Append;
Post;
end;
end;
procedure TfrmMachineInPut.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmMachineInPut.FormShow(Sender: TObject);
var
fsj: string;
begin
inherited;
ReadCxGrid(trim(self.Caption), Tv1, '染色坯布仓库');
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add(' select A.* ');
sql.Add(' from Bs_Vehicle A');
sql.Add(' where VID=''' + Trim(FBCId) + '''');
Open;
end;
SCreateCDS(ADOQueryTemp, CDS_Sub);
SInitCDSData(ADOQueryTemp, CDS_Sub);
end;
procedure TfrmMachineInPut.TBDelClick(Sender: TObject);
begin
if CDS_Sub.IsEmpty then
Exit;
if Trim(CDS_Sub.fieldbyname('VID').AsString) <> '' then
begin
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
try
ADOQueryCmd.Connection.BeginTrans;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add(' delete Bs_Vehicle where VID=''' + Trim(CDS_Sub.fieldbyname('VID').AsString) + '''');
ExecSQL;
end;
ADOQueryCmd.Connection.CommitTrans;
CDS_Sub.Delete;
except
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('删除异常!', '提示', 0);
end;
end
else
begin
CDS_Sub.Delete;
end;
end;
procedure TfrmMachineInPut.TBSaveClick(Sender: TObject);
begin
if CDS_Sub.IsEmpty then
Exit;
if CDS_Sub.Locate('VNO', null, []) = True then
begin
Application.MessageBox('编号不能为空!', '提示', 0);
Exit;
end;
if SaveCKData() then
begin
Application.MessageBox('保存成功!', '提示', 0);
ModalResult := 1;
Exit;
end;
end;
procedure TfrmMachineInPut.ToolButton1Click(Sender: TObject);
begin
WriteCxGrid(trim(self.Caption), Tv1, '染色坯布仓库');
end;
end.

View File

@ -4,28 +4,29 @@ inherited frmMachineManage: TfrmMachineManage
Caption = #26426#21488#31649#29702
ClientHeight = 523
ClientWidth = 1107
Font.Height = -16
KeyPreview = True
ExplicitWidth = 1123
ExplicitHeight = 562
PixelsPerInch = 96
TextHeight = 12
TextHeight = 21
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1107
Height = 38
Height = 30
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
ButtonHeight = 30
ButtonWidth = 67
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_BaseInfo.ImageList_new32
Images = DataLink_BaseInfo.ImageList_new32
DisabledImages = DataLink_BaseInfo.cxImageList_bar
Images = DataLink_BaseInfo.cxImageList_bar
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 0
TabOrder = 3
object TBRafresh: TToolButton
Left = 0
Top = 0
@ -41,24 +42,23 @@ inherited frmMachineManage: TfrmMachineManage
Caption = #36807#28388
ImageIndex = 0
Visible = False
OnClick = ToolButton2Click
end
object ToolButton4: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #22686#34892
ImageIndex = 9
OnClick = ToolButton4Click
end
object ToolButton6: TToolButton
Left = 142
Left = 213
Top = 0
AutoSize = True
Caption = #20462#25913
ImageIndex = 3
OnClick = ToolButton6Click
end
object ToolButton4: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #22686#34892
ImageIndex = 2
OnClick = ToolButton4Click
end
object ToolButton5: TToolButton
Left = 284
Top = 0
@ -94,9 +94,9 @@ inherited frmMachineManage: TfrmMachineManage
end
object cxGrid2: TcxGrid [1]
Left = 0
Top = 96
Top = 73
Width = 1107
Height = 427
Height = 450
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 2
@ -104,6 +104,7 @@ inherited frmMachineManage: TfrmMachineManage
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_HZ
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
@ -136,30 +137,37 @@ inherited frmMachineManage: TfrmMachineManage
OptionsData.DeletingConfirmation = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
Styles.Footer = DataLink_BaseInfo.Default
Styles.Header = DataLink_BaseInfo.Default
object v2Column1: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
HeaderAlignmentHorz = taCenter
Width = 53
end
object v2Column12: TcxGridDBColumn
Caption = #26426#21488#21495
DataBinding.FieldName = 'MCNO'
Caption = #36710#29260
DataBinding.FieldName = 'VNO'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 149
end
object v2Column8: TcxGridDBColumn
Caption = #26426#21488#31867#22411
DataBinding.FieldName = 'MCType'
Caption = #31867#22411
DataBinding.FieldName = 'VType'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 180
end
object Tv2Column1: TcxGridDBColumn
Caption = #21496#26426
DataBinding.FieldName = 'Driver'
DataBinding.IsNullValueType = True
end
end
object cxGridLevel1: TcxGridLevel
GridView = Tv2
@ -167,58 +175,62 @@ inherited frmMachineManage: TfrmMachineManage
end
object Panel1: TPanel [2]
Left = 0
Top = 38
Top = 30
Width = 1107
Height = 58
Height = 43
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 1
Color = clWhite
ParentBackground = False
TabOrder = 4
object Label1: TLabel
Left = 66
Top = 20
Width = 36
Height = 12
Caption = #26426#21488#21495
Left = 37
Top = 10
Width = 32
Height = 21
Caption = #36710#29260
end
object MCNO: TEdit
object VNO: TcxTextEdit
Tag = 2
Left = 105
Top = 16
Width = 89
Height = 20
Left = 91
Top = 6
ParentColor = True
ParentFont = False
Properties.OnChange = MCNOPropertiesChange
TabOrder = 0
OnChange = CustomerChange
Width = 158
end
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
Left = 113
Top = 256
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
Left = 153
Top = 129
Left = 137
Top = 169
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 299
Top = 209
Left = 459
Top = 169
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
Parameters = <>
Left = 261
Top = 209
Left = 357
Top = 153
end
object ADOQueryMain: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 229
Top = 209
Left = 253
Top = 161
end
object GPM_1: TcxGridPopupMenu
Grid = cxGrid2
@ -234,12 +246,12 @@ inherited frmMachineManage: TfrmMachineManage
object CDS_HZ: TClientDataSet
Aggregates = <>
Params = <>
Left = 445
Top = 199
Left = 429
Top = 271
end
object PopupMenu1: TPopupMenu
Left = 379
Top = 338
Left = 355
Top = 250
object N1: TMenuItem
Caption = #20840#36873
OnClick = N1Click

View File

@ -13,8 +13,9 @@ uses
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
cxTextEdit, cxPC, cxCheckComboBox, cxDropDownEdit, Menus, RM_e_Xls,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
dxDateRanges, dxBarBuiltInMenu, U_BaseList, RM_BarCode;
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges,
dxBarBuiltInMenu, U_BaseList, RM_BarCode, dxScrollbarAnnotations, cxContainer,
cxProgressBar;
type
TfrmMachineManage = class(TfrmBaseList)
@ -36,7 +37,6 @@ type
N1: TMenuItem;
N2: TMenuItem;
Panel1: TPanel;
MCNO: TEdit;
v2Column8: TcxGridDBColumn;
Label1: TLabel;
v2Column12: TcxGridDBColumn;
@ -45,29 +45,28 @@ type
ToolButton5: TToolButton;
v2Column1: TcxGridDBColumn;
ToolButton6: TToolButton;
VNO: TcxTextEdit;
Tv2Column1: TcxGridDBColumn;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure cxTabControl1Change(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure CustomerChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure v2Column8PropertiesEditValueChanged(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure ToolButton4Click(Sender: TObject);
procedure ToolButton5Click(Sender: TObject);
procedure ToolButton6Click(Sender: TObject);
procedure Tv2Column1PropertiesChange(Sender: TObject);
procedure MCNOPropertiesChange(Sender: TObject);
private
{ Private declarations }
procedure InitGrid();
procedure EditValueT();
procedure EditValueF();
public
fFlag: integer;
{ Public declarations }
@ -80,21 +79,20 @@ var
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp, U_LabelPrint;
U_DataLink, U_RTFun, U_ZDYHelp, U_LabelPrint, U_MachineInPut;
{$R *.dfm}
procedure TfrmMachineManage.InitGrid();
begin
MCNO.SetFocus;
ToolBar1.SetFocus;
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Close;
SQL.Clear;
sql.Add(' select A.* from BS_Machine A order by MCNO ');
sql.Add(' select A.* from Bs_Vehicle A order by VNO ');
Open;
end;
SCreateCDS(ADOQueryMain, CDS_HZ);
@ -103,7 +101,19 @@ begin
ADOQueryMain.EnableControls;
ToolButton2.Click;
end;
EditValueF();
end;
procedure TfrmMachineManage.MCNOPropertiesChange(Sender: TObject);
var
sql: string;
begin
if ADOQueryMain.Active then
begin
sql := SGetFilters(Panel1, 1, 2);
SDofilter(ADOQueryMain, sql);
SCreateCDS(ADOQueryMain, CDS_HZ);
SInitCDSData(ADOQueryMain, CDS_HZ);
end;
end;
procedure TfrmMachineManage.FormDestroy(Sender: TObject);
@ -138,19 +148,6 @@ begin
InitGrid();
end;
procedure TfrmMachineManage.ToolButton2Click(Sender: TObject);
var
sql: string;
begin
if ADOQueryMain.Active then
begin
sql := SGetFilters(Panel1, 1, 2);
SDofilter(ADOQueryMain, sql);
SCreateCDS(ADOQueryMain, CDS_HZ);
SInitCDSData(ADOQueryMain, CDS_HZ);
end;
end;
procedure TfrmMachineManage.ToolButton1Click(Sender: TObject);
begin
if ADOQueryMain.IsEmpty then
@ -189,40 +186,6 @@ begin
fmanage := Trim(DParameters1);
end;
procedure TfrmMachineManage.v2Column8PropertiesEditValueChanged(Sender: TObject);
var
mvalue, FFieldName: string;
begin
mvalue := TcxTextEdit(Sender).EditingText;
FFieldName := Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
try
ADOQueryCmd.Connection.BeginTrans;
with CDS_HZ do
begin
Edit;
FieldByName(FFieldName).Value := Trim(mvalue);
Post;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('UPdate BS_Machine ');
sql.Add(' Set ' + FFieldName + '=''' + Trim(mvalue) + '''');
sql.Add(' , Editer=''' + Trim(DName) + '''');
sql.Add(' , Edittime=getdate()');
sql.Add(' where MCID=' + quotedstr(CDS_HZ.fieldbyname('MCID').AsString));
ExecSQL;
end;
ADOQueryCmd.Connection.CommitTrans;
tv2.Controller.EditingController.ShowEdit();
except
tv2.Controller.EditingController.ShowEdit();
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end
end;
procedure TfrmMachineManage.ToolButton3Click(Sender: TObject);
var
RTValues: TArray<string>;
@ -235,7 +198,7 @@ begin
Application.MessageBox('ÇëÏÈÑ¡ÔñÊý¾Ý£¡', 'Ìáʾ', 0);
Exit;
end;
RTValues := SelCDSKey(CDS_HZ, ['MCID']);
RTValues := SelCDSKey(CDS_HZ, ['VID']);
try
frmLabelPrint := TfrmLabelPrint.Create(Application);
@ -257,21 +220,33 @@ procedure TfrmMachineManage.ToolButton4Click(Sender: TObject);
var
maxId: string;
begin
MCNO.SetFocus;
if GetLSNo(ADOQueryCmd, maxId, 'M', 'BS_Machine', 4, 1) = False then
try
frmMachineInPut := TfrmMachineInPut.Create(Application);
with frmMachineInPut do
begin
Application.MessageBox('取最大号失败!', '提示', 0);
Exit;
end;
with ADOQueryCmd do
FBCId := '';
if ShowModal = 1 then
begin
Close;
sql.Clear;
sql.Add('insert into BS_Machine(Filler) values(' + quotedstr(Trim(dname)) + ')');
ExecSQL;
Self.InitGrid();
end;
InitGrid();
EditValueT();
end;
finally
frmMachineInPut.Free;
end;
// VNO.SetFocus;
// if GetLSNo(ADOQueryCmd, maxId, 'M', 'Bs_Vehicle', 4, 1) = False then
// begin
// Application.MessageBox('È¡×î´óºÅʧ°Ü£¡', 'Ìáʾ', 0);
// Exit;
// end;
// with ADOQueryCmd do
// begin
// Close;
// sql.Clear;
// sql.Add('insert into Bs_Vehicle(Filler) values(' + quotedstr(Trim(dname)) + ')');
// ExecSQL;
// end;
// InitGrid();
end;
procedure TfrmMachineManage.ToolButton5Click(Sender: TObject);
@ -298,7 +273,7 @@ begin
begin
Close;
sql.Clear;
sql.Add('delete BS_Machine where MCID=' + QuotedStr(CDS_HZ.FieldByName('MCID').AsString));
sql.Add('delete Bs_Vehicle where VID=' + QuotedStr(CDS_HZ.FieldByName('VID').AsString));
ExecSQL;
end;
end;
@ -315,28 +290,20 @@ procedure TfrmMachineManage.ToolButton6Click(Sender: TObject);
begin
if CDS_HZ.IsEmpty then
Exit;
EditValueT();
end;
procedure TfrmMachineManage.EditValueT();
var
i: Integer;
try
frmMachineInPut := TfrmMachineInPut.Create(Application);
with frmMachineInPut do
begin
for i := 0 to tv2.ColumnCount - 1 do
FBCId := Trim(CDS_HZ.fieldbyname('VID').AsString);
TBDel.Visible := False;
TBAdd.Visible := False;
if ShowModal = 1 then
begin
if uppercase(tv2.Columns[i].DataBinding.FieldName) <> 'SSEL' then
tv2.Columns[i].Options.Editing := True;
Self.InitGrid();
end;
end;
procedure TfrmMachineManage.EditValueF();
var
i: Integer;
begin
for i := 0 to tv2.ColumnCount - 1 do
begin
if uppercase(tv2.Columns[i].DataBinding.FieldName) <> 'SSEL' then
tv2.Columns[i].Options.Editing := false;
finally
frmMachineInPut.Free;
end;
end;
@ -358,11 +325,11 @@ begin
begin
Close;
sql.Clear;
sql.Add('UPdate BS_Machine ');
sql.Add('UPdate Bs_Vehicle ');
sql.Add(' Set ' + FFieldName + '=''' + Trim(mvalue) + '''');
sql.Add(' , Editer=''' + Trim(DName) + '''');
sql.Add(' , Edittime=getdate()');
sql.Add(' where MCID=' + quotedstr(CDS_HZ.fieldbyname('MCID').AsString));
sql.Add(' where VID=' + quotedstr(CDS_HZ.fieldbyname('VID').AsString));
// ShowMessage(sql.text);
ExecSQL;
end;

View File

@ -0,0 +1,245 @@
inherited frmPositionInPut: TfrmPositionInPut
Left = 88
Top = 141
Caption = #26426#21488#24405#20837
ClientHeight = 333
ClientWidth = 632
Color = clWhite
Font.Height = -16
Position = poMainFormCenter
ExplicitWidth = 648
ExplicitHeight = 372
PixelsPerInch = 96
TextHeight = 21
object cxGrid2: TcxGrid [0]
Left = 0
Top = 79
Width = 632
Height = 254
Align = alClient
TabOrder = 0
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DataSource3
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skCount
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsView.GroupByBox = False
object v1Column2: TcxGridDBColumn
Caption = #24211#20301#32534#21495
DataBinding.FieldName = 'POSNO'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 100
end
object Tv1Column1: TcxGridDBColumn
Caption = #24211#20301#21517#31216
DataBinding.FieldName = 'POSName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 100
end
end
object cxGrid2Level1: TcxGridLevel
GridView = Tv1
end
end
object ToolBar1: TToolBar [1]
Tag = 1
Left = 0
Top = 0
Width = 632
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 99
Caption = 'ToolBar1'
Images = DataLink_BaseInfo.cxImageList_bar
List = True
ShowCaptions = True
TabOrder = 1
object TBSave: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #20445#23384
ImageIndex = 16
OnClick = TBSaveClick
end
object TBAdd: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #26032#22686
ImageIndex = 2
OnClick = TBAddClick
end
object TBDel: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 6
OnClick = TBDelClick
end
object ToolButton1: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton1Click
end
object TBClose: TToolButton
Left = 316
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object Panel1: TPanel [2]
Left = 0
Top = 30
Width = 632
Height = 49
Align = alTop
TabOrder = 2
object Label4: TLabel
Left = 158
Top = 14
Width = 32
Height = 21
Caption = #33539#22260
end
object Label1: TLabel
Left = 256
Top = 14
Width = 7
Height = 21
Caption = '-'
end
object Label2: TLabel
Left = 18
Top = 14
Width = 32
Height = 21
Caption = #21069#32512
end
object Label3: TLabel
Left = 346
Top = 14
Width = 64
Height = 21
Caption = #24211#20301#21517#31216
end
object cxtxtdtQS: TcxTextEdit
Tag = 2
Left = 194
Top = 8
ParentColor = True
ParentFont = False
TabOrder = 0
Width = 58
end
object cxtxtdtJS: TcxTextEdit
Tag = 2
Left = 267
Top = 8
ParentColor = True
ParentFont = False
TabOrder = 1
Width = 58
end
object QZ: TcxTextEdit
Tag = 2
Left = 54
Top = 8
ParentColor = True
ParentFont = False
TabOrder = 2
Width = 100
end
object POSName: TcxTextEdit
Tag = 2
Left = 416
Top = 8
ParentColor = True
ParentFont = False
TabOrder = 3
Width = 100
end
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
Left = 225
Top = 136
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
Left = 73
Top = 161
end
inherited ImageList_new32: TImageList
Left = 248
Top = 288
end
inherited cxImageList_bar: TcxImageList
FormatVersion = 1
end
object DataSource3: TDataSource
DataSet = CDS_Sub
Left = 576
Top = 136
end
object CDS_Sub: TClientDataSet
Aggregates = <>
Params = <>
Left = 528
Top = 192
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
Parameters = <>
Left = 328
Top = 136
end
object ADOQueryMain: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 408
Top = 136
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 496
Top = 136
end
object cxGridPopupMenu2: TcxGridPopupMenu
Grid = cxGrid2
PopupMenus = <>
Left = 160
Top = 192
end
end

View File

@ -0,0 +1,252 @@
unit U_PositionInPut;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, cxCalendar, cxDropDownEdit, ComCtrls, ToolWin,
cxGridLevel, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
cxClasses, cxControls, cxGridCustomView, cxGrid, cxGridCustomPopupMenu,
cxGridPopupMenu, ADODB, DBClient, cxButtonEdit, cxTextEdit, StdCtrls, ExtCtrls,
StrUtils, U_BaseInput, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
dxDateRanges, dxScrollbarAnnotations, cxContainer, dxBarBuiltInMenu,
System.ImageList, Vcl.ImgList, cxImageList;
type
TfrmPositionInPut = class(TfrmBaseInput)
cxGrid2: TcxGrid;
Tv1: TcxGridDBTableView;
v1Column2: TcxGridDBColumn;
cxGrid2Level1: TcxGridLevel;
ToolBar1: TToolBar;
TBAdd: TToolButton;
TBDel: TToolButton;
TBSave: TToolButton;
TBClose: TToolButton;
DataSource3: TDataSource;
CDS_Sub: TClientDataSet;
ADOQueryCmd: TADOQuery;
ADOQueryMain: TADOQuery;
ADOQueryTemp: TADOQuery;
cxGridPopupMenu2: TcxGridPopupMenu;
ToolButton1: TToolButton;
Tv1Column1: TcxGridDBColumn;
Panel1: TPanel;
cxtxtdtQS: TcxTextEdit;
cxtxtdtJS: TcxTextEdit;
Label4: TLabel;
Label1: TLabel;
QZ: TcxTextEdit;
Label2: TLabel;
Label3: TLabel;
POSName: TcxTextEdit;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBAddClick(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBDelClick(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
private
{ Private declarations }
function SaveCKData(): Boolean;
public
{ Public declarations }
FBCId, FSTKName: string;
end;
var
frmPositionInPut: TfrmPositionInPut;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp;
{$R *.dfm}
procedure TfrmPositionInPut.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
Action := caFree;
end;
procedure TfrmPositionInPut.TBAddClick(Sender: TObject);
var
I: Integer;
begin
for I := strtointdef(cxtxtdtQS.Text, 0) to strtointdef(cxtxtdtJS.Text, 0) do
begin
with CDS_Sub do
begin
Append;
CDS_Sub.fieldbyname('POSNO').Value := Trim(QZ.Text) + RightStr(('0000' + inttostr(I)), 5);
CDS_Sub.fieldbyname('POSName').Value := Trim(POSName.Text);
Post;
end;
end;
end;
function TfrmPositionInPut.SaveCKData(): Boolean;
var
MaxNo, MWBID: string;
begin
try
ADOQueryCmd.Connection.BeginTrans;
CDS_Sub.DisableControls;
with CDS_Sub do
begin
First;
while not eof do
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select * from BS_Position where POSID=''' + Trim(CDS_Sub.fieldbyname('POSID').AsString) + '''');
open;
end;
MWBID := Trim(ADOQueryTemp.fieldbyname('POSID').AsString);
if Trim(MWBID) = '' then
begin
if GetLSNo(ADOQueryCmd, MaxNo, 'M', 'BS_Position', 4, 1) = False then
raise Exception.Create('取最大号失败!');
end
else
begin
MaxNo := Trim(MWBID);
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('select * from BS_Position where POSID=''' + Trim(MaxNo) + '''');
Open;
end;
with ADOQueryCmd do
begin
if Trim(MWBID) = '' then
begin
Append;
FieldByName('Fillid').Value := Trim(Dcode);
FieldByName('Filler').Value := Trim(DName)
end
else
begin
Edit;
FieldByName('Editid').Value := Trim(Dcode);
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDate(ADOQueryTemp);
end;
FieldByName('POSID').Value := Trim(MaxNo);
// FieldByName('STKName').Value := Trim(FSTKName);
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_Sub, 'BS_Position', 0);
Post;
end;
Edit;
FieldByName('POSID').Value := Trim(MaxNo);
Post;
Next;
end;
end;
CDS_Sub.EnableControls;
ADOQueryCmd.Connection.CommitTrans;
Result := True;
except
Result := False;
ADOQueryCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
end;
end;
procedure TfrmPositionInPut.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmPositionInPut.FormShow(Sender: TObject);
var
fsj: string;
begin
inherited;
ReadCxGrid(trim(self.Caption), Tv1, '染色坯布仓库');
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add(' select A.* ');
sql.Add(' from BS_Position A');
sql.Add(' where POSID=''' + Trim(FBCId) + '''');
Open;
end;
SCreateCDS(ADOQueryTemp, CDS_Sub);
SInitCDSData(ADOQueryTemp, CDS_Sub);
end;
procedure TfrmPositionInPut.TBDelClick(Sender: TObject);
begin
if CDS_Sub.IsEmpty then
Exit;
if Trim(CDS_Sub.fieldbyname('POSID').AsString) <> '' then
begin
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
try
ADOQueryCmd.Connection.BeginTrans;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add(' delete BS_Position where POSID=''' + Trim(CDS_Sub.fieldbyname('POSID').AsString) + '''');
ExecSQL;
end;
ADOQueryCmd.Connection.CommitTrans;
CDS_Sub.Delete;
except
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('删除异常!', '提示', 0);
end;
end
else
begin
CDS_Sub.Delete;
end;
end;
procedure TfrmPositionInPut.TBSaveClick(Sender: TObject);
begin
if CDS_Sub.IsEmpty then
Exit;
if CDS_Sub.Locate('POSNO', null, []) = True then
begin
Application.MessageBox('编号不能为空!', '提示', 0);
Exit;
end;
if SaveCKData() then
begin
Application.MessageBox('保存成功!', '提示', 0);
ModalResult := 1;
Exit;
end;
end;
procedure TfrmPositionInPut.ToolButton1Click(Sender: TObject);
begin
WriteCxGrid(trim(self.Caption), Tv1, '染色坯布仓库');
end;
end.

View File

@ -4,28 +4,29 @@ inherited frmPositionList: TfrmPositionList
Caption = #24211#20301#31649#29702
ClientHeight = 532
ClientWidth = 1107
Font.Height = -16
KeyPreview = True
ExplicitWidth = 1123
ExplicitHeight = 571
PixelsPerInch = 96
TextHeight = 12
TextHeight = 21
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1107
Height = 38
Height = 30
AutoSize = True
ButtonHeight = 38
ButtonWidth = 75
ButtonHeight = 30
ButtonWidth = 67
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_BaseInfo.ImageList_new32
Images = DataLink_BaseInfo.ImageList_new32
DisabledImages = DataLink_BaseInfo.cxImageList_bar
Images = DataLink_BaseInfo.cxImageList_bar
List = True
ParentColor = False
ShowCaptions = True
TabOrder = 0
TabOrder = 3
object TBRafresh: TToolButton
Left = 0
Top = 0
@ -43,22 +44,22 @@ inherited frmPositionList: TfrmPositionList
Visible = False
OnClick = ToolButton2Click
end
object ToolButton6: TToolButton
object ToolButton4: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #26032#22686
ImageIndex = 9
OnClick = ToolButton4Click
end
object ToolButton6: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #20462#25913
ImageIndex = 3
OnClick = ToolButton6Click
end
object ToolButton4: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #22686#34892
ImageIndex = 2
OnClick = ToolButton4Click
end
object ToolButton5: TToolButton
Left = 284
Top = 0
@ -94,9 +95,9 @@ inherited frmPositionList: TfrmPositionList
end
object cxGrid2: TcxGrid [1]
Left = 0
Top = 96
Top = 88
Width = 1107
Height = 436
Height = 444
Align = alClient
PopupMenu = PopupMenu1
TabOrder = 2
@ -104,6 +105,7 @@ inherited frmPositionList: TfrmPositionList
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_HZ
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
@ -131,27 +133,29 @@ inherited frmPositionList: TfrmPositionList
OptionsData.Deleting = False
OptionsData.DeletingConfirmation = False
OptionsView.GroupByBox = False
Styles.Header = DataLink_BaseInfo.Default
object v2Column1: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
HeaderAlignmentHorz = taCenter
end
object v2Column12: TcxGridDBColumn
Caption = #24211#20301#32534#21495
DataBinding.FieldName = 'POSNO'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 149
end
object v2Column8: TcxGridDBColumn
Caption = #24211#20301#21517#31216
DataBinding.FieldName = 'POSName'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v2Column8PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 180
end
end
@ -161,31 +165,44 @@ inherited frmPositionList: TfrmPositionList
end
object Panel1: TPanel [2]
Left = 0
Top = 38
Top = 30
Width = 1107
Height = 58
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 1
TabOrder = 4
object Label1: TLabel
Left = 66
Top = 20
Width = 48
Height = 12
Left = 58
Top = 19
Width = 64
Height = 21
Caption = #24211#20301#32534#21495
end
object POSNO: TEdit
Tag = 2
Left = 120
Top = 16
Width = 89
Height = 20
Left = 126
Top = 15
Width = 120
Height = 29
TabOrder = 0
OnChange = CustomerChange
end
end
inherited loadProcess: TPanel
Left = 730
Top = 246
ExplicitLeft = 730
ExplicitTop = 246
end
inherited cxProgressBar2: TcxProgressBar
Left = 594
Top = 138
ExplicitLeft = 594
ExplicitTop = 138
ExplicitHeight = 29
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_BaseInfo.ADOLink
Left = 417

View File

@ -13,8 +13,9 @@ uses
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
cxTextEdit, cxPC, cxCheckComboBox, cxDropDownEdit, Menus, RM_e_Xls,
cxLookAndFeels, cxLookAndFeelPainters,
cxNavigator, dxDateRanges, dxBarBuiltInMenu, U_BaseList, RM_BarCode;
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxDateRanges,
dxBarBuiltInMenu, U_BaseList, RM_BarCode, dxScrollbarAnnotations, cxContainer,
cxProgressBar;
type
TfrmPositionList = class(TfrmBaseList)
@ -62,7 +63,6 @@ type
procedure N2Click(Sender: TObject);
procedure CustomerChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure v2Column8PropertiesEditValueChanged(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure ToolButton4Click(Sender: TObject);
procedure ToolButton5Click(Sender: TObject);
@ -71,8 +71,6 @@ type
{ Private declarations }
procedure PrintReport(FZDYNo: string);
procedure InitGrid();
procedure EditValueT();
procedure EditValueF();
public
fFlag: integer;
{ Public declarations }
@ -85,7 +83,7 @@ var
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp, U_LabelPrint;
U_DataLink, U_RTFun, U_ZDYHelp, U_LabelPrint, U_PositionInPut;
{$R *.dfm}
@ -136,29 +134,6 @@ begin
ADOQueryMain.EnableControls;
ToolButton2.Click;
end;
EditValueF();
end;
procedure TfrmPositionList.EditValueT();
var
i: Integer;
begin
for i := 0 to tv2.ColumnCount - 1 do
begin
if uppercase(tv2.Columns[i].DataBinding.FieldName) <> 'SSEL' then
tv2.Columns[i].Options.Editing := True;
end;
end;
procedure TfrmPositionList.EditValueF();
var
i: Integer;
begin
for i := 0 to tv2.ColumnCount - 1 do
begin
if uppercase(tv2.Columns[i].DataBinding.FieldName) <> 'SSEL' then
tv2.Columns[i].Options.Editing := false;
end;
end;
procedure TfrmPositionList.FormDestroy(Sender: TObject);
@ -244,40 +219,6 @@ begin
fmanage := Trim(DParameters1);
end;
procedure TfrmPositionList.v2Column8PropertiesEditValueChanged(Sender: TObject);
var
mvalue, FFieldName: string;
begin
mvalue := TcxTextEdit(Sender).EditingText;
FFieldName := Trim(Tv2.Controller.FocusedColumn.DataBinding.FilterFieldName);
try
ADOQueryCmd.Connection.BeginTrans;
with CDS_HZ do
begin
Edit;
FieldByName(FFieldName).Value := Trim(mvalue);
Post;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('UPdate BS_Position ');
sql.Add(' Set ' + FFieldName + '=''' + Trim(mvalue) + '''');
sql.Add(' , Editer=''' + Trim(DName) + '''');
sql.Add(' , Edittime=getdate()');
sql.Add(' where POSID=' + quotedstr(CDS_HZ.fieldbyname('POSID').AsString));
ExecSQL;
end;
ADOQueryCmd.Connection.CommitTrans;
tv2.Controller.EditingController.ShowEdit();
except
tv2.Controller.EditingController.ShowEdit();
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('保存失败!', '提示', 0);
end
end;
procedure TfrmPositionList.ToolButton3Click(Sender: TObject);
var
RTValues: TArray<string>;
@ -309,24 +250,20 @@ begin
end;
procedure TfrmPositionList.ToolButton4Click(Sender: TObject);
var
maxId: string;
begin
POSNO.SetFocus;
if GetLSNo(ADOQueryCmd, maxId, 'KW', 'BS_Position', 4, 1) = False then
try
frmPositionInPut := TfrmPositionInPut.Create(Application);
with frmPositionInPut do
begin
Application.MessageBox('取最大号失败!', '提示', 0);
Exit;
FBCId := '';
if ShowModal = 1 then
begin
Self.InitGrid();
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('insert into BS_Position(POSID,Filler) values(' + quotedstr(Trim(maxId)) + ',' + quotedstr(Trim(dname)) + ')');
ExecSQL;
end;
InitGrid();
EditValueT();
finally
frmPositionInPut.Free;
end;
end;
procedure TfrmPositionList.ToolButton5Click(Sender: TObject);
@ -368,13 +305,24 @@ begin
end;
procedure TfrmPositionList.ToolButton6Click(Sender: TObject);
var
i: Integer;
begin
if CDS_HZ.IsEmpty then
Exit;
EditValueT();
try
frmPositionInPut := TfrmPositionInPut.Create(Application);
with frmPositionInPut do
begin
FBCId := Trim(CDS_HZ.fieldbyname('POSID').AsString);
TBDel.Visible := False;
TBAdd.Visible := False;
if ShowModal = 1 then
begin
Self.InitGrid();
end;
end;
finally
frmPositionInPut.Free;
end;
end;
end.

View File

@ -124,7 +124,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
<Debugger_HostApplication>D:\Dp10RepoV1\项目代码\D10myXushang\T01贸易生产计划\testDll.exe</Debugger_HostApplication>
<Debugger_HostApplication>D:\Dp10RepoV1\项目代码\D10xhGemei\T01贸易生产计划\testDll.exe</Debugger_HostApplication>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">

View File

@ -72,14 +72,9 @@ begin
if trim(DataBaseStr) = '' then
begin
server := '101.132.143.144,7781';
dtbase := 'xushangData';
dtbase := 'gemeiData';
user := 'rtsa';
pswd := 'rightsoft@5740';
// server := '127.0.0.1';
// dtbase := 'xushangData';
// user := 'sa';
// pswd := 'rightsoft@123';
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
Parameters1 := '¹ÜÀí';
// Parameters1 := '¼Èë';

View File

@ -2,7 +2,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Left = 143
Top = 4
Caption = #29983#20135#35745#21010#21333#24405#20837
ClientHeight = 845
ClientHeight = 808
ClientWidth = 1722
Font.Charset = GB2312_CHARSET
Font.Height = -16
@ -11,7 +11,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
OnClose = FormClose
OnResize = FormResize
ExplicitWidth = 1738
ExplicitHeight = 884
ExplicitHeight = 847
PixelsPerInch = 96
TextHeight = 21
object Label51: TLabel [0]
@ -87,7 +87,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Left = 0
Top = 30
Width = 1722
Height = 362
Height = 335
Align = alTop
BevelInner = bvNone
BevelOuter = bvNone
@ -113,9 +113,9 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
object Label1: TLabel
Left = 13
Top = 96
Width = 48
Width = 64
Height = 21
Caption = #35746#21333#21495
Caption = #35745#21010#21333#21495
end
object Label2: TLabel
Left = 329
@ -132,7 +132,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Caption = #23458#25143#21333#21495
end
object Label6: TLabel
Left = 600
Left = 329
Top = 135
Width = 64
Height = 21
@ -147,7 +147,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
end
object Label9: TLabel
Left = 13
Top = 170
Top = 174
Width = 32
Height = 21
Caption = #25104#20998
@ -195,18 +195,20 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Caption = #23436#25104#24230
end
object Label16: TLabel
Left = 13
Top = 131
Left = 1193
Top = 245
Width = 32
Height = 21
Caption = #24067#31181
Visible = False
end
object Label17: TLabel
Left = 329
Top = 135
Left = 1509
Top = 249
Width = 48
Height = 21
Caption = #21152#24037#21035
Visible = False
end
object Label18: TLabel
Left = 13
@ -220,7 +222,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Top = 53
Width = 64
Height = 21
Caption = #35746#21333#31867#22411
Caption = #35745#21010#31867#22411
end
object Label38: TLabel
Left = 876
@ -257,13 +259,6 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Height = 21
Caption = #21518#25972#29702#33521#25991
end
object Label26: TLabel
Left = 324
Top = 289
Width = 64
Height = 21
Caption = #29992#36884#21035#31216
end
object Label29: TLabel
Left = 600
Top = 252
@ -278,30 +273,16 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Height = 21
Caption = #20184#27454#26041#24335
end
object Label31: TLabel
Left = 13
Top = 279
Width = 103
Height = 42
Caption = #26579#21378'/'#21518#21152#24037#21378#13#10'('#24320#21457#21333')'
end
object Label32: TLabel
Left = 600
Top = 279
Width = 58
Height = 42
Caption = #22791#27880'2'#13#10'('#24320#21457#21333')'
end
object lbl23: TLabel
Left = 13
Top = 330
Top = 295
Width = 80
Height = 21
Caption = #19979#21333#31867#22411#65306
end
object Label12: TLabel
Left = 1356
Top = 285
Left = 1166
Top = 47
Width = 80
Height = 21
AutoSize = False
@ -309,8 +290,8 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Visible = False
end
object Label13: TLabel
Left = 1356
Top = 324
Left = 1166
Top = 86
Width = 80
Height = 21
AutoSize = False
@ -324,6 +305,13 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Height = 21
Caption = '%'
end
object Label23: TLabel
Left = 13
Top = 135
Width = 64
Height = 21
Caption = #20135#21697#32534#21495
end
object OrderNo: TcxTextEdit
Tag = 1
Left = 123
@ -340,7 +328,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
end
object C_Name: TcxTextEdit
Tag = 2
Left = 673
Left = 396
Top = 129
TabOrder = 2
Width = 475
@ -458,16 +446,18 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
end
object GC_Name: TcxTextEdit
Tag = 2
Left = 123
Top = 129
Left = 1303
Top = 243
TabOrder = 14
Visible = False
Width = 200
end
object CraftCode: TcxTextEdit
Tag = 2
Left = 396
Top = 129
Left = 1576
Top = 243
TabOrder = 15
Visible = False
Width = 200
end
object CraftName: TcxTextEdit
@ -521,28 +511,11 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
TabOrder = 20
Width = 200
end
object ClothUse: TcxButtonEdit
Tag = 1
Left = 394
Top = 285
Hint = 'ClothUse/'#29992#36884#21035
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
Properties.OnButtonClick = QtyNotePropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 21
OnDblClick = CustNameDblClick
Width = 200
end
object SalesId: TcxTextEdit
Tag = 1
Left = 1385
Top = 84
TabOrder = 22
TabOrder = 21
Visible = False
Width = 200
end
@ -550,7 +523,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Tag = 1
Left = 1385
Top = 123
TabOrder = 23
TabOrder = 22
Visible = False
Width = 200
end
@ -558,7 +531,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Tag = 1
Left = 1385
Top = 168
TabOrder = 24
TabOrder = 23
Visible = False
Width = 200
end
@ -566,7 +539,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Tag = 1
Left = 1385
Top = 207
TabOrder = 25
TabOrder = 24
Visible = False
Width = 200
end
@ -578,7 +551,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Properties.Items.Strings = (
#26159
#21542)
TabOrder = 26
TabOrder = 25
Text = #26159
Width = 197
end
@ -595,57 +568,34 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Properties.ReadOnly = False
Properties.OnButtonClick = QtyNotePropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 27
TabOrder = 26
OnDblClick = CustNameDblClick
Width = 200
end
object FactoryName: TcxButtonEdit
Tag = 1
Left = 123
Top = 285
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = True
Properties.OnButtonClick = FactoryNamePropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 28
OnDblClick = CustNameDblClick
Width = 200
end
object Note2: TcxTextEdit
Tag = 1
Left = 673
Top = 285
TabOrder = 29
Width = 473
end
object OrdReason: TcxComboBox
Tag = 1
Left = 123
Top = 326
Top = 289
Properties.Items.Strings = (
#27491#24120#29983#20135
#23458#35785#34917#25237)
TabOrder = 30
TabOrder = 27
Text = #27491#24120#29983#20135
Width = 200
end
object C_EComposition: TcxTextEdit
Tag = 2
Left = 1440
Top = 279
TabOrder = 31
Left = 1250
Top = 41
TabOrder = 28
Visible = False
Width = 133
end
object C_EName: TcxTextEdit
Tag = 2
Left = 1440
Top = 318
TabOrder = 32
Left = 1250
Top = 80
TabOrder = 29
Visible = False
Width = 133
end
@ -654,7 +604,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Left = 396
Top = 248
Properties.AssignedValues.DisplayFormat = True
TabOrder = 33
TabOrder = 30
Width = 165
end
object Tallyer: TcxButtonEdit
@ -669,27 +619,37 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Properties.ReadOnly = True
Properties.OnButtonClick = TallyerPropertiesButtonClick
Style.ButtonStyle = btsDefault
TabOrder = 34
TabOrder = 31
OnDblClick = TallyerDblClick
Width = 200
end
object C_Code: TcxTextEdit
Tag = 2
Left = 123
Top = 129
TabOrder = 32
Width = 200
end
end
object cxPageControl3: TcxPageControl [4]
Left = 0
Top = 392
Top = 365
Width = 1722
Height = 453
Height = 443
Align = alClient
TabOrder = 2
Properties.ActivePage = cxTabSheet2
Properties.CustomButtons.Buttons = <>
Properties.Style = 9
ClientRectBottom = 453
ExplicitTop = 392
ExplicitHeight = 453
ClientRectBottom = 443
ClientRectRight = 1722
ClientRectTop = 28
object cxTabSheet2: TcxTabSheet
Caption = ' '#20135#21697#35814#24773' '
ImageIndex = 1
ExplicitHeight = 425
object tlb2: TToolBar
Tag = 1
Left = 0
@ -708,16 +668,8 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
ParentColor = False
ShowCaptions = True
TabOrder = 0
object btnConSel: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #38144#21806#21512#21516
ImageIndex = 12
OnClick = btnConSelClick
end
object ToolButton5: TToolButton
Left = 103
Left = 0
Top = 0
AutoSize = True
Caption = #20135#21697#26723#26696
@ -725,7 +677,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
OnClick = ToolButton5Click
end
object ToolButton7: TToolButton
Left = 206
Left = 103
Top = 0
AutoSize = True
Caption = #24555#36895#26032#22686
@ -734,7 +686,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
OnClick = ToolButton7Click
end
object ToolButton4: TToolButton
Left = 309
Left = 206
Top = 0
AutoSize = True
Caption = 'Excel'
@ -743,7 +695,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
OnClick = ToolButton4Click
end
object ToolButton1: TToolButton
Left = 386
Left = 283
Top = 0
AutoSize = True
Caption = #22686#34892
@ -751,7 +703,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
OnClick = ToolButton1Click
end
object ToolButton6: TToolButton
Left = 457
Left = 354
Top = 0
AutoSize = True
Caption = #22686#31354#34892
@ -759,7 +711,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
OnClick = ToolButton6Click
end
object ToolButton2: TToolButton
Left = 544
Left = 441
Top = 0
AutoSize = True
Caption = #21024#34892
@ -767,22 +719,33 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
OnClick = ToolButton2Click
end
object ToolButton8: TToolButton
Left = 615
Left = 512
Top = 0
AutoSize = True
Caption = #35745#31639#25237#22383#25968#37327
ImageIndex = 49
OnClick = ToolButton8Click
end
object btnConSel: TToolButton
Left = 647
Top = 0
AutoSize = True
Caption = #38144#21806#21512#21516
ImageIndex = 12
Visible = False
OnClick = btnConSelClick
end
end
object cxGrid1: TcxGrid
Left = 0
Top = 30
Width = 1722
Height = 395
Height = 385
Align = alClient
PopupMenu = PM_1
TabOrder = 1
ExplicitLeft = 2
ExplicitTop = 28
object TV1: TcxGridDBTableView
OnMouseDown = TV1MouseDown
Navigator.Buttons.CustomButtons = <>
@ -1016,13 +979,15 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
object cxTabSheet3: TcxTabSheet
Caption = ' '#21152#24037#35201#27714' '
ImageIndex = 3
ExplicitHeight = 425
object ScrollBox2: TScrollBox
Left = 0
Top = 30
Width = 1722
Height = 395
Height = 385
Align = alClient
TabOrder = 0
ExplicitHeight = 395
object Label5: TLabel
Left = 30
Top = 62
@ -1535,6 +1500,9 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
object cxTabSheet4: TcxTabSheet
Caption = ' '#25216#26415#35201#27714' '
ImageIndex = 3
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object cxGrid2: TcxGrid
Left = 0
Top = 30
@ -1699,6 +1667,7 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
object cxTabSheet1: TcxTabSheet
Caption = ' '#21462#26679#19982#21253#35013#35201#27714' '
ImageIndex = 2
ExplicitHeight = 425
object cxGroupBox3: TcxGroupBox
Left = 785
Top = 0
@ -1706,7 +1675,8 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Caption = #21367#26631#31614
ParentFont = False
TabOrder = 0
Height = 425
ExplicitHeight = 425
Height = 415
Width = 937
object cxDBImage4: TcxDBImage
Left = 4
@ -1725,7 +1695,8 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
StyleHot.LookAndFeel.NativeStyle = True
TabOrder = 0
OnDblClick = cxDBImage1DblClick
Height = 394
ExplicitHeight = 394
Height = 384
Width = 929
end
end
@ -1733,9 +1704,10 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
Left = 0
Top = 0
Width = 785
Height = 425
Height = 415
Align = alLeft
TabOrder = 1
ExplicitHeight = 425
object lbl1: TLabel
Left = 29
Top = 410
@ -2125,6 +2097,9 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
end
inherited cxImageList_bar: TcxImageList
FormatVersion = 1
Left = 1246
Top = 159
DesignInfo = 10421470
end
object ADOTemp: TADOQuery
Connection = DataLink_TradePlan.ADOLink

View File

@ -177,8 +177,6 @@ type
CraftEName: TcxTextEdit;
Label24: TLabel;
ShippingMark: TcxMemo;
Label26: TLabel;
ClothUse: TcxButtonEdit;
TV1Column11: TcxGridDBColumn;
TV1Column12: TcxGridDBColumn;
TV1Column13: TcxGridDBColumn;
@ -193,10 +191,6 @@ type
ISTax: TcxComboBox;
Label30: TLabel;
PayMent: TcxButtonEdit;
Label31: TLabel;
FactoryName: TcxButtonEdit;
Label32: TLabel;
Note2: TcxTextEdit;
TV1Column15: TcxGridDBColumn;
ScrollBox2: TScrollBox;
Label5: TLabel;
@ -251,6 +245,8 @@ type
Tallyer: TcxButtonEdit;
ToolBar3: TToolBar;
ToolButton9: TToolButton;
Label23: TLabel;
C_Code: TcxTextEdit;
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
@ -294,7 +290,6 @@ type
procedure TV2Column2PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure FollowerPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure TV2Column3PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure FactoryNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormDestroy(Sender: TObject);
procedure FormResize(Sender: TObject);
@ -595,35 +590,6 @@ var
begin
end;
procedure TfrmTradePlanInPut.FactoryNamePropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmCompanySel := TfrmCompanySel.Create(Application);
with frmCompanySel do
begin
FCoType := '¹©Ó¦ÉÌ';
if ShowModal = 1 then
begin
if Trim(self.FactoryName.Properties.LookupItems.Text) <> '' then
begin
self.FactoryName.Properties.LookupItems.Text := self.FactoryName.Properties.LookupItems.Text + '/' + Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
self.FactoryName.Text := self.FactoryName.Text + '/' + Trim(frmCompanySel.CDS_1.fieldbyname('CoAbbrName').AsString);
end
else
begin
self.FactoryName.Properties.LookupItems.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
self.FactoryName.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAbbrName').AsString);
end;
end;
end;
finally
frmCompanySel.Free;
end;
end;
procedure TfrmTradePlanInPut.FollowerPropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
@ -764,7 +730,6 @@ begin
FieldByName('OrdType').Value := '´ó»õµ¥';
FieldByName('OurCoNo').Value := Trim(OurCoName.Properties.LookupItems.Text);
FieldByName('CustNo').Value := Trim(CustName.Properties.LookupItems.Text);
FieldByName('FactoryNo').Value := Trim(FactoryName.Properties.LookupItems.Text);
Post;
end;
@ -1272,14 +1237,25 @@ begin
begin
if ShowModal = 1 then
begin
while CDS_1.locate('SSel', true, []) do
with CDS_3 do
begin
DisableControls;
First;
while not eof do
begin
if FieldByName('SSEL').AsBoolean then
begin
with self.CDS_1 do
begin
append;
FieldByName('SSel').Value := false;
Fieldbyname('C_Code').value := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Code').AsString);
self.C_Code.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Code').AsString);
self.C_Name.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Name').AsString);
self.C_EName.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_EName').AsString);
@ -1294,14 +1270,48 @@ begin
self.CraftName.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('CraftName').AsString);
self.CraftEName.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('CraftEName').AsString);
Fieldbyname('C_ColorNo').value := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_ColorNo').AsString);
Fieldbyname('C_Color').value := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Color').AsString);
Fieldbyname('C_Pattern').value := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Pattern').AsString);
Fieldbyname('C_ColorNo').value := trim(frmClothInfoSel.CDS_3.Fieldbyname('C_ColorNo').AsString);
Fieldbyname('C_Color').value := trim(frmClothInfoSel.CDS_3.Fieldbyname('C_Color').AsString);
Fieldbyname('C_Pattern').value := trim(frmClothInfoSel.CDS_3.Fieldbyname('C_Pattern').AsString);
Fieldbyname('C_StyleNo').value := trim(frmClothInfoSel.CDS_3.Fieldbyname('C_StyleNo').AsString);
Fieldbyname('SerialNo').value := 999;
end;
CDS_1.Edit;
CDS_1.fieldbyname('SSel').value := false;
end;
Next;
end;
EnableControls;
end;
// while CDS_1.locate('SSel', true, []) do
// begin
//
// with self.CDS_1 do
// begin
// append;
// FieldByName('SSel').Value := false;
// Fieldbyname('C_Code').value := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Code').AsString);
// self.C_Name.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Name').AsString);
// self.C_EName.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_EName').AsString);
//
// self.C_Spec.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Spec').AsString);
// self.C_Composition.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Composition').AsString);
// self.C_EComposition.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_EComposition').AsString);
//
// self.C_Width.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Width').AsString);
// self.C_GramWeight.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_GramWeight').AsString);
// self.GC_Name.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('GC_Name').AsString);
// self.CraftCode.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('CraftCode').AsString);
// self.CraftName.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('CraftName').AsString);
// self.CraftEName.Text := trim(frmClothInfoSel.CDS_1.Fieldbyname('CraftEName').AsString);
//
// Fieldbyname('C_ColorNo').value := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_ColorNo').AsString);
// Fieldbyname('C_Color').value := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Color').AsString);
// Fieldbyname('C_Pattern').value := trim(frmClothInfoSel.CDS_1.Fieldbyname('C_Pattern').AsString);
// Fieldbyname('SerialNo').value := 999;
// end;
// CDS_1.Edit;
// CDS_1.fieldbyname('SSel').value := false;
// end;
end;
end;
finally
@ -1398,7 +1408,6 @@ begin
Open;
end;
Feel.Text := trim(ADOTemp.FieldByName('Feel').AsString);
LightNote.Text := trim(ADOTemp.FieldByName('LightNote').AsString);
LightType.Text := trim(ADOTemp.FieldByName('LightType').AsString);

View File

@ -72,7 +72,9 @@ uses
U_printPdf in '..\..\..\public10\ThreeFun\Fun\U_printPdf.pas',
U_CustomFun in '..\A00通用方法\U_CustomFun.pas',
U_TradeClothSplit in 'U_TradeClothSplit.pas' {frmTradeClothSplit},
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas';
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
U_TradeRRList in 'U_TradeRRList.pas' {frmTradeRRList},
U_TradeRRInPut in 'U_TradeRRInPut.pas' {frmTradeRRInPut};
{$R *.res}

View File

@ -124,7 +124,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
<Debugger_HostApplication>D:\Dp10RepoV1\项目代码\D10myXushang\T02贸易汇总仓库\testDll.exe</Debugger_HostApplication>
<Debugger_HostApplication>D:\Dp10RepoV1\项目代码\D10xhGemei\T02贸易汇总仓库\testDll.exe</Debugger_HostApplication>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
@ -354,6 +354,14 @@
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
<DCCReference Include="U_TradeRRList.pas">
<Form>frmTradeRRList</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_TradeRRInPut.pas">
<Form>frmTradeRRInPut</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>

View File

@ -2,14 +2,14 @@ inherited frmClothScheduleList: TfrmClothScheduleList
Left = 246
Top = 116
Caption = #24067#21305#21152#24037#35745#21010
ClientHeight = 585
ClientHeight = 725
ClientWidth = 1520
Color = clBtnFace
Font.Height = -16
FormStyle = fsMDIChild
Visible = True
ExplicitWidth = 1536
ExplicitHeight = 624
ExplicitHeight = 764
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
@ -150,7 +150,9 @@ inherited frmClothScheduleList: TfrmClothScheduleList
Width = 1516
Height = 37
Align = alTop
Color = clWhite
ParentBackground = False
ParentColor = False
TabOrder = 3
ExplicitLeft = 2
ExplicitTop = 2
@ -192,10 +194,12 @@ inherited frmClothScheduleList: TfrmClothScheduleList
Left = 0
Top = 143
Width = 1520
Height = 173
Height = 313
Align = alClient
BorderStyle = cxcbsNone
TabOrder = 2
ExplicitLeft = -113
ExplicitTop = 247
object TV1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -447,13 +451,13 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object ToolBar2: TToolBar [3]
Tag = 1
Left = 0
Top = 316
Top = 456
Width = 1520
Height = 30
Align = alBottom
AutoSize = True
ButtonHeight = 30
ButtonWidth = 99
ButtonWidth = 83
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_TradeTotalClothStk.cxImageList_bar
@ -462,48 +466,17 @@ inherited frmClothScheduleList: TfrmClothScheduleList
ParentColor = False
ShowCaptions = True
TabOrder = 3
object ToolButton2: TToolButton
ExplicitTop = 316
object ToolButton5: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #22383#24067#39044#25237
ImageIndex = 2
OnClick = ToolButton2Click
end
object ToolButton5: TToolButton
Left = 103
Top = 0
AutoSize = True
Caption = #23454#38469#25237#20837
Caption = #22383#24067#25237#22383
ImageIndex = 6
OnClick = ToolButton5Click
end
object ToolButton6: TToolButton
Left = 206
Top = 0
AutoSize = True
Caption = #35746#21333#23436#24037
ImageIndex = 2
OnClick = ToolButton6Click
end
object ToolButton9: TToolButton
Left = 309
Top = 0
AutoSize = True
Caption = #21518#25972#39044#25237
ImageIndex = 2
OnClick = ToolButton9Click
end
object ToolButton10: TToolButton
Left = 412
Top = 0
AutoSize = True
Caption = #21518#25972#25237#20837
ImageIndex = 6
OnClick = ToolButton10Click
end
object ToolButton11: TToolButton
Left = 515
Left = 87
Top = 0
AutoSize = True
Caption = #35746#21333#23436#24037
@ -511,7 +484,7 @@ inherited frmClothScheduleList: TfrmClothScheduleList
OnClick = ToolButton11Click
end
object ToolButton3: TToolButton
Left = 618
Left = 174
Top = 0
AutoSize = True
Caption = #38754#26009#20986#24211
@ -519,7 +492,7 @@ inherited frmClothScheduleList: TfrmClothScheduleList
OnClick = ToolButton3Click
end
object ToolButton12: TToolButton
Left = 721
Left = 261
Top = 0
AutoSize = True
Caption = #29983#20135#22791#27880
@ -527,34 +500,41 @@ inherited frmClothScheduleList: TfrmClothScheduleList
OnClick = ToolButton12Click
end
object ToolButton4: TToolButton
Left = 824
Left = 348
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
OnClick = ToolButton4Click
end
object ToolButton2: TToolButton
Left = 411
Top = 0
AutoSize = True
Caption = #22383#24067#39044#25237
ImageIndex = 2
Visible = False
OnClick = ToolButton2Click
end
end
object cxPageControl1: TcxPageControl [4]
Left = 0
Top = 346
Top = 486
Width = 1520
Height = 239
Align = alBottom
TabOrder = 4
Properties.ActivePage = cxTabSheet1
Properties.ActivePage = cxTabSheet3
Properties.CustomButtons.Buttons = <>
Properties.Style = 5
OnChange = cxPageControl1Change
ExplicitTop = 346
ClientRectBottom = 239
ClientRectRight = 1520
ClientRectTop = 32
object cxTabSheet2: TcxTabSheet
Caption = ' '#37197#24067#25968#25454' '
ImageIndex = 1
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object cxGrid2: TcxGrid
Left = 0
Top = 0
@ -735,9 +715,6 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object cxTabSheet3: TcxTabSheet
Caption = ' '#25237#20837#25968#25454' '
ImageIndex = 3
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object cxGrid3: TcxGrid
Left = 0
Top = 0
@ -925,6 +902,7 @@ inherited frmClothScheduleList: TfrmClothScheduleList
Height = 207
Align = alClient
TabOrder = 0
ExplicitLeft = 2
object TV4: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
@ -1412,11 +1390,17 @@ inherited frmClothScheduleList: TfrmClothScheduleList
ClientRectRight = 0
ClientRectTop = 0
end
inherited loadProcess: TPanel
Left = 524
Top = 310
ExplicitLeft = 524
ExplicitTop = 310
end
inherited cxProgressBar2: TcxProgressBar
Left = 535
Top = 170
ExplicitLeft = 535
ExplicitTop = 170
Left = 725
Top = 306
ExplicitLeft = 725
ExplicitTop = 306
ExplicitHeight = 29
end
inherited ADOQueryBaseCmd: TADOQuery
@ -1432,8 +1416,8 @@ inherited frmClothScheduleList: TfrmClothScheduleList
object GPM_1: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 584
Top = 264
Left = 496
Top = 204
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_TradeTotalClothStk.ADOLink
@ -1457,14 +1441,14 @@ inherited frmClothScheduleList: TfrmClothScheduleList
end
object DS_1: TDataSource
DataSet = CDS_1
Left = 744
Top = 288
Left = 788
Top = 238
end
object CDS_1: TClientDataSet
Aggregates = <>
Params = <>
Left = 704
Top = 288
Left = 746
Top = 184
end
object pm1: TPopupMenu
Left = 384

View File

@ -67,7 +67,6 @@ type
TV1Column9: TcxGridDBColumn;
TV1Column12: TcxGridDBColumn;
ToolButton5: TToolButton;
ToolButton6: TToolButton;
cxPageControl1: TcxPageControl;
cxTabSheet2: TcxTabSheet;
cxTabSheet3: TcxTabSheet;
@ -159,8 +158,6 @@ type
TV4Column3: TcxGridDBColumn;
TV4Column4: TcxGridDBColumn;
TV4Column5: TcxGridDBColumn;
ToolButton9: TToolButton;
ToolButton10: TToolButton;
ToolButton11: TToolButton;
ToolButton12: TToolButton;
cxTabSheet5: TcxTabSheet;

View File

@ -22,7 +22,7 @@ uses
U_TradePackClothOutList, U_TradePackClothStkList, U_TradeSampleClothInList,
U_TradeSampleClothOutList, U_TradeSampleClothStkList, U_ClothPurchaseEnterList,
U_ClothScheduleList, U_TradeClothTotalStkList, U_TradeClothTotalInList,
U_TradeClothTotalOutList, U_TradeDeliveryRequest;
U_TradeClothTotalOutList, U_TradeDeliveryRequest, U_TradeRRList;
/////////////////////////////////////////////////////////////////
// 功能说明:取Dll中得窗体 //
@ -78,15 +78,10 @@ begin
if trim(DataBaseStr) = '' then
begin
server := '101.132.143.144,7781';
dtbase := 'xushangData';
dtbase := 'gemeiData';
user := 'rtsa';
pswd := 'rightsoft@5740';
// server := '127.0.0.1';
// dtbase := 'xushangData';
// user := 'sa';
// pswd := 'rightsoft@123';
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
Parameters1 := '管理';
DName := 'ADMIN';
@ -170,6 +165,18 @@ begin
end;
end;
221: //ÍË»õÉêÇë
begin
with TfrmTradeRRList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
begin
fFormID := FormID;
FormStyle := mstyle;
WindowState := mstate;
BorderStyle := mborderstyle;
mnewHandle := Handle;
end;
end;
211: //发货申请
begin
with TfrmTradeDeliveryRequest.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //

View File

@ -108,8 +108,8 @@ begin
sql.Add(',KYPiece=StkPiece,KYQty=StkQty ');
sql.Add(' from BS_Cloth_IO A ');
SQL.Add(' where A.IOFlag=''Èë¿â'' and (isnull(StkQty,0)>0 or isnull(StkPiece,0)>0) ');
sql.Add(' and isnull(stkName,'''')=''óÒײ¼Æ¥'' and IOType=''µ÷²¦Èë¿â'' ');
sql.Add(' and fromMasterOrdNo= ' + QuotedStr(TRIM(FMasterOrderNo)));
sql.Add(' and isnull(stkName,'''')=''óÒײ¼Æ¥'' ');
// sql.Add(' and fromMasterOrdNo= ' + QuotedStr(TRIM(FMasterOrderNo))); and IOType=''µ÷²¦Èë¿â''
Open;
end;

View File

@ -265,7 +265,9 @@ inherited frmTradeClothTotalInList: TfrmTradeClothTotalInList
Width = 1964
Height = 37
Align = alTop
Color = clWhite
ParentBackground = False
ParentColor = False
TabOrder = 6
ExplicitLeft = 2
ExplicitTop = 2

View File

@ -359,7 +359,6 @@ inherited frmTradeDeliveryRequest: TfrmTradeDeliveryRequest
ParentBackground = False
ParentColor = True
TabOrder = 6
ExplicitTop = 29
object Label4: TLabel
Left = 243
Top = 47
@ -419,7 +418,9 @@ inherited frmTradeDeliveryRequest: TfrmTradeDeliveryRequest
Width = 1575
Height = 36
Align = alTop
Color = clWhite
ParentBackground = False
ParentColor = False
TabOrder = 2
ExplicitLeft = 2
ExplicitTop = 2
@ -655,11 +656,17 @@ inherited frmTradeDeliveryRequest: TfrmTradeDeliveryRequest
GridView = TV2
end
end
inherited loadProcess: TPanel
Left = 796
Top = 294
ExplicitLeft = 796
ExplicitTop = 294
end
inherited cxProgressBar2: TcxProgressBar
Left = 649
Top = 274
ExplicitLeft = 649
ExplicitTop = 274
Left = 571
Top = 286
ExplicitLeft = 571
ExplicitTop = 286
ExplicitHeight = 29
end
inherited ADOQueryBaseCmd: TADOQuery

View File

@ -0,0 +1,379 @@
object frmTradeRRInPut: TfrmTradeRRInPut
Left = 302
Top = 139
Caption = #21457#36135#30003#35831#24405#20837
ClientHeight = 644
ClientWidth = 1252
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = #24494#36719#38597#40657
Font.Style = []
OldCreateOrder = True
Position = poScreenCenter
OnShow = FormShow
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar
Tag = 1
Left = 0
Top = 0
Width = 1252
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 99
Caption = 'ToolBar1'
DisabledImages = DataLink_TradeTotalClothStk.ImageList_new32
EdgeInner = esNone
EdgeOuter = esNone
Images = DataLink_TradeTotalClothStk.cxImageList_bar
List = True
ShowCaptions = True
TabOrder = 0
object TBSave: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #20445#23384
ImageIndex = 16
OnClick = TBSaveClick
end
object ToolButton4: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton4Click
end
object TBClose: TToolButton
Left = 174
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object ScrollBox1: TScrollBox
Left = 0
Top = 30
Width = 1252
Height = 75
Align = alTop
BevelInner = bvNone
BevelOuter = bvNone
Ctl3D = False
ParentCtl3D = False
TabOrder = 1
ExplicitTop = 18
object Label1: TLabel
Left = 254
Top = 13
Width = 80
Height = 21
Caption = #36864#36135#31867#22411#65306
end
object Label12: TLabel
Left = 31
Top = 45
Width = 68
Height = 21
Caption = #22791' '#27880#65306
end
object Label11: TLabel
Left = 478
Top = 13
Width = 80
Height = 21
Caption = #36864#36135#21333#20301#65306
end
object Label2: TLabel
Left = 31
Top = 13
Width = 80
Height = 21
Caption = #21457#36135#26085#26399#65306
end
object Label27: TLabel
Left = 704
Top = 13
Width = 64
Height = 21
Caption = #25968#37327#21333#20301
end
object InType: TComboBox
Tag = 1
Left = 338
Top = 9
Width = 136
Height = 29
Style = csDropDownList
TabOrder = 0
Items.Strings = (
#38144#21806#36864#22238
#21152#24037#36864#22238)
end
object Note: TEdit
Tag = 1
Left = 111
Top = 42
Width = 962
Height = 27
TabOrder = 2
end
object fromCoName: TBtnEditC
Tag = 1
Left = 562
Top = 9
Width = 138
Height = 30
TabOrder = 1
OnBtnUpClick = fromCoNameBtnUpClick
OnBtnDnClick = fromCoNameBtnDnClick
end
object DlyDate: TDateTimePicker
Tag = 1
Left = 111
Top = 9
Width = 132
Height = 29
Date = 40675.000000000000000000
Format = 'yyyy-MM-dd'
Time = 0.464761099538009100
TabOrder = 3
end
object QtyUnit: TComboBox
Tag = 2
Left = 772
Top = 9
Width = 96
Height = 29
Style = csDropDownList
TabOrder = 4
Items.Strings = (
'M'
'Y'
'Kg')
end
end
object ToolBar2: TToolBar
Tag = 1
Left = 0
Top = 105
Width = 1252
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 59
Caption = 'ToolBar1'
Color = clBtnFace
DisabledImages = DataLink_TradeTotalClothStk.ImageList_new32
EdgeInner = esNone
EdgeOuter = esNone
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Images = DataLink_TradeTotalClothStk.cxImageList_bar
List = True
ParentColor = False
ParentFont = False
ShowCaptions = True
TabOrder = 2
object ToolButton3: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #36873#21333
ImageIndex = 12
OnClick = ToolButton3Click
end
object ToolButton1: TToolButton
Left = 63
Top = 0
AutoSize = True
Caption = #22686#34892
ImageIndex = 2
OnClick = ToolButton1Click
end
object ToolButton2: TToolButton
Left = 126
Top = 0
AutoSize = True
Caption = #21024#34892
ImageIndex = 6
OnClick = ToolButton2Click
end
end
object cxGrid1: TcxGrid
Left = 0
Top = 135
Width = 1252
Height = 509
Align = alClient
TabOrder = 3
ExplicitTop = 111
ExplicitHeight = 533
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DataSource1
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = '0'
Position = spFooter
end
item
Format = '0'
Position = spFooter
end
item
Format = '0'
Position = spFooter
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
Column = Tv1Column2
end
item
Kind = skSum
Column = cv1Column3
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.FocusCellOnTab = True
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
object v1Column2: TcxGridDBColumn
Caption = #21512#21516#21495
DataBinding.FieldName = 'ConNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column3: TcxGridDBColumn
Caption = #23458#25143#35746#21333#21495
DataBinding.FieldName = 'BuyConNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 122
end
object v1Column5: TcxGridDBColumn
Caption = #20135#21697#32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 125
end
object v1Column6: TcxGridDBColumn
Caption = #20135#21697#21517#31216
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 151
end
object v1Column1: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 73
end
object v1Column7: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 60
end
object Tv1Column6: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'C_ColorNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 71
end
object Tv1Column1: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'C_Width'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 72
end
object Tv1Column4: TcxGridDBColumn
Caption = #20811#37325
DataBinding.FieldName = 'C_GramWeight'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 74
end
object Tv1Column2: TcxGridDBColumn
Caption = #30003#35831#21305#25968
DataBinding.FieldName = 'Piece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 81
end
object cv1Column3: TcxGridDBColumn
Caption = #30003#35831#25968#37327
DataBinding.FieldName = 'Qty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Width = 90
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object ADOTemp: TADOQuery
Connection = DataLink_TradeTotalClothStk.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 256
Top = 281
end
object ADOCmd: TADOQuery
Connection = DataLink_TradeTotalClothStk.ADOLink
Parameters = <>
Left = 328
Top = 281
end
object DataSource1: TDataSource
DataSet = Order_Sub
Left = 684
Top = 276
end
object Order_Sub: TClientDataSet
Aggregates = <>
Params = <>
Left = 596
Top = 284
end
object cxGridPopupMenu2: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 456
Top = 276
end
object cxStyleRepository1: TcxStyleRepository
Left = 200
Top = 432
PixelsPerInch = 96
object dazi1: TcxStyle
AssignedValues = [svColor]
Color = clRed
end
end
end

View File

@ -0,0 +1,448 @@
unit U_TradeRRInPut;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, cxMemo,
cxRichEdit, ComCtrls, cxContainer, cxTextEdit, cxMaskEdit, cxButtonEdit,
StdCtrls, ToolWin, DBClient, ADODB, ExtCtrls, BtnEdit, cxCalendar, StrUtils,
cxDropDownEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxLookAndFeels,
cxLookAndFeelPainters, cxNavigator, dxSkinsCore, dxSkinsDefaultPainters,
dxDateRanges, dxBarBuiltInMenu, U_BaseList, dxScrollbarAnnotations;
type
TfrmTradeRRInPut = class(Tform)
ToolBar1: TToolBar;
TBSave: TToolButton;
TBClose: TToolButton;
ScrollBox1: TScrollBox;
ToolBar2: TToolBar;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
cxGrid1Level1: TcxGridLevel;
ADOTemp: TADOQuery;
ADOCmd: TADOQuery;
DataSource1: TDataSource;
Order_Sub: TClientDataSet;
cxGridPopupMenu2: TcxGridPopupMenu;
Label1: TLabel;
InType: TComboBox;
Note: TEdit;
Label12: TLabel;
Label11: TLabel;
fromCoName: TBtnEditC;
v1Column1: TcxGridDBColumn;
cv1Column3: TcxGridDBColumn;
cxStyleRepository1: TcxStyleRepository;
dazi1: TcxStyle;
v1Column2: TcxGridDBColumn;
v1Column5: TcxGridDBColumn;
v1Column6: TcxGridDBColumn;
v1Column7: TcxGridDBColumn;
Label2: TLabel;
DlyDate: TDateTimePicker;
Tv1Column2: TcxGridDBColumn;
ToolButton3: TToolButton;
Tv1Column3: TcxGridDBColumn;
Tv1Column6: TcxGridDBColumn;
ToolButton4: TToolButton;
Label27: TLabel;
QtyUnit: TComboBox;
Tv1Column1: TcxGridDBColumn;
Tv1Column4: TcxGridDBColumn;
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBSaveClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure fromCoNameBtnUpClick(Sender: TObject);
procedure fromCoNameBtnDnClick(Sender: TObject);
procedure JSQtyUnitChange(Sender: TObject);
procedure ToolButton3Click(Sender: TObject);
procedure ToolButton4Click(Sender: TObject);
private
fuserName: string;
procedure InitData();
function SaveData(): Boolean;
{ Private declarations }
public
PState, CopyInt: Integer;
FRRMID: string;
{ Public declarations }
end;
var
frmTradeRRInPut: TfrmTradeRRInPut;
newh: hwnd;
implementation
uses
U_DataLink, U_ZDYHelp, U_RTFun, U_TradePlanSel, U_TradeSalesContractSel,
U_CompanySel;
{$R *.dfm}
procedure TfrmTradeRRInPut.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmTradeRRInPut.InitData();
var
fsj: string;
begin
if PState = 0 then
begin
DlyDate.DateTime := strtodatetime(Trim(FormatDateTime('yyyy-MM-dd', Now)));
end;
with ADOTemp do
begin
Close;
SQL.Clear;
sql.Add(' select A.* ');
sql.Add(' from Trade_Cloth_RR_Sub A');
if PState = 1 then
begin
sql.Add('where RRMID=''' + Trim(FRRMID) + '''');
end;
if PState = 0 then
begin
sql.Add(' where 1<>1');
end;
Open;
end;
SCreateCDS(ADOTemp, Order_Sub);
SInitCDSData(ADOTemp, Order_Sub);
with ADOTemp do
begin
Close;
sql.Clear;
sql.Add('select A.* ');
sql.Add(' from Trade_Cloth_RR_Main A');
sql.Add(' where RRMID=''' + Trim(FRRMID) + ''' ');
Open;
end;
SCSHData(ADOTemp, ScrollBox1, 1);
fromCoName.TxtCode := ADOTemp.FieldByName('fromCoNo').AsString;
end;
procedure TfrmTradeRRInPut.JSQtyUnitChange(Sender: TObject);
begin
if not Order_Sub.IsEmpty then
begin
exit;
end;
end;
procedure TfrmTradeRRInPut.FormShow(Sender: TObject);
var
fsj: string;
begin
readCxGrid(trim(self.Caption), Tv1, '发货管理');
InitData();
end;
function TfrmTradeRRInPut.SaveData(): Boolean;
var
MaxMid, MaxSid: string;
begin
try
ADOCmd.Connection.BeginTrans;
///////////////// 保存主表 /////////////////
if Trim(FRRMID) = '' then
begin
if GetLSNo(ADOCmd, MaxMid, 'DM', 'Trade_Cloth_RR_Main', 4, 1) = False then
raise Exception.Create('取最大号失败!');
end
else
begin
MaxMid := Trim(FRRMID);
end;
with ADOCmd do
begin
Close;
sql.Clear;
SQL.Add('select * from Trade_Cloth_RR_Main where RRMID=''' + Trim(MaxMid) + '''');
Open;
end;
with ADOCmd do
begin
if Trim(FRRMID) = '' then
begin
Append;
FieldByName('FillID').Value := Trim(DCode);
FieldByName('Filler').Value := Trim(DName);
end
else
begin
Edit;
FieldByName('EditID').Value := Trim(DCode);
FieldByName('Editer').Value := Trim(DName);
FieldByName('EditTime').Value := SGetServerDateTime(ADOTemp);
end;
RTSetsavedata(ADOCmd, 'Trade_Cloth_RR_Main', ScrollBox1, 1);
FieldByName('fromCoNo').Value := fromCoName.TxtCode;
FieldByName('RRMID').Value := Trim(MaxMid);
FieldByName('Status').Value := '0';
Post;
end;
///////////////// 保存主表 /////////////////
///
///////////////// 保存子表 /////////////////
Order_Sub.DisableControls;
with Order_Sub do
begin
First;
while not Eof do
begin
if Trim(Order_Sub.fieldbyname('RRSID').AsString) = '' then
begin
if GetLSNo(ADOCmd, MaxSid, 'DS', 'Trade_Cloth_RR_Sub', 4, 1) = False then
raise Exception.Create('取子流水号失败!');
end
else
begin
MaxSid := Trim(Order_Sub.fieldbyname('RRSID').AsString);
end;
with ADOCmd do
begin
Close;
SQL.Clear;
sql.Add('select * from Trade_Cloth_RR_Sub ');
sql.Add(' where RRMID=''' + Trim(MaxMid) + '''');
sql.Add(' and RRSID=''' + Trim(MaxSid) + '''');
Open;
if ADOCmd.IsEmpty then
begin
Append;
end
else
begin
Edit;
end;
RTSetSaveDataCDS(ADOCmd, Tv1, Order_Sub, 'Trade_Cloth_RR_Sub', 0);
FieldByName('RRMID').Value := Trim(MaxMid);
FieldByName('RRSID').Value := Trim(MaxSid);
FieldByName('QtyUnit').Value := QtyUnit.Text;
FieldByName('MainId').Value := Order_Sub.fieldbyname('MainId').Value;
FieldByName('SubId').Value := Order_Sub.fieldbyname('SubId').Value;
FieldByName('ConMId').Value := Order_Sub.fieldbyname('ConMId').Value;
FieldByName('ConSId').Value := Order_Sub.fieldbyname('ConSId').Value;
Post;
end;
Order_Sub.Edit;
Order_Sub.FieldByName('RRSID').Value := Trim(MaxSid);
Next;
end;
end;
Order_Sub.EnableControls;
///////////////// 保存子表 /////////////////
FRRMID := Trim(MaxMid);
ADOCmd.Connection.CommitTrans;
Result := True;
except
ADOCmd.Connection.RollbackTrans;
application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
Result := False;
end;
end;
procedure TfrmTradeRRInPut.TBSaveClick(Sender: TObject);
var
Freal: Double;
begin
ToolBar1.SetFocus;
if Trim(InType.Text) = '' then
begin
Application.MessageBox('入库类型不能为空!', '提示', 0);
Exit;
end;
if Trim(fromCoName.Text) = '' then
begin
Application.MessageBox('退货单位不能为空!', '提示', 0);
Exit;
end;
if (Order_Sub.Locate('Piece', null, [])) and (Order_Sub.Locate('Qty', null, [])) = True then
begin
Application.MessageBox('细码申请匹数和数量不能全为空!', '提示', 0);
Exit;
end;
if SaveData() then
begin
Application.MessageBox('保存成功!', '提示', 0);
ModalResult := 1;
end;
end;
procedure TfrmTradeRRInPut.ToolButton1Click(Sender: TObject);
var
FQtyUnit, FFSubid: string;
begin
try
frmTradePlanSel := TfrmTradePlanSel.Create(Application);
with frmTradePlanSel do
begin
if ShowModal = 1 then
begin
while CDS_1.locate('SSel', true, []) do
begin
begin
with Self.Order_Sub do
begin
Append;
FieldByName('OrderNo').Value := Trim(frmTradePlanSel.CDS_1.fieldbyname('Orderno').AsString);
FieldByName('ConMId').Value := frmTradePlanSel.CDS_1.fieldbyname('ConMId').Value;
FieldByName('ConSId').Value := frmTradePlanSel.CDS_1.fieldbyname('ConSId').Value;
FieldByName('MainId').Value := frmTradePlanSel.CDS_1.fieldbyname('MainId').Value;
FieldByName('SubId').Value := frmTradePlanSel.CDS_1.fieldbyname('SubId').Value;
FieldByName('C_Code').Value := frmTradePlanSel.CDS_1.fieldbyname('C_Code').Value;
FieldByName('C_Name').Value := frmTradePlanSel.CDS_1.fieldbyname('C_Name').Value;
FieldByName('C_Composition').Value := frmTradePlanSel.CDS_1.fieldbyname('C_Composition').Value;
FieldByName('C_Spec').Value := frmTradePlanSel.CDS_1.fieldbyname('C_Spec').Value;
FieldByName('C_Width').Value := frmTradePlanSel.CDS_1.fieldbyname('C_Width').Value;
FieldByName('C_GramWeight').Value := frmTradePlanSel.CDS_1.fieldbyname('C_GramWeight').Value;
FieldByName('C_Color').Value := frmTradePlanSel.CDS_1.fieldbyname('C_Color').Value;
FieldByName('C_ColorNo').Value := frmTradePlanSel.CDS_1.fieldbyname('C_ColorNo').Value;
FieldByName('C_Pattern').Value := frmTradePlanSel.CDS_1.fieldbyname('C_Pattern').Value;
FieldByName('C_StyleNo').Value := frmTradePlanSel.CDS_1.fieldbyname('C_StyleNo').Value;
end;
end;
CDS_1.Delete;
end;
end;
end;
finally
frmTradePlanSel.Free;
end;
end;
procedure TfrmTradeRRInPut.ToolButton2Click(Sender: TObject);
begin
if Order_Sub.IsEmpty then
Exit;
if Trim(Order_Sub.fieldbyname('RRSID').AsString) <> '' then
begin
with ADOTemp do
begin
Close;
sql.Clear;
sql.Add('select * from Trade_Cloth_RR_Sub where RRSID=''' + Trim(Order_Sub.fieldbyname('RRSID').AsString) + '''');
sql.add(' and isnull(DlyPiece,0)>0');
Open;
end;
if ADOTemp.IsEmpty = False then
begin
Application.MessageBox('已退货不能删除数据!', '提示', 0);
exit;
end;
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
with ADOCmd do
begin
Close;
sql.Clear;
sql.Add('delete Trade_Cloth_RR_Sub where RRSID=''' + Trim(Order_Sub.fieldbyname('RRSID').AsString) + '''');
ExecSQL;
end;
end;
Order_Sub.Delete;
end;
procedure TfrmTradeRRInPut.ToolButton3Click(Sender: TObject);
var
FConMainId, FMPRTCode: string;
begin
try
frmTradeSalesContractSel := TfrmTradeSalesContractSel.Create(Application);
with frmTradeSalesContractSel do
begin
BuyName.Text := Self.fromCoName.Text;
if ShowModal = 1 then
begin
while CDS_1.locate('SSel', true, []) do
begin
if not self.Order_Sub.locate('ConSId', trim(frmTradeSalesContractSel.CDS_1.Fieldbyname('ConSId').AsString), []) then
begin
with Self.Order_Sub do
begin
Append;
FieldByName('ConNo').Value := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('ConNo').AsString);
FieldByName('ConMId').Value := Trim(frmTradeSalesContractSel.CDS_1.fieldbyname('ConMId').AsString);
FieldByName('ConSId').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('ConSId').Value;
FieldByName('C_Code').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_Code').Value;
FieldByName('C_Name').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_Name').Value;
FieldByName('C_Composition').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_Composition').Value;
FieldByName('C_Spec').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_Spec').Value;
FieldByName('C_Width').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_Width').Value;
FieldByName('C_GramWeight').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_GramWeight').Value;
FieldByName('C_Color').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_Color').Value;
FieldByName('C_ColorNo').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_ColorNo').Value;
FieldByName('C_EColor').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_EColor').Value;
FieldByName('C_Pattern').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_Pattern').Value;
FieldByName('C_StyleNo').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_StyleNo').Value;
// FieldByName('C_ColorDepth').Value := frmTradeSalesContractSel.CDS_1.fieldbyname('C_ColorDepth').Value;
end;
end;
CDS_1.Edit;
CDS_1.fieldbyname('SSel').value := false;
end;
end;
end;
finally
frmTradeSalesContractSel.Free;
end;
end;
procedure TfrmTradeRRInPut.ToolButton4Click(Sender: TObject);
begin
WriteCxGrid(trim(self.Caption), Tv1, '发货管理')
end;
procedure TfrmTradeRRInPut.fromCoNameBtnUpClick(Sender: TObject);
begin
try
frmCompanySel := TfrmCompanySel.Create(Application);
with frmCompanySel do
begin
FCoType := '客户';
if ShowModal = 1 then
begin
self.fromCoName.TxtCode := Trim(frmCompanySel.CDS_1.fieldbyname('CoCode').AsString);
self.fromCoName.Text := Trim(frmCompanySel.CDS_1.fieldbyname('CoAbbrName').AsString);
end;
end;
finally
frmCompanySel.Free;
end;
end;
procedure TfrmTradeRRInPut.fromCoNameBtnDnClick(Sender: TObject);
begin
fromCoName.Text := '';
end;
end.

View File

@ -0,0 +1,629 @@
inherited frmTradeRRList: TfrmTradeRRList
Left = 220
Top = 16
BorderStyle = bsNone
Caption = #36864#36135#30003#35831
ClientHeight = 752
ClientWidth = 1453
Color = clBtnFace
Font.Height = -16
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitWidth = 1469
ExplicitHeight = 791
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1453
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 83
Caption = 'ToolBar1'
Color = clSkyBlue
DisabledImages = DataLink_TradeTotalClothStk.ImageList_new32
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Images = DataLink_TradeTotalClothStk.cxImageList_bar
List = True
ParentColor = False
ParentFont = False
ShowCaptions = True
TabOrder = 4
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 1
OnClick = TBRafreshClick
end
object TBFind: TToolButton
Left = 63
Top = 0
AutoSize = True
Caption = #36807#28388
ImageIndex = 0
OnClick = TBFindClick
end
object TBAdd: TToolButton
Left = 126
Top = 0
AutoSize = True
Caption = #26032#22686
ImageIndex = 9
OnClick = TBAddClick
end
object ToolButton1: TToolButton
Left = 189
Top = 0
AutoSize = True
Caption = #26597#30475
ImageIndex = 4
OnClick = ToolButton1Click
end
object TBDel: TToolButton
Left = 252
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
OnClick = TBDelClick
end
object TBEdit: TToolButton
Left = 315
Top = 0
AutoSize = True
Caption = #20462#25913
ImageIndex = 3
OnClick = TBEditClick
end
object TBPrint: TToolButton
Left = 378
Top = 0
AutoSize = True
Caption = #25171#21360
ImageIndex = 21
OnClick = TBPrintClick
end
object tchk: TToolButton
Left = 441
Top = 0
AutoSize = True
Caption = #23457#26680
ImageIndex = 12
OnClick = tchkClick
end
object Tnochk: TToolButton
Left = 504
Top = 0
AutoSize = True
Caption = #25764#38144#23457#26680
ImageIndex = 11
OnClick = TnochkClick
end
object btnWC: TToolButton
Left = 591
Top = 0
AutoSize = True
Caption = #23436#25104
ImageIndex = 12
OnClick = btnWCClick
end
object btnWCCX: TToolButton
Left = 654
Top = 0
AutoSize = True
Caption = #25764#38144#23436#25104
ImageIndex = 11
OnClick = btnWCCXClick
end
object TBExport: TToolButton
Left = 741
Top = 0
AutoSize = True
Caption = #23548#20986
ImageIndex = 20
OnClick = TBExportClick
end
object ToolButton6: TToolButton
Left = 804
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton6Click
end
object TBClose: TToolButton
Left = 891
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object cxGrid1: TcxGrid [1]
Left = 0
Top = 141
Width = 1453
Height = 341
Align = alClient
TabOrder = 3
ExplicitTop = 139
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnFocusedRecordChanged = Tv1FocusedRecordChanged
DataController.DataSource = DataSource1
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.GroupFooters = gfAlwaysVisible
OptionsView.IndicatorWidth = 30
object v1Column4: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
Properties.MultiLine = True
Properties.NullStyle = nssUnchecked
HeaderAlignmentHorz = taCenter
Width = 49
end
object v1Column8: TcxGridDBColumn
Caption = #30003#35831#21333#21495
DataBinding.FieldName = 'RRMID'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 93
end
object v1OrdDate: TcxGridDBColumn
Caption = #30331#35760#26085#26399
DataBinding.FieldName = 'Filltime'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxDateEditProperties'
Properties.ShowTime = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 85
end
object Tv1Column1: TcxGridDBColumn
Caption = #36864#36135#31867#22411
DataBinding.FieldName = 'inType'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 84
end
object v1Column27: TcxGridDBColumn
Caption = #20132#36135#26085#26399
DataBinding.FieldName = 'DlyDate'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 69
end
object v1Column10: TcxGridDBColumn
Caption = #25910#36135#21333#20301
DataBinding.FieldName = 'fromCoName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 124
end
object v1Column1: TcxGridDBColumn
Caption = #30003#35831#20154
DataBinding.FieldName = 'Filler'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object v1Column13: TcxGridDBColumn
Caption = #23457#26680#20154
DataBinding.FieldName = 'Chker'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 65
end
object v1Column17: TcxGridDBColumn
Caption = #23457#26680#26085#26399
DataBinding.FieldName = 'ChkTime'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object v1Column7: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'Note'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.OnEditValueChanged = v1Column7PropertiesEditValueChanged
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 70
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object Panel1: TPanel [2]
Left = 0
Top = 30
Width = 1453
Height = 81
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
ParentBackground = False
ParentColor = True
TabOrder = 6
object Label4: TLabel
Left = 196
Top = 52
Width = 64
Height = 21
Caption = #25910#36135#21333#20301
end
object Label1: TLabel
Left = 25
Top = 52
Width = 64
Height = 21
Caption = #30003#35831#21333#21495
end
object ToCoName: TEdit
Tag = 2
Left = 264
Top = 44
Width = 115
Height = 29
TabOrder = 0
OnChange = ToCoNameChange
end
object RRMID: TEdit
Tag = 2
Left = 93
Top = 44
Width = 99
Height = 29
TabOrder = 1
OnChange = ToCoNameChange
end
inline frmFrameDateSel1: TfrmFrameDateSel
Left = 2
Top = 2
Width = 1449
Height = 37
Align = alTop
Color = clWhite
ParentBackground = False
ParentColor = False
TabOrder = 2
ExplicitLeft = 2
ExplicitTop = 2
ExplicitWidth = 1964
ExplicitHeight = 37
inherited lbl2: TLabel
Width = 16
Height = 21
ExplicitWidth = 16
ExplicitHeight = 21
end
end
end
object cxTabControl1: TcxTabControl [3]
Left = 0
Top = 111
Width = 1453
Height = 30
Align = alTop
TabOrder = 2
Properties.CustomButtons.Buttons = <>
Properties.Style = 9
Properties.TabIndex = 0
Properties.Tabs.Strings = (
#26410#23457#26680
#24050#23457#26680
#24050#23436#25104
#20840#37096)
OnChange = cxTabControl1Change
ExplicitTop = 73
ClientRectRight = 0
ClientRectTop = 0
end
object cxSplitter1: TcxSplitter [4]
Left = 0
Top = 482
Width = 1453
Height = 8
HotZoneClassName = 'TcxMediaPlayer9Style'
AlignSplitter = salBottom
Control = cxGrid2
ExplicitTop = 308
end
object cxGrid2: TcxGrid [5]
Left = 0
Top = 490
Width = 1453
Height = 262
Align = alBottom
TabOrder = 5
ExplicitLeft = 6
ExplicitTop = 314
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_2
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = '0'
Position = spFooter
end
item
Format = '0'
Position = spFooter
end
item
Format = '0'
Position = spFooter
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.FocusCellOnTab = True
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
object cxGridDBColumn1: TcxGridDBColumn
Caption = #21512#21516#21495
DataBinding.FieldName = 'ConNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object cxGridDBColumn2: TcxGridDBColumn
Caption = #23458#25143#35746#21333#21495
DataBinding.FieldName = 'BuyConNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 146
end
object cxGridDBColumn3: TcxGridDBColumn
Caption = #20135#21697#32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 88
end
object v1Column6: TcxGridDBColumn
Caption = #20135#21697#21517#31216
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 71
end
object cxGridDBColumn4: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 73
end
object cxGridDBColumn5: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 60
end
object cxGridDBColumn6: TcxGridDBColumn
Caption = #33394#21495
DataBinding.FieldName = 'C_ColorNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 71
end
object cxGridDBColumn7: TcxGridDBColumn
Caption = #30003#35831#21305#25968
DataBinding.FieldName = 'Piece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 103
end
object cv1Column3: TcxGridDBColumn
Caption = #30003#35831#25968#37327
DataBinding.FieldName = 'Qty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 108
end
object TV2Column1: TcxGridDBColumn
Caption = #25968#37327#21333#20301
DataBinding.FieldName = 'QtyUnit'
DataBinding.IsNullValueType = True
Options.Editing = False
Width = 112
end
object TV2Column2: TcxGridDBColumn
Caption = #26816#39564#21305#25968
DataBinding.FieldName = 'DlyPiece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 120
end
object TV2Column3: TcxGridDBColumn
Caption = #26816#39564#25968#37327
DataBinding.FieldName = 'DlyQty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 134
end
end
object cxGridLevel1: TcxGridLevel
GridView = TV2
end
end
inherited loadProcess: TPanel
Left = 388
Top = 212
ExplicitLeft = 388
ExplicitTop = 212
end
inherited cxProgressBar2: TcxProgressBar
Left = 636
Top = 222
ExplicitLeft = 636
ExplicitTop = 222
ExplicitHeight = 29
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_TradeTotalClothStk.ADOLink
Left = 73
Top = 224
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_TradeTotalClothStk.ADOLink
Left = 73
Top = 161
end
object cxGridPopupMenu1: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 1000
Top = 184
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_TradeTotalClothStk.ADOLink
Parameters = <>
Left = 292
Top = 250
end
object ADOQueryMain: TADOQuery
Connection = DataLink_TradeTotalClothStk.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 560
Top = 160
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_TradeTotalClothStk.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 688
Top = 152
end
object DataSource1: TDataSource
DataSet = Order_Main
Left = 968
Top = 184
end
object Order_Main: TClientDataSet
Aggregates = <>
Params = <>
Left = 936
Top = 184
end
object DS_2: TDataSource
DataSet = ClientDataSet2
Left = 352
Top = 600
end
object ClientDataSet2: TClientDataSet
Aggregates = <>
Params = <>
Left = 272
Top = 592
end
object GPM_2: TcxGridPopupMenu
Grid = cxGrid2
PopupMenus = <>
Left = 408
Top = 600
end
end

View File

@ -0,0 +1,746 @@
unit U_TradeRRList;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, cxStyles, cxCustomData,
cxGraphics, cxFilter, cxData, cxDataStorage, cxEdit, DB, cxDBData, ADODB,
cxGridCustomPopupMenu, cxGridPopupMenu, cxGridLevel, cxClasses, cxControls,
cxGridCustomView, cxGridCustomTableView, cxGridTableView, cxGridDBTableView,
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, cxPC, cxButtonEdit,
cxDropDownEdit, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
dxBarBuiltInMenu, dxSkinsCore, dxSkinsDefaultPainters, U_BaseList,
dxDateRanges, cxContainer, dxScrollbarAnnotations, cxProgressBar, FrameDateSel;
type
TfrmTradeRRList = class(TfrmBaseList)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBFind: TToolButton;
TBAdd: TToolButton;
TBEdit: TToolButton;
TBDel: TToolButton;
TBPrint: TToolButton;
TBClose: TToolButton;
Tv1: TcxGridDBTableView;
cxGrid1Level1: TcxGridLevel;
cxGrid1: TcxGrid;
cxGridPopupMenu1: TcxGridPopupMenu;
ADOQueryCmd: TADOQuery;
ADOQueryMain: TADOQuery;
ADOQueryTemp: TADOQuery;
DataSource1: TDataSource;
TBExport: TToolButton;
v1OrdDate: TcxGridDBColumn;
Order_Main: TClientDataSet;
ToolButton1: TToolButton;
v1Column4: TcxGridDBColumn;
Panel1: TPanel;
Label4: TLabel;
ToCoName: TEdit;
cxTabControl1: TcxTabControl;
tchk: TToolButton;
Tnochk: TToolButton;
cxSplitter1: TcxSplitter;
DS_2: TDataSource;
v1Column8: TcxGridDBColumn;
ClientDataSet2: TClientDataSet;
GPM_2: TcxGridPopupMenu;
v1Column13: TcxGridDBColumn;
v1Column17: TcxGridDBColumn;
v1Column1: TcxGridDBColumn;
v1Column7: TcxGridDBColumn;
v1Column10: TcxGridDBColumn;
v1Column27: TcxGridDBColumn;
btnWC: TToolButton;
btnWCCX: TToolButton;
ToolButton6: TToolButton;
Label1: TLabel;
cxGrid2: TcxGrid;
TV2: TcxGridDBTableView;
cxGridDBColumn1: TcxGridDBColumn;
cxGridDBColumn2: TcxGridDBColumn;
cxGridDBColumn3: TcxGridDBColumn;
v1Column6: TcxGridDBColumn;
cxGridDBColumn4: TcxGridDBColumn;
cxGridDBColumn5: TcxGridDBColumn;
cxGridDBColumn6: TcxGridDBColumn;
cxGridDBColumn7: TcxGridDBColumn;
cv1Column3: TcxGridDBColumn;
cxGridLevel1: TcxGridLevel;
TV2Column1: TcxGridDBColumn;
TV2Column2: TcxGridDBColumn;
TV2Column3: TcxGridDBColumn;
Tv1Column1: TcxGridDBColumn;
frmFrameDateSel1: TfrmFrameDateSel;
//RMllPDFExport1: TRMllPDFExport;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject);
procedure TBFindClick(Sender: TObject);
procedure TBEditClick(Sender: TObject);
procedure TBDelClick(Sender: TObject);
procedure TBExportClick(Sender: TObject);
procedure TBPrintClick(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure TBAddClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure CheckBox2Click(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
procedure ToCoNameChange(Sender: TObject);
procedure tchkClick(Sender: TObject);
procedure TnochkClick(Sender: TObject);
procedure cxTabControl1Change(Sender: TObject);
procedure btnWCClick(Sender: TObject);
procedure Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
procedure btnWCCXClick(Sender: TObject);
procedure v1Column7PropertiesEditValueChanged(Sender: TObject);
procedure Tv1Column9PropertiesEditValueChanged(Sender: TObject);
procedure ToolButton6Click(Sender: TObject);
private
procedure InitGrid();
procedure InitSubGrid();
procedure SetStatus();
function DelData(): Boolean;
{ Private declarations }
public
FFInt: Integer;
canshu1, canshu2: string;
{ Public declarations }
end;
//var
//frmContractListNX: TfrmContractListNX;
implementation
uses
U_DataLink, U_TradeRRInPut, U_RTFun, U_ZDYHelp, U_LabelPrint;
{$R *.dfm}
procedure TfrmTradeRRList.SetStatus();
begin
tchk.Enabled := False;
Tnochk.Enabled := False;
btnWC.Enabled := False;
btnWCCX.Enabled := False;
if canshu1 = '录入' then
begin
case cxTabControl1.TabIndex of
0:
begin
tchk.Enabled := true;
end;
1:
begin
Tnochk.Enabled := true;
btnWC.Enabled := true;
end;
2:
begin
btnWCCX.Enabled := true;
end;
end;
end
else if canshu1 = '管理' then
begin
case cxTabControl1.TabIndex of
0:
begin
tchk.Enabled := true;
end;
1:
begin
Tnochk.Enabled := true;
btnWC.Enabled := true;
end;
2:
begin
btnWCCX.Enabled := true;
end;
end;
end;
end;
procedure TfrmTradeRRList.FormDestroy(Sender: TObject);
begin
inherited;
//frmFHSQList:=nil;
end;
procedure TfrmTradeRRList.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
Action := caFree;
end;
procedure TfrmTradeRRList.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmTradeRRList.InitGrid();
begin
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Filtered := False;
Close;
sql.Clear;
Sql.Add(' select A.* ');
sql.Add(' from Trade_Cloth_RR_Main A where 1=1');
sql.Add(' and Filltime>=''' + FormatDateTime('yyyy-MM-dd', frmFrameDateSel1.begdate.Date) + ''' ');
sql.Add(' and Filltime<''' + FormatDateTime('yyyy-MM-dd', frmFrameDateSel1.Enddate.Date + 1) + ''' ');
case cxTabControl1.TabIndex of
0:
begin
SQL.Add(' and isnull(A.status,''0'')=''0'' ');
end;
1:
begin
SQL.Add(' and isnull(A.status,''0'')=''9'' ');
end;
2:
begin
SQL.Add(' and isnull(A.status,''0'')=''10'' ');
end;
end;
if Trim(canshu1) <> '管理' then
begin
sql.Add(' and isnull(A.Filler,'''')=''' + Trim(DName) + '''');
end;
sql.Add(' order by Filltime desc ');
Open;
end;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, Order_Main);
SInitCDSData(ADOQueryMain, Order_Main);
finally
ADOQueryMain.EnableControls;
TV1.DataController.Filter.Clear;
TV2.DataController.Filter.Clear;
end;
end;
procedure TfrmTradeRRList.TBFindClick(Sender: TObject);
begin
if ADOQueryMain.Active = False then
Exit;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, Order_Main);
SInitCDSData(ADOQueryMain, Order_Main);
end;
procedure TfrmTradeRRList.TBEditClick(Sender: TObject);
begin
if Order_Main.IsEmpty then
Exit;
// if cxTabControl1.TabIndex <> 0 then
// Exit;
if Trim(canshu1) <> '高权限' then
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
SQL.Add('select FILLER from Trade_Cloth_RR_Main A ');
SQL.Add('where RRMID=''' + Trim(Order_Main.fieldbyname('RRMID').AsString) + ''' ');
SQL.Add('and filler in ( select username from SY_User where UType=(select UType from SY_User where UserName=' + quotedstr(Trim(dname)));
SQL.Add('))');
Open;
end;
if ADOQueryTemp.ISEMPTY = True then
begin
Application.MessageBox('不能操作他人的数据!', '提示', 0);
Exit;
end;
// if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
// begin
// Application.MessageBox('不能操作他人的数据!', '提示', 0);
// Exit;
// end;
end;
with ADOQueryTemp do
begin
close;
sql.Clear;
sql.Add('select * from Trade_Cloth_RR_Main');
sql.Add('where RRMID=' + quotedstr(trim(Order_Main.fieldbyname('RRMID').AsString)));
Open;
end;
// if Trim(ADOQueryTemp.fieldbyname('YSID').AsString) <> '' then
// begin
// Application.MessageBox('已生成应收账款不能修改数据!', '提示', 0);
// Exit;
// end;
try
frmTradeRRInPut := TfrmTradeRRInPut.Create(Application);
with frmTradeRRInPut do
begin
PState := 1;
FRRMID := Trim(Self.Order_Main.fieldbyname('RRMID').AsString);
if ShowModal = 1 then
begin
InitGrid();
end;
end;
finally
frmTradeRRInPut.Free;
end;
end;
procedure TfrmTradeRRList.TBDelClick(Sender: TObject);
begin
if Order_Main.IsEmpty then
Exit;
if cxTabControl1.TabIndex <> 0 then
Exit;
if canshu1 <> '高权限' then
begin
if Trim(Order_Main.fieldbyname('Filler').AsString) <> Trim(DName) then
begin
Application.MessageBox('不能操作他人的数据!', '提示', 0);
Exit;
end;
end;
if Application.MessageBox('确定要删除数据吗?', '提示', 32 + 4) <> IDYES then
Exit;
if DelData() then
begin
initgrid();
InitSubGrid();
end;
end;
function TfrmTradeRRList.DelData(): Boolean;
begin
try
with Order_Main do
begin
Result := false;
ADOQueryCmd.Connection.BeginTrans;
DisableControls;
First;
while not eof do
begin
if fieldbyname('SSel').AsBoolean then
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add(' select * from Trade_Cloth_IO where IOFlag=''出库''');
sql.add(' and IONo=''' + Trim(Order_Main.fieldbyname('RRMID').AsString) + '''');
Open;
end;
if ADOQueryTemp.IsEmpty = False then
begin
Order_Main.EnableControls;
ADOQueryCmd.Connection.RollbackTrans;
Application.MessageBox('已发货不能删除数据!', '提示', 0);
exit;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('delete Trade_Cloth_RR_Sub where RRMID=''' + Trim(Order_Main.fieldbyname('RRMID').AsString) + '''');
ExecSQL;
end;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('delete Trade_Cloth_RR_Main where RRMID=''' + Trim(Order_Main.fieldbyname('RRMID').AsString) + '''');
ExecSQL;
end;
end;
next;
end;
First;
EnableControls;
end;
ADOQueryCmd.Connection.CommitTrans;
Result := True;
except
order_main.EnableControls;
ADOQueryCmd.Connection.RollbackTrans;
Result := False;
Application.MessageBox('数据删除异常!', '提示', 0);
end;
end;
procedure TfrmTradeRRList.TBExportClick(Sender: TObject);
begin
if ADOQueryMain.IsEmpty then
Exit;
// SelExportData(Tv1, ADOQueryMain, '发货申请列表');
end;
procedure TfrmTradeRRList.TBPrintClick(Sender: TObject);
begin
if Order_Main.IsEmpty then
Exit;
try
frmLabelPrint := TfrmLabelPrint.Create(Application);
with frmLabelPrint do
begin
FLMType := 'TradeClothDR1';
FFiltration1 := Trim(self.Order_Main.fieldbyname('RRMID').AsString);
if ShowModal = 1 then
begin
end;
end;
finally
frmLabelPrint.Free;
end;
end;
procedure TfrmTradeRRList.TBRafreshClick(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmTradeRRList.TBAddClick(Sender: TObject);
var
maxno: string;
begin
try
frmTradeRRInPut := TfrmTradeRRInPut.Create(Application);
with frmTradeRRInPut do
begin
PState := 0;
FRRMID := '';
if ShowModal = 1 then
begin
InitGrid();
end;
end;
finally
frmTradeRRInPut.Free;
end;
end;
procedure TfrmTradeRRList.FormShow(Sender: TObject);
begin
inherited;
canshu1 := self.fParameters1;
ReadCxGrid(trim(self.Caption) + 'Tv1', Tv1, '发货管理');
ReadCxGrid(trim(self.Caption) + 'Tv2', Tv2, '发货管理');
frmFrameDateSel1.EndDate.Date := SGetServerDate(ADOQueryTemp);
frmFrameDateSel1.BegDate.Date := frmFrameDateSel1.EndDate.Date - 60;
SetStatus();
InitGrid();
end;
procedure TfrmTradeRRList.CheckBox1Click(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmTradeRRList.CheckBox2Click(Sender: TObject);
begin
TBRafresh.Click;
end;
procedure TfrmTradeRRList.ToolButton1Click(Sender: TObject);
begin
if Order_Main.IsEmpty then
Exit;
try
frmTradeRRInPut := TfrmTradeRRInPut.Create(Application);
with frmTradeRRInPut do
begin
PState := 1;
FRRMID := Trim(Self.Order_Main.fieldbyname('RRMID').AsString);
ToolBar2.Visible := False;
TBSave.Visible := False;
ScrollBox1.Enabled := False;
Tv1.OptionsSelection.CellSelect := False;
if ShowModal = 1 then
begin
end;
end;
finally
frmTradeRRInPut.Free;
end;
end;
procedure TfrmTradeRRList.ToCoNameChange(Sender: TObject);
begin
if ADOQueryMain.Active = False then
Exit;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, Order_Main);
SInitCDSData(ADOQueryMain, Order_Main);
end;
procedure TfrmTradeRRList.tchkClick(Sender: TObject);
begin
if Order_Main.IsEmpty then
exit;
if cxTabControl1.TabIndex <> 0 then
exit;
try
with Order_Main do
begin
DisableControls;
First;
while not eof do
begin
if fieldbyname('SSel').AsBoolean then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('update Trade_Cloth_RR_Main SET Chker=''' + Trim(DName) + ''',ChkTime=getdate(),Status=''9'' ');
sql.Add('where RRMID=' + quotedstr(trim(Order_Main.fieldbyname('RRMID').AsString)));
execsql;
end;
end;
next;
end;
First;
EnableControls;
end;
InitGrid();
application.MessageBox('审核成功!', '提示信息');
except
application.MessageBox('审核失败!', '提示信息', 0);
end;
end;
procedure TfrmTradeRRList.InitSubGrid();
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.Add('select A.* ');
sql.Add('from Trade_Cloth_RR_Sub A where A.RRMID=''' + Trim(Order_Main.fieldbyname('RRMID').AsString) + '''');
Open;
end;
SCreateCDS(ADOQueryTemp, ClientDataSet2);
SInitCDSData(ADOQueryTemp, ClientDataSet2);
end;
procedure TfrmTradeRRList.TnochkClick(Sender: TObject);
begin
if Order_Main.IsEmpty then
exit;
if cxTabControl1.TabIndex <> 1 then
exit;
try
with Order_Main do
begin
DisableControls;
First;
while not eof do
begin
if fieldbyname('SSel').AsBoolean then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('update Trade_Cloth_RR_Main SET Chker=Null,ChkTime=Null,status=''0'' ');
sql.Add('where RRMID=' + quotedstr(trim(Order_Main.fieldbyname('RRMID').AsString)));
execsql;
end;
end;
next;
end;
First;
EnableControls;
end;
InitGrid();
application.MessageBox('撤销成功!', '提示信息');
except
application.MessageBox('撤销失败!', '提示信息', 0);
end;
end;
procedure TfrmTradeRRList.cxTabControl1Change(Sender: TObject);
begin
SetStatus();
InitGrid();
end;
procedure TfrmTradeRRList.btnWCCXClick(Sender: TObject);
begin
if Order_Main.IsEmpty then
exit;
try
with Order_Main do
begin
DisableControls;
First;
while not eof do
begin
if fieldbyname('SSel').AsBoolean then
begin
// with ADOQueryTemp do
// begin
// Close;
// sql.Clear;
// sql.Add('exec P_CW_Judge_All @DataID=' + quotedstr(trim(Order_Main.fieldbyname('RRMID').AsString)));
// Open;
// end;
// if ADOQueryTemp.FieldByName('intReturn').AsInteger = -1 then
// begin
// Application.MessageBox(PChar(ADOQueryTemp.fieldbyname('ShowMsg').AsString), '提示', 0);
// exit;
// end;
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('update Trade_Cloth_RR_Main SET Comper=null,CompTime=null, status=''9'' ');
sql.Add('where RRMID=' + quotedstr(trim(Order_Main.fieldbyname('RRMID').AsString)));
execsql;
end;
end;
next;
end;
First;
EnableControls;
end;
InitGrid();
application.MessageBox('操作成功!', '提示信息');
except
application.MessageBox('操作失败!', '提示信息', 0);
end;
end;
procedure TfrmTradeRRList.ToolButton6Click(Sender: TObject);
begin
WriteCxGrid(trim(self.Caption) + 'Tv1', Tv1, '发货管理');
WriteCxGrid(trim(self.Caption) + 'Tv2', Tv2, '发货管理');
end;
procedure TfrmTradeRRList.btnWCClick(Sender: TObject);
begin
if Order_Main.IsEmpty then
exit;
try
with Order_Main do
begin
DisableControls;
First;
while not eof do
begin
if fieldbyname('SSel').AsBoolean then
begin
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('update Trade_Cloth_RR_Main SET Comper=''' + Trim(DName) + ''',CompTime=getdate(), status=''10'' ');
sql.Add('where RRMID=' + quotedstr(trim(Order_Main.fieldbyname('RRMID').AsString)));
execsql;
end;
end;
next;
end;
EnableControls;
end;
InitGrid();
application.MessageBox('操作成功!', '提示信息');
except
application.MessageBox('操作失败!', '提示信息', 0);
end;
end;
procedure TfrmTradeRRList.Tv1Column9PropertiesEditValueChanged(Sender: TObject);
var
mvalue, FFieldName: string;
begin
mvalue := TcxTextEdit(Sender).EditingText;
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
if mvalue = '' then
begin
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('update Trade_Cloth_RR_Main set ' + FFieldName + '=' + 'NULL');
sql.Add('where RRMID=' + quotedstr(Trim(Order_Main.fieldbyname('RRMID').AsString)));
ExecSQL;
end;
end
else
begin
with Order_Main do
begin
Edit;
FieldByName(FFieldName).Value := mvalue;
Post;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('update Trade_Cloth_RR_Main set ' + FFieldName + '=' + quotedstr(Trim(mvalue)));
sql.Add('where RRMID=' + quotedstr(Trim(Order_Main.fieldbyname('RRMID').AsString)));
ExecSQL;
end;
end;
tv1.Controller.EditingController.ShowEdit();
end;
procedure TfrmTradeRRList.Tv1FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
begin
InitSubGrid();
end;
procedure TfrmTradeRRList.v1Column7PropertiesEditValueChanged(Sender: TObject);
var
mvalue, FFieldName: string;
begin
mvalue := TcxTextEdit(Sender).EditingText;
FFieldName := Trim(Tv1.Controller.FocusedColumn.DataBinding.FilterFieldName);
with Order_Main do
begin
Edit;
FieldByName(FFieldName).Value := mvalue;
Post;
end;
with ADOQueryCmd do
begin
Close;
SQL.Clear;
sql.Add('update Trade_Cloth_RR_Main set ' + FFieldName + '=' + quotedstr(Trim(mvalue)));
sql.Add('where RRMID=' + quotedstr(Trim(Order_Main.fieldbyname('RRMID').AsString)));
ExecSQL;
end;
tv1.Controller.EditingController.ShowEdit();
end;
end.

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B

View File

@ -3,7 +3,7 @@
<ProjectGuid>{D75EC075-444C-40C2-8ACB-0AAD801B39FF}</ProjectGuid>
</PropertyGroup>
<ItemGroup>
<Projects Include="ClothInfo.dproj">
<Projects Include="TradeMarket.dproj">
<Dependencies/>
</Projects>
<Projects Include="testDll.dproj">
@ -17,14 +17,14 @@
<Default.Personality/>
</BorlandProject>
</ProjectExtensions>
<Target Name="ClothInfo">
<MSBuild Projects="ClothInfo.dproj"/>
<Target Name="TradeMarket">
<MSBuild Projects="TradeMarket.dproj"/>
</Target>
<Target Name="ClothInfo:Clean">
<MSBuild Projects="ClothInfo.dproj" Targets="Clean"/>
<Target Name="TradeMarket:Clean">
<MSBuild Projects="TradeMarket.dproj" Targets="Clean"/>
</Target>
<Target Name="ClothInfo:Make">
<MSBuild Projects="ClothInfo.dproj" Targets="Make"/>
<Target Name="TradeMarket:Make">
<MSBuild Projects="TradeMarket.dproj" Targets="Make"/>
</Target>
<Target Name="testDll">
<MSBuild Projects="testDll.dproj"/>
@ -36,13 +36,13 @@
<MSBuild Projects="testDll.dproj" Targets="Make"/>
</Target>
<Target Name="Build">
<CallTarget Targets="ClothInfo;testDll"/>
<CallTarget Targets="TradeMarket;testDll"/>
</Target>
<Target Name="Clean">
<CallTarget Targets="ClothInfo:Clean;testDll:Clean"/>
<CallTarget Targets="TradeMarket:Clean;testDll:Clean"/>
</Target>
<Target Name="Make">
<CallTarget Targets="ClothInfo:Make;testDll:Make"/>
<CallTarget Targets="TradeMarket:Make;testDll:Make"/>
</Target>
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
</Project>

View File

@ -1,4 +1,4 @@
library ClothInfo;
library TradeMarket;
uses
SysUtils,
@ -8,7 +8,7 @@ uses
WinProcs,
midaslib,
U_GetDllForm in 'U_GetDllForm.pas',
U_DataLink in 'U_DataLink.pas' {DataLink_ClothInfo: TDataModule},
U_DataLink in 'U_DataLink.pas' {DataLink_TradeMarket: TDataModule},
U_iniParam in 'U_iniParam.pas',
U_BaseHelp in '..\..\..\public10\design\U_BaseHelp.pas' {frmBaseHelp},
U_BaseInput in '..\..\..\public10\design\U_BaseInput.pas' {frmBaseInput},
@ -19,16 +19,27 @@ uses
U_CompressionFun in '..\..\..\public10\ThreeFun\Fun\U_CompressionFun.pas',
U_RTFun in '..\..\..\public10\ThreeFun\Fun\U_RTFun.pas',
U_ZDYHelp in '..\..\..\public10\ThreeFun\Form\U_ZDYHelp.pas' {frmZDYHelp},
Unit1 in 'Unit1.pas' {Form1},
U_AttachmentUpload in '..\A00通用窗体\U_AttachmentUpload.pas' {frmFjList_RZ},
U_ClothInfoSel in '..\A00通用窗体\U_ClothInfoSel.pas' {frmClothInfoSel},
U_CompanySel in '..\A00通用窗体\U_CompanySel.pas' {frmCompanySel},
U_EmployeeSel in '..\A00通用窗体\U_EmployeeSel.pas' {frmEmployeeSel},
U_ClothType in 'U_ClothType.pas' {frmClothType},
U_CloInfoFileUp in 'U_CloInfoFileUp.pas' {frmCloInfoFileUp},
U_ClothInfo_Tat in 'U_ClothInfo_Tat.pas' {frmClothInfo_Tat},
U_testdll in 'U_testdll.pas' {Form1},
U_LabelMapSet in '..\A00通用窗体\U_LabelMapSet.pas' {frmLabelMapSet},
U_LabelPrint in '..\A00ͨÓô°Ìå\U_LabelPrint.pas' {frmLabelPrint};
U_LabelPrint in '..\A00通用窗体\U_LabelPrint.pas' {frmLabelPrint},
U_ZDYHelpSel in '..\..\..\public10\ThreeFun\Form\U_ZDYHelpSel.pas' {frmZDYHelpSel},
U_PictureUpload in '..\A00通用窗体\U_PictureUpload.pas' {frmPictureUpload},
U_TradeMarketDisScan in 'U_TradeMarketDisScan.pas' {frmTradeMarketDisScan},
U_TradeDispatchedSel in 'U_TradeDispatchedSel.pas' {frmTradeDispatchedSel},
uSZHN_JSON in '..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas',
U_BaseDataLink in '..\..\..\public10\design\U_BaseDataLink.pas' {BaseDataLink: TDataModule},
FrameDateSel in '..\A00通用组件\FrameDateSel.pas' {frmFrameDateSel: TFrame},
U_cxGridCustomSet in '..\..\..\public10\design\U_cxGridCustomSet.pas',
U_FormDesign in '..\..\..\public10\design\U_FormDesign.pas',
U_FormLayOutDesign in '..\..\..\public10\design\U_FormLayOutDesign.pas',
U_printPdf in '..\..\..\public10\ThreeFun\Fun\U_printPdf.pas',
U_TradeMarketList in 'U_TradeMarketList.pas' {frmTradeMarketList},
U_TradeDispatchedList in 'U_TradeDispatchedList.pas' {frmTradeDispatchedList},
U_TradeMarketDisSel in 'U_TradeMarketDisSel.pas' {frmTradeMarketDisSel};
{$R *.res}

View File

@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{7B70AA99-C84C-40AE-B4AE-13C5223B874C}</ProjectGuid>
<MainSource>ClothInfo.dpr</MainSource>
<MainSource>TradeMarket.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
<TargetedPlatforms>38017</TargetedPlatforms>
@ -79,7 +79,7 @@
<DCC_UnitSearchPath>D:\富通ERP;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<DCC_UsePackage>vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;dclOffice2k;Rave50CLX;Rave50VCL;$(DCC_UsePackage)</DCC_UsePackage>
<GenDll>true</GenDll>
<SanitizedProjectName>ClothInfo</SanitizedProjectName>
<SanitizedProjectName>TradeMarket</SanitizedProjectName>
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;Data.Win;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_Locale>2052</VerInfo_Locale>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
@ -124,7 +124,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName)</VerInfo_Keys>
<Debugger_HostApplication>D:\Dp10Repo\项目代码\D10xhBaisheng\A02基础产品管理\testDll.exe</Debugger_HostApplication>
<Debugger_HostApplication>D:\Dp10RepoV1\项目代码\D10xhGemei\T05贸易门市管理\testDll.exe</Debugger_HostApplication>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
@ -132,7 +132,7 @@
</DelphiCompile>
<DCCReference Include="U_GetDllForm.pas"/>
<DCCReference Include="U_DataLink.pas">
<Form>DataLink_ClothInfo</Form>
<Form>DataLink_TradeMarket</Form>
<DesignClass>TDataModule</DesignClass>
</DCCReference>
<DCCReference Include="U_iniParam.pas"/>
@ -157,6 +157,10 @@
<Form>frmZDYHelp</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="Unit1.pas">
<Form>Form1</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\A00通用窗体\U_AttachmentUpload.pas">
<Form>frmFjList_RZ</Form>
<FormType>dfm</FormType>
@ -173,22 +177,6 @@
<Form>frmEmployeeSel</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_ClothType.pas">
<Form>frmClothType</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_CloInfoFileUp.pas">
<Form>frmCloInfoFileUp</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_ClothInfo_Tat.pas">
<Form>frmClothInfo_Tat</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_testdll.pas">
<Form>Form1</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\A00通用窗体\U_LabelMapSet.pas">
<Form>frmLabelMapSet</Form>
<FormType>dfm</FormType>
@ -197,6 +185,49 @@
<Form>frmLabelPrint</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\..\..\public10\ThreeFun\Form\U_ZDYHelpSel.pas">
<Form>frmZDYHelpSel</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\A00通用窗体\U_PictureUpload.pas">
<Form>frmPictureUpload</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_TradeMarketDisScan.pas">
<Form>frmTradeMarketDisScan</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_TradeDispatchedSel.pas">
<Form>frmTradeDispatchedSel</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\uSZHN_JSON.pas"/>
<DCCReference Include="..\..\..\public10\design\U_BaseDataLink.pas">
<Form>BaseDataLink</Form>
<FormType>dfm</FormType>
<DesignClass>TDataModule</DesignClass>
</DCCReference>
<DCCReference Include="..\A00通用组件\FrameDateSel.pas">
<Form>frmFrameDateSel</Form>
<FormType>dfm</FormType>
<DesignClass>TFrame</DesignClass>
</DCCReference>
<DCCReference Include="..\..\..\public10\design\U_cxGridCustomSet.pas"/>
<DCCReference Include="..\..\..\public10\design\U_FormDesign.pas"/>
<DCCReference Include="..\..\..\public10\design\U_FormLayOutDesign.pas"/>
<DCCReference Include="..\..\..\public10\ThreeFun\Fun\U_printPdf.pas"/>
<DCCReference Include="U_TradeMarketList.pas">
<Form>frmTradeMarketList</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_TradeDispatchedList.pas">
<Form>frmTradeDispatchedList</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="U_TradeMarketDisSel.pas">
<Form>frmTradeMarketDisSel</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Debug">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
@ -215,7 +246,7 @@
<BorlandProject>
<Delphi.Personality>
<Source>
<Source Name="MainSource">ClothInfo.dpr</Source>
<Source Name="MainSource">TradeMarket.dpr</Source>
</Source>
</Delphi.Personality>
<Platforms>
@ -227,9 +258,9 @@
<Platform value="Win64">False</Platform>
</Platforms>
<Deployment Version="3">
<DeployFile LocalName="ClothInfo.dll" Configuration="Debug" Class="ProjectOutput">
<DeployFile LocalName="TradeMarket.dll" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>ClothInfo.dll</RemoteName>
<RemoteName>TradeMarket.dll</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>

Binary file not shown.

View File

@ -1,9 +1,25 @@
object DataLink_ClothInfo: TDataLink_ClothInfo
OldCreateOrder = False
OnCreate = DataModuleCreate
inherited DataLink_TradeMarket: TDataLink_TradeMarket
OnDestroy = DataModuleDestroy
Height = 349
Width = 482
inherited cxEditStyleController1: TcxEditStyleController
Style.LookAndFeel.SkinName = ''
StyleDisabled.LookAndFeel.SkinName = ''
StyleFocused.LookAndFeel.SkinName = ''
StyleHot.LookAndFeel.SkinName = ''
PixelsPerInch = 96
end
inherited cxImageList_bar: TcxImageList
FormatVersion = 1
end
inherited ThreeColorBase: TcxStyleRepository
PixelsPerInch = 96
end
inherited dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList
inherited dxLayoutSkinLookAndFeel1: TdxLayoutSkinLookAndFeel
PixelsPerInch = 96
end
end
object AdoDataLink: TADOQuery
Connection = ADOLink
Parameters = <>
@ -10423,139 +10439,6 @@ object DataLink_ClothInfo: TDataLink_ClothInfo
FF800001000000F003FFFE00FFE0000300000000000000000000000000000000
000000000000}
end
object ThreeLookAndFeelCol: TcxLookAndFeelController
Kind = lfStandard
NativeStyle = False
Left = 253
Top = 12
end
object ThreeColorBase: TcxStyleRepository
Left = 147
Top = 80
PixelsPerInch = 96
object SHuangSe: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 4707838
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
TextColor = clBtnText
end
object SkyBlue: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = clSkyBlue
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
TextColor = clBlack
end
object Default: TcxStyle
AssignedValues = [svFont]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object QHuangSe: TcxStyle
AssignedValues = [svColor, svFont]
Color = 8454143
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
end
object Red: TcxStyle
AssignedValues = [svColor, svFont]
Color = clRed
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
end
object FontBlue: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clBlue
end
object TextSHuangSe: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clOlive
end
object FonePurple: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clWindow
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clPurple
end
object FoneClMaroon: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clMaroon
end
object FoneRed: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = ANSI_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clRed
end
object RowColor: TcxStyle
AssignedValues = [svColor]
Color = 16311512
end
object handBlack: TcxStyle
AssignedValues = [svFont]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object cxBlue: TcxStyle
AssignedValues = [svColor, svFont]
Color = 16711731
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
end
object SHuangSeCu: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 4707838
Font.Charset = GB2312_CHARSET
Font.Color = clBlack
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clRed
end
end
object Timer_link: TTimer
Interval = 15000
OnTimer = Timer_linkTimer

View File

@ -5,23 +5,9 @@ interface
uses
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
Windows, Messages, forms, OleCtnrs, DateUtils, ExtCtrls, SyncObjs, cxClasses,
dxSkinsCore, dxSkinsDefaultPainters, System.ImageList, dxSkinBasic,
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
dxSkinDarkroom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinOffice2016Colorful,
dxSkinOffice2016Dark, dxSkinOffice2019Black, dxSkinOffice2019Colorful,
dxSkinOffice2019DarkGray, dxSkinOffice2019White, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
dxSkinSpringtime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
dxSkinTheBezier, dxSkinValentine, dxSkinVisualStudio2013Blue,
dxSkinVisualStudio2013Dark, dxSkinVisualStudio2013Light, dxSkinVS2010,
dxSkinWhiteprint, dxSkinWXI, dxSkinXmas2008Blue;
dxSkinsCore, dxSkinsDefaultPainters, System.ImageList, U_BaseDataLink, dxCore,
cxLocalization, dxLayoutLookAndFeels, cxImageList, cxGraphics, cxContainer,
cxEdit, dxSkinsForm;
type
TMyThread = class(TThread)
@ -53,26 +39,10 @@ var
UserDataFlag: string;
type
TDataLink_ClothInfo = class(TDataModule)
TDataLink_TradeMarket = class(TBaseDataLink)
AdoDataLink: TADOQuery;
ADOLink: TADOConnection;
ThreeImgList: TImageList;
ThreeLookAndFeelCol: TcxLookAndFeelController;
ThreeColorBase: TcxStyleRepository;
SHuangSe: TcxStyle;
SkyBlue: TcxStyle;
Default: TcxStyle;
QHuangSe: TcxStyle;
Red: TcxStyle;
FontBlue: TcxStyle;
TextSHuangSe: TcxStyle;
FonePurple: TcxStyle;
FoneClMaroon: TcxStyle;
FoneRed: TcxStyle;
RowColor: TcxStyle;
handBlack: TcxStyle;
cxBlue: TcxStyle;
SHuangSeCu: TcxStyle;
Timer_link: TTimer;
ImageList_new32: TImageList;
procedure DataModuleDestroy(Sender: TObject);
@ -89,7 +59,7 @@ type
TMixtext = procedure(szSrcBmpFileName: PChar; szDstBmpFileName: PChar; sztext: PChar; fontsize, txtheight, hmargin, vmargin, txtcntoneline: integer); stdcall;
var
DataLink_ClothInfo: TDataLink_ClothInfo;
DataLink_TradeMarket: TDataLink_TradeMarket;
CriticalSection: TCriticalSection; {ÉùÃ÷ÁÙ½ç}
implementation
@ -100,7 +70,7 @@ begin
FreeOnTerminate := True;
CriticalSection.Enter;
try
with DataLink_ClothInfo.AdoDataLink do
with DataLink_TradeMarket.AdoDataLink do
begin
close;
sql.Clear;
@ -109,7 +79,7 @@ begin
end;
except
try
with DataLink_ClothInfo.ADOLink do
with DataLink_TradeMarket.ADOLink do
begin
Connected := false;
ConnectionString := DConString;
@ -123,19 +93,21 @@ begin
CriticalSection.Leave;
end;
procedure TDataLink_ClothInfo.DataModuleDestroy(Sender: TObject);
procedure TDataLink_TradeMarket.DataModuleDestroy(Sender: TObject);
begin
inherited;
CriticalSection.Free;
DataLink_ClothInfo := nil;
DataLink_TradeMarket := nil;
end;
procedure TDataLink_ClothInfo.Timer_linkTimer(Sender: TObject);
procedure TDataLink_TradeMarket.Timer_linkTimer(Sender: TObject);
begin
TMyThread.Create(False);
end;
procedure TDataLink_ClothInfo.DataModuleCreate(Sender: TObject);
procedure TDataLink_TradeMarket.DataModuleCreate(Sender: TObject);
begin
inherited;
CriticalSection := TCriticalSection.Create;
end;

View File

@ -15,7 +15,7 @@ function GetsysParam(muserId: pchar; fparam1: pchar): Boolean;
implementation
uses
U_DataLink, U_iniParam, U_ClothType, U_ClothInfo, U_ClothInfo_Tat;
U_DataLink, U_iniParam, U_TradeMarketList, U_TradeDispatchedList;
/////////////////////////////////////////////////////////////////
// 功能说明:取Dll中得窗体 //
@ -70,12 +70,13 @@ begin
if trim(DataBaseStr) = '' then
begin
server := '101.132.143.144,7781';
dtbase := 'BaiShengData';
dtbase := 'gemeiData';
user := 'rtsa';
pswd := 'rightsoft@5740';
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
Parameters1 := '录入';
Parameters1 := '管理';
// DParameters1:='멕홈掘';
// Parameters2 := '虔廉';
end
else
begin
@ -124,11 +125,12 @@ begin
//调用子模块窗口
case FormID of
111: // 产品类别
111: //댕새데
begin
with TfrmClothType.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
with TfrmTradeMarketList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
begin
fFormID := FormID;
FOrdType := '攣끽데';
FormStyle := mstyle;
WindowState := mstate;
BorderStyle := mborderstyle;
@ -136,11 +138,12 @@ begin
end;
end;
112: // 产品信息管理
112: //숏湳데
begin
with TfrmClothInfo.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
with TfrmTradeMarketList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
begin
fFormID := FormID;
FOrdType := '숏湳데';
FormStyle := mstyle;
WindowState := mstate;
BorderStyle := mborderstyle;
@ -148,9 +151,9 @@ begin
end;
end;
113: // 梭织产品信息管理
121: //토새데
begin
with TfrmClothInfo_Tat.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
with TfrmTradeDispatchedList.Create(Application.MainForm, Title, trim(Parameters1), trim(Parameters2), trim(Parameters3), trim(Parameters4), trim(Parameters5), trim(Parameters10)) do //
begin
fFormID := FormID;
FormStyle := mstyle;
@ -181,7 +184,7 @@ begin
//////////////////////////////
// shortDateFormat := 'yyyy-MM-dd';
//服务器日期
with DataLink_ClothInfo.AdoDataLink do
with DataLink_TradeMarket.AdoDataLink do
begin
close;
sql.Clear;
@ -207,10 +210,10 @@ begin
finally
IniFile.Free;
end;
if not Assigned(DataLink_ClothInfo) then
DataLink_ClothInfo := TDataLink_ClothInfo.Create(Application);
if not Assigned(DataLink_TradeMarket) then
DataLink_TradeMarket := TDataLink_TradeMarket.Create(Application);
try
with DataLink_ClothInfo.ADOLink do
with DataLink_TradeMarket.ADOLink do
begin
if not Connected then
begin
@ -234,7 +237,7 @@ initialization
finalization
DataLink_ClothInfo.Free;
DataLink_TradeMarket.Free;
application := NewDllApp;
dxUnitsLoader.Finalize;

View File

@ -0,0 +1,883 @@
inherited frmTradeDispatchedList: TfrmTradeDispatchedList
Left = 165
Top = 13
Caption = #37197#36135#31649#29702
ClientHeight = 935
ClientWidth = 1540
Font.Height = -16
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitWidth = 1556
ExplicitHeight = 974
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1540
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 95
Caption = 'ToolBar1'
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Images = DataLink_TradeMarket.cxImageList_bar
List = True
ParentColor = False
ParentFont = False
ShowCaptions = True
TabOrder = 5
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 1
OnClick = TBRafreshClick
end
object ToolButton1: TToolButton
Left = 63
Top = 0
AutoSize = True
Caption = #25195#25551#37197#36135
ImageIndex = 8
OnClick = ToolButton1Click
end
object TBPrint: TToolButton
Left = 150
Top = 0
AutoSize = True
Caption = #25171#21360
ImageIndex = 21
OnClick = TBPrintClick
end
object TBPrint1: TToolButton
Left = 213
Top = 0
AutoSize = True
Caption = #25171#21360#20986#24211#21333
ImageIndex = 21
OnClick = TBPrint1Click
end
object TBCK: TToolButton
Left = 312
Top = 0
AutoSize = True
Caption = #26597#30475
ImageIndex = 8
OnClick = TBCKClick
end
object TBFJ: TToolButton
Left = 375
Top = 0
AutoSize = True
Caption = #38468#20214
ImageIndex = 22
OnClick = TBFJClick
end
object ToolButton2: TToolButton
Left = 438
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton2Click
end
object TBClose: TToolButton
Left = 525
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object Panel1: TPanel [1]
Left = 0
Top = 30
Width = 1540
Height = 83
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clWhite
ParentBackground = False
TabOrder = 6
ExplicitTop = 38
object Label3: TLabel
Left = 35
Top = 48
Width = 64
Height = 21
Caption = #22823#36135#21333#21495
end
object Label1: TLabel
Left = 419
Top = 48
Width = 32
Height = 21
Caption = #23458#25143
end
object Label2: TLabel
Left = 227
Top = 48
Width = 64
Height = 21
Caption = #20135#21697#21517#31216
end
object TMMNo: TEdit
Tag = 2
Left = 103
Top = 44
Width = 120
Height = 29
TabOrder = 0
OnKeyPress = TMMNoKeyPress
end
object CustName: TEdit
Tag = 2
Left = 455
Top = 44
Width = 120
Height = 29
TabOrder = 1
OnKeyPress = TMMNoKeyPress
end
object C_Name: TEdit
Tag = 2
Left = 295
Top = 44
Width = 120
Height = 29
TabOrder = 2
OnKeyPress = TMMNoKeyPress
end
inline frmFrameDateSel1: TfrmFrameDateSel
Left = 2
Top = 2
Width = 1536
Height = 37
Align = alTop
Color = clWhite
ParentBackground = False
ParentColor = False
TabOrder = 3
ExplicitLeft = -380
ExplicitTop = 2
ExplicitWidth = 1920
ExplicitHeight = 37
inherited lbl2: TLabel
Width = 16
Height = 21
ExplicitWidth = 16
ExplicitHeight = 21
end
end
end
object cxGrid1: TcxGrid [2]
Left = 0
Top = 141
Width = 1540
Height = 465
Align = alTop
PopupMenu = PM_1
TabOrder = 2
ExplicitWidth = 1431
ExplicitHeight = 381
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnFocusedRecordChanged = Tv1FocusedRecordChanged
DataController.DataSource = DataSource1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
Column = Tv1Column11
end
item
Kind = skSum
Column = Tv1Column10
end>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.IndicatorWidth = 30
object v1Column16: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
HeaderAlignmentHorz = taCenter
Width = 50
end
object Tv1Column14: TcxGridDBColumn
Caption = #22823#36135#21333#21495
DataBinding.FieldName = 'TMMNO'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 122
end
object v1OrdDate: TcxGridDBColumn
Caption = #21046#21333#26085#26399
DataBinding.FieldName = 'OrdDate'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxDateEditProperties'
Properties.ShowTime = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 122
end
object Tv1Column2: TcxGridDBColumn
Caption = #32463#33829#21333#20301
DataBinding.FieldName = 'OurCoName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column4: TcxGridDBColumn
Caption = #23458#25143
DataBinding.FieldName = 'CustName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 134
end
object v1DeliveryDate: TcxGridDBColumn
Caption = #20132#36135#26085#26399
DataBinding.FieldName = 'DlyDate'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxDateEditProperties'
Properties.ShowTime = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column9: TcxGridDBColumn
Caption = #32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object Tv1Column12: TcxGridDBColumn
Caption = #21697#21517
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object Tv1Column13: TcxGridDBColumn
Caption = #20013#25991#39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
end
object Tv1Column15: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Column11: TcxGridDBColumn
Caption = #21305#25968
DataBinding.FieldName = 'TMSPiece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column10: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'TMSQty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
HeaderGlyphAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column7: TcxGridDBColumn
Caption = #37197#36135#21305#25968
DataBinding.FieldName = 'PHRollNum'
DataBinding.IsNullValueType = True
end
object Tv1Column8: TcxGridDBColumn
Caption = #37197#36135#25968#37327
DataBinding.FieldName = 'PHQty'
DataBinding.IsNullValueType = True
end
object v1Column11: TcxGridDBColumn
Caption = #21333#20301
DataBinding.FieldName = 'TMSUnit'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
HeaderGlyphAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column6: TcxGridDBColumn
Caption = #21046#21333#20154
DataBinding.FieldName = 'FILLER'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column1: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'OrdNote'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column3: TcxGridDBColumn
Caption = #21457#36135#22320#22336
DataBinding.FieldName = 'ShippingAddress'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 134
end
object Tv1Column5: TcxGridDBColumn
Caption = #32852#31995#26041#24335
DataBinding.FieldName = 'CONTACT'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 80
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object Panel2: TPanel [3]
Left = 0
Top = 606
Width = 1540
Height = 329
Align = alClient
BevelOuter = bvNone
Caption = 'Panel2'
TabOrder = 3
ExplicitTop = 366
ExplicitHeight = 196
object cxGrid2: TcxGrid
Left = 0
Top = 30
Width = 1540
Height = 299
Align = alClient
TabOrder = 0
ExplicitLeft = -2
ExplicitWidth = 1431
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DS_PH
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Kind = skSum
Position = spFooter
Column = V2Column5
end
item
Kind = skCount
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
Column = V2Column5
end
item
Kind = skCount
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
Position = spFooter
end
item
Kind = skSum
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
end
item
Kind = skSum
Column = V2Column5
end
item
Kind = skSum
end
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsData.Deleting = False
OptionsData.Inserting = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.Indicator = True
object V2Column13: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'ssel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
Properties.NullStyle = nssUnchecked
HeaderAlignmentHorz = taCenter
Width = 99
end
object V2Column10: TcxGridDBColumn
Caption = #21367#26465#30721
DataBinding.FieldName = 'stkid'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object V2Column2: TcxGridDBColumn
Caption = #21697#21517
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object TV2Column2: TcxGridDBColumn
Caption = #32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 99
end
object V2Column3: TcxGridDBColumn
Caption = #35268#26684
DataBinding.FieldName = 'C_Spec'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object V2C_Color: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object TV2Column1: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 99
end
object V2Column5: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'stkqty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object V2Column6: TcxGridDBColumn
Caption = #25209#21495
DataBinding.FieldName = 'batchno'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object V2Column11: TcxGridDBColumn
Caption = #26579#21378#32568#21495
DataBinding.FieldName = 'ftypcid'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object V2Filler: TcxGridDBColumn
Caption = #37197#36135#20154#21592
DataBinding.FieldName = 'Filler'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object V2Column12: TcxGridDBColumn
Caption = #37197#36135#26102#38388
DataBinding.FieldName = 'FillTime'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object V2Column14: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'C_Width'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object V2Column15: TcxGridDBColumn
Caption = #20811#37325'(g/'#13217')'
DataBinding.FieldName = 'C_GramWeight'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object V2Column16: TcxGridDBColumn
Caption = #21152#24037#21378
DataBinding.FieldName = 'factoryName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
end
object cxGrid2Level1: TcxGridLevel
GridView = TV2
end
end
object ToolBar2: TToolBar
Tag = 1
Left = 0
Top = 0
Width = 1540
Height = 30
ButtonHeight = 30
ButtonWidth = 83
Caption = 'ToolBar1'
Color = clWhite
EdgeInner = esNone
EdgeOuter = esNone
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Images = DataLink_TradeMarket.cxImageList_bar
List = True
ParentColor = False
ParentFont = False
ShowCaptions = True
TabOrder = 1
object ToolButton4: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #36873#25321#24211#23384
ImageIndex = 9
OnClick = ToolButton4Click
end
object phwc: TToolButton
Left = 87
Top = 0
AutoSize = True
Caption = #37197#36135#23436#25104
ImageIndex = 12
OnClick = phwcClick
end
object ToolButton6: TToolButton
Left = 174
Top = 0
AutoSize = True
Caption = #20462#25913#37197#36135
ImageIndex = 3
OnClick = ToolButton6Click
end
object phok: TToolButton
Left = 261
Top = 0
AutoSize = True
Caption = #37197#36135#30830#35748
ImageIndex = 12
OnClick = phokClick
end
object fh: TToolButton
Left = 348
Top = 0
AutoSize = True
Caption = #25104#21697#21457#36135
ImageIndex = 12
OnClick = fhClick
end
object ToolButton9: TToolButton
Left = 435
Top = 0
AutoSize = True
Caption = #25171#21360#26631#31614
ImageIndex = 21
OnClick = ToolButton9Click
end
object del: TToolButton
Left = 522
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
OnClick = delClick
end
object ToolButton5: TToolButton
Left = 585
Top = 0
AutoSize = True
Caption = #25972#21333#25764#38144
ImageIndex = 11
OnClick = ToolButton5Click
end
object Tdbchexiao: TToolButton
Left = 672
Top = 0
AutoSize = True
Caption = #25972#31508#25764#38144
ImageIndex = 11
OnClick = TdbchexiaoClick
end
object ToolButton3: TToolButton
Left = 759
Top = 0
AutoSize = True
Caption = #25764#38144#21457#36135
ImageIndex = 11
OnClick = ToolButton3Click
end
end
end
object cxTabControl1: TcxTabControl [4]
Left = 0
Top = 113
Width = 1540
Height = 28
Align = alTop
TabOrder = 4
Properties.CustomButtons.Buttons = <>
Properties.Style = 9
Properties.TabIndex = 0
Properties.Tabs.Strings = (
#26410#37197#36135
#24050#37197#36135
#24050#21457#36135
#20840#37096)
OnChange = cxTabControl1Change
ExplicitTop = 121
ClientRectRight = 0
ClientRectTop = 0
end
inherited cxProgressBar2: TcxProgressBar
Left = 626
Top = 344
ExplicitLeft = 626
ExplicitTop = 344
ExplicitHeight = 29
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 187
Top = 378
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 163
Top = 229
end
object cxgrdpmn1: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 700
Top = 236
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 568
Top = 240
end
object ADOQueryMain: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 446
Top = 230
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 274
Top = 390
end
object DataSource1: TDataSource
DataSet = Order_Main
Left = 812
Top = 440
end
object Order_Main: TClientDataSet
Aggregates = <>
Params = <>
Left = 724
Top = 432
end
object ADOQuerySub: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 348
Top = 296
end
object DataSource2: TDataSource
DataSet = ORDER_SUB
Left = 616
Top = 420
end
object ADOQueryImage: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
EnableBCD = False
Parameters = <>
Left = 332
Top = 227
end
object DSImage: TDataSource
DataSet = ADOQueryImage
Left = 440
Top = 294
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 92
Top = 258
end
object ORDER_SUB: TClientDataSet
Aggregates = <>
Params = <>
Left = 248
Top = 276
end
object PopupMenu2: TPopupMenu
Left = 812
Top = 388
object N3: TMenuItem
Caption = #20840#36873
OnClick = N3Click
end
object N4: TMenuItem
Caption = #20840#24323
OnClick = N4Click
end
object N2: TMenuItem
Caption = #22797#21046
OnClick = N2Click
end
end
object cxgrdpmn2: TcxGridPopupMenu
PopupMenus = <>
Left = 932
Top = 260
end
object CDS_WXTS: TClientDataSet
Aggregates = <>
Params = <>
Left = 516
Top = 416
end
object PM_1: TPopupMenu
Left = 940
Top = 388
object N1: TMenuItem
Caption = #22797#21046
OnClick = N1Click
end
end
object GPM_3: TcxGridPopupMenu
PopupMenus = <>
Left = 860
Top = 228
end
object ADO_PH: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 296
Top = 476
end
object DS_PH: TDataSource
DataSet = CDS_PH
Left = 360
Top = 444
end
object CDS_PH: TClientDataSet
Aggregates = <>
Params = <>
Left = 396
Top = 486
end
object ADOQueryPrint: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 1128
Top = 432
end
object RMDB_1: TRMDBDataSet
Visible = True
DataSet = ADOQueryPrint
Left = 1180
Top = 432
end
object RM1: TRMGridReport
ThreadPrepareReport = True
InitialZoom = pzDefault
PreviewButtons = [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbExport, rmpbNavigator]
DefaultCollate = False
ShowPrintDialog = False
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
PreviewOptions.RulerUnit = rmutScreenPixels
PreviewOptions.RulerVisible = False
PreviewOptions.DrawBorder = False
PreviewOptions.BorderPen.Color = clGray
PreviewOptions.BorderPen.Style = psDash
Dataset = RMDB_1
CompressLevel = rmzcFastest
CompressThread = False
LaterBuildEvents = True
OnlyOwnerDataSet = False
Left = 1228
Top = 432
ReportData = {}
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,458 @@
inherited frmTradeDispatchedSel: TfrmTradeDispatchedSel
Left = 165
Top = 13
Caption = #37197#36135#31649#29702
ClientHeight = 562
ClientWidth = 1540
Position = poScreenCenter
ExplicitLeft = -70
ExplicitWidth = 1556
ExplicitHeight = 601
PixelsPerInch = 96
TextHeight = 13
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1540
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 91
Caption = 'ToolBar1'
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Images = DataLink_TradeMarket.ImageList_new32
List = True
ParentColor = False
ParentFont = False
ShowCaptions = True
TabOrder = 0
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 1
OnClick = TBRafreshClick
end
object ToolButton2: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton2Click
end
object TBClose: TToolButton
Left = 166
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object Panel1: TPanel [1]
Left = 0
Top = 38
Width = 1540
Height = 51
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clWhite
ParentBackground = False
TabOrder = 1
object Label3: TLabel
Left = 317
Top = 20
Width = 52
Height = 12
Caption = #22823#36135#21333#21495
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label12: TLabel
Left = 613
Top = 119
Width = 26
Height = 12
Caption = #20811#37325
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label1: TLabel
Left = 637
Top = 20
Width = 26
Height = 12
Caption = #23458#25143
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label2: TLabel
Left = 478
Top = 20
Width = 52
Height = 12
Caption = #20135#21697#21517#31216
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object BegDate: TDateTimePicker
Left = 128
Top = 16
Width = 85
Height = 20
Date = 40675.000000000000000000
Format = 'yyyy-MM-dd'
Time = 0.464742650459811600
TabOrder = 0
end
object EndDate: TDateTimePicker
Left = 219
Top = 16
Width = 86
Height = 20
Date = 40675.000000000000000000
Format = 'yyyy-MM-dd'
Time = 0.464761099538009200
TabOrder = 2
end
object TMMNo: TEdit
Tag = 2
Left = 375
Top = 16
Width = 77
Height = 21
TabOrder = 1
OnKeyPress = TMMNoKeyPress
end
object MPRTKZ: TEdit
Tag = 2
Left = 654
Top = 99
Width = 56
Height = 21
TabOrder = 3
end
object ComboBox1: TComboBox
Left = 49
Top = 16
Width = 71
Height = 21
Enabled = False
TabOrder = 4
Text = #21046#21333#26085#26399
OnChange = ComboBox1Change
Items.Strings = (
#21046#21333#26085#26399
#20132#36135#26085#26399)
end
object CustName: TEdit
Tag = 2
Left = 669
Top = 16
Width = 80
Height = 21
TabOrder = 5
OnKeyPress = TMMNoKeyPress
end
object C_Name: TEdit
Tag = 2
Left = 533
Top = 16
Width = 77
Height = 21
TabOrder = 6
OnKeyPress = TMMNoKeyPress
end
object CheckBox1: TCheckBox
Left = 28
Top = 18
Width = 19
Height = 17
Checked = True
State = cbChecked
TabOrder = 7
end
object CheckBox3: TCheckBox
Left = 776
Top = 16
Width = 99
Height = 19
Caption = #20840#36873
TabOrder = 8
OnClick = CheckBox3Click
end
end
object cxGrid1: TcxGrid [2]
Left = 0
Top = 111
Width = 1540
Height = 451
Align = alClient
TabOrder = 2
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
OnCellDblClick = Tv1CellDblClick
DataController.DataSource = DataSource1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
Column = Tv1Column11
end
item
Kind = skSum
Column = Tv1Column10
end>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.IndicatorWidth = 30
Styles.Content = DataLink_TradeMarket.Default
Styles.IncSearch = DataLink_TradeMarket.SHuangSe
Styles.Footer = DataLink_TradeMarket.Default
Styles.Header = DataLink_TradeMarket.Default
Styles.Inactive = DataLink_TradeMarket.SHuangSe
Styles.Selection = DataLink_TradeMarket.SHuangSe
object Tv1Column14: TcxGridDBColumn
Caption = #22823#36135#21333#21495
DataBinding.FieldName = 'TMMNO'
HeaderAlignmentHorz = taCenter
Width = 70
end
object v1OrdDate: TcxGridDBColumn
Caption = #21046#21333#26085#26399
DataBinding.FieldName = 'OrdDate'
PropertiesClassName = 'TcxDateEditProperties'
Properties.ShowTime = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_TradeMarket.Default
Width = 66
end
object Tv1Column2: TcxGridDBColumn
Caption = #32463#33829#21333#20301
DataBinding.FieldName = 'OurCoName'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_TradeMarket.FontBlue
Width = 66
end
object Tv1Column4: TcxGridDBColumn
Caption = #23458#25143
DataBinding.FieldName = 'CustName'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_TradeMarket.FoneClMaroon
Width = 66
end
object v1DeliveryDate: TcxGridDBColumn
Caption = #20132#36135#26085#26399
DataBinding.FieldName = 'DlyDate'
PropertiesClassName = 'TcxDateEditProperties'
Properties.ShowTime = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Styles.Header = DataLink_TradeMarket.Default
Width = 66
end
object Tv1Column9: TcxGridDBColumn
Caption = #32534#21495
DataBinding.FieldName = 'C_Code'
HeaderAlignmentHorz = taCenter
end
object Tv1Column12: TcxGridDBColumn
Caption = #21697#21517
DataBinding.FieldName = 'C_Name'
HeaderAlignmentHorz = taCenter
end
object Tv1Column13: TcxGridDBColumn
Caption = #20013#25991#39068#33394
DataBinding.FieldName = 'C_Color'
HeaderAlignmentHorz = taCenter
end
object Tv1Column15: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Column11: TcxGridDBColumn
Caption = #21305#25968
DataBinding.FieldName = 'TMSPiece'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column10: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'TMSQty'
HeaderAlignmentHorz = taCenter
HeaderGlyphAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column7: TcxGridDBColumn
Caption = #37197#36135#21305#25968
DataBinding.FieldName = 'PHRollNum'
end
object Tv1Column8: TcxGridDBColumn
Caption = #37197#36135#25968#37327
DataBinding.FieldName = 'PHQty'
end
object v1Column11: TcxGridDBColumn
Caption = #21333#20301
DataBinding.FieldName = 'OrdUnit'
HeaderAlignmentHorz = taCenter
HeaderGlyphAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column6: TcxGridDBColumn
Caption = #21046#21333#20154
DataBinding.FieldName = 'FILLER'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column1: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'Note'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column3: TcxGridDBColumn
Caption = #21457#36135#22320#22336
DataBinding.FieldName = 'ShippingAddress'
HeaderAlignmentHorz = taCenter
Width = 134
end
object Tv1Column5: TcxGridDBColumn
Caption = #32852#31995#26041#24335
DataBinding.FieldName = 'CONTACT'
HeaderAlignmentHorz = taCenter
Width = 80
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object cxTabControl1: TcxTabControl [3]
Left = 0
Top = 89
Width = 1540
Height = 22
Align = alTop
Enabled = False
TabOrder = 3
Properties.CustomButtons.Buttons = <>
Properties.Style = 9
Properties.TabIndex = 0
Properties.Tabs.Strings = (
#26410#37197#36135
#24050#37197#36135
#24050#21457#36135
#20840#37096)
OnChange = cxTabControl1Change
ClientRectRight = 0
ClientRectTop = 0
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 257
Top = 152
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 121
Top = 153
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 568
Top = 240
end
object ADOQueryMain: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 428
Top = 176
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 328
Top = 168
end
object DataSource1: TDataSource
DataSet = Order_Main
Left = 812
Top = 440
end
object Order_Main: TClientDataSet
Aggregates = <>
Params = <>
Left = 724
Top = 432
end
object ADOQuerySub: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 328
Top = 272
end
object DataSource2: TDataSource
DataSet = ORDER_SUB
Left = 616
Top = 420
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 92
Top = 258
end
object ORDER_SUB: TClientDataSet
Aggregates = <>
Params = <>
Left = 228
Top = 264
end
end

View File

@ -0,0 +1,449 @@
unit U_TradeDispatchedSel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, cxMemo,
cxRichEdit, ComCtrls, cxContainer, cxTextEdit, cxMaskEdit, cxButtonEdit,
StdCtrls, ToolWin, DBClient, ADODB, ExtCtrls, BtnEdit, cxCalendar, StrUtils,
cxCurrencyEdit, cxImage, cxDBEdit, Menus, RM_Common, RM_Class, RM_e_Xls,
RM_Dataset, RM_System, RM_GridReport, cxGridCustomPopupMenu, cxGridPopupMenu,
cxPC, cxSplitter, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdFTP, ShellAPI, cxDropDownEdit, cxCheckBox, RM_e_Graphic, RM_e_Jpeg,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, Math,
dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges,
IdExplicitTLSClientServerBase, U_BaseHelp, Vcl.Clipbrd, U_BaseList,
System.ImageList, Vcl.ImgList;
type
TfrmTradeDispatchedSel = class(TfrmBaseHelp)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBClose: TToolButton;
Panel1: TPanel;
BegDate: TDateTimePicker;
EndDate: TDateTimePicker;
Tv1: TcxGridDBTableView;
cxGrid1Level1: TcxGridLevel;
cxGrid1: TcxGrid;
ADOQueryCmd: TADOQuery;
ADOQueryMain: TADOQuery;
ADOQueryTemp: TADOQuery;
DataSource1: TDataSource;
Label3: TLabel;
TMMNo: TEdit;
v1OrdDate: TcxGridDBColumn;
v1DeliveryDate: TcxGridDBColumn;
Order_Main: TClientDataSet;
Label12: TLabel;
MPRTKZ: TEdit;
ADOQuerySub: TADOQuery;
DataSource2: TDataSource;
IdFTP1: TIdFTP;
v1Column11: TcxGridDBColumn;
ORDER_SUB: TClientDataSet;
ComboBox1: TComboBox;
Label1: TLabel;
CustName: TEdit;
Tv1Column6: TcxGridDBColumn;
Tv1Column2: TcxGridDBColumn;
Tv1Column10: TcxGridDBColumn;
Tv1Column11: TcxGridDBColumn;
Tv1Column1: TcxGridDBColumn;
Label2: TLabel;
C_Name: TEdit;
CheckBox1: TCheckBox;
ToolButton2: TToolButton;
Tv1Column4: TcxGridDBColumn;
Tv1Column3: TcxGridDBColumn;
Tv1Column5: TcxGridDBColumn;
cxTabControl1: TcxTabControl;
Tv1Column7: TcxGridDBColumn;
Tv1Column8: TcxGridDBColumn;
Tv1Column9: TcxGridDBColumn;
Tv1Column12: TcxGridDBColumn;
Tv1Column13: TcxGridDBColumn;
Tv1Column14: TcxGridDBColumn;
Tv1Column15: TcxGridDBColumn;
CheckBox3: TCheckBox;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure TMMNoMChange(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBTPClick(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure TMMNoKeyPress(Sender: TObject; var Key: Char);
procedure cxTabControl1Change(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure CustomerNoNameKeyPress(Sender: TObject; var Key: Char);
procedure JGTypeChange(Sender: TObject);
procedure ToolButton2Click(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure fhClick(Sender: TObject);
procedure CheckBox3Click(Sender: TObject);
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
private
DQdate: TDateTime;
MSubIds: string;
procedure InitGrid();
procedure InitForm();
function DelData(): Boolean;
procedure InitGridFH();
procedure InitSub();
procedure InitPH();
procedure SetStatus();
procedure InitImage(fwbid: string);
function SaveData(): Boolean;
procedure SendMessageQR(MDateId, KeyWord1, KeyWord2, KeyWord3: string);
{ Private declarations }
public
FFInt, FCloth: Integer;
canshu1, canshu2: string;
fFlileFlag: string;
FNOTE: string;
{ Public declarations }
end;
var
frmTradeDispatchedSel: TfrmTradeDispatchedSel;
implementation
uses
U_DataLink, U_RTFun, U_ZDYHelp, U_LabelPrint, U_AttachmentUpload,
U_TradeMarketInPut, U_TradeMarketDisSel, U_TradeMarketDisScan;
{$R *.dfm}
procedure TfrmTradeDispatchedSel.InitImage(fwbid: string);
begin
end;
procedure TfrmTradeDispatchedSel.SetStatus();
begin
end;
procedure TfrmTradeDispatchedSel.InitSub();
begin
end;
procedure TfrmTradeDispatchedSel.InitPH();
begin
end;
procedure TfrmTradeDispatchedSel.JGTypeChange(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmTradeDispatchedSel.FormDestroy(Sender: TObject);
begin
inherited;
// frmProductOrderList:=nil;
end;
procedure TfrmTradeDispatchedSel.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
Action := caFree;
end;
procedure TfrmTradeDispatchedSel.FormCreate(Sender: TObject);
begin
inherited;
cxgrid1.Align := alClient;
DQdate := SGetServerDate(ADOQueryTemp);
end;
procedure TfrmTradeDispatchedSel.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmTradeDispatchedSel.InitGrid();
var
STRwhere, Pwhere: string;
begin
STRwhere := '';
Pwhere := SGetFilters(Panel1, 1, 2);
begin
if trim(Pwhere) <> '' then
STRwhere := STRwhere + ' and ' + trim(Pwhere);
end;
STRwhere := STRwhere + ' and isnull(A.Status,''0'')=''9'' ';
if cxTabControl1.TabIndex = 0 then
begin
STRwhere := STRwhere + ' and isnull(substatus,''0'')=''' + inttostr(cxTabControl1.TabIndex) + '''';
end;
if (cxTabControl1.TabIndex >= 1) and (cxTabControl1.TabIndex < 3) then
STRwhere := STRwhere + ' and isnull(substatus,''0'')=''' + inttostr(cxTabControl1.TabIndex + 1) + '''';
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Filtered := False;
Close;
sql.Clear;
sql.add(' select * ');
sql.Add(' ,PHRollNum=(select count(X.STKID) from Trade_Market_Distribution X where X.TMMID=A.TMMID and X.TMSID=B.TMSID)');
sql.Add(' ,PHQty=(select sum(STKMeter) from Trade_Market_Distribution X inner join Trade_Cloth_Stock XX on X.stkid=XX.stkid where X.TMMID=A.TMMID and X.TMSID=B.TMSID)');
sql.add(' from Trade_Market_Sub B');
sql.add(' inner join Trade_Market_Main A on B.TMMID=A.TMMID ');
if (ComboBox1.Text = '制单日期') and (CheckBox1.Checked = True) then
begin
sql.add(' where A.TMMDate>=' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime))));
sql.add(' and A.TMMDate<' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1))));
end;
if (ComboBox1.Text = '制单日期') and (CheckBox1.Checked = False) then
begin
sql.add(' where A.TMMDate>=' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime - 39999))));
sql.add(' and A.TMMDate<' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1))));
end;
if (ComboBox1.Text = '交货日期') and (CheckBox1.Checked = True) then
begin
sql.add(' where A.DlyDate>=' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime))));
sql.add(' and A.DlyDate<' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1))));
end;
if (ComboBox1.Text = '交货日期') and (CheckBox1.Checked = False) then
begin
sql.add(' where A.DlyDate>=' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime - 39999))));
sql.add(' and A.DlyDate<' + quotedstr(Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1))));
end;
if canshu1 = '录入' then
begin
sql.add(' and A.Filler= ' + QuotedStr(Trim(DName)));
end;
sql.add(' ' + STRwhere);
sql.Add(' and ordtype=''正常单'' ');
sql.add(' order by filltime desc');
// ShowMessage(SQL.Text);
Open;
end;
SCreateCDS(ADOQueryMain, Order_Main);
SInitCDSData(ADOQueryMain, Order_Main);
finally
ADOQueryMain.EnableControls;
TV1.DataController.Filter.Clear;
end;
end;
procedure TfrmTradeDispatchedSel.SendMessageQR(MDateId, KeyWord1, KeyWord2, KeyWord3: string);
begin
end;
procedure TfrmTradeDispatchedSel.InitGridFH();
begin
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Filtered := False;
Close;
sql.Clear;
sql.Add('exec Order_QryList :TMMId,:WSql');
Parameters.ParamByName('WSql').Value := ' and FillTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''' + ' and FillTime<''' + Trim(FormatDateTime('yyyy-MM-dd', EndDate.DateTime + 1)) + '''';
Open;
end;
SCreateCDS(ADOQueryMain, Order_Main);
SInitCDSData(ADOQueryMain, Order_Main);
finally
ADOQueryMain.EnableControls;
end;
end;
procedure TfrmTradeDispatchedSel.InitForm();
begin
ReadCxGrid('指示单列表FF1', Tv1, '生产指示单管理');
BegDate.DateTime := SGetServerDate(ADOQueryTemp) - 180;
EndDate.DateTime := SGetServerDate(ADOQueryTemp);
SetStatus();
InitGrid();
end;
function TfrmTradeDispatchedSel.DelData(): Boolean;
begin
try
Result := false;
ADOQueryCmd.Connection.BeginTrans;
with ADOQueryCmd do
begin
Close;
sql.Clear;
sql.Add('delete Trade_Market_Main where TMMId=''' + Trim(Order_Main.fieldbyname('TMMId').AsString) + '''');
sql.Add('delete Trade_Market_Sub where TMMId=''' + Trim(Order_Main.fieldbyname('TMMId').AsString) + '''');
sql.Add('delete Trade_Plan_Fty where TMMId=''' + Trim(Order_Main.fieldbyname('TMMId').AsString) + '''');
sql.Add('insert into SY_SysLog(operor,opertime,Model,acction,opevent,result) values( ');
sql.Add(' ' + quotedstr(trim(DName)));
sql.Add(',getdate() ');
sql.Add(',' + quotedstr(trim(self.Caption)));
sql.Add(',' + quotedstr(trim('指示单删除')));
sql.Add(',' + quotedstr(trim('指示单号:' + trim(Order_Main.FieldByName('TMMNo').AsString))));
sql.Add(',' + quotedstr(trim('成功')));
sql.Add(')');
ExecSQL;
end;
ADOQueryCmd.Connection.CommitTrans;
Result := True;
except
ADOQueryCmd.Connection.RollbackTrans;
Result := False;
Application.MessageBox('数据删除异常!', '提示', 0);
end;
end;
procedure TfrmTradeDispatchedSel.TBRafreshClick(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmTradeDispatchedSel.TMMNoMChange(Sender: TObject);
begin
if ADOQueryMain.Active = False then
Exit;
SDofilter(ADOQueryMain, SGetFilters(Panel1, 1, 2));
SCreateCDS(ADOQueryMain, Order_Main);
SInitCDSData(ADOQueryMain, Order_Main);
end;
procedure TfrmTradeDispatchedSel.FormShow(Sender: TObject);
begin
inherited;
InitForm();
end;
procedure TfrmTradeDispatchedSel.TBTPClick(Sender: TObject);
var
FQty, FQty1, FMxQty, FPQty, FMxQtyS, FPQtyS: string;
begin
end;
procedure TfrmTradeDispatchedSel.CheckBox1Click(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmTradeDispatchedSel.CheckBox3Click(Sender: TObject);
begin
inherited;
if Order_Main.IsEmpty then
exit;
with Order_Main do
begin
DisableControls;
first;
while not eof do
begin
edit;
fieldbyname('ssel').Value := checkbox1.Checked;
post;
next;
end;
First;
EnableControls;
end;
end;
procedure TfrmTradeDispatchedSel.TMMNoKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then
begin
initgrid();
end;
end;
procedure TfrmTradeDispatchedSel.fhClick(Sender: TObject);
var
MStkIds, maxno: string;
i, fRoll: integer;
fNum: double;
begin
end;
procedure TfrmTradeDispatchedSel.cxTabControl1Change(Sender: TObject);
begin
SetStatus();
InitGrid();
end;
procedure TfrmTradeDispatchedSel.N1Click(Sender: TObject);
begin
Clipboard.SetTextBuf(PChar(Trim(Order_Main.fieldbyname(TV1.Controller.FocusedColumn.DataBinding.FilterFieldName).AsString)));
end;
procedure TfrmTradeDispatchedSel.N3Click(Sender: TObject);
begin
SelOKNoFiler(Tv1, True); //全选
end;
procedure TfrmTradeDispatchedSel.N4Click(Sender: TObject);
begin
SelOKNoFiler(Tv1, False); //全弃
end;
procedure TfrmTradeDispatchedSel.ComboBox1Change(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmTradeDispatchedSel.CustomerNoNameKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then
begin
InitGrid();
end;
end;
procedure TfrmTradeDispatchedSel.ToolButton2Click(Sender: TObject);
begin
WriteCxGrid('指示单列表FF1', Tv1, '生产指示单管理');
end;
procedure TfrmTradeDispatchedSel.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
begin
inherited;
if Order_Main.IsEmpty then
exit;
ModalResult := 1;
end;
function TfrmTradeDispatchedSel.SaveData(): Boolean;
begin
end;
end.

View File

@ -0,0 +1,722 @@
inherited frmTradeMarketDisScan: TfrmTradeMarketDisScan
Left = 143
Top = 4
Caption = #25195#25551#37197#36135
ClientHeight = 650
ClientWidth = 1540
Color = clWhite
Font.Charset = GB2312_CHARSET
Font.Name = #23435#20307
Position = poMainFormCenter
WindowState = wsMaximized
ExplicitWidth = 1556
ExplicitHeight = 689
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1540
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 91
Caption = 'ToolBar1'
Color = clWhite
EdgeInner = esNone
EdgeOuter = esNone
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Images = DataLink_TradeMarket.ImageList_new32
List = True
ParentColor = False
ParentFont = False
ShowCaptions = True
TabOrder = 0
object TBSave: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #20445#23384
ImageIndex = 16
OnClick = TBSaveClick
end
object ToolButton3: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
end
object TBClose: TToolButton
Left = 166
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object MovePanel2: TMovePanel [1]
Left = 408
Top = 192
Width = 289
Height = 49
BevelInner = bvLowered
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
Color = clSkyBlue
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -13
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 1
Visible = False
end
object Panel1: TPanel [2]
Left = 0
Top = 38
Width = 1540
Height = 75
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 2
object Label1: TLabel
Left = 24
Top = 24
Width = 100
Height = 24
Caption = #26465#30721#32534#21495
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -24
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label15: TLabel
Left = 428
Top = 28
Width = 80
Height = 20
Caption = #37197#36135#20154#21592
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -20
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
end
object SmNO: TEdit
Left = 130
Top = 20
Width = 153
Height = 32
CharCase = ecUpperCase
Font.Charset = GB2312_CHARSET
Font.Color = clBlue
Font.Height = -24
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
OnKeyPress = SmNOKeyPress
end
object PHYG: TBtnEditA
Left = 514
Top = 24
Width = 149
Height = 29
Hint = 'PHYG/'#37197#36135#21592
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -20
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 1
OnBtnClick = PHYGBtnClick
end
object Button1: TButton
Left = 281
Top = 20
Width = 75
Height = 33
Caption = #36873#25321
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -24
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 2
OnClick = Button1Click
end
end
object cxGrid1: TcxGrid [3]
Left = 0
Top = 113
Width = 713
Height = 537
Align = alLeft
TabOrder = 3
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DataSource1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = 'C_Code'
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
Column = v1RollNum
end
item
Kind = skSum
Column = v1Qty
end
item
Kind = skSum
end
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.FocusCellOnTab = True
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsData.Editing = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
object v1MJID: TcxGridDBColumn
Caption = #35746#21333#21495
DataBinding.FieldName = 'TMMNO'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 133
end
object v1MJXH: TcxGridDBColumn
Caption = #23458#25143
DataBinding.FieldName = 'CustName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 99
end
object v1P_Code: TcxGridDBColumn
Caption = #21697#21517
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 88
end
object v1P_Color: TcxGridDBColumn
Caption = #32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 62
end
object Tv1Column2: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 80
end
object v1RollNum: TcxGridDBColumn
Caption = #21305#25968
DataBinding.FieldName = 'TMSPiece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 73
end
object v1Qty: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'TMSQty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 76
end
object v1PHRollNum: TcxGridDBColumn
Caption = #37197#36135#21305#25968
DataBinding.FieldName = 'PHRollNum'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 131
end
object v1PHQty: TcxGridDBColumn
Caption = #37197#36135#25968#37327
DataBinding.FieldName = 'PHQty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 125
end
object Tv1Column1: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object cxGrid2: TcxGrid [4]
Left = 713
Top = 113
Width = 827
Height = 537
Align = alClient
TabOrder = 4
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCustomDrawCell = TV2CustomDrawCell
DataController.DataSource = DataSource2
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = 'C_Code'
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
Column = cxGridDBColumn5
end
item
Kind = skSum
Column = cxGridDBColumn6
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.FocusCellOnTab = True
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsCustomize.ColumnSorting = False
OptionsData.Deleting = False
OptionsData.Inserting = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
object V2Column2: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'Ssel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
Properties.NullStyle = nssUnchecked
Width = 66
end
object cxGridDBColumn1: TcxGridDBColumn
Caption = #25195#25551#20449#24687
DataBinding.FieldName = 'SDefNote'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 204
end
object cxGridDBColumn5: TcxGridDBColumn
Caption = #21305#25968
DataBinding.FieldName = 'RollNum'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 70
end
object cxGridDBColumn6: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'stkmetet'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 102
end
object cxGridDBColumn2: TcxGridDBColumn
Caption = #26465#30721
DataBinding.FieldName = 'ciid'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 166
end
object cxGridDBColumn4: TcxGridDBColumn
Caption = #21697#21517
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 109
end
object cxGridDBColumn3: TcxGridDBColumn
Caption = #32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 78
end
object TV2Column1: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
end
object V2Column1: TcxGridDBColumn
Caption = #32568#21495
DataBinding.FieldName = 'batchno'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 84
end
object cxGridDBColumn7: TcxGridDBColumn
Caption = #31561#32423
DataBinding.FieldName = 'Grade'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 93
end
object V2Column3: TcxGridDBColumn
Caption = #20811#37325
DataBinding.FieldName = 'C_GramWeight'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 67
end
object V2Column4: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'C_Width'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 60
end
object TV2Column2: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
end
object cxGridLevel1: TcxGridLevel
GridView = TV2
end
end
object MovePanel1: TMovePanel [5]
Left = 54
Top = 201
Width = 561
Height = 305
BevelInner = bvLowered
Color = clSkyBlue
TabOrder = 5
Visible = False
object Label2: TLabel
Left = 48
Top = 160
Width = 150
Height = 48
Caption = 'Label2'
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -48
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Edit2: TEdit
Left = 85
Top = 35
Width = 386
Height = 72
Enabled = False
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -64
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
ReadOnly = True
TabOrder = 0
Text = '91209120001'
end
object Button4: TButton
Left = 224
Top = 248
Width = 75
Height = 41
Caption = #20851#38381
TabOrder = 1
OnClick = Button4Click
end
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 265
Top = 504
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 353
Top = 505
end
inherited ImageList_new32: TImageList
Left = 1480
Top = 32
end
inherited cxImageList_bar: TcxImageList
FormatVersion = 1
end
object GPM_1: TcxGridPopupMenu
PopupMenus = <>
Left = 436
Top = 509
end
object cxStyleRepository1: TcxStyleRepository
Left = 69
Top = 130
PixelsPerInch = 96
object cxStyle1: TcxStyle
AssignedValues = [svColor, svFont]
Color = clInactiveCaption
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object cxStyle2: TcxStyle
AssignedValues = [svColor, svFont, svTextColor]
Color = 4707838
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clBtnText
end
object cxStyle_gridRow: TcxStyle
AssignedValues = [svColor, svFont]
Color = 16311512
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object cxStyle_gridFoot: TcxStyle
AssignedValues = [svFont]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object cxStyle_gridHead: TcxStyle
AssignedValues = [svFont]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object cxStyle_gridGroupBox: TcxStyle
AssignedValues = [svColor, svFont]
Color = clMoneyGreen
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object cxStyle_yellow: TcxStyle
AssignedValues = [svColor, svFont]
Color = 8454143
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object cxStyle_Red: TcxStyle
AssignedValues = [svColor, svFont]
Color = clRed
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object cxStyle_fontBlack: TcxStyle
AssignedValues = [svFont]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
end
object cxStyle_fontclFuchsia: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clFuchsia
end
object cxStyle_fontclPurple: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clPurple
end
object cxStyle_fontclGreen: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clGreen
end
object cxStyle_fontclBlue: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clBlue
end
object cxStyle_fontclTeal: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clTeal
end
object cxStyle_fontclOlive: TcxStyle
AssignedValues = [svFont, svTextColor]
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -29
Font.Name = #23435#20307
Font.Style = [fsBold]
TextColor = clOlive
end
end
object CDSOrder: TClientDataSet
Aggregates = <>
Params = <>
Left = 172
Top = 144
end
object DataSource1: TDataSource
DataSet = CDSOrder
Left = 232
Top = 160
end
object ADOQueryTmp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 352
Top = 312
end
object ADOQueryPrint: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 360
Top = 240
end
object ADOQueryMain: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 404
Top = 216
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 492
Top = 252
end
object RMDB_Main: TRMDBDataSet
Visible = True
Left = 608
Top = 264
end
object ADOQuery1: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 648
Top = 232
end
object CDSMJID: TClientDataSet
Aggregates = <>
Params = <>
Left = 732
Top = 212
end
object DataSource2: TDataSource
DataSet = CDSMJID
Left = 872
Top = 248
end
object RMXLSExport2: TRMXLSExport
ShowAfterExport = True
ExportPrecision = 1
PagesOfSheet = 1
ExportImages = True
ExportFrames = True
ExportImageFormat = ifBMP
JPEGQuality = 0
ScaleX = 1.000000000000000000
ScaleY = 1.000000000000000000
CompressFile = False
Left = 860
Top = 164
end
object RM1: TRMGridReport
ThreadPrepareReport = True
InitialZoom = pzDefault
PreviewButtons = [rmpbZoom, rmpbLoad, rmpbSave, rmpbPrint, rmpbFind, rmpbPageSetup, rmpbExit, rmpbSaveToXLS, rmpbExport, rmpbNavigator]
DefaultCollate = False
ShowPrintDialog = False
SaveReportOptions.RegistryPath = 'Software\ReportMachine\ReportSettings\'
PreviewOptions.RulerUnit = rmutScreenPixels
PreviewOptions.RulerVisible = False
PreviewOptions.DrawBorder = False
PreviewOptions.BorderPen.Color = clGray
PreviewOptions.BorderPen.Style = psDash
CompressLevel = rmzcFastest
CompressThread = False
LaterBuildEvents = True
OnlyOwnerDataSet = False
Left = 784
Top = 136
ReportData = {}
end
end

View File

@ -0,0 +1,593 @@
unit U_TradeMarketDisScan;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, cxMemo,
cxRichEdit, ComCtrls, cxContainer, cxTextEdit, cxMaskEdit, cxButtonEdit,
StdCtrls, ToolWin, DBClient, ADODB, ExtCtrls, BtnEdit, cxCalendar, StrUtils,
cxCurrencyEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxDropDownEdit,
RM_Common, RM_Preview, RM_System, RM_Class, RM_GridReport, RM_Dataset, Menus,
cxSplitter, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxCheckBox,
dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, cxPC,
System.ImageList, Vcl.ImgList, U_BaseInput, cxImage, cxDBEdit, IdBaseComponent,
IdComponent, IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase,
IdFTP, ShellAPI, MovePanel, RM_e_Xls, MMSystem, dxScrollbarAnnotations,
cxImageList;
type
TfrmTradeMarketDisScan = class(TfrmBaseInput)
ToolBar1: TToolBar;
TBSave: TToolButton;
TBClose: TToolButton;
GPM_1: TcxGridPopupMenu;
ToolButton3: TToolButton;
MovePanel2: TMovePanel;
Panel1: TPanel;
cxGrid1: TcxGrid;
Tv1: TcxGridDBTableView;
v1MJID: TcxGridDBColumn;
v1MJXH: TcxGridDBColumn;
v1P_Code: TcxGridDBColumn;
v1P_Color: TcxGridDBColumn;
v1RollNum: TcxGridDBColumn;
v1Qty: TcxGridDBColumn;
v1PHRollNum: TcxGridDBColumn;
v1PHQty: TcxGridDBColumn;
cxGrid1Level1: TcxGridLevel;
cxGrid2: TcxGrid;
TV2: TcxGridDBTableView;
V2Column2: TcxGridDBColumn;
cxGridDBColumn1: TcxGridDBColumn;
cxGridDBColumn5: TcxGridDBColumn;
cxGridDBColumn6: TcxGridDBColumn;
cxGridDBColumn2: TcxGridDBColumn;
cxGridDBColumn4: TcxGridDBColumn;
cxGridDBColumn3: TcxGridDBColumn;
V2Column1: TcxGridDBColumn;
cxGridDBColumn7: TcxGridDBColumn;
V2Column3: TcxGridDBColumn;
V2Column4: TcxGridDBColumn;
cxGridLevel1: TcxGridLevel;
MovePanel1: TMovePanel;
Label2: TLabel;
Edit2: TEdit;
Button4: TButton;
Label1: TLabel;
SmNO: TEdit;
Label15: TLabel;
PHYG: TBtnEditA;
cxStyleRepository1: TcxStyleRepository;
cxStyle1: TcxStyle;
cxStyle2: TcxStyle;
cxStyle_gridRow: TcxStyle;
cxStyle_gridFoot: TcxStyle;
cxStyle_gridHead: TcxStyle;
cxStyle_gridGroupBox: TcxStyle;
cxStyle_yellow: TcxStyle;
cxStyle_Red: TcxStyle;
cxStyle_fontBlack: TcxStyle;
cxStyle_fontclFuchsia: TcxStyle;
cxStyle_fontclPurple: TcxStyle;
cxStyle_fontclGreen: TcxStyle;
cxStyle_fontclBlue: TcxStyle;
cxStyle_fontclTeal: TcxStyle;
cxStyle_fontclOlive: TcxStyle;
CDSOrder: TClientDataSet;
DataSource1: TDataSource;
ADOQueryTmp: TADOQuery;
ADOQueryPrint: TADOQuery;
ADOQueryMain: TADOQuery;
ADOQueryCmd: TADOQuery;
RMDB_Main: TRMDBDataSet;
ADOQuery1: TADOQuery;
CDSMJID: TClientDataSet;
DataSource2: TDataSource;
RMXLSExport2: TRMXLSExport;
RM1: TRMGridReport;
Tv1Column2: TcxGridDBColumn;
TV2Column1: TcxGridDBColumn;
Button1: TButton;
TV2Column2: TcxGridDBColumn;
Tv1Column1: TcxGridDBColumn;
procedure TBCloseClick(Sender: TObject);
procedure CustomerNoNameBtnDnClick(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TV2CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
procedure SmNOKeyPress(Sender: TObject; var Key: Char);
procedure TBSaveClick(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure PHYGBtnClick(Sender: TObject);
private
fCode, fColor, FPattern: string;
function SaveData(): Boolean;
procedure InitOrder();
procedure InitMJID();
procedure initGrid();
{ Private declarations }
public
FMainid: string;
{ Public declarations }
end;
var
frmTradeMarketDisScan: TfrmTradeMarketDisScan;
newh: hwnd;
implementation
uses
U_DataLink, U_ZDYHelp, U_ZDYHelpSel, U_RTFun, U_CompanySel, U_PictureUpload,
U_ClothInfoSel, U_TradeDispatchedSel;
{$R *.dfm}
procedure TfrmTradeMarketDisScan.TBCloseClick(Sender: TObject);
begin
Close;
end;
function TfrmTradeMarketDisScan.SaveData(): Boolean;
var
phID: string;
P_ID: integer;
begin
Result := false;
ADOQueryCmd.Connection.BeginTrans;
P_ID := 1;
try
with CDSMJID do
begin
DisableControls;
first;
while not eof do
begin
if trim(CDSMJID.fieldbyname('SDefNote').AsString) = '扫描成功' then
begin
if GetLSNo(ADOQueryTmp, phID, 'PH', 'Trade_Market_Distribution', 4, 1) = False then
begin
Application.MessageBox('取配货单号失败!', '提示', 0);
Exit;
end;
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('select * from Trade_Market_Distribution ');
sql.Add('where 1=2 ');
open;
end;
ADOQueryCmd.Append;
ADOQueryCmd.FieldByName('TMDID').Value := trim(phID);
ADOQueryCmd.FieldByName('TMMID').Value := trim(cdsmjid.fieldbyname('TMMID').AsString);
ADOQueryCmd.FieldByName('TMSID').Value := trim(cdsmjid.fieldbyname('TMSID').AsString);
ADOQueryCmd.FieldByName('STKID').Value := trim(cdsmjid.fieldbyname('STKID').AsString);
ADOQueryCmd.FieldByName('Filler').Value := trim(DName);
ADOQueryCmd.FieldByName('PHYG').Value := trim(PHYG.Text);
ADOQueryCmd.FieldByName('TMDType').Value := '扫描配货';
ADOQueryCmd.Post;
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('select * from Trade_Cloth_Stock ');
sql.Add('where stkid=' + quotedstr(trim(CDSMJID.fieldbyname('stkid').AsString)));
open;
edit;
fieldbyname('DISstatus').Value := '1';
post;
end;
with ADOQueryCmd do
begin
close;
sql.Clear;
sql.Add('select * from Trade_Market_Sub ');
sql.Add('where TMSID=' + quotedstr(trim(CDSMJID.fieldbyname('TMSID').AsString)));
open;
edit;
fieldbyname('substatus').Value := '2';
post;
end;
end;
next;
end;
first;
EnableControls;
end;
ADOQueryCmd.Connection.CommitTrans;
Result := true;
except
ADOQueryCmd.Connection.RollbackTrans;
end;
end;
procedure TfrmTradeMarketDisScan.SmNOKeyPress(Sender: TObject; var Key: Char);
begin
inherited;
if Key = #13 then
begin
MovePanel1.Visible := false;
if trim(smno.Text) = '' then
exit;
if uppercase(leftBstr(trim(smno.Text), 2)) = 'JM' then
begin
if not CDSMJID.IsEmpty then
begin
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\数据未保存.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\数据未保存.wav'), 0, SND_ASYNC);
exit;
end;
inItorder();
end
else
begin
if CDSOrder.IsEmpty then
begin
MovePanel1.Visible := true;
Edit2.Text := SmNO.Text;
Label2.Caption := '订单不能为空!';
smno.Text := '';
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\订单不能为空.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\订单不能为空.wav'), 0, SND_ASYNC);
exit;
end;
if not CDSMJID.Locate('CIID', trim(smNo.Text), []) then
begin
initMjid();
end
else
begin
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\重复扫描.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\重复扫描.wav'), 0, SND_ASYNC);
end;
end;
smno.Text := '';
smno.SetFocus;
end;
end;
procedure TfrmTradeMarketDisScan.TBRafreshClick(Sender: TObject);
begin
inherited;
MovePanel2.Visible := True;
MovePanel2.Refresh;
initOrder();
MovePanel2.Visible := False;
end;
procedure TfrmTradeMarketDisScan.TBSaveClick(Sender: TObject);
begin
inherited;
if CDSOrder.IsEmpty then
exit;
if CDSMJID.IsEmpty then
exit;
try
if not SaveData() then
begin
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\保存失败.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\保存失败.wav'), 0, SND_ASYNC);
exit;
end
else
begin
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\保存成功.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\保存成功.wav'), 0, SND_ASYNC);
initGrid();
exit;
end;
except
end;
end;
procedure TfrmTradeMarketDisScan.TV2CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
begin
inherited;
var i: integer;
begin
i := tv2.GetColumnByFieldName('SDefNote').Index;
if (AViewInfo.GridRecord.Values[i] <> '扫描成功') then
ACanvas.Brush.Color := clred;
end;
end;
procedure TfrmTradeMarketDisScan.Button1Click(Sender: TObject);
var
key: Char;
begin
inherited;
key := #13;
frmTradeDispatchedSel := TfrmTradeDispatchedSel.create(self);
with frmTradeDispatchedSel do
begin
if showmodal = 1 then
begin
smno.Text := trim(Order_Main.FieldByName('TMMID').AsString);
SmNOKeyPress(smno, key);
end;
free;
end;
end;
procedure TfrmTradeMarketDisScan.Button4Click(Sender: TObject);
begin
inherited;
MovePanel1.Visible := False;
end;
procedure TfrmTradeMarketDisScan.CustomerNoNameBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmTradeMarketDisScan.InitOrder();
var
fP_No: string;
begin
MovePanel1.Visible := false;
CDSMJID.EmptyDataSet;
with ADOQueryMain do
begin
Close;
sql.Clear;
sql.add(' select * ');
sql.Add(' ,PHRollNum=(select count(STKID) from Trade_Market_Distribution X where X.TMMID=A.TMMID and X.TMSID=B.TMSID),');
sql.Add(' PHQty=(select sum(STKMeter) from Trade_Market_Distribution X inner join Trade_Cloth_Stock XX on X.stkid=XX.stkid where X.TMMID=A.TMMID and X.TMSID=B.TMSID)');
sql.add(' from Trade_Market_Sub B');
sql.add(' inner join Trade_Market_Main A on B.TMMID=A.TMMID ');
SQL.Add(' where A.TMMID=' + quotedstr(trim(SmNO.text)));
SQL.Add(' and isnull(B.substatus,''0'')<=''2'' ');
Open;
end;
if ADOQueryMain.IsEmpty then
begin
MovePanel1.Visible := true;
Edit2.text := SmNO.Text;
Label2.Caption := '订单号未审核或已发货!';
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\订单不存在.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\订单不存在.wav'), 0, SND_ASYNC);
exit;
end
else
begin
SCreateCDS(ADOQueryMain, CDSOrder);
SInitCDSData(ADOQueryMain, CDSOrder);
with CDSOrder do
begin
DisableControls;
first;
while not eof do
begin
next;
end;
first;
EnableControls;
end;
end;
end;
procedure TfrmTradeMarketDisScan.PHYGBtnClick(Sender: TObject);
var
fsj: string;
FWZ: Integer;
begin
fsj := Trim(TEdit(Sender).Hint);
FWZ := Pos('/', fsj);
try
frmZDYHelpSel := TfrmZDYHelpSel.Create(Application);
with frmZDYHelpSel do
begin
flag := Copy(fsj, 1, FWZ - 1);
flagname := Copy(fsj, FWZ + 1, Length(fsj) - FWZ);
if ShowModal = 1 then
begin
TEdit(Sender).Text := ReturnStr;
end;
end;
finally
frmZDYHelpSel.Free;
end;
end;
procedure TfrmTradeMarketDisScan.InitGrid();
begin
with ADOQueryMain do
begin
Close;
sql.Clear;
sql.add(' select * ');
sql.Add(' ,PHRollNum=(select count(X.STKID) from Trade_Market_Distribution X where X.TMMID=A.TMMID and X.TMSID=B.TMSID),');
sql.Add(' PHQty=(select sum(STKMeter) from Trade_Market_Distribution X inner join Trade_Cloth_Stock XX on X.stkid=XX.stkid where X.TMMID=A.TMMID and X.TMSID=B.TMSID)');
sql.add(' from Trade_Market_Sub B');
sql.add(' inner join Trade_Market_Main A on B.TMMID=A.TMMID ');
SQL.Add(' where 1=2 ');
Open;
end;
SCreateCDS(ADOQueryMain, CDSOrder);
SInitCDSData(ADOQueryMain, CDSOrder);
with ADOQueryMain do
begin
Close;
sql.Clear;
SQL.Add('select A.*,B.TMMID,TMSID,TMDID,cast(0 as int) as RollNum from Trade_Cloth_Stock A ');
SQL.Add('inner join Trade_Market_Distribution B on B.STKID=A.STKID ');
SQL.Add('where 1=2 ');
Open;
end;
SCreateCDS(ADOQueryMain, CDSMJID);
SInitCDSData(ADOQueryMain, CDSMJID);
end;
procedure TfrmTradeMarketDisScan.FormShow(Sender: TObject);
begin
MovePanel1.Left := (Width - MovePanel1.Width) div 2;
MovePanel1.top := (Height - MovePanel1.Height - 200) div 2;
InitGrid();
end;
procedure TfrmTradeMarketDisScan.InitMJID();
var
fP_No: string;
i: integer;
begin
MovePanel1.Visible := false;
with ADOQueryTmp do
begin
Close;
sql.Clear;
SQL.Add('select CIID from Trade_Cloth_Inspect A');
SQL.Add('where A.CIID=' + quotedstr(trim(SmNO.text)));
SQL.Add('and CIIOFlag=''未入库''');
Open;
if not IsEmpty then
begin
CDSMJID.Append;
CDSMJID.FieldByName('SDefNote').Value := '此条码未入库';
CDSMJID.FieldByName('CIID').Value := trim(SmNO.Text);
CDSMJID.Post;
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\此条码未入库.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\此条码未入库.wav'), 0, SND_ASYNC);
Exit;
end;
end;
with ADOQueryTmp do
begin
Close;
sql.Clear;
SQL.Add('select Stkid from Trade_Cloth_IO A');
SQL.Add('where A.stkid=' + quotedstr(trim(SmNO.text)));
SQL.Add('and IOFlag=''出库''');
Open;
if not IsEmpty then
begin
CDSMJID.Append;
CDSMJID.FieldByName('SDefNote').Value := '此条码已出库';
CDSMJID.FieldByName('Stkid').Value := trim(SmNO.Text);
CDSMJID.Post;
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\此条码已出库.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\此条码已出库.wav'), 0, SND_ASYNC);
Exit;
end;
end;
with ADOQueryMain do
begin
Close;
sql.Clear;
SQL.Add('select A.* from Trade_Cloth_Stock A');
sql.add('left join Trade_Cloth_IO B on B.stkid=A.stkid and B.IOFlag=''入库'' ');
SQL.Add('where A.CIID=' + quotedstr(trim(SmNO.text)));
sql.Add('and isnull(A.DisStatus,''0'')=''0'' ');
sql.Add('and StkExists=1 ');
Open;
end;
if ADOQueryMain.IsEmpty then
begin
CDSMJID.Append;
CDSMJID.FieldByName('SDefNote').Value := '条码不存在或已经配货';
CDSMJID.FieldByName('CIID').Value := trim(SmNO.Text);
CDSMJID.Post;
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\扫描错误.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\扫描错误.wav'), 0, SND_ASYNC);
exit;
end;
with ADOQueryTmp do
begin
Close;
sql.Clear;
SQL.Add('select A.STKID,B.TMMID,B.TMSID from Trade_Cloth_Stock A');
sql.Add('inner join Trade_Market_Sub B on isnull(B.C_Color,'''')=isnull(A.C_Color,'''') and isnull(B.C_Pattern,'''')= isnull(A.C_Pattern,'''') ');
SQL.Add('where A.STKID=' + quotedstr(trim(SmNO.text)));
SQL.Add('and B.TMMID=' + quotedstr(trim(CDSOrder.Fieldbyname('TMMID').AsString)));
// SQL.ADD('and isnull(B.PRTKZ,'''')<>'''' ');
Open;
end;
if ADOQueryTmp.IsEmpty then
begin
CDSMJID.Append;
CDSMJID.FieldByName('SDefNote').Value := '颜色和花型不对应';
CDSMJID.FieldByName('STKID').Value := trim(SmNO.Text);
CDSMJID.Post;
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\品名颜色不对应.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\品名颜色不对应.wav'), 0, SND_ASYNC);
exit;
end;
i := 0;
while not ADOQueryTmp.eof do
begin
if CDSOrder.Locate('TMSID', trim(ADOQueryTmp.fieldbyname('TMSID').AsString), []) then
begin
if (CDSOrder.fieldbyName('TMSPiece').AsInteger = CDSOrder.FieldByName('PHRollNum').AsInteger) and (CDSOrder.fieldbyName('TMSPiece').AsInteger > 0) then
begin
end
else
begin
i := 1;
CDSMJID.Append;
CDSMJID.FieldByName('SDefNote').Value := '扫描成功';
CDSMJID.FieldByName('CIID').Value := trim(ADOQueryMain.Fieldbyname('CIID').AsString);
CDSMJID.FieldByName('stkid').Value := trim(ADOQueryMain.Fieldbyname('stkid').AsString);
CDSMJID.FieldByName('C_Name').Value := trim(ADOQueryMain.Fieldbyname('C_Name').AsString);
CDSMJID.FieldByName('C_Color').Value := trim(ADOQueryMain.Fieldbyname('C_Color').AsString);
CDSMJID.FieldByName('Grade').Value := trim(ADOQueryMain.Fieldbyname('Grade').AsString);
CDSMJID.FieldByName('RollNum').Value := 1;
CDSMJID.FieldByName('stkmeter').Value := ADOQueryMain.Fieldbyname('stkmeter').AsFloat;
CDSMJID.FieldByName('TMMID').Value := trim(ADOQueryTmp.Fieldbyname('TMMID').AsString);
CDSMJID.FieldByName('TMSID').Value := trim(ADOQueryTmp.Fieldbyname('TMSID').AsString);
CDSMJID.FieldByName('C_Width').Value := ADOQueryMain.Fieldbyname('C_Width').AsString;
CDSMJID.FieldByName('C_GramWeight').Value := ADOQueryMain.Fieldbyname('C_GramWeight').AsString;
// CDSMJID.FieldByName('conNo').Value:=trim(ADOQueryMain.Fieldbyname('conNo').AsString);
CDSMJID.Post;
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\正确.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\正确.wav'), 0, SND_ASYNC);
CDSOrder.Edit;
CDSOrder.fieldbyName('PHRollNum').Value := CDSOrder.fieldbyName('PHRollNum').AsInteger + 1;
CDSOrder.fieldbyName('PHQty').Value := CDSOrder.fieldbyName('PHQty').AsFloat + ADOQueryMain.Fieldbyname('stkmeter').AsFloat;
CDSOrder.Post;
if tv1.DataController.Summary.FooterSummaryValues[0] <> 0 then
begin
if tv1.DataController.Summary.FooterSummaryValues[0] = tv2.DataController.Summary.FooterSummaryValues[0] then
begin
TBSave.Click;
exit;
end;
end;
exit;
end;
end;
ADOQueryTmp.Next;
end;
if i = 0 then
begin
if FileExists(PChar(ExtractFilePath(Application.ExeName) + 'wav\超出下单匹数.wav')) then
PlaySound(PChar(ExtractFilePath(Application.ExeName) + 'wav\超出下单匹数.wav'), 0, SND_ASYNC);
end;
end;
end.

View File

@ -0,0 +1,861 @@
inherited frmTradeMarketDisSel: TfrmTradeMarketDisSel
Left = 143
Top = 4
Caption = #35746#21333#24405#20837
ClientHeight = 650
ClientWidth = 1540
Color = clWhite
Font.Charset = GB2312_CHARSET
Font.Name = #23435#20307
Position = poMainFormCenter
WindowState = wsMaximized
ExplicitWidth = 1556
ExplicitHeight = 689
PixelsPerInch = 96
TextHeight = 12
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1540
Height = 38
AutoSize = True
ButtonHeight = 38
ButtonWidth = 91
Caption = 'ToolBar1'
Color = clWhite
EdgeInner = esNone
EdgeOuter = esNone
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Images = DataLink_TradeMarket.ImageList_new32
List = True
ParentColor = False
ParentFont = False
ShowCaptions = True
TabOrder = 0
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 1
OnClick = TBRafreshClick
end
object TBFind: TToolButton
Left = 71
Top = 0
AutoSize = True
Caption = #36807#28388
ImageIndex = 0
OnClick = TBFindClick
end
object TBSave: TToolButton
Left = 142
Top = 0
AutoSize = True
Caption = #30830#35748#37197#36135
ImageIndex = 4
OnClick = TBSaveClick
end
object ToolButton3: TToolButton
Left = 237
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
end
object TBClose: TToolButton
Left = 332
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object Panel2: TPanel [1]
Left = 0
Top = 81
Width = 497
Height = 569
Align = alLeft
Caption = 'Panel2'
TabOrder = 1
object cxGrid3: TcxGrid
Left = 1
Top = 1
Width = 495
Height = 567
Align = alClient
TabOrder = 0
object Tv3: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnFocusedRecordChanged = Tv3FocusedRecordChanged
DataController.DataSource = DS_1
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsData.Editing = False
OptionsView.GroupByBox = False
object cxGridDBColumn1: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.NullStyle = nssUnchecked
Visible = False
HeaderAlignmentHorz = taCenter
Width = 49
end
object v1OrderNo: TcxGridDBColumn
Caption = #35746#21333#21495
DataBinding.FieldName = 'TMMNO'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 72
end
object v1CustomerNoName: TcxGridDBColumn
Caption = #23458#25143
DataBinding.FieldName = 'CustName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 73
end
object v1MPRTCodeName: TcxGridDBColumn
Caption = #32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 69
end
object v1PRTColor: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 60
end
object v1MPRTKZ: TcxGridDBColumn
Caption = #20811#37325
DataBinding.FieldName = 'PRTKZ'
DataBinding.IsNullValueType = True
Visible = False
Options.Focusing = False
VisibleForCustomization = False
Width = 54
end
object v1PRTRollNum: TcxGridDBColumn
Caption = #21305#25968
DataBinding.FieldName = 'TMSPiece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 40
end
object v1PRTOrderQty: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'TMSQty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 52
end
object cxGridDBColumn19: TcxGridDBColumn
Caption = #25968#37327#21333#20301
DataBinding.FieldName = 'TMSUnit'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 58
end
object v1OrdDefStr1: TcxGridDBColumn
Caption = #20844#21496#32534#21495
DataBinding.FieldName = 'OrdDefStr1'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 90
end
object cxGridDBColumn17: TcxGridDBColumn
Caption = #20844#21496#21488#22836
DataBinding.FieldName = 'OrdDefStr2'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 90
end
object v1OrdPerson1: TcxGridDBColumn
Caption = #19994#21153#21592
DataBinding.FieldName = 'OrdPerson1'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Focusing = False
VisibleForCustomization = False
Width = 73
end
object v1JGFactoryName: TcxGridDBColumn
Caption = #26579#21378
DataBinding.FieldName = 'JGFactoryName'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 60
end
object v1OrdDate: TcxGridDBColumn
Caption = #21046#21333#26085#26399
DataBinding.FieldName = 'OrdDate'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxDateEditProperties'
Properties.ShowTime = False
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 68
end
object cxGridDBColumn18: TcxGridDBColumn
Caption = #22791#27880#21450#35201#27714
DataBinding.FieldName = 'Note'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 96
end
object v1DeliveryDate: TcxGridDBColumn
Caption = #20132#36135#26085#26399
DataBinding.FieldName = 'DlyDate'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxDateEditProperties'
Properties.ShowTime = False
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 62
end
object v1MPRTSpec: TcxGridDBColumn
Caption = #35268#26684
DataBinding.FieldName = 'C_Spec'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Focusing = False
Width = 68
end
object v3Column11: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 60
end
object v1MPRTMF: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'PRTMF'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Focusing = False
VisibleForCustomization = False
Width = 70
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv3
end
end
end
object Panel3: TPanel [2]
Left = 497
Top = 81
Width = 1043
Height = 569
Align = alClient
TabOrder = 2
object cxGrid2: TcxGrid
Left = 1
Top = 1
Width = 1041
Height = 207
Align = alClient
TabOrder = 0
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = Tv1CellDblClick
DataController.DataSource = DS_MX
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skCount
Column = v1Column6
end
item
Kind = skSum
Column = v2Column5
end
item
Kind = skSum
Column = v2Column6
end
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsCustomize.ColumnSorting = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.Indicator = True
OptionsView.IndicatorWidth = 20
object v1Ssel: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'Ssel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
Properties.NullStyle = nssUnchecked
HeaderAlignmentHorz = taCenter
Width = 49
end
object v2Column1: TcxGridDBColumn
Caption = #32534#21495
DataBinding.FieldName = 'C_CODE'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 91
end
object v2Column3: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 77
end
object v1C_Color: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 60
end
object v2Column6: TcxGridDBColumn
Caption = #24211#23384#25968#37327
DataBinding.FieldName = 'stkqty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 85
end
object v1Column7: TcxGridDBColumn
Caption = #25968#37327#21333#20301
DataBinding.FieldName = 'QtyUnit'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 83
end
object v1Column2: TcxGridDBColumn
Caption = #32568#21495
DataBinding.FieldName = 'batchno'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 62
end
object v1Column3: TcxGridDBColumn
Caption = #31867#22411
DataBinding.FieldName = 'Grade'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 63
end
object v2Column5: TcxGridDBColumn
Caption = #24211#23384#20844#26020#25968
DataBinding.FieldName = 'KCKGQty'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 83
end
object v1Column6: TcxGridDBColumn
Caption = #26465#30721
DataBinding.FieldName = 'CIID'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 92
end
object v1KCKW: TcxGridDBColumn
Caption = #24211#20301
DataBinding.FieldName = 'IOPosition'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 60
end
object v1Column5: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 60
end
end
object cxGrid2Level1: TcxGridLevel
GridView = Tv1
end
end
object cxGrid1: TcxGrid
Left = 1
Top = 208
Width = 1041
Height = 360
Align = alBottom
TabOrder = 1
object Tv2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = Tv2CellDblClick
DataController.DataSource = DS_MXSel
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skCount
Column = cxGridDBColumn7
end
item
Kind = skSum
Column = cxGridDBColumn11
end
item
Kind = skSum
Column = cxGridDBColumn13
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsCustomize.ColumnSorting = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.Indicator = True
OptionsView.IndicatorWidth = 20
object cxGridDBColumn3: TcxGridDBColumn
Caption = #32534#21495
DataBinding.FieldName = 'C_CODE'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 92
end
object cxGridDBColumn4: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 77
end
object cxGridDBColumn11: TcxGridDBColumn
Caption = #24211#23384#20844#26020#25968
DataBinding.FieldName = 'KCKGQty'
DataBinding.IsNullValueType = True
Visible = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 83
end
object cxGridDBColumn16: TcxGridDBColumn
Caption = #39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 60
end
object cxGridDBColumn13: TcxGridDBColumn
Caption = #24211#23384#25968#37327
DataBinding.FieldName = 'stkqty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 76
end
object cxGridDBColumn14: TcxGridDBColumn
Caption = #25968#37327#21333#20301
DataBinding.FieldName = 'QtyUnit'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 68
end
object cxGridDBColumn15: TcxGridDBColumn
Caption = #26579#21378#32568#21495
DataBinding.FieldName = 'gangNO'
DataBinding.IsNullValueType = True
Visible = False
Options.Editing = False
Options.Focusing = False
Width = 60
end
object cxGridDBColumn10: TcxGridDBColumn
Caption = #31867#22411
DataBinding.FieldName = 'Grade'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 63
end
object cxGridDBColumn9: TcxGridDBColumn
Caption = #21367#21495
DataBinding.FieldName = 'pieceno'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 59
end
object cxGridDBColumn7: TcxGridDBColumn
Caption = #26465#30721
DataBinding.FieldName = 'ciid'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 92
end
object cxGridDBColumn5: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'C_Width'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 70
end
object cxGridDBColumn6: TcxGridDBColumn
Caption = #20811#37325
DataBinding.FieldName = 'C_GramWeight'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Focusing = False
Width = 59
end
object v2Column4: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 60
end
object v2Column7: TcxGridDBColumn
Caption = #32568#21495
DataBinding.FieldName = 'batchno'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 80
end
end
object cxGridLevel1: TcxGridLevel
GridView = Tv2
end
end
end
object MovePanel2: TMovePanel [3]
Left = 408
Top = 192
Width = 289
Height = 49
BevelInner = bvLowered
Caption = #27491#22312#26597#35810#25968#25454#65292#35831#31245#21518#12290#12290#12290
Color = clSkyBlue
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -13
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 3
Visible = False
end
object Panel1: TPanel [4]
Left = 0
Top = 38
Width = 1540
Height = 43
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clSkyBlue
TabOrder = 4
object Label3: TLabel
Left = 55
Top = 15
Width = 24
Height = 12
Caption = #32534#21495
end
object Label4: TLabel
Left = 201
Top = 15
Width = 24
Height = 12
Caption = #39068#33394
end
object Label7: TLabel
Left = 492
Top = 68
Width = 24
Height = 12
Caption = #31867#22411
end
object Label15: TLabel
Left = 844
Top = 15
Width = 48
Height = 12
Caption = #37197#36135#20154#21592
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
Visible = False
end
object Label1: TLabel
Left = 338
Top = 15
Width = 24
Height = 12
Caption = #32568#21495
end
object Label2: TLabel
Left = 471
Top = 15
Width = 24
Height = 12
Caption = #33457#22411
end
object c_code: TEdit
Tag = 2
Left = 83
Top = 11
Width = 100
Height = 20
ImeName = #20013#25991'('#31616#20307') - '#30334#24230#36755#20837#27861
TabOrder = 1
end
object C_color: TEdit
Tag = 2
Left = 228
Top = 11
Width = 100
Height = 20
ImeName = #20013#25991'('#31616#20307') - '#30334#24230#36755#20837#27861
TabOrder = 2
end
object CPType: TComboBox
Tag = 2
Left = 518
Top = 64
Width = 68
Height = 20
Style = csDropDownList
ImeName = #20013#25991'('#31616#20307') - '#30334#24230#36755#20837#27861
TabOrder = 6
OnChange = TBFindClick
Items.Strings = (
#27491#21697
#27425#21697
#30041#26679
'')
end
object Button1: TButton
Left = 1008
Top = 8
Width = 75
Height = 25
Caption = #30830#23450#36873#25321
TabOrder = 0
OnClick = Button1Click
end
object PHYG: TBtnEditA
Left = 896
Top = 11
Width = 100
Height = 20
ImeName = #20013#25991'('#31616#20307') - '#30334#24230#36755#20837#27861
TabOrder = 4
Visible = False
end
object CheckBox1: TCheckBox
Left = 1097
Top = 11
Width = 99
Height = 19
Caption = #20840#36873
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
ParentFont = False
TabOrder = 5
OnClick = CheckBox1Click
end
object batchno: TEdit
Tag = 2
Left = 368
Top = 11
Width = 100
Height = 20
ImeName = #20013#25991'('#31616#20307') - '#30334#24230#36755#20837#27861
TabOrder = 3
end
object C_Pattern: TEdit
Tag = 2
Left = 498
Top = 11
Width = 100
Height = 20
ImeName = #20013#25991'('#31616#20307') - '#30334#24230#36755#20837#27861
TabOrder = 7
end
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 265
Top = 504
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 353
Top = 505
end
inherited ImageList_new32: TImageList
Left = 1480
Top = 32
end
inherited cxImageList_bar: TcxImageList
FormatVersion = 1
end
object ADOTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 504
Top = 396
end
object ADOCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 592
Top = 389
end
object DS_1: TDataSource
DataSet = CDS_1
Left = 208
Top = 344
end
object CDS_1: TClientDataSet
Aggregates = <>
Params = <>
Left = 139
Top = 348
end
object GPM_1: TcxGridPopupMenu
PopupMenus = <>
Left = 436
Top = 509
end
object ADOQueryLabel: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 916
Top = 357
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 840
Top = 162
end
object DS_MX: TDataSource
DataSet = CDS_MX
Left = 1040
Top = 156
end
object CDS_MX: TClientDataSet
Aggregates = <>
Params = <>
Left = 992
Top = 156
end
object CDS_MXSel: TClientDataSet
Aggregates = <>
Params = <>
Left = 1024
Top = 380
end
object DS_MXSel: TDataSource
DataSet = CDS_MXSel
Left = 1072
Top = 380
end
object ADOQueryMain: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 980
Top = 124
end
end

View File

@ -0,0 +1,468 @@
unit U_TradeMarketDisSel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomTableView, cxGridTableView,
cxGridDBTableView, cxClasses, cxControls, cxGridCustomView, cxGrid, cxMemo,
cxRichEdit, ComCtrls, cxContainer, cxTextEdit, cxMaskEdit, cxButtonEdit,
StdCtrls, ToolWin, DBClient, ADODB, ExtCtrls, BtnEdit, cxCalendar, StrUtils,
cxCurrencyEdit, cxGridCustomPopupMenu, cxGridPopupMenu, cxDropDownEdit,
RM_Common, RM_Preview, RM_System, RM_Class, RM_GridReport, RM_Dataset, Menus,
cxSplitter, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxCheckBox,
dxSkinsCore, dxSkinsDefaultPainters, dxDateRanges, dxBarBuiltInMenu, cxPC,
System.ImageList, Vcl.ImgList, U_BaseInput, cxImage, cxDBEdit, IdBaseComponent,
IdComponent, IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase,
IdFTP, ShellAPI, MovePanel, dxScrollbarAnnotations, cxImageList;
type
TfrmTradeMarketDisSel = class(TfrmBaseInput)
ToolBar1: TToolBar;
TBSave: TToolButton;
TBClose: TToolButton;
ADOTemp: TADOQuery;
ADOCmd: TADOQuery;
DS_1: TDataSource;
CDS_1: TClientDataSet;
GPM_1: TcxGridPopupMenu;
ADOQueryLabel: TADOQuery;
ToolButton3: TToolButton;
IdFTP1: TIdFTP;
DS_MX: TDataSource;
CDS_MX: TClientDataSet;
Panel2: TPanel;
cxGrid3: TcxGrid;
Tv3: TcxGridDBTableView;
cxGridDBColumn1: TcxGridDBColumn;
v1OrderNo: TcxGridDBColumn;
v1CustomerNoName: TcxGridDBColumn;
v1MPRTCodeName: TcxGridDBColumn;
v1PRTColor: TcxGridDBColumn;
v1MPRTKZ: TcxGridDBColumn;
v1PRTRollNum: TcxGridDBColumn;
v1PRTOrderQty: TcxGridDBColumn;
cxGridDBColumn19: TcxGridDBColumn;
v1OrdDefStr1: TcxGridDBColumn;
cxGridDBColumn17: TcxGridDBColumn;
v1OrdPerson1: TcxGridDBColumn;
v1JGFactoryName: TcxGridDBColumn;
v1OrdDate: TcxGridDBColumn;
cxGridDBColumn18: TcxGridDBColumn;
v1DeliveryDate: TcxGridDBColumn;
v1MPRTSpec: TcxGridDBColumn;
v3Column11: TcxGridDBColumn;
v1MPRTMF: TcxGridDBColumn;
cxGrid1Level1: TcxGridLevel;
Panel3: TPanel;
cxGrid2: TcxGrid;
Tv1: TcxGridDBTableView;
v1Ssel: TcxGridDBColumn;
v2Column1: TcxGridDBColumn;
v2Column3: TcxGridDBColumn;
v1C_Color: TcxGridDBColumn;
v2Column6: TcxGridDBColumn;
v1Column7: TcxGridDBColumn;
v1Column2: TcxGridDBColumn;
v1Column3: TcxGridDBColumn;
v2Column5: TcxGridDBColumn;
v1Column6: TcxGridDBColumn;
v1KCKW: TcxGridDBColumn;
v1Column5: TcxGridDBColumn;
cxGrid2Level1: TcxGridLevel;
cxGrid1: TcxGrid;
Tv2: TcxGridDBTableView;
cxGridDBColumn3: TcxGridDBColumn;
cxGridDBColumn4: TcxGridDBColumn;
cxGridDBColumn11: TcxGridDBColumn;
cxGridDBColumn16: TcxGridDBColumn;
cxGridDBColumn13: TcxGridDBColumn;
cxGridDBColumn14: TcxGridDBColumn;
cxGridDBColumn15: TcxGridDBColumn;
cxGridDBColumn10: TcxGridDBColumn;
cxGridDBColumn9: TcxGridDBColumn;
cxGridDBColumn7: TcxGridDBColumn;
cxGridDBColumn5: TcxGridDBColumn;
cxGridDBColumn6: TcxGridDBColumn;
v2Column4: TcxGridDBColumn;
v2Column7: TcxGridDBColumn;
cxGridLevel1: TcxGridLevel;
TBRafresh: TToolButton;
TBFind: TToolButton;
MovePanel2: TMovePanel;
CDS_MXSel: TClientDataSet;
DS_MXSel: TDataSource;
ADOQueryMain: TADOQuery;
Panel1: TPanel;
Label3: TLabel;
Label4: TLabel;
Label7: TLabel;
Label15: TLabel;
Label1: TLabel;
c_code: TEdit;
C_color: TEdit;
CPType: TComboBox;
Button1: TButton;
PHYG: TBtnEditA;
CheckBox1: TCheckBox;
batchno: TEdit;
Label2: TLabel;
C_Pattern: TEdit;
procedure TBCloseClick(Sender: TObject);
procedure CustomerNoNameBtnDnClick(Sender: TObject);
procedure TBRafreshClick(Sender: TObject);
procedure Tv3FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
procedure FormShow(Sender: TObject);
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure TBSaveClick(Sender: TObject);
procedure TBFindClick(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
fCode, fColor, FPattern: string;
function SaveData(): Boolean;
procedure InitOrder();
procedure InitGrid();
{ Private declarations }
public
FMainid: string;
{ Public declarations }
end;
var
frmTradeMarketDisSel: TfrmTradeMarketDisSel;
newh: hwnd;
implementation
uses
U_DataLink, U_ZDYHelp, U_ZDYHelpSel, U_RTFun, U_CompanySel, U_PictureUpload,
U_ClothInfoSel;
{$R *.dfm}
procedure TfrmTradeMarketDisSel.TBCloseClick(Sender: TObject);
begin
Close;
end;
procedure TfrmTradeMarketDisSel.TBFindClick(Sender: TObject);
begin
inherited;
if ADOQueryMain.Active then
begin
SCreateCDS(ADOQueryMain, cds_mx);
SInitCDSData(ADOQueryMain, cds_mx);
end;
end;
function TfrmTradeMarketDisSel.SaveData(): Boolean;
var
phID: string;
P_ID: integer;
begin
Result := false;
ADOCmd.Connection.BeginTrans;
P_ID := 1;
try
with CDS_MXSel do
begin
DisableControls;
first;
while not eof do
begin
if GetLSNo(adotemp, phID, 'PH', 'Trade_Market_Distribution', 4, 1) = False then
begin
Application.MessageBox('取配货单号失败!', '提示', 0);
Exit;
end;
with ADOCmd do
begin
close;
sql.Clear;
sql.Add('select * from Trade_Market_Distribution ');
sql.Add('where 1=2 ');
open;
end;
ADOCmd.Append;
ADOCmd.FieldByName('TMDID').Value := trim(phID);
ADOCmd.FieldByName('TMMID').Value := trim(cds_1.fieldbyname('TMMID').AsString);
ADOCmd.FieldByName('TMSID').Value := trim(cds_1.fieldbyname('TMSID').AsString);
ADOCmd.FieldByName('STKID').Value := trim(cds_mxsel.fieldbyname('STKID').AsString);
ADOCmd.FieldByName('Filler').Value := trim(DName);
ADOCmd.Post;
with adocmd do
begin
close;
sql.Clear;
sql.Add('select * from BS_Cloth_IO ');
sql.Add('where STKID=' + quotedstr(trim(CDS_MXSel.fieldbyname('STKID').AsString)));
open;
edit;
fieldbyname('DisStatus').Value := '1';
post;
end;
next;
end;
first;
EnableControls;
with adocmd do
begin
close;
sql.Clear;
sql.Add('select * from Trade_Market_Sub ');
sql.Add('where TMMID=' + quotedstr(trim(cds_1.fieldbyname('TMMID').AsString)));
sql.Add('and TMSID=' + quotedstr(trim(cds_1.fieldbyname('TMSID').AsString)));
// ShowMessage(sql.Text);
open;
edit;
fieldbyname('substatus').Value := '2';
post;
end;
end;
ADOCmd.Connection.CommitTrans;
Result := true;
except
ADOCmd.Connection.RollbackTrans;
end;
end;
procedure TfrmTradeMarketDisSel.TBRafreshClick(Sender: TObject);
begin
inherited;
MovePanel2.Visible := True;
MovePanel2.Refresh;
initOrder();
MovePanel2.Visible := False;
end;
procedure TfrmTradeMarketDisSel.TBSaveClick(Sender: TObject);
begin
if CDS_MXSel.IsEmpty then
exit;
Panel1.SetFocus;
with CDS_MXSel do
begin
DisableControls;
first;
while not eof do
begin
if (trim(fieldbyname('c_code').AsString) <> trim(cds_1.FieldByName('c_code').AsString)) or (uppercase(trim(fieldbyname('c_color').AsString)) <> uppercase(trim(cds_1.FieldByName('C_Color').AsString))) or (uppercase(trim(fieldbyname('C_Pattern').AsString)) <> uppercase(trim(cds_1.FieldByName('C_Pattern').AsString))) then
begin
application.MessageBox('产品编号,花型或者颜色不一样,不能配货!', '提示信息', 0);
EnableControls;
exit;
end;
next;
end;
first;
EnableControls;
end;
if SaveData() then
begin
application.MessageBox('配货成功!', '提示信息');
CDS_1.Delete;
CDS_MXSel.EmptyDataSet;
// TBRafresh.Click;
end
else
begin
application.MessageBox('配货失败!', '提示信息', 0);
end;
end;
procedure TfrmTradeMarketDisSel.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
var
i: Integer;
begin
if cds_mx.IsEmpty then
Exit;
CDS_MXSel.Append;
for i := 0 to CDS_MXSel.FieldCount - 1 do
begin
CDS_MXSel.Fields[i].Value := cds_mx.Fields[i].Value;
end;
CDS_MXSel.Post;
CDS_MX.Delete;
end;
procedure TfrmTradeMarketDisSel.Tv2CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
var
i: Integer;
begin
if CDS_MXSel.IsEmpty then
Exit;
CDS_MX.Append;
for i := 0 to CDS_MX.FieldCount - 1 do
begin
CDS_MX.Fields[i].Value := CDS_MXSel.Fields[i].Value;
end;
CDS_MX.FieldByName('ssel').Value := false;
CDS_MX.Post;
CDS_MXSel.Delete;
end;
procedure TfrmTradeMarketDisSel.Tv3FocusedRecordChanged(Sender: TcxCustomGridTableView; APrevFocusedRecord, AFocusedRecord: TcxCustomGridRecord; ANewItemRecordFocusingChanged: Boolean);
begin
inherited;
if CDS_1.IsEmpty then
begin
fCode := '!##@';
fColor := '!##@';
FPattern := '!##@';
end
else
begin
FCode := trim(cds_1.FieldByName('C_Code').AsString);
fColor := trim(cds_1.FieldByName('C_Color').AsString);
FPattern := trim(cds_1.FieldByName('C_Pattern').AsString);
end;
InitGrid();
end;
procedure TfrmTradeMarketDisSel.Button1Click(Sender: TObject);
var
i: integer;
mfieldName: string;
begin
if CDS_MX.IsEmpty then
Exit;
CDS_mxSel.DisableControls;
with CDS_MX do
begin
DisableControls;
First;
while not eof do
begin
if (CDS_MX.Locate('ssel', true, [])) and not CDS_mxSel.Locate('stkid', CDS_MX.fieldbyname('stkid').AsString, []) then
begin
CDS_mxSel.Append;
for i := 0 to CDS_mxSel.FieldCount - 1 do
begin
mfieldName := trim(CDS_mxSel.fields[i].FieldName);
CDS_mxSel.Fields[i].Value := CDS_MX.fieldbyName(mfieldName).Value;
end;
CDS_mxSel.Post;
CDS_MX.Delete;
end;
next;
end;
EnableControls;
First;
end;
with CDS_MX do
begin
DisableControls;
First;
while not eof do
begin
if (CDS_MX.Locate('ssel', true, [])) and not CDS_mxSel.Locate('stkid', CDS_MX.fieldbyname('stkid').AsString, []) then
begin
CDS_mxSel.Append;
for i := 0 to CDS_mxSel.FieldCount - 1 do
begin
mfieldName := trim(CDS_mxSel.fields[i].FieldName);
CDS_mxSel.Fields[i].Value := CDS_MX.fieldbyName(mfieldName).Value;
// CDS_SubSel.Fields[i].Value:=CDS_Main.Fields[i].Value;
end;
CDS_mxSel.Post;
CDS_MX.Delete;
end;
next;
end;
EnableControls;
First;
end;
CDS_mxSel.EnableControls;
end;
procedure TfrmTradeMarketDisSel.CheckBox1Click(Sender: TObject);
begin
inherited;
if cds_mx.IsEmpty then
exit;
with cds_mx do
begin
DisableControls;
first;
while not eof do
begin
edit;
fieldbyname('ssel').Value := checkbox1.Checked;
post;
next;
end;
First;
EnableControls;
end;
end;
procedure TfrmTradeMarketDisSel.CustomerNoNameBtnDnClick(Sender: TObject);
begin
TBtnEditC(Sender).Text := '';
TBtnEditC(Sender).TxtCode := '';
end;
procedure TfrmTradeMarketDisSel.InitOrder();
begin
try
with ADOTemp do
begin
close;
sql.Clear;
sql.Add(' select A.* ');
sql.Add(' from Trade_Market_Sub A ');
sql.Add(' inner join Trade_Market_Main B on B.TMMID=A.TMMID');
sql.Add(' and isnull(substatus,''0'')=''0''');
sql.Add(' and A.TMMID=' + quotedstr(trim(fmainID)));
open;
end;
SCreateCDS(ADOTemp, cds_1);
SInitCDSData(ADOTemp, cds_1);
finally
// Order_Main.EnableControls;
end;
end;
procedure TfrmTradeMarketDisSel.FormShow(Sender: TObject);
begin
inherited;
TBRafresh.Click;
end;
procedure TfrmTradeMarketDisSel.InitGrid();
begin
try
with ADOQueryMain do
begin
Filtered := False;
Close;
sql.Clear;
SQL.Add('exec P_Trade_Dispatched_View');
SQL.Add('@C_Code=' + quotedstr(trim(fCode)));
SQL.Add(',@C_Color=' + quotedstr(trim(fColor)));
SQL.Add(',@C_Pattern=' + quotedstr(trim(FPattern)));
// ShowMessage(sql.Text);
Open;
end;
SCreateCDS(ADOQueryMain, cds_mx);
SInitCDSData(ADOQueryMain, cds_mx);
SCreateCDS(ADOQueryMain, cds_mxSel);
finally
TBFind.Click;
end;
end;
end.

View File

@ -0,0 +1,751 @@
inherited frmTradeMarketInPut: TfrmTradeMarketInPut
Left = 143
Top = 4
Caption = #35746#21333#24405#20837
ClientHeight = 865
ClientWidth = 1360
Font.Charset = GB2312_CHARSET
Font.Height = -16
Position = poMainFormCenter
WindowState = wsMaximized
ExplicitWidth = 1376
ExplicitHeight = 904
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1360
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 83
Caption = 'ToolBar1'
Color = clWhite
EdgeInner = esNone
EdgeOuter = esNone
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Images = cxImageList_bar
List = True
ParentColor = False
ParentFont = False
ShowCaptions = True
TabOrder = 0
ExplicitWidth = 1692
object TBSave: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #20445#23384
ImageIndex = 16
OnClick = TBSaveClick
end
object ToolButton3: TToolButton
Left = 63
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton3Click
end
object TBClose: TToolButton
Left = 150
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object ToolBar2: TToolBar [1]
Left = 0
Top = 254
Width = 1360
Height = 30
ButtonHeight = 30
ButtonWidth = 83
Caption = 'ToolBar1'
Color = clBtnFace
EdgeInner = esNone
EdgeOuter = esNone
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Images = cxImageList_bar
List = True
ParentColor = False
ParentFont = False
ShowCaptions = True
TabOrder = 1
object ToolButton4: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #20135#21697#36873#25321
ImageIndex = 4
OnClick = ToolButton4Click
end
object ToolButton1: TToolButton
Left = 87
Top = 0
AutoSize = True
Caption = #22686#34892
ImageIndex = 2
OnClick = ToolButton1Click
end
object ToolButton2: TToolButton
Left = 150
Top = 0
AutoSize = True
Caption = #21024#34892
ImageIndex = 6
OnClick = ToolButton2Click
end
object ToolButton5: TToolButton
Left = 213
Top = 0
Caption = #19968#38190#26367#25442
ImageIndex = 17
OnClick = ToolButton3Click
end
end
object Panel2: TPanel [2]
Left = 0
Top = 284
Width = 1360
Height = 581
Align = alClient
Caption = 'Panel2'
TabOrder = 2
ExplicitTop = 251
ExplicitWidth = 1540
ExplicitHeight = 399
object Panel3: TPanel
Left = 1
Top = 1
Width = 1072
Height = 579
Align = alClient
Caption = 'Panel2'
TabOrder = 0
ExplicitWidth = 900
ExplicitHeight = 397
object cxGrid1: TcxGrid
Left = 1
Top = 1
Width = 1070
Height = 577
Align = alClient
TabOrder = 0
ExplicitLeft = 0
ExplicitWidth = 1392
ExplicitHeight = 573
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnFocusedRecordChanged = Tv1FocusedRecordChanged
DataController.DataSource = DS_1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = '0'
Position = spFooter
end
item
Format = '0'
Position = spFooter
Column = v1PRTOrderQty
end
item
Format = '0'
Position = spFooter
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
Column = v1PRTOrderQty
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
Column = VC_PRTPs
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.FocusCellOnTab = True
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsData.Deleting = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
object Tv1Column3: TcxGridDBColumn
Caption = #24207#21495
DataBinding.FieldName = 'SerialNo'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 50
end
object v1Column11: TcxGridDBColumn
Tag = 99
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
Properties.NullStyle = nssUnchecked
HeaderAlignmentHorz = taCenter
Options.Sorting = False
Width = 66
end
object Tv1Column1: TcxGridDBColumn
Caption = #20135#21697#32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.OnButtonClick = Tv1Column1PropertiesButtonClick
HeaderAlignmentHorz = taCenter
Width = 80
end
object Tv1Column7: TcxGridDBColumn
Caption = #20135#21697#21517#31216
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 80
end
object v1PRTColor: TcxGridDBColumn
Caption = #20013#25991#39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
HeaderAlignmentHorz = taCenter
Width = 116
end
object Tv1Column9: TcxGridDBColumn
Caption = #35268#26684
DataBinding.FieldName = 'C_Spec'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Column11: TcxGridDBColumn
Caption = #33457#22411
DataBinding.FieldName = 'C_Pattern'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 80
end
object Tv1Column5: TcxGridDBColumn
Caption = #38376#24133
DataBinding.FieldName = 'C_Width'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Column10: TcxGridDBColumn
Caption = #20811#37325
DataBinding.FieldName = 'C_GramWeight'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object VC_PRTPs: TcxGridDBColumn
Caption = #21305#25968
DataBinding.FieldName = 'TMSPiece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 112
end
object v1PRTOrderQty: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'TMSQty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Width = 98
end
object Tv1Column8: TcxGridDBColumn
Caption = #25968#37327#21333#20301
DataBinding.FieldName = 'TMSUnit'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxComboBoxProperties'
Properties.Items.Strings = (
'M'
'Y'
'Kg'
#21305)
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Column4: TcxGridDBColumn
Caption = #21333#20215
DataBinding.FieldName = 'Price'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Column6: TcxGridDBColumn
Caption = #21253#32568#36153
DataBinding.FieldName = 'GangFee'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Column13: TcxGridDBColumn
Caption = #36816#36153
DataBinding.FieldName = 'Transfee'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Column14: TcxGridDBColumn
Caption = #20854#23427#36153
DataBinding.FieldName = 'Otherfee'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object Tv1Column2: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'OrdSNote'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 105
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
end
object Panel4: TPanel
Left = 1073
Top = 1
Width = 286
Height = 579
Align = alRight
Caption = 'Panel4'
TabOrder = 1
object Panel5: TPanel
Left = 1
Top = 1
Width = 284
Height = 41
Align = alTop
TabOrder = 0
ExplicitLeft = 215
ExplicitTop = 393
ExplicitWidth = 421
object Label33: TLabel
Left = 113
Top = 10
Width = 44
Height = 21
Caption = #25968#37327
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -21
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object Label38: TLabel
Left = 20
Top = 10
Width = 44
Height = 21
Caption = #24207#21495
Font.Charset = GB2312_CHARSET
Font.Color = clRed
Font.Height = -21
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
end
object QtyMX: TEdit
Left = 163
Top = 6
Width = 89
Height = 29
TabOrder = 0
OnKeyPress = QtyMXKeyPress
end
end
object GroupBox2: TGroupBox
Left = 1
Top = 42
Width = 284
Height = 536
Align = alClient
Caption = #21452#20987#21024#38500#26126#32454#20449#24687
TabOrder = 1
ExplicitWidth = 636
ExplicitHeight = 354
object cxGrid2: TcxGrid
Left = 2
Top = 23
Width = 280
Height = 511
Align = alClient
TabOrder = 0
ExplicitLeft = -2
ExplicitWidth = 784
ExplicitHeight = 507
object TvMX: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
Navigator.Buttons.Delete.Enabled = False
Navigator.Buttons.Delete.Visible = False
ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = TvMXCellDblClick
DataController.DataSource = DS_MX
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Kind = skCount
Position = spFooter
end
item
Kind = skSum
Position = spFooter
Column = cxGridDBColumn8
end
item
Kind = skCount
end
item
Kind = skSum
Column = cxGridDBColumn8
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
Column = cxGridDBColumn8
end
item
Kind = skCount
Column = cxGridDBColumn8
end>
DataController.Summary.SummaryGroups = <>
OptionsCustomize.ColumnFiltering = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.Indicator = True
OptionsView.IndicatorWidth = 33
object cxGridDBColumn8: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'Meter'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
Properties.Alignment.Horz = taCenter
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Sorting = False
Width = 66
end
end
object cxGridLevel2: TcxGridLevel
GridView = TvMX
end
end
end
end
end
object ScrollBox1: TScrollBox [3]
Left = 0
Top = 30
Width = 1360
Height = 224
Align = alTop
BevelInner = bvNone
BevelOuter = bvNone
BorderStyle = bsNone
Color = clWhite
Ctl3D = False
ParentColor = False
ParentCtl3D = False
TabOrder = 3
OnClick = ScrollBox1Click
ExplicitTop = 72
ExplicitWidth = 1692
object Label3: TLabel
Left = 722
Top = 13
Width = 64
Height = 21
Caption = #21046#21333#26085#26399
end
object Label25: TLabel
Left = 363
Top = 13
Width = 64
Height = 21
Caption = #20132#36135#26085#26399
end
object Label1: TLabel
Left = 21
Top = 126
Width = 77
Height = 21
Caption = #22791' '#27880
end
object Label2: TLabel
Left = 23
Top = 13
Width = 48
Height = 21
Caption = #35746#21333#21495
end
object Label14: TLabel
Left = 363
Top = 49
Width = 72
Height = 21
Caption = #23458' '#25143
end
object Label20: TLabel
Left = 23
Top = 49
Width = 64
Height = 21
Caption = #32463#33829#21333#20301
end
object Label19: TLabel
Left = 363
Top = 87
Width = 80
Height = 21
Caption = #32852#31995#26041#24335#65306
end
object Label37: TLabel
Left = 23
Top = 87
Width = 80
Height = 21
Caption = #35746#21333#31867#22411#65306
end
object Label18: TLabel
Left = 722
Top = 49
Width = 64
Height = 21
Caption = #21457#36135#22320#22336
end
object TMMNo: TEdit
Tag = 2
Left = 114
Top = 10
Width = 150
Height = 27
TabOrder = 0
end
object TMMDate: TDateTimePicker
Tag = 2
Left = 806
Top = 9
Width = 150
Height = 29
BevelInner = bvNone
Date = 40916.000000000000000000
Format = 'yyyy-MM-dd'
Time = 0.670856296288548000
TabOrder = 1
end
object DLYDate: TDateTimePicker
Tag = 2
Left = 461
Top = 9
Width = 150
Height = 29
BevelInner = bvNone
Date = 40916.000000000000000000
Format = 'yyyy-MM-dd'
Time = 0.670856296288548000
ShowCheckbox = True
TabOrder = 2
end
object OrdNote: TMemo
Tag = 2
Left = 112
Top = 131
Width = 842
Height = 58
Hint = 'OrdNote/'#22791#27880
ScrollBars = ssVertical
TabOrder = 3
OnDblClick = PackNoteDblClick
end
object CustName: TBtnEditC
Tag = 2
Left = 461
Top = 44
Width = 150
Height = 30
ReadOnly = True
TabOrder = 4
OnBtnUpClick = CustNameBtnUpClick
OnBtnDnClick = OurCoNameBtnDnClick
end
object OurCoName: TBtnEditC
Tag = 2
Left = 114
Top = 45
Width = 150
Height = 30
ReadOnly = True
TabOrder = 5
OnBtnUpClick = OurCoNameBtnUpClick
OnBtnDnClick = OurCoNameBtnDnClick
end
object CONTACT: TBtnEditC
Tag = 2
Left = 461
Top = 82
Width = 493
Height = 30
TabOrder = 6
end
object OrdType: TComboBox
Tag = 2
Left = 114
Top = 83
Width = 100
Height = 29
Style = csDropDownList
Ctl3D = False
Enabled = False
ItemIndex = 0
ParentCtl3D = False
TabOrder = 7
Text = #27491#24120#21333
Items.Strings = (
#27491#24120#21333)
end
object ShippingAddress: TBtnEditC
Tag = 2
Left = 806
Top = 44
Width = 150
Height = 30
TabOrder = 8
end
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 265
Top = 504
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 353
Top = 505
end
inherited ImageList_new32: TImageList
Left = 1480
Top = 32
end
inherited cxImageList_bar: TcxImageList
FormatVersion = 1
end
object ADOTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 504
Top = 396
end
object ADOCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 592
Top = 389
end
object DS_1: TDataSource
DataSet = CDS_1
Left = 584
Top = 512
end
object CDS_1: TClientDataSet
Aggregates = <>
Params = <>
Left = 515
Top = 508
end
object GPM_1: TcxGridPopupMenu
PopupMenus = <>
Left = 436
Top = 509
end
object ADOQueryLabel: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 932
Top = 421
end
object ADO_I1: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 1226
Top = 189
end
object DS_I1: TDataSource
DataSet = ADO_I1
Left = 1166
Top = 157
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 1058
Top = 238
end
object ADO_I2: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 1048
Top = 75
end
object DS_I2: TDataSource
DataSet = ADO_I2
Left = 1124
Top = 71
end
object DS_MX: TDataSource
DataSet = CDS_MX
Left = 1056
Top = 444
end
object CDS_MX: TClientDataSet
Aggregates = <>
Params = <>
Left = 1008
Top = 412
end
end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,722 @@
inherited frmTradeMarketList: TfrmTradeMarketList
Left = 165
Top = 13
Caption = #29983#20135#35745#21010#21333#31649#29702
ClientHeight = 760
ClientWidth = 1540
Color = clBtnFace
Font.Height = -16
FormStyle = fsMDIChild
Position = poScreenCenter
Visible = True
ExplicitWidth = 1556
ExplicitHeight = 799
PixelsPerInch = 96
TextHeight = 21
object ToolBar1: TToolBar [0]
Tag = 1
Left = 0
Top = 0
Width = 1540
Height = 30
AutoSize = True
ButtonHeight = 30
ButtonWidth = 83
Caption = 'ToolBar1'
Color = clBtnFace
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = #23435#20307
Font.Style = []
Images = DataLink_TradeMarket.cxImageList_bar
List = True
ParentColor = False
ParentFont = False
ShowCaptions = True
TabOrder = 4
object TBRafresh: TToolButton
Left = 0
Top = 0
AutoSize = True
Caption = #21047#26032
ImageIndex = 1
OnClick = TBRafreshClick
end
object TBAdd: TToolButton
Left = 63
Top = 0
AutoSize = True
Caption = #26032#22686
ImageIndex = 9
OnClick = TBAddClick
end
object btnCopy: TToolButton
Left = 126
Top = 0
AutoSize = True
Caption = #22797#21046
ImageIndex = 13
OnClick = btnCopyClick
end
object TBEdit: TToolButton
Left = 189
Top = 0
AutoSize = True
Caption = #20462#25913
ImageIndex = 3
OnClick = TBEditClick
end
object TBDel: TToolButton
Left = 252
Top = 0
AutoSize = True
Caption = #21024#38500
ImageIndex = 5
OnClick = TBDelClick
end
object TBPrint: TToolButton
Left = 315
Top = 0
AutoSize = True
Caption = #25171#21360
ImageIndex = 21
OnClick = TBPrintClick
end
object TBCK: TToolButton
Left = 378
Top = 0
AutoSize = True
Caption = #26597#30475
ImageIndex = 8
OnClick = TBCKClick
end
object ToolButton4: TToolButton
Left = 441
Top = 0
AutoSize = True
Caption = #38468#20214
ImageIndex = 22
OnClick = ToolButton4Click
end
object TBTJ: TToolButton
Left = 504
Top = 0
AutoSize = True
Caption = #25552#20132
ImageIndex = 12
OnClick = TBTJClick
end
object TBTJCX: TToolButton
Left = 567
Top = 0
AutoSize = True
Caption = #25552#20132#25764#38144
ImageIndex = 11
OnClick = TBTJCXClick
end
object Tchk: TToolButton
Left = 654
Top = 0
AutoSize = True
Caption = #23457#26680
ImageIndex = 12
OnClick = TchkClick
end
object Tnochk: TToolButton
Left = 717
Top = 0
AutoSize = True
Caption = #25764#38144#23457#26680
ImageIndex = 11
OnClick = TnochkClick
end
object TWC: TToolButton
Left = 804
Top = 0
AutoSize = True
Caption = #23436#25104
ImageIndex = 12
OnClick = TWCClick
end
object TNowc: TToolButton
Left = 867
Top = 0
AutoSize = True
Caption = #25764#38144#23436#25104
ImageIndex = 11
OnClick = TNowcClick
end
object ToolButton2: TToolButton
Left = 954
Top = 0
AutoSize = True
Caption = #20445#23384#26684#24335
ImageIndex = 16
OnClick = ToolButton2Click
end
object TBClose: TToolButton
Left = 1041
Top = 0
AutoSize = True
Caption = #20851#38381
ImageIndex = 7
OnClick = TBCloseClick
end
end
object Panel1: TPanel [1]
Left = 0
Top = 30
Width = 1540
Height = 91
Align = alTop
BevelInner = bvRaised
BevelOuter = bvLowered
Color = clWhite
ParentBackground = False
TabOrder = 6
ExplicitTop = 38
object Label3: TLabel
Left = 24
Top = 51
Width = 64
Height = 21
Caption = #35745#21010#21333#21495
end
object Label1: TLabel
Left = 408
Top = 51
Width = 32
Height = 21
Caption = #23458#25143
end
object Label2: TLabel
Left = 216
Top = 51
Width = 64
Height = 21
Caption = #20135#21697#21517#31216
end
object Label4: TLabel
Left = 568
Top = 51
Width = 48
Height = 21
Caption = #21512#21516#21495
end
object TMMNo: TEdit
Tag = 2
Left = 92
Top = 47
Width = 120
Height = 29
TabOrder = 0
OnKeyPress = TMMNoKeyPress
end
object CustName: TEdit
Tag = 2
Left = 444
Top = 47
Width = 120
Height = 29
TabOrder = 1
OnKeyPress = TMMNoKeyPress
end
object C_Name: TEdit
Tag = 2
Left = 284
Top = 47
Width = 120
Height = 29
TabOrder = 2
OnKeyPress = TMMNoKeyPress
end
object ConNo: TEdit
Tag = 2
Left = 620
Top = 47
Width = 120
Height = 29
TabOrder = 3
OnKeyPress = TMMNoKeyPress
end
inline frmFrameDateSel1: TfrmFrameDateSel
Left = 2
Top = 2
Width = 1536
Height = 37
Align = alTop
ParentBackground = False
TabOrder = 4
ExplicitLeft = -380
ExplicitTop = 2
ExplicitWidth = 1920
ExplicitHeight = 37
inherited lbl2: TLabel
Width = 16
Height = 21
ExplicitWidth = 16
ExplicitHeight = 21
end
end
end
object cxGrid1: TcxGrid [2]
Left = 0
Top = 152
Width = 1540
Height = 404
Align = alClient
PopupMenu = PM_1
TabOrder = 3
ExplicitTop = 120
ExplicitHeight = 436
object Tv1: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
OnCellDblClick = Tv1CellDblClick
OnFocusedRecordChanged = Tv1FocusedRecordChanged
DataController.DataSource = DataSource1
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
Column = Tv1Column11
end
item
Kind = skSum
Column = Tv1Column10
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.CellHints = True
OptionsCustomize.ColumnFiltering = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
OptionsView.IndicatorWidth = 30
object v1Column16: TcxGridDBColumn
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
HeaderAlignmentHorz = taCenter
Width = 50
end
object v1OrdDate: TcxGridDBColumn
Caption = #21046#21333#26085#26399
DataBinding.FieldName = 'TMMDate'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxDateEditProperties'
Properties.ShowTime = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column2: TcxGridDBColumn
Caption = #32463#33829#21333#20301
DataBinding.FieldName = 'OurCoName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column4: TcxGridDBColumn
Caption = #23458#25143
DataBinding.FieldName = 'CustName'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object v1DeliveryDate: TcxGridDBColumn
Caption = #20132#36135#26085#26399
DataBinding.FieldName = 'DlyDate'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxDateEditProperties'
Properties.ShowTime = False
OnCustomDrawCell = v1DeliveryDateCustomDrawCell
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column11: TcxGridDBColumn
Caption = #21305#25968
DataBinding.FieldName = 'HZPiQty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column10: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'OrdQty'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
HeaderGlyphAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object v1Column11: TcxGridDBColumn
Caption = #21333#20301
DataBinding.FieldName = 'OrdUnit'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
HeaderGlyphAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column6: TcxGridDBColumn
Caption = #21046#21333#20154
DataBinding.FieldName = 'FILLER'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column1: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'OrdNote'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object Tv1Column3: TcxGridDBColumn
Caption = #21457#36135#22320#22336
DataBinding.FieldName = 'ShippingAddress'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 134
end
object Tv1Column5: TcxGridDBColumn
Caption = #32852#31995#26041#24335
DataBinding.FieldName = 'CONTACT'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 80
end
end
object cxGrid1Level1: TcxGridLevel
GridView = Tv1
end
end
object cxSplitter1: TcxSplitter [3]
Left = 0
Top = 556
Width = 1540
Height = 8
HotZoneClassName = 'TcxMediaPlayer9Style'
AlignSplitter = salBottom
end
object cxTabControl1: TcxTabControl [4]
Left = 0
Top = 121
Width = 1540
Height = 31
Align = alTop
TabOrder = 2
Properties.CustomButtons.Buttons = <>
Properties.Style = 9
Properties.TabIndex = 0
Properties.Tabs.Strings = (
' '#24453#25552#20132' '
' '#24453#23457#26680' '
' '#24050#23457#26680' '
' '#24050#23436#25104' '
' '#20840#37096' ')
OnChange = cxTabControl1Change
ExplicitTop = 89
ClientRectBottom = 31
ClientRectRight = 1540
ClientRectTop = 28
end
object Panel2: TPanel [5]
Left = 0
Top = 564
Width = 1540
Height = 196
Align = alBottom
BevelOuter = bvNone
Caption = 'Panel2'
TabOrder = 5
object cxGrid2: TcxGrid
Left = 0
Top = 0
Width = 1540
Height = 196
Align = alClient
PopupMenu = PopupMenu2
TabOrder = 0
object TV2: TcxGridDBTableView
Navigator.Buttons.CustomButtons = <>
ScrollbarAnnotations.CustomAnnotations = <>
DataController.DataSource = DataSource2
DataController.Filter.AutoDataSetFilter = True
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = '0'
Position = spFooter
end
item
Format = '0'
Position = spFooter
Column = v1PRTOrderQty
end
item
Format = '0'
Position = spFooter
end>
DataController.Summary.FooterSummaryItems = <
item
Kind = skSum
Column = v1PRTOrderQty
end
item
Kind = skSum
end
item
Kind = skSum
end
item
Kind = skSum
Column = VC_PRTPs
end>
DataController.Summary.SummaryGroups = <>
OptionsBehavior.FocusCellOnTab = True
OptionsBehavior.GoToNextCellOnEnter = True
OptionsBehavior.FocusCellOnCycle = True
OptionsCustomize.ColumnFiltering = False
OptionsData.Deleting = False
OptionsView.Footer = True
OptionsView.GroupByBox = False
object cxGridDBColumn1: TcxGridDBColumn
Tag = 99
Caption = #36873#25321
DataBinding.FieldName = 'SSel'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxCheckBoxProperties'
Properties.ImmediatePost = True
Properties.NullStyle = nssUnchecked
Visible = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Options.Sorting = False
Width = 66
end
object TV2Column1: TcxGridDBColumn
Caption = #20135#21697#32534#21495
DataBinding.FieldName = 'C_Code'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object TV2Column2: TcxGridDBColumn
Caption = #20135#21697#21517#31216
DataBinding.FieldName = 'C_Name'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Width = 70
end
object v1PRTColor: TcxGridDBColumn
Caption = #20013#25991#39068#33394
DataBinding.FieldName = 'C_Color'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxButtonEditProperties'
Properties.Buttons = <
item
Default = True
Kind = bkEllipsis
end>
Properties.ReadOnly = False
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 79
end
object VC_PRTPs: TcxGridDBColumn
Caption = #21305#25968
DataBinding.FieldName = 'TMSPiece'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object v1PRTOrderQty: TcxGridDBColumn
Caption = #25968#37327
DataBinding.FieldName = 'TMSQty'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxTextEditProperties'
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object v1OrderUnit: TcxGridDBColumn
Caption = #21333#20301
DataBinding.FieldName = 'OrdUnit'
DataBinding.IsNullValueType = True
PropertiesClassName = 'TcxComboBoxProperties'
Properties.Items.Strings = (
'M'
'Y'
'Kg')
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
object cxGridDBColumn7: TcxGridDBColumn
Caption = #22791#27880
DataBinding.FieldName = 'OrdSNote'
DataBinding.IsNullValueType = True
HeaderAlignmentHorz = taCenter
Options.Editing = False
Width = 66
end
end
object cxGridLevel1: TcxGridLevel
GridView = TV2
end
end
end
inherited loadProcess: TPanel
Left = 616
Top = 346
ExplicitLeft = 616
ExplicitTop = 346
end
inherited cxProgressBar2: TcxProgressBar
Left = 484
Top = 280
ExplicitLeft = 484
ExplicitTop = 280
ExplicitHeight = 29
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 255
Top = 314
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Left = 157
Top = 256
end
object cxgrdpmn1: TcxGridPopupMenu
Grid = cxGrid1
PopupMenus = <>
Left = 660
Top = 428
end
object ADOQueryCmd: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 568
Top = 240
end
object ADOQueryMain: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 420
Top = 216
end
object ADOQueryTemp: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
LockType = ltReadOnly
Parameters = <>
Left = 320
Top = 224
end
object DataSource1: TDataSource
DataSet = Order_Main
Left = 812
Top = 440
end
object Order_Main: TClientDataSet
Aggregates = <>
Params = <>
Left = 724
Top = 432
end
object ADOQuerySub: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
Parameters = <>
Left = 312
Top = 600
end
object DataSource2: TDataSource
DataSet = ORDER_SUB
Left = 408
Top = 604
end
object ADOQueryImage: TADOQuery
Connection = DataLink_TradeMarket.ADOLink
EnableBCD = False
Parameters = <>
Left = 316
Top = 283
end
object DSImage: TDataSource
DataSet = ADOQueryImage
Left = 416
Top = 288
end
object IdFTP1: TIdFTP
ConnectTimeout = 0
NATKeepAlive.UseKeepAlive = False
NATKeepAlive.IdleTimeMS = 0
NATKeepAlive.IntervalMS = 0
ProxySettings.ProxyType = fpcmNone
ProxySettings.Port = 0
ReadTimeout = 0
Left = 92
Top = 258
end
object ORDER_SUB: TClientDataSet
Aggregates = <>
Params = <>
Left = 212
Top = 608
end
object PopupMenu2: TPopupMenu
Left = 532
Top = 636
object N3: TMenuItem
Caption = #20840#36873
OnClick = N3Click
end
object N4: TMenuItem
Caption = #20840#24323
OnClick = N4Click
end
object N2: TMenuItem
Caption = #22797#21046
OnClick = N2Click
end
end
object cxgrdpmn2: TcxGridPopupMenu
Grid = cxGrid2
PopupMenus = <>
Left = 660
Top = 636
end
object CDS_WXTS: TClientDataSet
Aggregates = <>
Params = <>
Left = 412
Top = 424
end
object PM_1: TPopupMenu
Left = 988
Top = 356
object N1: TMenuItem
Caption = #22797#21046
OnClick = N1Click
end
end
object GPM_3: TcxGridPopupMenu
PopupMenus = <>
Left = 860
Top = 228
end
end

File diff suppressed because it is too large Load Diff

View File

@ -46,7 +46,7 @@ object Form1: TForm1
Left = 138
Top = 0
Width = 79
Height = 13
Height = 22
Caption = ' DllName'#65306
end
object DllName: TEdit

View File

@ -55,7 +55,7 @@ begin
//动态加载
// showMessage(intTostr(application.Handle));
Th := LoadLibrary('ClothInfo.dll');
Th := LoadLibrary('TradeMarket.dll');
if Th > 0 then
begin
try

View File

@ -0,0 +1,64 @@
inherited Form1: TForm1
Caption = 'Form1'
ClientHeight = 299
ClientWidth = 635
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Height = -11
Font.Name = 'Tahoma'
ExplicitWidth = 651
ExplicitHeight = 338
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton [0]
Left = 32
Top = 16
Width = 75
Height = 25
Caption = #23458#25143
TabOrder = 0
OnClick = Button1Click
end
object Button2: TButton [1]
Left = 32
Top = 47
Width = 75
Height = 25
Caption = #26679#21697
TabOrder = 1
OnClick = Button2Click
end
object Button3: TButton [2]
Left = 32
Top = 78
Width = 75
Height = 25
Caption = #24037#24207#36873#25321
TabOrder = 2
end
object Button4: TButton [3]
Left = 32
Top = 118
Width = 75
Height = 25
Caption = #21592#24037#36873#25321
TabOrder = 3
OnClick = Button4Click
end
object Button5: TButton [4]
Left = 32
Top = 174
Width = 75
Height = 25
Caption = #26631#31614#25171#21360
TabOrder = 4
OnClick = Button5Click
end
inherited ADOQueryBaseCmd: TADOQuery
Connection = DataLink_InformationBase.ADOLink
Left = 345
end
inherited ADOQueryBaseTemp: TADOQuery
Connection = DataLink_InformationBase.ADOLink
end
end

View File

@ -0,0 +1,106 @@
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, U_BaseList,
Data.DB, Data.Win.ADODB, Vcl.StdCtrls;
type
TForm1 = class(TfrmBaseList)
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses
U_DataLink, U_CompanySel, U_ClothInfoSel, U_EmployeeSel, U_LabelPrint;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
try
frmCompanySel := TfrmCompanySel.Create(Application);
with frmCompanySel do
begin
if ShowModal = 1 then
begin
// Self.InitGrid();
end;
end;
finally
frmCompanySel.Free;
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
try
frmClothInfoSel := TfrmClothInfoSel.Create(Application);
with frmClothInfoSel do
begin
if ShowModal = 1 then
begin
// Self.InitGrid();
end;
end;
finally
frmClothInfoSel.Free;
end;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
try
frmEmployeeSel := TfrmEmployeeSel.Create(Application);
with frmEmployeeSel do
begin
if ShowModal = 1 then
begin
// Self.InitGrid();
end;
end;
finally
frmEmployeeSel.Free;
end;
end;
procedure TForm1.Button5Click(Sender: TObject);
begin
try
frmLabelPrint := TfrmLabelPrint.Create(Application);
with frmLabelPrint do
begin
if ShowModal = 1 then
begin
// Self.InitGrid();
end;
end;
finally
frmLabelPrint.Free;
end;
end;
end.

View File

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 766 B