0317
This commit is contained in:
parent
c7a02def1c
commit
889aa06bd5
|
|
@ -101,7 +101,7 @@ DebugSourceDirs=
|
||||||
UsePackages=0
|
UsePackages=0
|
||||||
[Parameters]
|
[Parameters]
|
||||||
RunParams=
|
RunParams=
|
||||||
HostApplication=D:\淃커덜쯤\D7szChenfeng\툰꼈쯤데덤쇱(PBMDDJ.dll)\testDll.exe
|
HostApplication=D:\Dp7Repo\淃커덜쯤\D7szChenfeng\툰꼈쯤데덤쇱(PBMDDJ.dll)\testDll.exe
|
||||||
Launcher=
|
Launcher=
|
||||||
UseLauncher=0
|
UseLauncher=0
|
||||||
DebugCWD=
|
DebugCWD=
|
||||||
|
|
|
||||||
|
|
@ -82,10 +82,15 @@ begin
|
||||||
|
|
||||||
if Trim(DataBaseStr) = '' then
|
if Trim(DataBaseStr) = '' then
|
||||||
begin
|
begin
|
||||||
server := '101.132.143.144,7781';
|
// server := '101.132.143.144,7781';
|
||||||
dtbase := 'chenfengdata';
|
// dtbase := 'chenfengdata';
|
||||||
user := 'rtsa';
|
// user := 'rtsa';
|
||||||
pswd := 'rightsoft@5740';
|
// pswd := 'rightsoft@5740';
|
||||||
|
|
||||||
|
server := '127.0.0.1';
|
||||||
|
dtbase := 'delphichenfeng';
|
||||||
|
user := 'sa';
|
||||||
|
pswd := 'rightsoft';
|
||||||
|
|
||||||
// server := '.';
|
// server := '.';
|
||||||
// dtbase := 'yiduidata';
|
// dtbase := 'yiduidata';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmSXCKOutList: TfrmSXCKOutList
|
object frmSXCKOutList: TfrmSXCKOutList
|
||||||
Left = 612
|
Left = 257
|
||||||
Top = 524
|
Top = 129
|
||||||
Width = 1314
|
Width = 1314
|
||||||
Height = 572
|
Height = 572
|
||||||
Caption = #22383#24067#20986#24211#21015#34920
|
Caption = #22383#24067#20986#24211#21015#34920
|
||||||
|
|
@ -21,7 +21,7 @@ object frmSXCKOutList: TfrmSXCKOutList
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1306
|
Width = 1298
|
||||||
Height = 33
|
Height = 33
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 83
|
ButtonWidth = 83
|
||||||
|
|
@ -151,7 +151,7 @@ object frmSXCKOutList: TfrmSXCKOutList
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 33
|
Top = 33
|
||||||
Width = 1306
|
Width = 1298
|
||||||
Height = 72
|
Height = 72
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -334,8 +334,8 @@ object frmSXCKOutList: TfrmSXCKOutList
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 105
|
Top = 105
|
||||||
Width = 1089
|
Width = 1081
|
||||||
Height = 436
|
Height = 428
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
|
|
@ -624,10 +624,10 @@ object frmSXCKOutList: TfrmSXCKOutList
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 1089
|
Left = 1081
|
||||||
Top = 105
|
Top = 105
|
||||||
Width = 217
|
Width = 217
|
||||||
Height = 436
|
Height = 428
|
||||||
Align = alRight
|
Align = alRight
|
||||||
Caption = 'Panel2'
|
Caption = 'Panel2'
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
@ -635,7 +635,7 @@ object frmSXCKOutList: TfrmSXCKOutList
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 215
|
Width = 215
|
||||||
Height = 434
|
Height = 426
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object TvMX: TcxGridDBTableView
|
object TvMX: TcxGridDBTableView
|
||||||
|
|
|
||||||
|
|
@ -425,6 +425,7 @@ begin
|
||||||
finally
|
finally
|
||||||
frmSXCKOutPut.Free;
|
frmSXCKOutPut.Free;
|
||||||
end;
|
end;
|
||||||
|
initGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmSXCKOutList.TBEditClick(Sender: TObject);
|
procedure TfrmSXCKOutList.TBEditClick(Sender: TObject);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmSXCKOutPut: TfrmSXCKOutPut
|
object frmSXCKOutPut: TfrmSXCKOutPut
|
||||||
Left = 657
|
Left = 414
|
||||||
Top = 566
|
Top = 377
|
||||||
Width = 1215
|
Width = 1215
|
||||||
Height = 489
|
Height = 489
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
|
@ -20,7 +20,7 @@ object frmSXCKOutPut: TfrmSXCKOutPut
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1207
|
Width = 1199
|
||||||
Height = 33
|
Height = 33
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 83
|
ButtonWidth = 83
|
||||||
|
|
@ -82,8 +82,8 @@ object frmSXCKOutPut: TfrmSXCKOutPut
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 33
|
Top = 33
|
||||||
Width = 1207
|
Width = 1199
|
||||||
Height = 425
|
Height = 417
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 203
|
Left = 314
|
||||||
Top = 121
|
Top = 397
|
||||||
Width = 791
|
Width = 791
|
||||||
Height = 554
|
Height = 554
|
||||||
Caption = 'Form1'
|
Caption = 'Form1'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmFDINVOICE: TfrmFDINVOICE
|
object frmFDINVOICE: TfrmFDINVOICE
|
||||||
Left = 173
|
Left = 168
|
||||||
Top = 86
|
Top = 455
|
||||||
Width = 1378
|
Width = 1378
|
||||||
Height = 754
|
Height = 754
|
||||||
Caption = #36827#39033#21457#31080#31649#29702
|
Caption = #36827#39033#21457#31080#31649#29702
|
||||||
|
|
@ -20,7 +20,7 @@ object frmFDINVOICE: TfrmFDINVOICE
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1370
|
Width = 1362
|
||||||
Height = 31
|
Height = 31
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 83
|
ButtonWidth = 83
|
||||||
|
|
@ -141,7 +141,7 @@ object frmFDINVOICE: TfrmFDINVOICE
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 1370
|
Width = 1362
|
||||||
Height = 69
|
Height = 69
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -324,7 +324,7 @@ object frmFDINVOICE: TfrmFDINVOICE
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 121
|
Top = 121
|
||||||
Width = 1370
|
Width = 1362
|
||||||
Height = 310
|
Height = 310
|
||||||
Align = alTop
|
Align = alTop
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
|
|
@ -459,7 +459,7 @@ object frmFDINVOICE: TfrmFDINVOICE
|
||||||
object cxTabControl1: TcxTabControl
|
object cxTabControl1: TcxTabControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 100
|
Top = 100
|
||||||
Width = 1370
|
Width = 1362
|
||||||
Height = 21
|
Height = 21
|
||||||
Align = alTop
|
Align = alTop
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
|
@ -477,8 +477,8 @@ object frmFDINVOICE: TfrmFDINVOICE
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 431
|
Top = 431
|
||||||
Width = 1370
|
Width = 1362
|
||||||
Height = 292
|
Height = 284
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object TV2: TcxGridDBTableView
|
object TV2: TcxGridDBTableView
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,20 @@ uses
|
||||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||||
cxTextEdit, cxDropDownEdit, cxPC, RM_e_Xls, Menus, cxLookAndFeels,
|
cxTextEdit, cxDropDownEdit, cxPC, RM_e_Xls, Menus, cxLookAndFeels,
|
||||||
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, DateUtils,
|
cxLookAndFeelPainters, cxNavigator, dxBarBuiltInMenu, DateUtils,
|
||||||
dxSkinsCore, dxSkinsDefaultPainters, dxSkinscxPCPainter;
|
dxSkinsCore, dxSkinsDefaultPainters, dxSkinscxPCPainter, 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, dxSkinPumpkin,
|
||||||
|
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||||
|
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||||
|
dxSkinTheAsphaltWorld, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
|
||||||
|
dxSkinXmas2008Blue;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmFDINVOICE = class(TForm)
|
TfrmFDINVOICE = class(TForm)
|
||||||
|
|
|
||||||
|
|
@ -66,11 +66,17 @@ begin
|
||||||
|
|
||||||
if Trim(DataBaseStr) = '' then
|
if Trim(DataBaseStr) = '' then
|
||||||
begin
|
begin
|
||||||
server := '101.132.143.144,7781';
|
// server := '101.132.143.144,7781';
|
||||||
|
//// server := '.';
|
||||||
|
// dtbase := 'chenfengdata';
|
||||||
|
// user := 'rtsa';
|
||||||
|
// pswd := 'rightsoft@5740';
|
||||||
|
|
||||||
|
server := '127.0.0.1';
|
||||||
// server := '.';
|
// server := '.';
|
||||||
dtbase := 'chenfengdata';
|
dtbase := 'delphichenfeng';
|
||||||
user := 'rtsa';
|
user := 'sa';
|
||||||
pswd := 'rightsoft@5740';
|
pswd := 'rightsoft';
|
||||||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||||
// Parameters2 := 'Ö¯Ôì';
|
// Parameters2 := 'Ö¯Ôì';
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
object frmPBRKlistSel2: TfrmPBRKlistSel2
|
object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Left = 197
|
Left = 287
|
||||||
Top = 139
|
Top = 711
|
||||||
Width = 1378
|
Width = 1378
|
||||||
Height = 615
|
Height = 525
|
||||||
Caption = #22383#24067#20837#24211#21015#34920
|
Caption = #22383#24067#20837#24211#21015#34920
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -192,6 +192,7 @@ object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Width = 80
|
Width = 80
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
OnChange = ToolButton1Click
|
||||||
end
|
end
|
||||||
object FactoryName: TEdit
|
object FactoryName: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
|
|
@ -200,6 +201,7 @@ object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Width = 80
|
Width = 80
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
OnChange = ToolButton1Click
|
||||||
end
|
end
|
||||||
object SPID: TEdit
|
object SPID: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
|
|
@ -208,6 +210,7 @@ object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Width = 80
|
Width = 80
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
OnChange = ToolButton1Click
|
||||||
end
|
end
|
||||||
object SPSpec: TEdit
|
object SPSpec: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
|
|
@ -216,6 +219,7 @@ object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Width = 80
|
Width = 80
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
|
OnChange = ToolButton1Click
|
||||||
end
|
end
|
||||||
object CRType: TComboBox
|
object CRType: TComboBox
|
||||||
Tag = 2
|
Tag = 2
|
||||||
|
|
@ -226,6 +230,7 @@ object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
ItemHeight = 12
|
ItemHeight = 12
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
|
OnChange = ToolButton1Click
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
#21152#24037#20986#24211
|
#21152#24037#20986#24211
|
||||||
#38144#21806#20986#24211
|
#38144#21806#20986#24211
|
||||||
|
|
@ -243,6 +248,7 @@ object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Width = 80
|
Width = 80
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 7
|
TabOrder = 7
|
||||||
|
OnChange = ToolButton1Click
|
||||||
end
|
end
|
||||||
object SPCode: TEdit
|
object SPCode: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
|
|
@ -251,6 +257,7 @@ object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Width = 77
|
Width = 77
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 8
|
TabOrder = 8
|
||||||
|
OnChange = ToolButton1Click
|
||||||
end
|
end
|
||||||
object FZSPID: TEdit
|
object FZSPID: TEdit
|
||||||
Tag = 2
|
Tag = 2
|
||||||
|
|
@ -259,6 +266,7 @@ object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Width = 77
|
Width = 77
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 9
|
TabOrder = 9
|
||||||
|
OnChange = ToolButton1Click
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object cxTabControl1: TcxTabControl
|
object cxTabControl1: TcxTabControl
|
||||||
|
|
@ -288,7 +296,7 @@ object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 117
|
Top = 117
|
||||||
Width = 1362
|
Width = 1362
|
||||||
Height = 459
|
Height = 369
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
|
|
@ -491,7 +499,7 @@ object frmPBRKlistSel2: TfrmPBRKlistSel2
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 117
|
Top = 117
|
||||||
Width = 1362
|
Width = 1362
|
||||||
Height = 459
|
Height = 369
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object cxGridDBTableView1: TcxGridDBTableView
|
object cxGridDBTableView1: TcxGridDBTableView
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
object frmSXCKNewList: TfrmSXCKNewList
|
object frmSXCKNewList: TfrmSXCKNewList
|
||||||
Left = 122
|
Left = 301
|
||||||
Top = 178
|
Top = 582
|
||||||
Width = 1289
|
Width = 1289
|
||||||
Height = 593
|
Height = 541
|
||||||
Caption = #32433#32447#20449#24687#21015#34920
|
Caption = #32433#32447#20449#24687#21015#34920
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -237,7 +237,7 @@ object frmSXCKNewList: TfrmSXCKNewList
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 121
|
Top = 121
|
||||||
Width = 1273
|
Width = 1273
|
||||||
Height = 433
|
Height = 381
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
@ -291,7 +291,7 @@ object frmSXCKNewList: TfrmSXCKNewList
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Styles.Content = cxStyle1
|
Styles.Content = cxStyle1
|
||||||
Styles.Header = cxStyle1
|
Styles.Header = cxStyle1
|
||||||
Width = 80
|
Width = 87
|
||||||
end
|
end
|
||||||
object v1Column6: TcxGridDBColumn
|
object v1Column6: TcxGridDBColumn
|
||||||
Caption = #20986#20837#24211#21333#21495
|
Caption = #20986#20837#24211#21333#21495
|
||||||
|
|
@ -300,7 +300,7 @@ object frmSXCKNewList: TfrmSXCKNewList
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Styles.Content = cxStyle1
|
Styles.Content = cxStyle1
|
||||||
Styles.Header = cxStyle1
|
Styles.Header = cxStyle1
|
||||||
Width = 83
|
Width = 105
|
||||||
end
|
end
|
||||||
object v1Column2: TcxGridDBColumn
|
object v1Column2: TcxGridDBColumn
|
||||||
Tag = 2
|
Tag = 2
|
||||||
|
|
@ -484,7 +484,7 @@ object frmSXCKNewList: TfrmSXCKNewList
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Styles.Content = cxStyle1
|
Styles.Content = cxStyle1
|
||||||
Styles.Header = cxStyle1
|
Styles.Header = cxStyle1
|
||||||
Width = 66
|
Width = 118
|
||||||
end
|
end
|
||||||
object v1Column21: TcxGridDBColumn
|
object v1Column21: TcxGridDBColumn
|
||||||
Caption = #36816#36153
|
Caption = #36816#36153
|
||||||
|
|
|
||||||
|
|
@ -301,12 +301,15 @@ begin
|
||||||
Filtered := False;
|
Filtered := False;
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
sql.Clear;
|
||||||
sql.Add(' select money=price*Qty,A.* ');
|
sql.Add(' select ');
|
||||||
|
sql.Add(' case when A.CRType = ''退货'' then -price*A.Qty else price*A.Qty end as money, ');
|
||||||
|
sql.Add(' case when A.CRType = ''退货'' then -A.Qty else A.Qty end as Qty, ');
|
||||||
|
sql.Add(' A.* ');
|
||||||
sql.Add(' from CK_Yarn_CR A');
|
sql.Add(' from CK_Yarn_CR A');
|
||||||
sql.add(' where A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''');
|
sql.add(' where A.CRTime>=''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + '''');
|
||||||
sql.Add(' and A.CRTime<''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + '''');
|
sql.Add(' and A.CRTime<''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + '''');
|
||||||
Sql.Add(' and CWFlag=0 and CKName=' + quotedstr(trim(FCKName)));
|
Sql.Add(' and CWFlag=0 and CKName=' + quotedstr(trim(FCKName)));
|
||||||
sql.Add(' and CRType in(''采购入库'',''期初入库'',''加工完成'',''加工未做回仓'',''织造未做回仓'' )');
|
sql.Add(' and CRType in(''采购入库'',''期初入库'',''加工完成'',''加工未做回仓'',''织造未做回仓'',''退货'' )');
|
||||||
|
|
||||||
if cxTabControl1.TabIndex = 0 then
|
if cxTabControl1.TabIndex = 0 then
|
||||||
SQL.Add(' and not exists(select YFPZNO from YF_Money_CR_Sub X where X.YFPZNO=A.Y_ID ) ')
|
SQL.Add(' and not exists(select YFPZNO from YF_Money_CR_Sub X where X.YFPZNO=A.Y_ID ) ')
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmXXFPHXList: TfrmXXFPHXList
|
object frmXXFPHXList: TfrmXXFPHXList
|
||||||
Left = 285
|
Left = 335
|
||||||
Top = 179
|
Top = 181
|
||||||
Width = 976
|
Width = 976
|
||||||
Height = 649
|
Height = 649
|
||||||
Caption = #26680#38144#20449#24687#26597#35810
|
Caption = #26680#38144#20449#24687#26597#35810
|
||||||
|
|
@ -192,13 +192,13 @@ object frmXXFPHXList: TfrmXXFPHXList
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 88
|
Top = 88
|
||||||
Width = 960
|
Width = 960
|
||||||
Height = 523
|
Height = 522
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Tv2: TcxGridDBTableView
|
object Tv2: TcxGridDBTableView
|
||||||
NavigatorButtons.ConfirmDelete = False
|
Navigator.Buttons.CustomButtons = <>
|
||||||
NavigatorButtons.Delete.Enabled = False
|
Navigator.Buttons.Delete.Enabled = False
|
||||||
NavigatorButtons.Delete.Visible = False
|
Navigator.Buttons.Delete.Visible = False
|
||||||
DataController.DataSource = DS_HZ
|
DataController.DataSource = DS_HZ
|
||||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,22 @@ uses
|
||||||
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
cxGridCustomPopupMenu, cxGridPopupMenu, RM_Dataset, RM_System, RM_Common,
|
||||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
cxButtonEdit, cxTextEdit;
|
cxButtonEdit, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||||
|
dxSkinsCore, 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, dxSkinPumpkin,
|
||||||
|
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||||
|
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||||
|
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||||
|
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter,
|
||||||
|
cxNavigator;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmXXFPHXList = class(TForm)
|
TfrmXXFPHXList = class(TForm)
|
||||||
|
|
|
||||||
136
应收应付/U_XXPRICE.dfm
Normal file
136
应收应付/U_XXPRICE.dfm
Normal file
|
|
@ -0,0 +1,136 @@
|
||||||
|
object frmXXPRICE: TfrmXXPRICE
|
||||||
|
Left = 544
|
||||||
|
Top = 235
|
||||||
|
Width = 242
|
||||||
|
Height = 135
|
||||||
|
Caption = #21333#20215#20462#25913
|
||||||
|
Color = clBtnFace
|
||||||
|
Font.Charset = GB2312_CHARSET
|
||||||
|
Font.Color = clWindowText
|
||||||
|
Font.Height = -12
|
||||||
|
Font.Name = #23435#20307
|
||||||
|
Font.Style = []
|
||||||
|
OldCreateOrder = False
|
||||||
|
OnClose = FormClose
|
||||||
|
OnDestroy = FormDestroy
|
||||||
|
PixelsPerInch = 96
|
||||||
|
TextHeight = 12
|
||||||
|
object ToolBar1: TToolBar
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Width = 226
|
||||||
|
Height = 31
|
||||||
|
ButtonHeight = 30
|
||||||
|
ButtonWidth = 59
|
||||||
|
Caption = 'ToolBar1'
|
||||||
|
Color = clSkyBlue
|
||||||
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
Flat = True
|
||||||
|
Images = DataLink_YSYF.ThreeImgList
|
||||||
|
List = True
|
||||||
|
ParentColor = False
|
||||||
|
ShowCaptions = True
|
||||||
|
TabOrder = 0
|
||||||
|
object ToolButton3: TToolButton
|
||||||
|
Left = 0
|
||||||
|
Top = 0
|
||||||
|
Caption = #30830#23450
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 59
|
||||||
|
Top = 0
|
||||||
|
AutoSize = True
|
||||||
|
Caption = #20851#38381
|
||||||
|
ImageIndex = 55
|
||||||
|
OnClick = TBCloseClick
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object Panel1: TPanel
|
||||||
|
Left = 0
|
||||||
|
Top = 31
|
||||||
|
Width = 226
|
||||||
|
Height = 65
|
||||||
|
Align = alClient
|
||||||
|
BevelInner = bvRaised
|
||||||
|
BevelOuter = bvLowered
|
||||||
|
Color = clSkyBlue
|
||||||
|
TabOrder = 1
|
||||||
|
object Label4: TLabel
|
||||||
|
Left = 16
|
||||||
|
Top = 21
|
||||||
|
Width = 42
|
||||||
|
Height = 12
|
||||||
|
Caption = #21333' '#20215
|
||||||
|
end
|
||||||
|
object price: TEdit
|
||||||
|
Tag = 2
|
||||||
|
Left = 68
|
||||||
|
Top = 17
|
||||||
|
Width = 89
|
||||||
|
Height = 20
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object ADOQueryTemp: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
LockType = ltReadOnly
|
||||||
|
Parameters = <>
|
||||||
|
Left = 789
|
||||||
|
Top = 9
|
||||||
|
end
|
||||||
|
object ADOQueryCmd: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 829
|
||||||
|
Top = 1
|
||||||
|
end
|
||||||
|
object RM1: TRMGridReport
|
||||||
|
ThreadPrepareReport = True
|
||||||
|
InitialZoom = pzDefault
|
||||||
|
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbExport, pbNavigator]
|
||||||
|
DefaultCollate = 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 = 424
|
||||||
|
Top = 208
|
||||||
|
ReportData = {}
|
||||||
|
end
|
||||||
|
object RMDB_Main: TRMDBDataSet
|
||||||
|
Visible = True
|
||||||
|
Left = 384
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||||
|
PopupMenus = <>
|
||||||
|
Left = 520
|
||||||
|
Top = 264
|
||||||
|
end
|
||||||
|
object DS_HZ: TDataSource
|
||||||
|
DataSet = CDS_HZ
|
||||||
|
Left = 443
|
||||||
|
Top = 267
|
||||||
|
end
|
||||||
|
object CDS_HZ: TClientDataSet
|
||||||
|
Aggregates = <>
|
||||||
|
Params = <>
|
||||||
|
Left = 496
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
object ADOQueryMain: TADOQuery
|
||||||
|
Connection = DataLink_YSYF.ADOLink
|
||||||
|
Parameters = <>
|
||||||
|
Left = 340
|
||||||
|
Top = 208
|
||||||
|
end
|
||||||
|
end
|
||||||
177
应收应付/U_XXPRICE.pas
Normal file
177
应收应付/U_XXPRICE.pas
Normal file
|
|
@ -0,0 +1,177 @@
|
||||||
|
unit U_XXPRICE;
|
||||||
|
|
||||||
|
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, cxCalendar, cxButtonEdit,
|
||||||
|
cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, 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, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
|
||||||
|
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
|
||||||
|
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
|
||||||
|
dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue,
|
||||||
|
dxSkinscxPCPainter, cxNavigator;
|
||||||
|
|
||||||
|
type
|
||||||
|
TfrmXXPRICE = class(TForm)
|
||||||
|
ToolBar1: TToolBar;
|
||||||
|
ADOQueryTemp: TADOQuery;
|
||||||
|
ADOQueryCmd: TADOQuery;
|
||||||
|
Panel1: TPanel;
|
||||||
|
RM1: TRMGridReport;
|
||||||
|
RMDB_Main: TRMDBDataSet;
|
||||||
|
cxGridPopupMenu2: TcxGridPopupMenu;
|
||||||
|
DS_HZ: TDataSource;
|
||||||
|
CDS_HZ: TClientDataSet;
|
||||||
|
Label4: TLabel;
|
||||||
|
price: TEdit;
|
||||||
|
ADOQueryMain: TADOQuery;
|
||||||
|
TBClose: TToolButton;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
procedure FormDestroy(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
|
private
|
||||||
|
{ Private declarations }
|
||||||
|
public
|
||||||
|
{ Public declarations }
|
||||||
|
RKFlag, FCYID, FFFID: string;
|
||||||
|
FFromNo, FTONO: string;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
frmXXPRICE: TfrmXXPRICE;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
U_DataLink, U_Fun10, U_ZDYHelp;
|
||||||
|
|
||||||
|
{$R *.dfm}
|
||||||
|
|
||||||
|
procedure TfrmXXPRICE.FormDestroy(Sender: TObject);
|
||||||
|
begin
|
||||||
|
frmXXPRICE := nil;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmXXPRICE.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
begin
|
||||||
|
Action := caFree;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmXXPRICE.TBCloseClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
|
//procedure TfrmXXPRICE.ToolButton3Click(Sender: TObject);
|
||||||
|
//begin
|
||||||
|
// if StrToFloatDef(Price.Text, 0) = 0 then
|
||||||
|
// Price.Text := '0';
|
||||||
|
// try
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add(' update YF_Money_CR_Sub ');
|
||||||
|
// sql.Add(' set Price = ' + Price.Text);
|
||||||
|
// // 使用IN子句批量更新
|
||||||
|
// sql.Add(' where YF_Money_CR_Sub.yfsid in (' + FFFID + ')');
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// ExecSQL;
|
||||||
|
// end;
|
||||||
|
// ModalResult := 1;
|
||||||
|
// except
|
||||||
|
// application.MessageBox(PChar(Exception(ExceptObject).Message), '提示信息', 0);
|
||||||
|
// end;
|
||||||
|
//end;
|
||||||
|
procedure TfrmXXPRICE.ToolButton3Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
IDList: TStringList;
|
||||||
|
i: Integer;
|
||||||
|
QuotedIDs: string;
|
||||||
|
begin
|
||||||
|
// 如果价格输入为空或无效,设为0
|
||||||
|
if StrToFloatDef(Price.Text, 0) = 0 then
|
||||||
|
Price.Text := '0';
|
||||||
|
|
||||||
|
// 检查是否有选中的ID
|
||||||
|
if Trim(FFFID) = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('没有选择要更新的记录!', '提示信息', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
// 给每个ID添加引号
|
||||||
|
IDList := TStringList.Create;
|
||||||
|
try
|
||||||
|
IDList.CommaText := FFFID; // 将逗号分隔的字符串分解
|
||||||
|
QuotedIDs := '';
|
||||||
|
for i := 0 to IDList.Count - 1 do
|
||||||
|
begin
|
||||||
|
if QuotedIDs = '' then
|
||||||
|
QuotedIDs := QuotedStr(IDList[i])
|
||||||
|
else
|
||||||
|
QuotedIDs := QuotedIDs + ',' + QuotedStr(IDList[i]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
with ADOQueryCmd do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
sql.Clear;
|
||||||
|
sql.Add(' update YF_Money_CR_Sub ');
|
||||||
|
sql.Add(' set Price = ' + Price.Text);
|
||||||
|
|
||||||
|
// 使用添加了引号的ID列表
|
||||||
|
sql.Add(' where YF_Money_CR_Sub.yfsid in (' + QuotedIDs + ')');
|
||||||
|
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
IDList.Free;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// 更新成功,返回1(成功标志)
|
||||||
|
ModalResult := 1;
|
||||||
|
except
|
||||||
|
on E: Exception do
|
||||||
|
Application.MessageBox(PChar(E.Message), '提示信息', 0);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add(' update YF_Money_CR_Sub ');
|
||||||
|
// sql.Add(' set Price = ' + Price.Text);
|
||||||
|
// sql.Add(' where exists(select 1 from YF_Money_CR ');
|
||||||
|
// sql.Add(' where YF_Money_CR.yfid = YF_Money_CR_Sub.yfid ');
|
||||||
|
// sql.Add(' and YF_Money_CR.yfid in (select X.RTValue from [dbo].[F_Tool_SplitString](' + quotedstr(FFFID) + ','','') X)) ');
|
||||||
|
//// showmessage(sql.text);
|
||||||
|
// ExecSQL;
|
||||||
|
// end;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
object frmYFCR: TfrmYFCR
|
object frmYFCR: TfrmYFCR
|
||||||
Left = 471
|
Left = 292
|
||||||
Top = 396
|
Top = 611
|
||||||
Width = 1181
|
Width = 1181
|
||||||
Height = 661
|
Height = 703
|
||||||
Caption = #24212#20184#27454#31649#29702
|
Caption = #24212#20184#27454#31649#29702
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -21,7 +21,7 @@ object frmYFCR: TfrmYFCR
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1173
|
Width = 1165
|
||||||
Height = 31
|
Height = 31
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 83
|
ButtonWidth = 83
|
||||||
|
|
@ -124,7 +124,7 @@ object frmYFCR: TfrmYFCR
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 1173
|
Width = 1165
|
||||||
Height = 65
|
Height = 65
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -215,7 +215,7 @@ object frmYFCR: TfrmYFCR
|
||||||
object cxTabControl1: TcxTabControl
|
object cxTabControl1: TcxTabControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 96
|
Top = 96
|
||||||
Width = 1173
|
Width = 1165
|
||||||
Height = 22
|
Height = 22
|
||||||
Align = alTop
|
Align = alTop
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
|
@ -229,14 +229,14 @@ object frmYFCR: TfrmYFCR
|
||||||
#20840#37096)
|
#20840#37096)
|
||||||
OnChange = cxTabControl1Change
|
OnChange = cxTabControl1Change
|
||||||
ClientRectBottom = 22
|
ClientRectBottom = 22
|
||||||
ClientRectRight = 1173
|
ClientRectRight = 1165
|
||||||
ClientRectTop = 19
|
ClientRectTop = 19
|
||||||
end
|
end
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 118
|
Top = 118
|
||||||
Width = 1173
|
Width = 1165
|
||||||
Height = 275
|
Height = 309
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
@ -436,8 +436,8 @@ object frmYFCR: TfrmYFCR
|
||||||
end
|
end
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 393
|
Top = 427
|
||||||
Width = 1173
|
Width = 1165
|
||||||
Height = 237
|
Height = 237
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmYFCRMXList: TfrmYFCRMXList
|
object frmYFCRMXList: TfrmYFCRMXList
|
||||||
Left = 313
|
Left = 365
|
||||||
Top = 245
|
Top = 143
|
||||||
Width = 1018
|
Width = 1018
|
||||||
Height = 688
|
Height = 688
|
||||||
Caption = #24212#20184#27454#26126#32454#26597#35810
|
Caption = #24212#20184#27454#26126#32454#26597#35810
|
||||||
|
|
@ -22,7 +22,7 @@ object frmYFCRMXList: TfrmYFCRMXList
|
||||||
Width = 1002
|
Width = 1002
|
||||||
Height = 31
|
Height = 31
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 59
|
ButtonWidth = 83
|
||||||
Caption = 'ToolBar1'
|
Caption = 'ToolBar1'
|
||||||
Color = clSkyBlue
|
Color = clSkyBlue
|
||||||
DisabledImages = DataLink_YSYF.ThreeImgList
|
DisabledImages = DataLink_YSYF.ThreeImgList
|
||||||
|
|
@ -56,9 +56,16 @@ object frmYFCRMXList: TfrmYFCRMXList
|
||||||
ImageIndex = 53
|
ImageIndex = 53
|
||||||
OnClick = ToolButton1Click
|
OnClick = ToolButton1Click
|
||||||
end
|
end
|
||||||
object TBClose: TToolButton
|
object ToolButton3: TToolButton
|
||||||
Left = 189
|
Left = 189
|
||||||
Top = 0
|
Top = 0
|
||||||
|
Caption = #21333#20215#20462#25913
|
||||||
|
ImageIndex = 54
|
||||||
|
OnClick = ToolButton3Click
|
||||||
|
end
|
||||||
|
object TBClose: TToolButton
|
||||||
|
Left = 272
|
||||||
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20851#38381
|
Caption = #20851#38381
|
||||||
ImageIndex = 55
|
ImageIndex = 55
|
||||||
|
|
@ -229,6 +236,12 @@ object frmYFCRMXList: TfrmYFCRMXList
|
||||||
OptionsView.GroupByBox = False
|
OptionsView.GroupByBox = False
|
||||||
OptionsView.Indicator = True
|
OptionsView.Indicator = True
|
||||||
Styles.Header = DataLink_YSYF.FonePurple
|
Styles.Header = DataLink_YSYF.FonePurple
|
||||||
|
object Tv1Column4: TcxGridDBColumn
|
||||||
|
Caption = #36873#25321
|
||||||
|
DataBinding.FieldName = 'ssel'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 88
|
||||||
|
end
|
||||||
object v1Column8: TcxGridDBColumn
|
object v1Column8: TcxGridDBColumn
|
||||||
Caption = #26085#26399
|
Caption = #26085#26399
|
||||||
DataBinding.FieldName = 'CRTime'
|
DataBinding.FieldName = 'CRTime'
|
||||||
|
|
@ -405,6 +418,12 @@ object frmYFCRMXList: TfrmYFCRMXList
|
||||||
Styles.Header = cxStyle1
|
Styles.Header = cxStyle1
|
||||||
Width = 66
|
Width = 66
|
||||||
end
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #20986#21040#21152#24037#21378'/'#23458#25143
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 156
|
||||||
|
end
|
||||||
object Tv1Column2: TcxGridDBColumn
|
object Tv1Column2: TcxGridDBColumn
|
||||||
Caption = #24635#22791#27880
|
Caption = #24635#22791#27880
|
||||||
DataBinding.FieldName = 'note'
|
DataBinding.FieldName = 'note'
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,9 @@ type
|
||||||
cxStyle1: TcxStyle;
|
cxStyle1: TcxStyle;
|
||||||
Tv1Column1: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
Tv1Column2: TcxGridDBColumn;
|
Tv1Column2: TcxGridDBColumn;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
ToolButton3: TToolButton;
|
||||||
|
Tv1Column4: TcxGridDBColumn;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
|
@ -100,6 +103,7 @@ type
|
||||||
procedure YFGSTypeChange(Sender: TObject);
|
procedure YFGSTypeChange(Sender: TObject);
|
||||||
procedure Tv1DblClick(Sender: TObject);
|
procedure Tv1DblClick(Sender: TObject);
|
||||||
procedure chk1Click(Sender: TObject);
|
procedure chk1Click(Sender: TObject);
|
||||||
|
procedure ToolButton3Click(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
|
|
||||||
|
|
@ -110,6 +114,7 @@ type
|
||||||
{ Public declarations }
|
{ Public declarations }
|
||||||
FCYID: string;
|
FCYID: string;
|
||||||
fmanage: string;
|
fmanage: string;
|
||||||
|
FFFID: string;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
|
|
@ -119,7 +124,7 @@ implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
U_DataLink, U_Fun, U_SXCKNewList, U_YSSCList, U_YsScXsList, U_YSKInput,
|
U_DataLink, U_Fun, U_SXCKNewList, U_YSSCList, U_YsScXsList, U_YSKInput,
|
||||||
U_XXFPHXList;
|
U_XXFPHXList, U_XXPRICE;
|
||||||
|
|
||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
procedure TfrmYFCRMXList.SetStatus();
|
procedure TfrmYFCRMXList.SetStatus();
|
||||||
|
|
@ -316,5 +321,186 @@ begin
|
||||||
InitGrid();
|
InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//procedure TfrmYFCRMXList.ToolButton3Click(Sender: TObject);
|
||||||
|
//var
|
||||||
|
// i: Integer;
|
||||||
|
// SelectedIDs: string;
|
||||||
|
// Bookmark: TBookmarkStr;
|
||||||
|
//begin
|
||||||
|
// SelectedIDs := '';
|
||||||
|
// with SELF.CDS_YFS do
|
||||||
|
// begin
|
||||||
|
// DisableControls;
|
||||||
|
// try
|
||||||
|
// Bookmark := Bookmark;
|
||||||
|
//
|
||||||
|
// First;
|
||||||
|
// while not Eof do
|
||||||
|
// begin
|
||||||
|
// // 判断是否选中(假设选择列字段名为'ssel')
|
||||||
|
// if FieldByName('ssel').AsBoolean then
|
||||||
|
// begin
|
||||||
|
// if SelectedIDs = '' then
|
||||||
|
// SelectedIDs := FieldByName('yfsid').AsString
|
||||||
|
// else
|
||||||
|
// SelectedIDs := SelectedIDs + ',' + FieldByName('yfsid').AsString;
|
||||||
|
// end;
|
||||||
|
// Next;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// // 恢复原记录位置
|
||||||
|
// if Bookmark <> '' then
|
||||||
|
// GotoBookmark(Pointer(Bookmark));
|
||||||
|
// finally
|
||||||
|
// EnableControls;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// // 如果没有选中任何记录,提示用户
|
||||||
|
// if SelectedIDs = '' then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('请先选择要修改价格的记录!', '提示信息', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// // 打开价格修改窗体
|
||||||
|
// try
|
||||||
|
// frmXXPRICE := TfrmXXPRICE.Create(Application);
|
||||||
|
// with frmXXPRICE do
|
||||||
|
// begin
|
||||||
|
// // 传递选中的多个ID(用逗号分隔)
|
||||||
|
// FFFID := SelectedIDs;
|
||||||
|
// // 显示模态窗体,等待用户操作
|
||||||
|
// if ShowModal = 1 then
|
||||||
|
// begin
|
||||||
|
// // 如果返回1,刷新主窗体数据
|
||||||
|
// InitGrid();
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// finally
|
||||||
|
// frmXXPRICE.Free;
|
||||||
|
// end;
|
||||||
|
//end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmYFCRMXList.ToolButton3Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
SelectedIDs: string;
|
||||||
|
Bookmark: TBookmarkStr;
|
||||||
|
begin
|
||||||
|
SelectedIDs := '';
|
||||||
|
|
||||||
|
with SELF.CDS_YFS do
|
||||||
|
begin
|
||||||
|
DisableControls;
|
||||||
|
try
|
||||||
|
Bookmark := Bookmark;
|
||||||
|
|
||||||
|
First;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if FieldByName('ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
if SelectedIDs = '' then
|
||||||
|
SelectedIDs := FieldByName('yfsid').AsString
|
||||||
|
else
|
||||||
|
SelectedIDs := SelectedIDs + ',' + FieldByName('yfsid').AsString;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
if Bookmark <> '' then
|
||||||
|
GotoBookmark(Pointer(Bookmark));
|
||||||
|
EnableControls;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if SelectedIDs = '' then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('请先选择要修改价格的记录!', '提示信息', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
try
|
||||||
|
frmXXPRICE := TfrmXXPRICE.Create(Application);
|
||||||
|
with frmXXPRICE do
|
||||||
|
begin
|
||||||
|
FFFID := SelectedIDs;
|
||||||
|
if ShowModal = 1 then
|
||||||
|
begin
|
||||||
|
InitGrid();
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
frmXXPRICE.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//procedure TfrmYFCRMXList.ToolButton3Click(Sender: TObject);
|
||||||
|
//var
|
||||||
|
// SelectedIDs: string;
|
||||||
|
// Bookmark: TBookmarkStr;
|
||||||
|
//begin
|
||||||
|
// SelectedIDs := '';
|
||||||
|
//
|
||||||
|
// with SELF.CDS_YFS do
|
||||||
|
// begin
|
||||||
|
// DisableControls;
|
||||||
|
// try
|
||||||
|
// Bookmark := Bookmark;
|
||||||
|
//
|
||||||
|
// First;
|
||||||
|
// while not Eof do
|
||||||
|
// begin
|
||||||
|
// if FieldByName('ssel').AsBoolean then
|
||||||
|
// begin
|
||||||
|
// if SelectedIDs = '' then
|
||||||
|
// SelectedIDs := FieldByName('yfsid').AsString
|
||||||
|
// else
|
||||||
|
// SelectedIDs := SelectedIDs + ',' + FieldByName('yfsid').AsString;
|
||||||
|
// end;
|
||||||
|
// Next;
|
||||||
|
// end;
|
||||||
|
// finally
|
||||||
|
// if Bookmark <> '' then
|
||||||
|
// GotoBookmark(Pointer(Bookmark));
|
||||||
|
// EnableControls;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// if SelectedIDs = '' then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('请先选择要修改价格的记录!', '提示信息', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
// try
|
||||||
|
// frmXXPRICE := TfrmXXPRICE.Create(Application);
|
||||||
|
// with frmXXPRICE do
|
||||||
|
// begin
|
||||||
|
// FFFID := SelectedIDs;
|
||||||
|
// if ShowModal = 1 then
|
||||||
|
// begin
|
||||||
|
// InitGrid();
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// finally
|
||||||
|
// frmXXPRICE.Free;
|
||||||
|
// end;
|
||||||
|
//end;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
object frmYFFKList: TfrmYFFKList
|
object frmYFFKList: TfrmYFFKList
|
||||||
Left = 278
|
Left = 346
|
||||||
Top = 412
|
Top = 322
|
||||||
Width = 1134
|
Width = 1134
|
||||||
Height = 618
|
Height = 569
|
||||||
Caption = #24212#20184#27454#20184#27454#32479#35745
|
Caption = #24212#20184#27454#20184#27454#32479#35745
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -19,7 +19,7 @@ object frmYFFKList: TfrmYFFKList
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1126
|
Width = 1118
|
||||||
Height = 31
|
Height = 31
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 83
|
ButtonWidth = 83
|
||||||
|
|
@ -84,7 +84,7 @@ object frmYFFKList: TfrmYFFKList
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 1126
|
Width = 1118
|
||||||
Height = 39
|
Height = 39
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -161,8 +161,8 @@ object frmYFFKList: TfrmYFFKList
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 92
|
Top = 92
|
||||||
Width = 1126
|
Width = 1118
|
||||||
Height = 495
|
Height = 438
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object Tv2: TcxGridDBTableView
|
object Tv2: TcxGridDBTableView
|
||||||
|
|
@ -333,7 +333,7 @@ object frmYFFKList: TfrmYFFKList
|
||||||
object cxTabControl1: TcxTabControl
|
object cxTabControl1: TcxTabControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 70
|
Top = 70
|
||||||
Width = 1126
|
Width = 1118
|
||||||
Height = 22
|
Height = 22
|
||||||
Align = alTop
|
Align = alTop
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
|
@ -345,7 +345,7 @@ object frmYFFKList: TfrmYFFKList
|
||||||
#20840#37096)
|
#20840#37096)
|
||||||
OnChange = cxTabControl1Change
|
OnChange = cxTabControl1Change
|
||||||
ClientRectBottom = 22
|
ClientRectBottom = 22
|
||||||
ClientRectRight = 1126
|
ClientRectRight = 1118
|
||||||
ClientRectTop = 19
|
ClientRectTop = 19
|
||||||
end
|
end
|
||||||
object ADOQueryTemp: TADOQuery
|
object ADOQueryTemp: TADOQuery
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmYFKInput: TfrmYFKInput
|
object frmYFKInput: TfrmYFKInput
|
||||||
Left = 424
|
Left = 237
|
||||||
Top = 208
|
Top = 189
|
||||||
Width = 993
|
Width = 993
|
||||||
Height = 569
|
Height = 569
|
||||||
Caption = #20449#24687#24405#20837
|
Caption = #20449#24687#24405#20837
|
||||||
|
|
@ -572,6 +572,12 @@ object frmYFKInput: TfrmYFKInput
|
||||||
Styles.Header = cxStyle1
|
Styles.Header = cxStyle1
|
||||||
Width = 81
|
Width = 81
|
||||||
end
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20986#21040#21152#24037#21378'/'#23458#25143
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 124
|
||||||
|
end
|
||||||
object v1note: TcxGridDBColumn
|
object v1note: TcxGridDBColumn
|
||||||
Caption = #22791#27880
|
Caption = #22791#27880
|
||||||
DataBinding.FieldName = 'MxNote'
|
DataBinding.FieldName = 'MxNote'
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ type
|
||||||
cxStyleRepository1: TcxStyleRepository;
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
cxStyle1: TcxStyle;
|
cxStyle1: TcxStyle;
|
||||||
ToolButton4: TToolButton;
|
ToolButton4: TToolButton;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure TSaveClick(Sender: TObject);
|
procedure TSaveClick(Sender: TObject);
|
||||||
|
|
@ -606,9 +607,10 @@ begin
|
||||||
self.YFSub.FieldByName('CPSpec').Value := CDS_Main.FieldByName('Y_Spec').Value;
|
self.YFSub.FieldByName('CPSpec').Value := CDS_Main.FieldByName('Y_Spec').Value;
|
||||||
self.YFSub.FieldByName('CPBatchNO').Value := CDS_Main.FieldByName('BatchNO').Value;
|
self.YFSub.FieldByName('CPBatchNO').Value := CDS_Main.FieldByName('BatchNO').Value;
|
||||||
self.YFSub.FieldByName('danbao').Value := CDS_Main.FieldByName('danbao').Value;
|
self.YFSub.FieldByName('danbao').Value := CDS_Main.FieldByName('danbao').Value;
|
||||||
|
self.YFSub.FieldByName('MXNote').Value := CDS_Main.FieldByName('Note').Value;
|
||||||
if Trim(CDS_Main.fieldbyname('CRType').AsString) = 'ÍË»õ' then
|
if Trim(CDS_Main.fieldbyname('CRType').AsString) = 'ÍË»õ' then
|
||||||
begin
|
begin
|
||||||
CQtyFlag := -1;
|
CQtyFlag := 1;
|
||||||
CKXType := 'É´ÏßÍË»õ';
|
CKXType := 'É´ÏßÍË»õ';
|
||||||
end
|
end
|
||||||
else if Trim(CDS_Main.fieldbyname('CRType').AsString) = '²É¹ºÈë¿â' then
|
else if Trim(CDS_Main.fieldbyname('CRType').AsString) = '²É¹ºÈë¿â' then
|
||||||
|
|
@ -622,8 +624,10 @@ begin
|
||||||
CKXType := 'É´Ïß¼Ó¹¤';
|
CKXType := 'É´Ïß¼Ó¹¤';
|
||||||
end;
|
end;
|
||||||
self.YFSub.FieldByName('KXType').Value := CKXType;
|
self.YFSub.FieldByName('KXType').Value := CKXType;
|
||||||
self.YFSub.FieldByName('PS').Value := CQtyFlag * CDS_Main.FieldByName('PiQty').AsInteger;
|
// self.YFSub.FieldByName('PS').Value := CQtyFlag * CDS_Main.FieldByName('PiQty').AsInteger;
|
||||||
self.YFSub.FieldByName('Qty').Value := CQtyFlag * CDS_Main.FieldByName('Qty').AsFloat;
|
// self.YFSub.FieldByName('Qty').Value := CQtyFlag * CDS_Main.FieldByName('Qty').AsFloat;
|
||||||
|
self.YFSub.FieldByName('PS').Value := CDS_Main.FieldByName('PiQty').AsInteger;
|
||||||
|
self.YFSub.FieldByName('Qty').Value := CDS_Main.FieldByName('Qty').AsFloat;
|
||||||
self.YFSub.FieldByName('QtyUnit').Value := CDS_Main.FieldByName('QtyUnit').Value;
|
self.YFSub.FieldByName('QtyUnit').Value := CDS_Main.FieldByName('QtyUnit').Value;
|
||||||
self.YFSub.FieldByName('Price').Value := CDS_Main.FieldByName('Price').AsFloat;
|
self.YFSub.FieldByName('Price').Value := CDS_Main.FieldByName('Price').AsFloat;
|
||||||
self.YFSub.FieldByName('MxMoney').Value := CDS_Main.FieldByName('money').AsFloat;
|
self.YFSub.FieldByName('MxMoney').Value := CDS_Main.FieldByName('money').AsFloat;
|
||||||
|
|
@ -864,6 +868,9 @@ begin
|
||||||
self.YFSub.FieldByName('PS').Value := CQtyFlag * CDS_Main.FieldByName('PiQty').AsInteger;
|
self.YFSub.FieldByName('PS').Value := CQtyFlag * CDS_Main.FieldByName('PiQty').AsInteger;
|
||||||
self.YFSub.FieldByName('Qty').Value := CQtyFlag * CDS_Main.FieldByName('Qty').AsFloat;
|
self.YFSub.FieldByName('Qty').Value := CQtyFlag * CDS_Main.FieldByName('Qty').AsFloat;
|
||||||
self.YFSub.FieldByName('QtyUnit').Value := CDS_Main.FieldByName('QtyUnit').Value;
|
self.YFSub.FieldByName('QtyUnit').Value := CDS_Main.FieldByName('QtyUnit').Value;
|
||||||
|
self.YFSub.FieldByName('ToFactoryName').Value := CDS_Main.FieldByName('ToFactoryName').Value;
|
||||||
|
|
||||||
|
|
||||||
self.YFSub.FieldByName('Price').Value := 0;
|
self.YFSub.FieldByName('Price').Value := 0;
|
||||||
self.YFSub.FieldByName('MxMoney').Value := 0;
|
self.YFSub.FieldByName('MxMoney').Value := 0;
|
||||||
self.YFSub.FieldByName('discount').Value := 1;
|
self.YFSub.FieldByName('discount').Value := 1;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmYFMXlist: TfrmYFMXlist
|
object frmYFMXlist: TfrmYFMXlist
|
||||||
Left = 221
|
Left = 411
|
||||||
Top = 115
|
Top = 523
|
||||||
Width = 1205
|
Width = 1205
|
||||||
Height = 614
|
Height = 614
|
||||||
Caption = #24212#20184#23545#36134#20449#24687#34920
|
Caption = #24212#20184#23545#36134#20449#24687#34920
|
||||||
|
|
@ -21,7 +21,7 @@ object frmYFMXlist: TfrmYFMXlist
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1197
|
Width = 1189
|
||||||
Height = 31
|
Height = 31
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 59
|
ButtonWidth = 59
|
||||||
|
|
@ -78,7 +78,7 @@ object frmYFMXlist: TfrmYFMXlist
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 1197
|
Width = 1189
|
||||||
Height = 38
|
Height = 38
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -195,8 +195,8 @@ object frmYFMXlist: TfrmYFMXlist
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 91
|
Top = 91
|
||||||
Width = 1197
|
Width = 1189
|
||||||
Height = 492
|
Height = 484
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object TV1: TcxGridDBBandedTableView
|
object TV1: TcxGridDBBandedTableView
|
||||||
|
|
@ -271,7 +271,7 @@ object frmYFMXlist: TfrmYFMXlist
|
||||||
Bands = <
|
Bands = <
|
||||||
item
|
item
|
||||||
Styles.Header = cxStyle1
|
Styles.Header = cxStyle1
|
||||||
Width = 683
|
Width = 741
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Caption = #24212#20184
|
Caption = #24212#20184
|
||||||
|
|
@ -591,6 +591,14 @@ object frmYFMXlist: TfrmYFMXlist
|
||||||
Position.ColIndex = 1
|
Position.ColIndex = 1
|
||||||
Position.RowIndex = 0
|
Position.RowIndex = 0
|
||||||
end
|
end
|
||||||
|
object TV1Column6: TcxGridDBBandedColumn
|
||||||
|
Caption = #20986#21040#21152#24037#21378'/.'#23458#25143
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Position.BandIndex = 0
|
||||||
|
Position.ColIndex = 12
|
||||||
|
Position.RowIndex = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGridLevel1: TcxGridLevel
|
object cxGridLevel1: TcxGridLevel
|
||||||
GridView = TV1
|
GridView = TV1
|
||||||
|
|
@ -616,7 +624,7 @@ object frmYFMXlist: TfrmYFMXlist
|
||||||
object cxTabControl1: TcxTabControl
|
object cxTabControl1: TcxTabControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 69
|
Top = 69
|
||||||
Width = 1197
|
Width = 1189
|
||||||
Height = 22
|
Height = 22
|
||||||
Align = alTop
|
Align = alTop
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
|
@ -627,7 +635,7 @@ object frmYFMXlist: TfrmYFMXlist
|
||||||
#24050#23457#26680
|
#24050#23457#26680
|
||||||
#20840#37096)
|
#20840#37096)
|
||||||
ClientRectBottom = 22
|
ClientRectBottom = 22
|
||||||
ClientRectRight = 1197
|
ClientRectRight = 1189
|
||||||
ClientRectTop = 19
|
ClientRectTop = 19
|
||||||
end
|
end
|
||||||
object ADOQueryTemp: TADOQuery
|
object ADOQueryTemp: TADOQuery
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ type
|
||||||
TV1Column4: TcxGridDBBandedColumn;
|
TV1Column4: TcxGridDBBandedColumn;
|
||||||
TV1Column5: TcxGridDBBandedColumn;
|
TV1Column5: TcxGridDBBandedColumn;
|
||||||
TV1Column3: TcxGridDBBandedColumn;
|
TV1Column3: TcxGridDBBandedColumn;
|
||||||
|
TV1Column6: TcxGridDBBandedColumn;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmYFZZCR: TfrmYFZZCR
|
object frmYFZZCR: TfrmYFZZCR
|
||||||
Left = 198
|
Left = 279
|
||||||
Top = 112
|
Top = 458
|
||||||
Width = 1181
|
Width = 1181
|
||||||
Height = 661
|
Height = 661
|
||||||
Caption = #32455#36896#24212#20184#27454#31649#29702
|
Caption = #32455#36896#24212#20184#27454#31649#29702
|
||||||
|
|
@ -221,7 +221,7 @@ object frmYFZZCR: TfrmYFZZCR
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
Properties.CustomButtons.Buttons = <>
|
Properties.CustomButtons.Buttons = <>
|
||||||
Properties.Style = 9
|
Properties.Style = 9
|
||||||
Properties.TabIndex = 0
|
Properties.TabIndex = 3
|
||||||
Properties.Tabs.Strings = (
|
Properties.Tabs.Strings = (
|
||||||
#26410#23457#26680
|
#26410#23457#26680
|
||||||
#24050#23457#26680
|
#24050#23457#26680
|
||||||
|
|
@ -326,7 +326,7 @@ object frmYFZZCR: TfrmYFZZCR
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Styles.Content = cxStyle1
|
Styles.Content = cxStyle1
|
||||||
Styles.Header = cxStyle1
|
Styles.Header = cxStyle1
|
||||||
Width = 77
|
Width = 81
|
||||||
end
|
end
|
||||||
object VYB: TcxGridDBColumn
|
object VYB: TcxGridDBColumn
|
||||||
Caption = #21407#24065#37329#39069
|
Caption = #21407#24065#37329#39069
|
||||||
|
|
@ -335,7 +335,7 @@ object frmYFZZCR: TfrmYFZZCR
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Styles.Content = cxStyle1
|
Styles.Content = cxStyle1
|
||||||
Styles.Header = cxStyle1
|
Styles.Header = cxStyle1
|
||||||
Width = 70
|
Width = 100
|
||||||
end
|
end
|
||||||
object VBZ: TcxGridDBColumn
|
object VBZ: TcxGridDBColumn
|
||||||
Caption = #24065#31181
|
Caption = #24065#31181
|
||||||
|
|
@ -598,6 +598,12 @@ object frmYFZZCR: TfrmYFZZCR
|
||||||
Styles.Header = cxStyle1
|
Styles.Header = cxStyle1
|
||||||
Width = 145
|
Width = 145
|
||||||
end
|
end
|
||||||
|
object Tv1Column2: TcxGridDBColumn
|
||||||
|
Caption = #20986#21040#24037#21378'/'#23458#25143
|
||||||
|
DataBinding.FieldName = 'ToFactoryName'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 131
|
||||||
|
end
|
||||||
object v1Column8: TcxGridDBColumn
|
object v1Column8: TcxGridDBColumn
|
||||||
Caption = #24050#26680#38144#24320#31080#37329#39069
|
Caption = #24050#26680#38144#24320#31080#37329#39069
|
||||||
DataBinding.FieldName = 'FPHX'
|
DataBinding.FieldName = 'FPHX'
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ type
|
||||||
Tv1Column1: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
cxStyleRepository1: TcxStyleRepository;
|
cxStyleRepository1: TcxStyleRepository;
|
||||||
cxStyle1: TcxStyle;
|
cxStyle1: TcxStyle;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure TBCloseClick(Sender: TObject);
|
procedure TBCloseClick(Sender: TObject);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmYSCR: TfrmYSCR
|
object frmYSCR: TfrmYSCR
|
||||||
Left = 251
|
Left = 270
|
||||||
Top = 94
|
Top = 581
|
||||||
Width = 1249
|
Width = 1249
|
||||||
Height = 688
|
Height = 688
|
||||||
Caption = #24212#25910#27454#31649#29702
|
Caption = #24212#25910#27454#31649#29702
|
||||||
|
|
@ -21,7 +21,7 @@ object frmYSCR: TfrmYSCR
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1241
|
Width = 1233
|
||||||
Height = 31
|
Height = 31
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 83
|
ButtonWidth = 83
|
||||||
|
|
@ -110,7 +110,7 @@ object frmYSCR: TfrmYSCR
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 1241
|
Width = 1233
|
||||||
Height = 70
|
Height = 70
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -217,8 +217,8 @@ object frmYSCR: TfrmYSCR
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 123
|
Top = 123
|
||||||
Width = 1241
|
Width = 1233
|
||||||
Height = 297
|
Height = 289
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
@ -432,7 +432,7 @@ object frmYSCR: TfrmYSCR
|
||||||
object cxTabControl1: TcxTabControl
|
object cxTabControl1: TcxTabControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 101
|
Top = 101
|
||||||
Width = 1241
|
Width = 1233
|
||||||
Height = 22
|
Height = 22
|
||||||
Align = alTop
|
Align = alTop
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
|
@ -445,13 +445,13 @@ object frmYSCR: TfrmYSCR
|
||||||
#20840#37096)
|
#20840#37096)
|
||||||
OnChange = cxTabControl1Change
|
OnChange = cxTabControl1Change
|
||||||
ClientRectBottom = 22
|
ClientRectBottom = 22
|
||||||
ClientRectRight = 1241
|
ClientRectRight = 1233
|
||||||
ClientRectTop = 19
|
ClientRectTop = 19
|
||||||
end
|
end
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 420
|
Top = 412
|
||||||
Width = 1241
|
Width = 1233
|
||||||
Height = 237
|
Height = 237
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmYSCRMXList: TfrmYSCRMXList
|
object frmYSCRMXList: TfrmYSCRMXList
|
||||||
Left = 273
|
Left = 244
|
||||||
Top = 107
|
Top = 413
|
||||||
Width = 1018
|
Width = 1018
|
||||||
Height = 688
|
Height = 688
|
||||||
Caption = #24212#25910#27454#26126#32454#26597#35810
|
Caption = #24212#25910#27454#26126#32454#26597#35810
|
||||||
|
|
@ -19,7 +19,7 @@ object frmYSCRMXList: TfrmYSCRMXList
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1010
|
Width = 1002
|
||||||
Height = 31
|
Height = 31
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 59
|
ButtonWidth = 59
|
||||||
|
|
@ -68,7 +68,7 @@ object frmYSCRMXList: TfrmYSCRMXList
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 1010
|
Width = 1002
|
||||||
Height = 62
|
Height = 62
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -160,7 +160,7 @@ object frmYSCRMXList: TfrmYSCRMXList
|
||||||
object cxTabControl1: TcxTabControl
|
object cxTabControl1: TcxTabControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 93
|
Top = 93
|
||||||
Width = 1010
|
Width = 1002
|
||||||
Height = 22
|
Height = 22
|
||||||
Align = alTop
|
Align = alTop
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
|
@ -173,14 +173,14 @@ object frmYSCRMXList: TfrmYSCRMXList
|
||||||
#20840#37096)
|
#20840#37096)
|
||||||
OnChange = cxTabControl1Change
|
OnChange = cxTabControl1Change
|
||||||
ClientRectBottom = 22
|
ClientRectBottom = 22
|
||||||
ClientRectRight = 1010
|
ClientRectRight = 1002
|
||||||
ClientRectTop = 19
|
ClientRectTop = 19
|
||||||
end
|
end
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 115
|
Top = 115
|
||||||
Width = 1010
|
Width = 1002
|
||||||
Height = 542
|
Height = 534
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,20 @@ uses
|
||||||
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
IdTCPClient, IdFTP, ShellAPI, IniFiles, cxCheckBox, cxCalendar, cxButtonEdit,
|
||||||
cxTextEdit, cxPC, cxDropDownEdit, Menus, cxLookAndFeels, cxLookAndFeelPainters,
|
cxTextEdit, cxPC, cxDropDownEdit, Menus, cxLookAndFeels, cxLookAndFeelPainters,
|
||||||
dxBarBuiltInMenu, cxNavigator, DateUtils, dxSkinsCore,
|
dxBarBuiltInMenu, cxNavigator, DateUtils, dxSkinsCore,
|
||||||
dxSkinsDefaultPainters, dxSkinscxPCPainter;
|
dxSkinsDefaultPainters, dxSkinscxPCPainter, 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, dxSkinPumpkin,
|
||||||
|
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||||
|
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||||
|
dxSkinTheAsphaltWorld, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
|
||||||
|
dxSkinXmas2008Blue;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmYSCRMXList = class(TForm)
|
TfrmYSCRMXList = class(TForm)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmYSMXlist: TfrmYSMXlist
|
object frmYSMXlist: TfrmYSMXlist
|
||||||
Left = 218
|
Left = 403
|
||||||
Top = 144
|
Top = 443
|
||||||
Width = 1205
|
Width = 1205
|
||||||
Height = 613
|
Height = 613
|
||||||
Caption = #24212#25910#23545#36134#20449#24687#34920
|
Caption = #24212#25910#23545#36134#20449#24687#34920
|
||||||
|
|
@ -418,7 +418,7 @@ object frmYSMXlist: TfrmYSMXlist
|
||||||
end
|
end
|
||||||
object V1Column12: TcxGridDBBandedColumn
|
object V1Column12: TcxGridDBBandedColumn
|
||||||
Caption = #24635#37329#39069
|
Caption = #24635#37329#39069
|
||||||
DataBinding.FieldName = 'MxMoney'
|
DataBinding.FieldName = 'Money'
|
||||||
PropertiesClassName = 'TcxCurrencyEditProperties'
|
PropertiesClassName = 'TcxCurrencyEditProperties'
|
||||||
Properties.DisplayFormat = '0.00'
|
Properties.DisplayFormat = '0.00'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ begin
|
||||||
end;
|
end;
|
||||||
sql.Add(',@YFGSType='''' ');
|
sql.Add(',@YFGSType='''' ');
|
||||||
sql.Add(',@ISHS=' + quotedstr(Trim(ISHS.Text)));
|
sql.Add(',@ISHS=' + quotedstr(Trim(ISHS.Text)));
|
||||||
ShowMessage(sql.Text);
|
//ShowMessage(sql.Text);
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
SCreateCDS20(ADOQueryMain, CDS_HZ);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,20 @@ uses
|
||||||
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
RM_Class, RM_GridReport, IdBaseComponent, IdComponent, IdTCPConnection,
|
||||||
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
IdTCPClient, IdFTP,ShellAPI,IniFiles, cxCheckBox, cxCalendar,
|
||||||
cxButtonEdit, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
cxButtonEdit, cxTextEdit, cxLookAndFeels, cxLookAndFeelPainters,
|
||||||
cxNavigator;
|
cxNavigator, dxSkinsCore, 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, dxSkinPumpkin,
|
||||||
|
dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
|
||||||
|
dxSkinSilver, dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008,
|
||||||
|
dxSkinTheAsphaltWorld, dxSkinsDefaultPainters, dxSkinValentine,
|
||||||
|
dxSkinVS2010, dxSkinWhiteprint, dxSkinXmas2008Blue, dxSkinscxPCPainter;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmZdyAttachGYS = class(TForm)
|
TfrmZdyAttachGYS = class(TForm)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@ uses
|
||||||
U_FjList10 in '..\Z99Dependency\ThreeFun\Form\U_FjList10.pas' {frmFjList10},
|
U_FjList10 in '..\Z99Dependency\ThreeFun\Form\U_FjList10.pas' {frmFjList10},
|
||||||
U_CompressionFun in '..\Z99Dependency\ThreeFun\Fun\U_CompressionFun.pas',
|
U_CompressionFun in '..\Z99Dependency\ThreeFun\Fun\U_CompressionFun.pas',
|
||||||
U_RTFun in '..\Z99Dependency\ThreeFun\Fun\U_RTFun.pas',
|
U_RTFun in '..\Z99Dependency\ThreeFun\Fun\U_RTFun.pas',
|
||||||
U_YFFKInput in 'U_YFFKInput.pas' {frmYFFKInput};
|
U_YFFKInput in 'U_YFFKInput.pas' {frmYFFKInput},
|
||||||
|
U_XXPRICE in 'U_XXPRICE.pas' {frmXXPRICE};
|
||||||
|
|
||||||
// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas',
|
// U_SelfForm in '..\..\SelfForm\U_SelfForm.pas',
|
||||||
// U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField},
|
// U_SelExportField in '..\..\SelfForm\U_SelExportField.pas' {frmSelExportField},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmCPCKMdList: TfrmCPCKMdList
|
object frmCPCKMdList: TfrmCPCKMdList
|
||||||
Left = 560
|
Left = 373
|
||||||
Top = 371
|
Top = 237
|
||||||
Width = 1128
|
Width = 1128
|
||||||
Height = 516
|
Height = 516
|
||||||
Caption = #30721#21333#25171#21360
|
Caption = #30721#21333#25171#21360
|
||||||
|
|
@ -20,7 +20,7 @@ object frmCPCKMdList: TfrmCPCKMdList
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1120
|
Width = 1112
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 95
|
ButtonWidth = 95
|
||||||
|
|
@ -128,7 +128,7 @@ object frmCPCKMdList: TfrmCPCKMdList
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 1120
|
Width = 1112
|
||||||
Height = 93
|
Height = 93
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -338,8 +338,8 @@ object frmCPCKMdList: TfrmCPCKMdList
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 147
|
Top = 147
|
||||||
Width = 1120
|
Width = 1112
|
||||||
Height = 338
|
Height = 330
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
|
|
@ -731,7 +731,7 @@ object frmCPCKMdList: TfrmCPCKMdList
|
||||||
object cxTabControl1: TcxTabControl
|
object cxTabControl1: TcxTabControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 125
|
Top = 125
|
||||||
Width = 1120
|
Width = 1112
|
||||||
Height = 22
|
Height = 22
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
object frmCPSQSMCK: TfrmCPSQSMCK
|
object frmCPSQSMCK: TfrmCPSQSMCK
|
||||||
Left = 363
|
Left = 210
|
||||||
Top = 45
|
Top = 0
|
||||||
Width = 1109
|
Width = 1109
|
||||||
Height = 795
|
Height = 685
|
||||||
Caption = #25104#21697#20986#24211#25195#25551'('#30003#35831')'
|
Caption = #25104#21697#20986#24211#25195#25551'('#30003#35831')'
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -20,7 +20,7 @@ object frmCPSQSMCK: TfrmCPSQSMCK
|
||||||
Left = 513
|
Left = 513
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 580
|
Width = 580
|
||||||
Height = 756
|
Height = 646
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Tv3: TcxGridDBTableView
|
object Tv3: TcxGridDBTableView
|
||||||
|
|
@ -75,7 +75,7 @@ object frmCPSQSMCK: TfrmCPSQSMCK
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 513
|
Width = 513
|
||||||
Height = 756
|
Height = 646
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ object DataLink_FinishedClothWarehouse: TDataLink_FinishedClothWarehouse
|
||||||
OldCreateOrder = False
|
OldCreateOrder = False
|
||||||
OnDestroy = DataModuleDestroy
|
OnDestroy = DataModuleDestroy
|
||||||
Left = 460
|
Left = 460
|
||||||
Top = 279
|
Top = 280
|
||||||
Height = 349
|
Height = 349
|
||||||
Width = 482
|
Width = 482
|
||||||
object AdoDataLink: TADOQuery
|
object AdoDataLink: TADOQuery
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmFinishedClothOutList: TfrmFinishedClothOutList
|
object frmFinishedClothOutList: TfrmFinishedClothOutList
|
||||||
Left = 772
|
Left = 350
|
||||||
Top = 528
|
Top = 239
|
||||||
Width = 1151
|
Width = 1151
|
||||||
Height = 515
|
Height = 515
|
||||||
Caption = #25104#21697#20986#24211#31649#29702
|
Caption = #25104#21697#20986#24211#31649#29702
|
||||||
|
|
@ -20,7 +20,7 @@ object frmFinishedClothOutList: TfrmFinishedClothOutList
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1143
|
Width = 1135
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 83
|
ButtonWidth = 83
|
||||||
|
|
@ -65,7 +65,7 @@ object frmFinishedClothOutList: TfrmFinishedClothOutList
|
||||||
end
|
end
|
||||||
object ComboBox1: TComboBox
|
object ComboBox1: TComboBox
|
||||||
Left = 189
|
Left = 189
|
||||||
Top = 0
|
Top = 3
|
||||||
Width = 172
|
Width = 172
|
||||||
Height = 24
|
Height = 24
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
|
|
@ -114,7 +114,7 @@ object frmFinishedClothOutList: TfrmFinishedClothOutList
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 32
|
Top = 32
|
||||||
Width = 1143
|
Width = 1135
|
||||||
Height = 62
|
Height = 62
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -440,7 +440,7 @@ object frmFinishedClothOutList: TfrmFinishedClothOutList
|
||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 94
|
Top = 94
|
||||||
Width = 1143
|
Width = 1135
|
||||||
Height = 30
|
Height = 30
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
|
|
@ -481,7 +481,7 @@ object frmFinishedClothOutList: TfrmFinishedClothOutList
|
||||||
object Panel6: TPanel
|
object Panel6: TPanel
|
||||||
Left = 205
|
Left = 205
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 938
|
Width = 930
|
||||||
Height = 30
|
Height = 30
|
||||||
Align = alClient
|
Align = alClient
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
|
|
@ -489,7 +489,7 @@ object frmFinishedClothOutList: TfrmFinishedClothOutList
|
||||||
BorderStyle = bsSingle
|
BorderStyle = bsSingle
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
934
|
926
|
||||||
26)
|
26)
|
||||||
object Label7: TLabel
|
object Label7: TLabel
|
||||||
Left = 64
|
Left = 64
|
||||||
|
|
@ -581,8 +581,8 @@ object frmFinishedClothOutList: TfrmFinishedClothOutList
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 124
|
Top = 124
|
||||||
Width = 1143
|
Width = 1135
|
||||||
Height = 360
|
Height = 352
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
|
|
||||||
|
|
@ -532,6 +532,7 @@ begin
|
||||||
sql.add('''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
sql.add('''' + Trim(FormatDateTime('yyyy-MM-dd', BegDate.DateTime)) + ''' ');
|
||||||
sql.Add(',''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + '''');
|
sql.Add(',''' + Trim(FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1)) + '''');
|
||||||
sql.Add(',' + QuotedStr(fwhere) + ' ');
|
sql.Add(',' + QuotedStr(fwhere) + ' ');
|
||||||
|
showmessage(SQL.text);
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
ExportFtErpFile('坯布出库日报表.rmf', ADOQueryTemp);
|
ExportFtErpFile('坯布出库日报表.rmf', ADOQueryTemp);
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ object DataLink_Yarn: TDataLink_Yarn
|
||||||
OldCreateOrder = False
|
OldCreateOrder = False
|
||||||
OnCreate = DataModuleCreate
|
OnCreate = DataModuleCreate
|
||||||
OnDestroy = DataModuleDestroy
|
OnDestroy = DataModuleDestroy
|
||||||
Left = 343
|
Left = 490
|
||||||
Top = 231
|
Top = 105
|
||||||
Height = 349
|
Height = 349
|
||||||
Width = 482
|
Width = 482
|
||||||
object AdoDataLink: TADOQuery
|
object AdoDataLink: TADOQuery
|
||||||
|
|
|
||||||
|
|
@ -71,11 +71,18 @@ begin
|
||||||
|
|
||||||
if Trim(DataBaseStr) = '' then
|
if Trim(DataBaseStr) = '' then
|
||||||
begin
|
begin
|
||||||
server := '101.132.143.144,7781';
|
// server := '101.132.143.144,7781';
|
||||||
|
//// server := '.';
|
||||||
|
// dtbase := 'chenfengdata';
|
||||||
|
// user := 'rtsa';
|
||||||
|
// pswd := 'rightsoft@5740';
|
||||||
|
|
||||||
|
|
||||||
|
server := '127.0.0.1';
|
||||||
// server := '.';
|
// server := '.';
|
||||||
dtbase := 'chenfengdata';
|
dtbase := 'delphichenfeng';
|
||||||
user := 'rtsa';
|
user := 'sa';
|
||||||
pswd := 'rightsoft@5740';
|
pswd := 'rightsoft';
|
||||||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
object frmShaOutList: TfrmShaOutList
|
object frmShaOutList: TfrmShaOutList
|
||||||
Left = 219
|
Left = 620
|
||||||
Top = 147
|
Top = 492
|
||||||
Width = 1356
|
Width = 1355
|
||||||
Height = 884
|
Height = 451
|
||||||
Caption = #32433#32447#20986#24211#21015#34920
|
Caption = #32433#32447#20986#24211#21015#34920
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -21,7 +21,7 @@ object frmShaOutList: TfrmShaOutList
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1340
|
Width = 1339
|
||||||
Height = 33
|
Height = 33
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 59
|
ButtonWidth = 59
|
||||||
|
|
@ -107,7 +107,7 @@ object frmShaOutList: TfrmShaOutList
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 33
|
Top = 33
|
||||||
Width = 1340
|
Width = 1339
|
||||||
Height = 61
|
Height = 61
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -335,12 +335,13 @@ object frmShaOutList: TfrmShaOutList
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 116
|
Top = 116
|
||||||
Width = 1340
|
Width = 1339
|
||||||
Height = 729
|
Height = 296
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCustomDrawCell = Tv1CustomDrawCell
|
||||||
DataController.DataSource = DataSource1
|
DataController.DataSource = DataSource1
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||||
DataController.Summary.FooterSummaryItems = <
|
DataController.Summary.FooterSummaryItems = <
|
||||||
|
|
@ -566,6 +567,10 @@ object frmShaOutList: TfrmShaOutList
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 100
|
Width = 100
|
||||||
end
|
end
|
||||||
|
object Tv1Column3: TcxGridDBColumn
|
||||||
|
Caption = #25171#21360
|
||||||
|
DataBinding.FieldName = 'DYFlag'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid2Level1: TcxGridLevel
|
object cxGrid2Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
@ -574,7 +579,7 @@ object frmShaOutList: TfrmShaOutList
|
||||||
object cxTabControl1: TcxTabControl
|
object cxTabControl1: TcxTabControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 94
|
Top = 94
|
||||||
Width = 1340
|
Width = 1339
|
||||||
Height = 22
|
Height = 22
|
||||||
Align = alTop
|
Align = alTop
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
@ -587,7 +592,7 @@ object frmShaOutList: TfrmShaOutList
|
||||||
#24050#20316#24223#25968#25454)
|
#24050#20316#24223#25968#25454)
|
||||||
OnChange = cxTabControl1Change
|
OnChange = cxTabControl1Change
|
||||||
ClientRectBottom = 23
|
ClientRectBottom = 23
|
||||||
ClientRectRight = 1340
|
ClientRectRight = 1339
|
||||||
ClientRectTop = 23
|
ClientRectTop = 23
|
||||||
end
|
end
|
||||||
object ADOQueryCmd: TADOQuery
|
object ADOQueryCmd: TADOQuery
|
||||||
|
|
@ -714,4 +719,9 @@ object frmShaOutList: TfrmShaOutList
|
||||||
Left = 208
|
Left = 208
|
||||||
Top = 264
|
Top = 264
|
||||||
end
|
end
|
||||||
|
object ADOTmp: TADOQuery
|
||||||
|
Parameters = <>
|
||||||
|
Left = 104
|
||||||
|
Top = 232
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,8 @@ type
|
||||||
Label7: TLabel;
|
Label7: TLabel;
|
||||||
Tv1Column2: TcxGridDBColumn;
|
Tv1Column2: TcxGridDBColumn;
|
||||||
CDS_Print: TClientDataSet;
|
CDS_Print: TClientDataSet;
|
||||||
|
Tv1Column3: TcxGridDBColumn;
|
||||||
|
ADOTmp: TADOQuery;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
|
@ -131,6 +133,9 @@ type
|
||||||
procedure ToolButton1Click(Sender: TObject);
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
procedure v1Column9CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
procedure v1Column9CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
procedure v2Column6CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
procedure v2Column6CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||||
|
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||||
|
var ADone: Boolean);
|
||||||
private
|
private
|
||||||
canshu1, canshu2: string;
|
canshu1, canshu2: string;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
|
|
@ -261,7 +266,7 @@ begin
|
||||||
end;
|
end;
|
||||||
fsj := 'select distinct(Crtype) name from CK_Yarn_CR where ckname=''纱线'' and crflag=''出库'' ';
|
fsj := 'select distinct(Crtype) name from CK_Yarn_CR where ckname=''纱线'' and crflag=''出库'' ';
|
||||||
SInitComBoxBySql(ADOQueryCmd, CRType, False, fsj);
|
SInitComBoxBySql(ADOQueryCmd, CRType, False, fsj);
|
||||||
//InitGrid();
|
InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmShaOutList.TBExportClick(Sender: TObject);
|
procedure TfrmShaOutList.TBExportClick(Sender: TObject);
|
||||||
|
|
@ -405,6 +410,8 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmShaOutList.TBEditClick(Sender: TObject);
|
procedure TfrmShaOutList.TBEditClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CDS_Main.IsEmpty then
|
if CDS_Main.IsEmpty then
|
||||||
|
|
@ -526,237 +533,6 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//procedure TfrmShaOutList.ToolButton1Click(Sender: TObject);
|
|
||||||
//var
|
|
||||||
// filepath: string;
|
|
||||||
// mBegdate, mEnddate: string;
|
|
||||||
// FName, FNameSX, FNameJX: string;
|
|
||||||
// i: Integer;
|
|
||||||
//begin
|
|
||||||
// for i := 0 to Tv1.ColumnCount - 1 do
|
|
||||||
// begin
|
|
||||||
// FName := Tv1.Columns[i].DataBinding.FilterFieldName;
|
|
||||||
// FNameSX := Trim(FName) + '-1';
|
|
||||||
// FNameJX := Trim(FName) + '-2';
|
|
||||||
// CDS_Main.AddIndex(FNameSX, FName, []); { 正序 }
|
|
||||||
// CDS_Main.AddIndex(FNameJX, FName, [ixDescending]); { 倒序 }
|
|
||||||
// if Tv1.Columns[i].SortOrder = soDescending then
|
|
||||||
// begin
|
|
||||||
// CDS_Main.IndexName := FNameJX;
|
|
||||||
// end
|
|
||||||
// else if Tv1.Columns[i].SortOrder = soAscending then
|
|
||||||
// begin
|
|
||||||
// CDS_Main.IndexName := FNameSX;
|
|
||||||
// end;
|
|
||||||
// end;
|
|
||||||
// mBegdate := FormatDateTime('yyyy-MM-dd', begdate.Date);
|
|
||||||
// mEnddate := FormatDateTime('yyyy-MM-dd', enddate.Date);
|
|
||||||
// if CDS_Main.IsEmpty then
|
|
||||||
// exit;
|
|
||||||
//
|
|
||||||
// ExportFtErpFile('纱线出库报表.rmf', ADOQueryTemp);
|
|
||||||
// try
|
|
||||||
// filepath := ExtractFilePath(Application.ExeName) + 'report\纱线出库报表.rmf';
|
|
||||||
// if not FileExists(Pchar(filepath)) then
|
|
||||||
// begin
|
|
||||||
// application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
|
||||||
// exit;
|
|
||||||
// end;
|
|
||||||
// RmVariables['begDate'] := FormatDateTime('yymmdd', begDate.Date) + '-' + FormatDateTime('yymmdd', enddate.Date);
|
|
||||||
// RM1.LoadFromFile(filepath);
|
|
||||||
// RM1.ShowReport;
|
|
||||||
// finally
|
|
||||||
//
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
//end;
|
|
||||||
|
|
||||||
//procedure TfrmShaOutList.ToolButton1Click(Sender: TObject);
|
|
||||||
//var
|
|
||||||
// filepath: string;
|
|
||||||
// mBegdate, mEnddate: string;
|
|
||||||
// FName, FNameSX, FNameJX: string;
|
|
||||||
// i: Integer;
|
|
||||||
// SelectedRecords: TStringList;
|
|
||||||
// RecordID: string;
|
|
||||||
//begin
|
|
||||||
// for i := 0 to Tv1.ColumnCount - 1 do
|
|
||||||
// begin
|
|
||||||
// FName := Tv1.Columns[i].DataBinding.FilterFieldName;
|
|
||||||
// FNameSX := Trim(FName) + '-1';
|
|
||||||
// FNameJX := Trim(FName) + '-2';
|
|
||||||
// CDS_Main.AddIndex(FNameSX, FName, []); { 正序 }
|
|
||||||
// CDS_Main.AddIndex(FNameJX, FName, [ixDescending]); { 倒序 }
|
|
||||||
// if Tv1.Columns[i].SortOrder = soDescending then
|
|
||||||
// begin
|
|
||||||
// CDS_Main.IndexName := FNameJX;
|
|
||||||
// end
|
|
||||||
// else if Tv1.Columns[i].SortOrder = soAscending then
|
|
||||||
// begin
|
|
||||||
// CDS_Main.IndexName := FNameSX;
|
|
||||||
// end;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// mBegdate := FormatDateTime('yyyy-MM-dd', begdate.Date);
|
|
||||||
// mEnddate := FormatDateTime('yyyy-MM-dd', enddate.Date);
|
|
||||||
//
|
|
||||||
// if CDS_Main.IsEmpty then
|
|
||||||
// exit;
|
|
||||||
//
|
|
||||||
// SelectedRecords := TStringList.Create;
|
|
||||||
// try
|
|
||||||
// CDS_Main.DisableControls;
|
|
||||||
// try
|
|
||||||
// CDS_Main.First;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// while CDS_Main.Locate('ssel', True, []) do
|
|
||||||
// begin
|
|
||||||
// RecordID := CDS_Main.FieldByName('Y_ID').AsString;
|
|
||||||
// SelectedRecords.Add(RecordID);
|
|
||||||
// CDS_Main.Edit;
|
|
||||||
// CDS_Main.FieldByName('ssel').AsBoolean := False;
|
|
||||||
// CDS_Main.Post;
|
|
||||||
// end;
|
|
||||||
// finally
|
|
||||||
// CDS_Main.EnableControls;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// if SelectedRecords.Count = 0 then
|
|
||||||
// begin
|
|
||||||
// ShowMessage('请先选择要导出的记录!');
|
|
||||||
// Exit;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// for i := 0 to SelectedRecords.Count - 1 do
|
|
||||||
// begin
|
|
||||||
// if CDS_Main.Locate('Y_ID', SelectedRecords[i], []) then
|
|
||||||
// begin
|
|
||||||
// end;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// ExportFtErpFile('纱线出库报表.rmf', ADOQueryTemp);
|
|
||||||
//
|
|
||||||
// try
|
|
||||||
// filepath := ExtractFilePath(Application.ExeName) + 'report\纱线出库报表.rmf';
|
|
||||||
// if not FileExists(Pchar(filepath)) then
|
|
||||||
// begin
|
|
||||||
// application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
|
||||||
// exit;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// // 可以添加选中记录的信息到报表变量
|
|
||||||
// // 例如:选中的记录数量、选中的记录ID列表等
|
|
||||||
// RMVariables['SelectedCount'] := IntToStr(SelectedRecords.Count);
|
|
||||||
// RMVariables['begDate'] := FormatDateTime('yymmdd', begDate.Date) + '-' +
|
|
||||||
// FormatDateTime('yymmdd', enddate.Date);
|
|
||||||
//
|
|
||||||
// RM1.LoadFromFile(filepath);
|
|
||||||
// RM1.ShowReport;
|
|
||||||
// finally
|
|
||||||
// // 可以在这里添加清理代码
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// finally
|
|
||||||
// SelectedRecords.Free;
|
|
||||||
// end;
|
|
||||||
//end;
|
|
||||||
|
|
||||||
//procedure TfrmShaOutList.ToolButton1Click(Sender: TObject);
|
|
||||||
//var
|
|
||||||
// fPrintFile, Txt, fImagePath, YIDSql: string;
|
|
||||||
// Moudle: THandle;
|
|
||||||
// Makebar: TMakebar;
|
|
||||||
// Mixtext: TMixtext;
|
|
||||||
// SelectedCount: Integer;
|
|
||||||
//begin
|
|
||||||
// if CDS_Main.IsEmpty then
|
|
||||||
// Exit;
|
|
||||||
//
|
|
||||||
// if CDS_Main.Locate('SSel', True, []) = False then
|
|
||||||
// begin
|
|
||||||
// Application.MessageBox('没有选择数据!', '提示', 0);
|
|
||||||
// Exit;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// SelectedCount := 0;
|
|
||||||
// YIDSql := '';
|
|
||||||
// CDS_Main.DisableControls;
|
|
||||||
//
|
|
||||||
// try
|
|
||||||
// with CDS_Main do
|
|
||||||
// begin
|
|
||||||
// First;
|
|
||||||
// //while Locate('SSel', True, [loCaseInsensitive]) do
|
|
||||||
// while Locate('SSel', True, []) do
|
|
||||||
// begin
|
|
||||||
// // 构建Y_ID的IN条件
|
|
||||||
// if YIDSql <> '' then
|
|
||||||
// YIDSql := YIDSql + ',' + QuotedStr(Trim(FieldByName('Y_ID').AsString))
|
|
||||||
// else
|
|
||||||
// YIDSql := QuotedStr(Trim(FieldByName('Y_ID').AsString));
|
|
||||||
//
|
|
||||||
// Inc(SelectedCount);
|
|
||||||
//
|
|
||||||
// Edit;
|
|
||||||
// FieldByName('SSel').Value := False;
|
|
||||||
// Post;
|
|
||||||
// end;
|
|
||||||
// end;
|
|
||||||
// finally
|
|
||||||
// CDS_Main.EnableControls;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// if YIDSql = '' then
|
|
||||||
// begin
|
|
||||||
// Application.MessageBox('未选择任何数据!', '提示', 0);
|
|
||||||
// Exit;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// with ADOQueryCmd do
|
|
||||||
// begin
|
|
||||||
// Close;
|
|
||||||
// SQL.Clear;
|
|
||||||
//
|
|
||||||
// sql.Add(' select A.* ');
|
|
||||||
// sql.Add(' from CK_Yarn_CR A');
|
|
||||||
// sql.Add(' where isnull(CKName,'''')=''纱线''');
|
|
||||||
// SQL.Add(' and CRFlag=''出库''');
|
|
||||||
//
|
|
||||||
// // 添加日期范围条件(根据您的需求可选)
|
|
||||||
// // sql.Add(' and A.CRTime>=''' + FormatDateTime('yyyy-MM-dd', begdate.Date) + '''');
|
|
||||||
// // sql.Add(' and A.CRTime<''' + FormatDateTime('yyyy-MM-dd', enddate.Date + 1) + '''');
|
|
||||||
//
|
|
||||||
// // 添加勾选数据条件
|
|
||||||
// SQL.Add(' and A.Y_ID in (' + YIDSql + ')');
|
|
||||||
//
|
|
||||||
// SQL.Add(' order by CRTime desc');
|
|
||||||
// Open;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// if ADOQueryCmd.IsEmpty then
|
|
||||||
// begin
|
|
||||||
// Application.MessageBox('未找到对应的纱线出库数据!', '提示信息', MB_ICONINFORMATION);
|
|
||||||
// Exit;
|
|
||||||
// end;
|
|
||||||
//
|
|
||||||
// SCreateCDS20(ADOQueryCmd, CDS_PRT); // 使用CDS_PRT而不是CDS_Main
|
|
||||||
// SInitCDSData20(ADOQueryCmd, CDS_PRT);
|
|
||||||
//
|
|
||||||
// fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\纱线出库报表.rmf';
|
|
||||||
// ExportFtErpFile('纱线出库报表.rmf', ADOQueryTemp);
|
|
||||||
//
|
|
||||||
// if FileExists(fPrintFile) then
|
|
||||||
// begin
|
|
||||||
// RM1.LoadFromFile(fPrintFile);
|
|
||||||
// RM1.ShowReport;
|
|
||||||
// end
|
|
||||||
// else
|
|
||||||
// begin
|
|
||||||
// Application.MessageBox(PChar('未找到报表文件:' + #13#10 + fPrintFile), '提示', MB_ICONWARNING);
|
|
||||||
// end;
|
|
||||||
//end;
|
|
||||||
|
|
||||||
procedure TfrmShaOutList.ToolButton1Click(Sender: TObject);
|
procedure TfrmShaOutList.ToolButton1Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
fPrintFile, Txt, fImagePath, YIDSql: string;
|
fPrintFile, Txt, fImagePath, YIDSql: string;
|
||||||
|
|
@ -805,27 +581,16 @@ begin
|
||||||
Application.MessageBox('未选择任何数据!', '提示', 0);
|
Application.MessageBox('未选择任何数据!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if SelectedCount = 0 then
|
|
||||||
begin
|
|
||||||
Application.MessageBox('未选择任何数据!', '提示', 0);
|
|
||||||
Exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
SQL.Clear;
|
SQL.Clear;
|
||||||
|
|
||||||
sql.Add(' select A.* ');
|
sql.Add(' select A.* ');
|
||||||
sql.Add(' from CK_Yarn_CR A');
|
sql.Add(' from CK_Yarn_CR A');
|
||||||
sql.Add(' where isnull(CKName,'''')=''纱线''');
|
sql.Add(' where isnull(CKName,'''')=''纱线''');
|
||||||
SQL.Add(' and CRFlag=''出库''');
|
SQL.Add(' and CRFlag=''出库''');
|
||||||
|
|
||||||
SQL.Add(' and A.Y_ID in (' + YIDSql + ')');
|
SQL.Add(' and A.Y_ID in (' + YIDSql + ')');
|
||||||
|
|
||||||
SQL.Add(' order by CRTime desc');
|
SQL.Add(' order by CRTime desc');
|
||||||
//ShowMessage(sql.text);
|
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -837,25 +602,30 @@ begin
|
||||||
|
|
||||||
SCreateCDS20(ADOQueryCmd, CDS_PRT);
|
SCreateCDS20(ADOQueryCmd, CDS_PRT);
|
||||||
SInitCDSData20(ADOQueryCmd, CDS_PRT);
|
SInitCDSData20(ADOQueryCmd, CDS_PRT);
|
||||||
|
with ADOQueryTemp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('UPDATE CK_Yarn_CR set DYFLAG=''已打印'' where Y_ID in (' + YIDSql + ')');
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\纱线出库报表.rmf';
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\纱线出库报表.rmf';
|
||||||
|
ExportFtErpFile('纱线出库报表.rmf', ADOQueryCmd);
|
||||||
|
|
||||||
if FileExists(fPrintFile) then
|
if FileExists(fPrintFile) then
|
||||||
begin
|
begin
|
||||||
RM1.LoadFromFile(fPrintFile);
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
|
||||||
|
|
||||||
RM1.ShowReport;
|
RM1.ShowReport;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Application.MessageBox(PChar('未找到报表文件:' + #13#10 + fPrintFile), '提示', MB_ICONWARNING);
|
Application.MessageBox(PChar('未找到报表文件:' + #13#10 + fPrintFile), '提示', MB_ICONWARNING);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
InitGrid();
|
InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmShaOutList.v1Column9CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
procedure TfrmShaOutList.v1Column9CustomDrawCell(Sender: TcxCustomGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
var
|
var
|
||||||
id: Integer;
|
id: Integer;
|
||||||
|
|
@ -882,5 +652,15 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TfrmShaOutList.Tv1CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||||
|
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||||
|
var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
if '已打印' = AViewInfo.GridRecord.Values[Tv1Column3.Index] then
|
||||||
|
ACanvas.Brush.Color := $0080FF80;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmShaOutPut: TfrmShaOutPut
|
object frmShaOutPut: TfrmShaOutPut
|
||||||
Left = 297
|
Left = 158
|
||||||
Top = 277
|
Top = 186
|
||||||
Width = 1383
|
Width = 1383
|
||||||
Height = 644
|
Height = 644
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
|
|
||||||
|
|
@ -467,7 +467,7 @@ begin
|
||||||
if SaveCKData() then
|
if SaveCKData() then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('保存成功!', '提示', 0);
|
Application.MessageBox('保存成功!', '提示', 0);
|
||||||
//ModalResult:=1;
|
ModalResult:=1;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
object frmShaRKList: TfrmShaRKList
|
object frmShaRKList: TfrmShaRKList
|
||||||
Left = 429
|
Left = 390
|
||||||
Top = 403
|
Top = 513
|
||||||
Width = 1396
|
Width = 1094
|
||||||
Height = 668
|
Height = 668
|
||||||
Caption = #32433#32447#20837#24211#21015#34920
|
Caption = #32433#32447#20837#24211#21015#34920
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
|
|
@ -20,7 +20,7 @@ object frmShaRKList: TfrmShaRKList
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1380
|
Width = 1078
|
||||||
Height = 33
|
Height = 33
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 83
|
ButtonWidth = 83
|
||||||
|
|
@ -160,7 +160,7 @@ object frmShaRKList: TfrmShaRKList
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 33
|
Top = 33
|
||||||
Width = 1380
|
Width = 1078
|
||||||
Height = 72
|
Height = 72
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -307,7 +307,7 @@ object frmShaRKList: TfrmShaRKList
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 125
|
Top = 125
|
||||||
Width = 1380
|
Width = 1078
|
||||||
Height = 504
|
Height = 504
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
|
@ -593,7 +593,7 @@ object frmShaRKList: TfrmShaRKList
|
||||||
object cxTabControl1: TcxTabControl
|
object cxTabControl1: TcxTabControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 105
|
Top = 105
|
||||||
Width = 1380
|
Width = 1078
|
||||||
Height = 20
|
Height = 20
|
||||||
Align = alTop
|
Align = alTop
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
|
@ -605,7 +605,7 @@ object frmShaRKList: TfrmShaRKList
|
||||||
#27491#24120#25968#25454)
|
#27491#24120#25968#25454)
|
||||||
OnChange = cxTabControl1Change
|
OnChange = cxTabControl1Change
|
||||||
ClientRectBottom = 22
|
ClientRectBottom = 22
|
||||||
ClientRectRight = 1380
|
ClientRectRight = 1078
|
||||||
ClientRectTop = 22
|
ClientRectTop = 22
|
||||||
end
|
end
|
||||||
object MovePanel1: TMovePanel
|
object MovePanel1: TMovePanel
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@ type
|
||||||
private
|
private
|
||||||
canshu1, canshu2, canshu3: string;
|
canshu1, canshu2, canshu3: string;
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
|
procedure SelOKNo(CDS_MainSel: TclientDataSet; FSel: Boolean);
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
public
|
public
|
||||||
dFdDy: array[0..30] of FdDy; //客户端连接数组
|
dFdDy: array[0..30] of FdDy; //客户端连接数组
|
||||||
|
|
@ -162,6 +163,28 @@ begin
|
||||||
//frmShaRKList:=nil;
|
//frmShaRKList:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmShaRKList.SelOKNo(CDS_MainSel: TclientDataSet; FSel: Boolean);
|
||||||
|
begin
|
||||||
|
if CDS_MainSel.isEmpty then
|
||||||
|
exit;
|
||||||
|
CDS_MainSel.DisableControls;
|
||||||
|
with CDS_MainSel do
|
||||||
|
begin
|
||||||
|
first;
|
||||||
|
while not Eof do
|
||||||
|
begin
|
||||||
|
if fieldByName('SSel').asBoolean = not FSel then
|
||||||
|
begin
|
||||||
|
edit;
|
||||||
|
fieldByName('SSel').Value := FSel;
|
||||||
|
post;
|
||||||
|
end;
|
||||||
|
Next;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
CDS_MainSel.EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TfrmShaRKList.FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure TfrmShaRKList.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
begin
|
begin
|
||||||
Action := caFree;
|
Action := caFree;
|
||||||
|
|
@ -209,7 +232,6 @@ end;
|
||||||
procedure TfrmShaRKList.TBRafreshClick(Sender: TObject);
|
procedure TfrmShaRKList.TBRafreshClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Panel1.SetFocus;
|
Panel1.SetFocus;
|
||||||
|
|
||||||
InitGrid();
|
InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -384,7 +406,7 @@ begin
|
||||||
begin
|
begin
|
||||||
FBCId := Trim(CDS_Main.fieldbyname('Y_ID').AsString);
|
FBCId := Trim(CDS_Main.fieldbyname('Y_ID').AsString);
|
||||||
TBDel.Visible := False;
|
TBDel.Visible := False;
|
||||||
TBAdd.Visible := False;
|
//TBAdd.Visible := False;
|
||||||
if ShowModal = 1 then
|
if ShowModal = 1 then
|
||||||
begin
|
begin
|
||||||
Self.Panel1.SetFocus;
|
Self.Panel1.SetFocus;
|
||||||
|
|
@ -581,82 +603,243 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//procedure TfrmShaRKList.ToolButton2Click(Sender: TObject);
|
||||||
|
//var
|
||||||
|
// filepath: string;
|
||||||
|
// mBegdate, mEnddate: string;
|
||||||
|
// FName, FNameSX, FNameJX: string;
|
||||||
|
// i: Integer;
|
||||||
|
// maxno, fPrintFile: string;
|
||||||
|
// Txt, fImagePath: string;
|
||||||
|
// Moudle: THandle;
|
||||||
|
// Makebar: TMakebar;
|
||||||
|
// Mixtext: TMixtext;
|
||||||
|
//begin
|
||||||
|
// if CDS_Main.IsEmpty then
|
||||||
|
// Exit;
|
||||||
|
// if CDS_Main.Locate('Ssel', True, []) = false then
|
||||||
|
// begin
|
||||||
|
// application.MessageBox('没有选择数据', '提示');
|
||||||
|
// exit;
|
||||||
|
// end;
|
||||||
|
// CDS_Main.DisableControls;
|
||||||
|
// with CDS_Main do
|
||||||
|
// begin
|
||||||
|
// first;
|
||||||
|
// while not eof do
|
||||||
|
// begin
|
||||||
|
// if FieldByName('Ssel').AsBoolean = True then
|
||||||
|
// begin
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Filtered := False;
|
||||||
|
// Close;
|
||||||
|
// sql.Clear;
|
||||||
|
// sql.Add(' select A.* ');
|
||||||
|
// sql.Add(',FillNo=(select B.Userid From SY_User B where B.UserName=A.Filler)');
|
||||||
|
// sql.Add(' from CK_Yarn_CR A');
|
||||||
|
// sql.add(' where A.Y_ID=''' + Trim(CDS_Main.Fieldbyname('Y_ID').asstring) + '''');
|
||||||
|
// sql.Add(' and isnull(CKName,'''')=''纱线''');
|
||||||
|
// SQL.Add(' and CRFlag=''入库'' ');
|
||||||
|
// Open;
|
||||||
|
// end;
|
||||||
|
// SCreateCDS20(ADOQueryCmd, CDS_HZ);
|
||||||
|
// SInitCDSData20(ADOQueryCmd, CDS_HZ);
|
||||||
|
// try
|
||||||
|
// Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
// @Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
// @Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
|
// Txt := Trim(CDS_HZ.Fieldbyname('Y_ID').asstring);
|
||||||
|
// fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
||||||
|
// if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
||||||
|
// CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
|
// if FileExists(fImagePath) then
|
||||||
|
// DeleteFile(fImagePath);
|
||||||
|
// Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
||||||
|
// except
|
||||||
|
// application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
||||||
|
// //SelOKNo(CDS_Main, false) ;
|
||||||
|
// exit;
|
||||||
|
//
|
||||||
|
// //InitGrid();
|
||||||
|
// end;
|
||||||
|
// for i := 0 to StrToInt(FQty.Text) - 1 do
|
||||||
|
// begin
|
||||||
|
// filepath := ExtractFilePath(Application.ExeName) + 'report\纱线入库标签.rmf';
|
||||||
|
// if not FileExists(Pchar(filepath)) then
|
||||||
|
// begin
|
||||||
|
// application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
||||||
|
// exit;
|
||||||
|
// end;
|
||||||
|
// RMVariables['QRBARCODE'] := fImagePath;
|
||||||
|
// RM2.LoadFromFile(filepath);
|
||||||
|
// RM2.PrintReport;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// next;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// CDS_Main.EnableControls;
|
||||||
|
// //TBRafreshClick(Sender);
|
||||||
|
// InitGrid();
|
||||||
|
//end;
|
||||||
|
|
||||||
procedure TfrmShaRKList.ToolButton2Click(Sender: TObject);
|
procedure TfrmShaRKList.ToolButton2Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
filepath: string;
|
filepath: string;
|
||||||
mBegdate, mEnddate: string;
|
fImagePath: string;
|
||||||
FName, FNameSX, FNameJX: string;
|
|
||||||
i: Integer;
|
|
||||||
maxno, fPrintFile: string;
|
|
||||||
Txt, fImagePath: string;
|
|
||||||
Moudle: THandle;
|
Moudle: THandle;
|
||||||
Makebar: TMakebar;
|
Makebar: TMakebar;
|
||||||
Mixtext: TMixtext;
|
Mixtext: TMixtext;
|
||||||
|
PrintCount: Integer;
|
||||||
|
i: Integer;
|
||||||
|
bHasError: Boolean; // 添加错误标志
|
||||||
begin
|
begin
|
||||||
if CDS_Main.IsEmpty then
|
if CDS_Main.IsEmpty then
|
||||||
Exit;
|
Exit;
|
||||||
if CDS_Main.Locate('Ssel', True, []) = false then
|
|
||||||
|
if not CDS_Main.Locate('Ssel', True, []) then
|
||||||
begin
|
begin
|
||||||
application.MessageBox('没有选择数据', '提示');
|
Application.MessageBox('没有选择数据', '提示');
|
||||||
exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// 检查打印数量
|
||||||
|
PrintCount := StrToIntDef(FQty.Text, 0);
|
||||||
|
if PrintCount <= 0 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('请输入有效的打印数量', '提示');
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
CDS_Main.DisableControls;
|
CDS_Main.DisableControls;
|
||||||
with CDS_Main do
|
bHasError := False; // 初始化错误标志
|
||||||
|
|
||||||
|
try
|
||||||
|
// 加载DLL(移到循环外)
|
||||||
|
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
||||||
|
if Moudle = 0 then
|
||||||
begin
|
begin
|
||||||
first;
|
Application.MessageBox('加载条形码生成组件失败!', '提示信息', MB_ICONERROR);
|
||||||
while not eof do
|
InitGrid();
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
try
|
||||||
|
@Makebar := GetProcAddress(Moudle, 'Make');
|
||||||
|
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
||||||
|
|
||||||
|
if not Assigned(Makebar) or not Assigned(Mixtext) then
|
||||||
begin
|
begin
|
||||||
if FieldByName('Ssel').AsBoolean = True then
|
Application.MessageBox('获取条形码生成函数失败!', '提示信息', MB_ICONERROR);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// 确保图片目录存在
|
||||||
|
if not DirectoryExists(ExtractFilePath(Application.ExeName) + 'image') then
|
||||||
|
CreateDirectory(PChar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
||||||
|
|
||||||
|
CDS_Main.First;
|
||||||
|
while not CDS_Main.Eof do
|
||||||
begin
|
begin
|
||||||
|
if CDS_Main.FieldByName('Ssel').AsBoolean then
|
||||||
|
begin
|
||||||
|
// 查询明细数据
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Filtered := False;
|
Filtered := False;
|
||||||
Close;
|
Close;
|
||||||
sql.Clear;
|
SQL.Clear;
|
||||||
sql.Add(' select A.* ');
|
SQL.Add(' select A.* ');
|
||||||
sql.Add(',FillNo=(select B.Userid From SY_User B where B.UserName=A.Filler)');
|
SQL.Add(',FillNo=(select B.Userid From SY_User B where B.UserName=A.Filler)');
|
||||||
sql.Add(' from CK_Yarn_CR A');
|
SQL.Add(' from CK_Yarn_CR A');
|
||||||
sql.add(' where A.Y_ID=''' + Trim(CDS_Main.Fieldbyname('Y_ID').asstring) + '''');
|
SQL.Add(' where A.Y_ID=''' + Trim(CDS_Main.FieldByName('Y_ID').AsString) + '''');
|
||||||
sql.Add(' and isnull(CKName,'''')=''纱线''');
|
SQL.Add(' and isnull(CKName,'''')=''纱线''');
|
||||||
SQL.Add(' and CRFlag=''入库''');
|
SQL.Add(' and CRFlag=''入库''');
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SCreateCDS20(ADOQueryCmd, CDS_HZ);
|
SCreateCDS20(ADOQueryCmd, CDS_HZ);
|
||||||
SInitCDSData20(ADOQueryCmd, CDS_HZ);
|
|
||||||
try
|
try
|
||||||
Moudle := LoadLibrary('MakeQRBarcode.dll');
|
SInitCDSData20(ADOQueryCmd, CDS_HZ);
|
||||||
@Makebar := GetProcAddress(Moudle, 'Make');
|
|
||||||
@Mixtext := GetProcAddress(Moudle, 'MixText');
|
// 使用记录ID作为文件名,避免冲突
|
||||||
Txt := Trim(CDS_HZ.Fieldbyname('Y_ID').asstring);
|
fImagePath := ExtractFilePath(Application.ExeName) + 'image\' +
|
||||||
fImagePath := ExtractFilePath(Application.ExeName) + 'image\temp.bmp';
|
Trim(CDS_HZ.FieldByName('Y_ID').AsString) + '.bmp';
|
||||||
if not DirectoryExists(pchar(ExtractFilePath(Application.ExeName) + 'image')) then
|
|
||||||
CreateDirectory(pchar(ExtractFilePath(Application.ExeName) + 'image'), nil);
|
// 删除旧文件
|
||||||
if FileExists(fImagePath) then
|
if FileExists(fImagePath) then
|
||||||
DeleteFile(fImagePath);
|
DeleteFile(fImagePath);
|
||||||
Makebar(pchar(Txt), Length(Txt), 3, 3, 0, PChar(fImagePath), 3);
|
|
||||||
|
// 生成条形码
|
||||||
|
try
|
||||||
|
Makebar(PChar(Trim(CDS_HZ.FieldByName('Y_ID').AsString)),
|
||||||
|
Length(Trim(CDS_HZ.FieldByName('Y_ID').AsString)),
|
||||||
|
3, 3, 0, PChar(fImagePath), 3);
|
||||||
except
|
except
|
||||||
application.MessageBox('条形码生成失败!', '提示信息', MB_ICONERROR);
|
Application.MessageBox(PChar('条形码生成失败!记录:' +
|
||||||
exit;
|
CDS_HZ.FieldByName('Y_ID').AsString),
|
||||||
|
'提示信息', MB_ICONERROR);
|
||||||
|
bHasError := True; // 标记有错误发生
|
||||||
|
// 不调用TBRafreshClick,也不Continue,让循环继续处理其他记录
|
||||||
|
// 但跳过打印步骤
|
||||||
|
Continue; // 跳过打印,继续下一条记录
|
||||||
end;
|
end;
|
||||||
for i := 0 to StrToInt(FQty.Text) - 1 do
|
|
||||||
begin
|
// 检查打印模板
|
||||||
filepath := ExtractFilePath(Application.ExeName) + 'report\纱线入库标签.rmf';
|
filepath := ExtractFilePath(Application.ExeName) + 'report\纱线入库标签.rmf';
|
||||||
if not FileExists(Pchar(filepath)) then
|
if not FileExists(filepath) then
|
||||||
begin
|
begin
|
||||||
application.MessageBox(pchar('文件[' + filepath + ']不存在!'), '提示信息', MB_IConError);
|
Application.MessageBox(PChar('文件[' + filepath + ']不存在!'),
|
||||||
exit;
|
'提示信息', MB_ICONERROR);
|
||||||
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// 打印多份
|
||||||
RMVariables['QRBARCODE'] := fImagePath;
|
RMVariables['QRBARCODE'] := fImagePath;
|
||||||
RM2.LoadFromFile(filepath);
|
RM2.LoadFromFile(filepath);
|
||||||
|
for i := 1 to PrintCount do
|
||||||
RM2.PrintReport;
|
RM2.PrintReport;
|
||||||
|
|
||||||
|
finally
|
||||||
|
CDS_HZ.Close; // 释放临时数据集
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
next;
|
CDS_Main.Next;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
finally
|
||||||
|
FreeLibrary(Moudle); // 释放DLL
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
finally
|
||||||
CDS_Main.EnableControls;
|
CDS_Main.EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
// 清除所有选中标记
|
||||||
|
CDS_Main.DisableControls;
|
||||||
|
try
|
||||||
|
CDS_Main.First;
|
||||||
|
while not CDS_Main.Eof do
|
||||||
|
begin
|
||||||
|
CDS_Main.Edit;
|
||||||
|
CDS_Main.FieldByName('Ssel').AsBoolean := False;
|
||||||
|
CDS_Main.Post;
|
||||||
|
CDS_Main.Next;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
CDS_Main.EnableControls;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// 刷新数据
|
||||||
|
InitGrid();
|
||||||
|
|
||||||
|
// 如果有错误,可以提示用户
|
||||||
|
if bHasError then
|
||||||
|
Application.MessageBox('部分记录打印失败,请检查!', '提示', MB_ICONWARNING);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrmShaRKList.ToolButton3Click(Sender: TObject);
|
procedure TfrmShaRKList.ToolButton3Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
excelApp, WorkBook: Variant;
|
excelApp, WorkBook: Variant;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
object frmYarnList: TfrmYarnList
|
object frmYarnList: TfrmYarnList
|
||||||
Left = 142
|
Left = 243
|
||||||
Top = 480
|
Top = 166
|
||||||
Width = 1270
|
Width = 1094
|
||||||
Height = 700
|
Height = 700
|
||||||
Caption = #32433#32447#36164#26009
|
Caption = #32433#32447#36164#26009
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
|
|
@ -21,7 +21,7 @@ object frmYarnList: TfrmYarnList
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1254
|
Width = 1078
|
||||||
Height = 31
|
Height = 31
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 59
|
ButtonWidth = 59
|
||||||
|
|
@ -94,7 +94,7 @@ object frmYarnList: TfrmYarnList
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 1254
|
Width = 1078
|
||||||
Height = 39
|
Height = 39
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
|
|
@ -177,7 +177,7 @@ object frmYarnList: TfrmYarnList
|
||||||
object cxGrid2: TcxGrid
|
object cxGrid2: TcxGrid
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 70
|
Top = 70
|
||||||
Width = 1254
|
Width = 1078
|
||||||
Height = 591
|
Height = 591
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
|
|
||||||
|
|
@ -64,10 +64,15 @@ begin
|
||||||
|
|
||||||
if Trim(DataBaseStr) = '' then
|
if Trim(DataBaseStr) = '' then
|
||||||
begin
|
begin
|
||||||
server := '101.132.143.144,7781';
|
// server := '101.132.143.144,7781';
|
||||||
dtbase := 'chenfengdata';
|
// dtbase := 'chenfengdata';
|
||||||
user := 'rtsa';
|
// user := 'rtsa';
|
||||||
pswd := 'rightsoft@5740';
|
// pswd := 'rightsoft@5740';
|
||||||
|
|
||||||
|
server := '127.0.0.1';
|
||||||
|
dtbase := 'delphichenfeng';
|
||||||
|
user := 'sa';
|
||||||
|
pswd := 'rightsoft';
|
||||||
// server := '.';
|
// server := '.';
|
||||||
// dtbase := 'yiduidata';
|
// dtbase := 'yiduidata';
|
||||||
// user := 'sa';
|
// user := 'sa';
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
object frmWarpRollerCk: TfrmWarpRollerCk
|
object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
Left = 325
|
Left = 555
|
||||||
Top = 159
|
Top = 145
|
||||||
Width = 1230
|
Width = 737
|
||||||
Height = 638
|
Height = 390
|
||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
Caption = #32463#36724#20986#24211#21015#34920
|
Caption = #32463#36724#20986#24211#21015#34920
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
|
|
@ -22,7 +22,7 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
object ToolBar1: TToolBar
|
object ToolBar1: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 1214
|
Width = 721
|
||||||
Height = 29
|
Height = 29
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 59
|
ButtonWidth = 59
|
||||||
|
|
@ -62,16 +62,16 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 29
|
Top = 29
|
||||||
Width = 1214
|
Width = 721
|
||||||
Height = 92
|
Height = 4
|
||||||
Align = alTop
|
Align = alTop
|
||||||
BevelInner = bvRaised
|
BevelInner = bvRaised
|
||||||
BevelOuter = bvLowered
|
BevelOuter = bvLowered
|
||||||
Color = clSkyBlue
|
Color = clSkyBlue
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 38
|
Left = 686
|
||||||
Top = 17
|
Top = 25
|
||||||
Width = 52
|
Width = 52
|
||||||
Height = 12
|
Height = 12
|
||||||
Caption = #20986#24211#26085#26399
|
Caption = #20986#24211#26085#26399
|
||||||
|
|
@ -81,10 +81,11 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
Font.Name = #23435#20307
|
Font.Name = #23435#20307
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
end
|
end
|
||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
Left = 224
|
Left = 872
|
||||||
Top = 17
|
Top = 25
|
||||||
Width = 52
|
Width = 52
|
||||||
Height = 12
|
Height = 12
|
||||||
Caption = #20986#24211#31867#22411
|
Caption = #20986#24211#31867#22411
|
||||||
|
|
@ -94,10 +95,11 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
Font.Name = #23435#20307
|
Font.Name = #23435#20307
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
end
|
end
|
||||||
object Label8: TLabel
|
object Label8: TLabel
|
||||||
Left = 38
|
Left = 686
|
||||||
Top = 43
|
Top = 51
|
||||||
Width = 52
|
Width = 52
|
||||||
Height = 12
|
Height = 12
|
||||||
Caption = #20986#24211#21333#21495
|
Caption = #20986#24211#21333#21495
|
||||||
|
|
@ -107,10 +109,11 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
Font.Name = #23435#20307
|
Font.Name = #23435#20307
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
end
|
end
|
||||||
object Label9: TLabel
|
object Label9: TLabel
|
||||||
Left = 224
|
Left = 872
|
||||||
Top = 43
|
Top = 51
|
||||||
Width = 52
|
Width = 52
|
||||||
Height = 12
|
Height = 12
|
||||||
Caption = #20986#21040#24037#21378
|
Caption = #20986#21040#24037#21378
|
||||||
|
|
@ -120,12 +123,14 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
Font.Name = #23435#20307
|
Font.Name = #23435#20307
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
|
Visible = False
|
||||||
end
|
end
|
||||||
object CRTime: TDateTimePicker
|
object CRTime: TDateTimePicker
|
||||||
Left = 90
|
Tag = 2222
|
||||||
Top = 13
|
Left = 1129
|
||||||
Width = 100
|
Top = 25
|
||||||
Height = 20
|
Width = 7
|
||||||
|
Height = 8
|
||||||
Date = 41509.970132187500000000
|
Date = 41509.970132187500000000
|
||||||
Format = 'yyyy-MM-dd'
|
Format = 'yyyy-MM-dd'
|
||||||
Time = 41509.970132187500000000
|
Time = 41509.970132187500000000
|
||||||
|
|
@ -133,13 +138,15 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object CRType: TComboBox
|
object CRType: TComboBox
|
||||||
Left = 280
|
Tag = 2222
|
||||||
Top = 12
|
Left = 976
|
||||||
|
Top = 44
|
||||||
Width = 100
|
Width = 100
|
||||||
Height = 20
|
Height = 20
|
||||||
Style = csDropDownList
|
Style = csDropDownList
|
||||||
ItemHeight = 12
|
ItemHeight = 12
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
Visible = False
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
#21152#24037#20986#24211
|
#21152#24037#20986#24211
|
||||||
#38144#21806#20986#24211
|
#38144#21806#20986#24211
|
||||||
|
|
@ -149,26 +156,29 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
#19978#27974#20986#24211)
|
#19978#27974#20986#24211)
|
||||||
end
|
end
|
||||||
object JZRKNo: TEdit
|
object JZRKNo: TEdit
|
||||||
Left = 90
|
Tag = 2222
|
||||||
Top = 39
|
Left = 1097
|
||||||
Width = 100
|
Top = 31
|
||||||
|
Width = 8
|
||||||
Height = 20
|
Height = 20
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object ToFactoryName: TBtnEditA
|
object ToFactoryName: TBtnEditA
|
||||||
Left = 280
|
Tag = 2222
|
||||||
Top = 39
|
Left = 944
|
||||||
|
Top = 15
|
||||||
Width = 101
|
Width = 101
|
||||||
Height = 20
|
Height = 20
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
Visible = False
|
||||||
OnBtnClick = ToFactoryNameBtnClick
|
OnBtnClick = ToFactoryNameBtnClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ToolBar2: TToolBar
|
object ToolBar2: TToolBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 121
|
Top = 33
|
||||||
Width = 1214
|
Width = 721
|
||||||
Height = 30
|
Height = 30
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
|
|
@ -189,6 +199,7 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
ShowCaptions = True
|
ShowCaptions = True
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
object ToolButton1: TToolButton
|
object ToolButton1: TToolButton
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
|
|
@ -208,17 +219,17 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
end
|
end
|
||||||
object Panel3: TPanel
|
object Panel3: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 151
|
Top = 63
|
||||||
Width = 1214
|
Width = 721
|
||||||
Height = 448
|
Height = 288
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Caption = 'Panel3'
|
Caption = 'Panel3'
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object cxGrid1: TcxGrid
|
object cxGrid1: TcxGrid
|
||||||
Left = 1
|
Left = 1
|
||||||
Top = 1
|
Top = 1
|
||||||
Width = 1212
|
Width = 719
|
||||||
Height = 446
|
Height = 286
|
||||||
Align = alClient
|
Align = alClient
|
||||||
PopupMenu = PopupMenu1
|
PopupMenu = PopupMenu1
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
|
|
@ -229,12 +240,10 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
item
|
item
|
||||||
Format = 'C_Code'
|
Format = 'C_Code'
|
||||||
Column = v1P_CodeName
|
|
||||||
end>
|
end>
|
||||||
DataController.Summary.FooterSummaryItems = <
|
DataController.Summary.FooterSummaryItems = <
|
||||||
item
|
item
|
||||||
Kind = skCount
|
Kind = skCount
|
||||||
Column = v1P_Code
|
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
Kind = skSum
|
Kind = skSum
|
||||||
|
|
@ -255,56 +264,25 @@ object frmWarpRollerCk: TfrmWarpRollerCk
|
||||||
OptionsView.Indicator = True
|
OptionsView.Indicator = True
|
||||||
Styles.Content = DataLink_Warehouse.Default
|
Styles.Content = DataLink_Warehouse.Default
|
||||||
Styles.Header = DataLink_Warehouse.Default
|
Styles.Header = DataLink_Warehouse.Default
|
||||||
|
object Tv1Column1: TcxGridDBColumn
|
||||||
|
Caption = #20986#24211#21333#21495
|
||||||
|
DataBinding.FieldName = 'JZRKNo'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 98
|
||||||
|
end
|
||||||
object v1Column2: TcxGridDBColumn
|
object v1Column2: TcxGridDBColumn
|
||||||
|
Tag = 111
|
||||||
Caption = #26469#33258#24037#21378
|
Caption = #26469#33258#24037#21378
|
||||||
DataBinding.FieldName = 'fromFactoryName'
|
DataBinding.FieldName = 'fromFactoryName'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Editing = False
|
Options.Editing = False
|
||||||
Width = 66
|
Width = 83
|
||||||
end
|
end
|
||||||
object v1Column4: TcxGridDBColumn
|
object Tv1Column2: TcxGridDBColumn
|
||||||
Caption = #23384#25918#24037#21378
|
|
||||||
DataBinding.FieldName = 'FactoryName'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Options.Editing = False
|
|
||||||
Width = 63
|
|
||||||
end
|
|
||||||
object v1Column3: TcxGridDBColumn
|
|
||||||
Caption = #25351#31034#21333#21495
|
|
||||||
DataBinding.FieldName = 'WBId'
|
|
||||||
PropertiesClassName = 'TcxButtonEditProperties'
|
|
||||||
Properties.Buttons = <
|
|
||||||
item
|
|
||||||
Default = True
|
|
||||||
Kind = bkEllipsis
|
|
||||||
end>
|
|
||||||
Properties.ReadOnly = True
|
|
||||||
Properties.OnButtonClick = v1Column3PropertiesButtonClick
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Width = 93
|
|
||||||
end
|
|
||||||
object v1P_Code: TcxGridDBColumn
|
|
||||||
Caption = #32463#36724#32534#21495
|
|
||||||
DataBinding.FieldName = 'WBCode'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Options.Editing = False
|
|
||||||
Options.Sorting = False
|
|
||||||
Width = 73
|
|
||||||
end
|
|
||||||
object v1P_CodeName: TcxGridDBColumn
|
|
||||||
Caption = #32463#36724#21517#31216
|
|
||||||
DataBinding.FieldName = 'WBName'
|
|
||||||
HeaderAlignmentHorz = taCenter
|
|
||||||
Options.Editing = False
|
|
||||||
Options.Sorting = False
|
|
||||||
Width = 86
|
|
||||||
end
|
|
||||||
object v1Note: TcxGridDBColumn
|
|
||||||
Caption = #22791#27880
|
Caption = #22791#27880
|
||||||
DataBinding.FieldName = 'Note'
|
DataBinding.FieldName = 'note'
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Options.Sorting = False
|
Width = 86
|
||||||
Width = 132
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
|
|
|
||||||
|
|
@ -52,10 +52,6 @@ type
|
||||||
ADOQueryMain: TADOQuery;
|
ADOQueryMain: TADOQuery;
|
||||||
cxGrid1: TcxGrid;
|
cxGrid1: TcxGrid;
|
||||||
Tv1: TcxGridDBTableView;
|
Tv1: TcxGridDBTableView;
|
||||||
v1Column3: TcxGridDBColumn;
|
|
||||||
v1P_Code: TcxGridDBColumn;
|
|
||||||
v1P_CodeName: TcxGridDBColumn;
|
|
||||||
v1Note: TcxGridDBColumn;
|
|
||||||
cxGrid1Level1: TcxGridLevel;
|
cxGrid1Level1: TcxGridLevel;
|
||||||
PopupMenu1: TPopupMenu;
|
PopupMenu1: TPopupMenu;
|
||||||
N1: TMenuItem;
|
N1: TMenuItem;
|
||||||
|
|
@ -65,7 +61,8 @@ type
|
||||||
RMDB_Main: TRMDBDataSet;
|
RMDB_Main: TRMDBDataSet;
|
||||||
RMXLSExport1: TRMXLSExport;
|
RMXLSExport1: TRMXLSExport;
|
||||||
v1Column2: TcxGridDBColumn;
|
v1Column2: TcxGridDBColumn;
|
||||||
v1Column4: TcxGridDBColumn;
|
Tv1Column1: TcxGridDBColumn;
|
||||||
|
Tv1Column2: TcxGridDBColumn;
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
|
|
@ -107,13 +104,13 @@ function TfrmWarpRollerCk.CheckData(): Boolean;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
|
|
||||||
if trim(CRType.Text) = '' then
|
// if trim(CRType.Text) = '' then
|
||||||
raise Exception.Create('出库类型不能为空!');
|
// raise Exception.Create('出库类型不能为空!');
|
||||||
if trim(CRType.Text) <> '损耗出库' then
|
// if trim(CRType.Text) <> '损耗出库' then
|
||||||
begin
|
// begin
|
||||||
if trim(ToFactoryName.Text) = '' then
|
// if trim(ToFactoryName.Text) = '' then
|
||||||
raise Exception.Create('出到工厂不能为空!');
|
// raise Exception.Create('出到工厂不能为空!');
|
||||||
end;
|
// end;
|
||||||
// if cds_main.Locate('QtyUnit', '', []) then
|
// if cds_main.Locate('QtyUnit', '', []) then
|
||||||
// raise Exception.Create('数量单位不能为空!');
|
// raise Exception.Create('数量单位不能为空!');
|
||||||
|
|
||||||
|
|
@ -168,13 +165,14 @@ begin
|
||||||
ADOQueryCmd.FieldByName('editTime').Value := SGetServerDateTime(adoqueryTmp);
|
ADOQueryCmd.FieldByName('editTime').Value := SGetServerDateTime(adoqueryTmp);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
ADOQueryCmd.FieldByName('JZRKNo').Value := trim(JZRKNo.Text);
|
//ADOQueryCmd.FieldByName('JZRKNo').Value := trim(JZRKNo.Text);
|
||||||
ADOQueryCmd.FieldByName('JZRKID').Value := trim(MaxNo);
|
//ADOQueryCmd.FieldByName('Note').Value := trim(Note.Text);
|
||||||
ADOQueryCmd.FieldByName('ToFactoryName').Value := trim(ToFactoryName.Text);
|
// ADOQueryCmd.FieldByName('JZRKID').Value := trim(MaxNo);
|
||||||
ADOQueryCmd.FieldByName('CRTime').Value := formatdateTime('yyyy-MM-dd', CRTIme.Date);
|
// ADOQueryCmd.FieldByName('ToFactoryName').Value := trim(ToFactoryName.Text);
|
||||||
ADOQueryCmd.FieldByName('CRType').Value := trim(CRType.Text);
|
// ADOQueryCmd.FieldByName('CRTime').Value := formatdateTime('yyyy-MM-dd', CRTIme.Date);
|
||||||
ADOQueryCmd.FieldByName('CRFlag').Value := '出库';
|
// ADOQueryCmd.FieldByName('CRType').Value := trim(CRType.Text);
|
||||||
ADOQueryCmd.FieldByName('CRQtyFlag').Value := -1;
|
// ADOQueryCmd.FieldByName('CRFlag').Value := '出库';
|
||||||
|
// ADOQueryCmd.FieldByName('CRQtyFlag').Value := -1;
|
||||||
|
|
||||||
//保存明细
|
//保存明细
|
||||||
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_Main, 'CK_WarpBeam_CR', 0);
|
RTSetSaveDataCDS(ADOQueryCmd, Tv1, CDS_Main, 'CK_WarpBeam_CR', 0);
|
||||||
|
|
@ -289,10 +287,12 @@ begin
|
||||||
if savedate() then
|
if savedate() then
|
||||||
begin
|
begin
|
||||||
application.MessageBox('数据保存成功!', '提示信息');
|
application.MessageBox('数据保存成功!', '提示信息');
|
||||||
|
close;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
application.MessageBox('数据保存失败!', '提示信息', MB_ICONERROR);
|
application.MessageBox('数据保存失败!', '提示信息', MB_ICONERROR);
|
||||||
|
close;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
object frmWarpRollerCklist: TfrmWarpRollerCklist
|
object frmWarpRollerCklist: TfrmWarpRollerCklist
|
||||||
Left = 178
|
Left = 164
|
||||||
Top = 140
|
Top = 230
|
||||||
Width = 1378
|
Width = 1378
|
||||||
Height = 615
|
Height = 823
|
||||||
Caption = #32463#36724#20986#24211#31649#29702
|
Caption = #32463#36724#20986#24211#31649#29702
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -23,7 +23,7 @@ object frmWarpRollerCklist: TfrmWarpRollerCklist
|
||||||
Width = 1362
|
Width = 1362
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
ButtonHeight = 30
|
ButtonHeight = 30
|
||||||
ButtonWidth = 59
|
ButtonWidth = 83
|
||||||
Caption = 'ToolBar1'
|
Caption = 'ToolBar1'
|
||||||
Color = clSkyBlue
|
Color = clSkyBlue
|
||||||
Flat = True
|
Flat = True
|
||||||
|
|
@ -52,20 +52,18 @@ object frmWarpRollerCklist: TfrmWarpRollerCklist
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20986#24211
|
Caption = #20986#24211
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
Visible = False
|
|
||||||
OnClick = TBAddClick
|
OnClick = TBAddClick
|
||||||
end
|
end
|
||||||
object TBEdit: TToolButton
|
object TBEdit: TToolButton
|
||||||
Left = 126
|
Left = 126
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20462#25913
|
Caption = #29305#27530#20462#25913
|
||||||
ImageIndex = 11
|
ImageIndex = 11
|
||||||
Visible = False
|
|
||||||
OnClick = TBEditClick
|
OnClick = TBEditClick
|
||||||
end
|
end
|
||||||
object TBDel: TToolButton
|
object TBDel: TToolButton
|
||||||
Left = 189
|
Left = 213
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #21024#38500
|
Caption = #21024#38500
|
||||||
|
|
@ -73,7 +71,7 @@ object frmWarpRollerCklist: TfrmWarpRollerCklist
|
||||||
OnClick = TBDelClick
|
OnClick = TBDelClick
|
||||||
end
|
end
|
||||||
object TBExport: TToolButton
|
object TBExport: TToolButton
|
||||||
Left = 252
|
Left = 276
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #23548#20986
|
Caption = #23548#20986
|
||||||
|
|
@ -81,14 +79,14 @@ object frmWarpRollerCklist: TfrmWarpRollerCklist
|
||||||
OnClick = TBExportClick
|
OnClick = TBExportClick
|
||||||
end
|
end
|
||||||
object ToolButton1: TToolButton
|
object ToolButton1: TToolButton
|
||||||
Left = 315
|
Left = 339
|
||||||
Top = 0
|
Top = 0
|
||||||
Caption = #25171#21360
|
Caption = #25171#21360
|
||||||
ImageIndex = 4
|
ImageIndex = 4
|
||||||
OnClick = ToolButton1Click
|
OnClick = ToolButton1Click
|
||||||
end
|
end
|
||||||
object TBClose: TToolButton
|
object TBClose: TToolButton
|
||||||
Left = 374
|
Left = 422
|
||||||
Top = 0
|
Top = 0
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
Caption = #20851#38381
|
Caption = #20851#38381
|
||||||
|
|
@ -302,7 +300,7 @@ object frmWarpRollerCklist: TfrmWarpRollerCklist
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 97
|
Top = 97
|
||||||
Width = 1362
|
Width = 1362
|
||||||
Height = 479
|
Height = 687
|
||||||
Align = alClient
|
Align = alClient
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
Font.Color = clBtnShadow
|
Font.Color = clBtnShadow
|
||||||
|
|
@ -314,6 +312,7 @@ object frmWarpRollerCklist: TfrmWarpRollerCklist
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
Navigator.Buttons.CustomButtons = <>
|
Navigator.Buttons.CustomButtons = <>
|
||||||
|
OnCustomDrawCell = Tv1CustomDrawCell
|
||||||
DataController.DataSource = DataSource1
|
DataController.DataSource = DataSource1
|
||||||
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
DataController.Options = [dcoAssignGroupingValues, dcoAssignMasterDetailKeys, dcoSaveExpanding, dcoImmediatePost]
|
||||||
DataController.Summary.DefaultGroupSummaryItems = <
|
DataController.Summary.DefaultGroupSummaryItems = <
|
||||||
|
|
@ -473,6 +472,18 @@ object frmWarpRollerCklist: TfrmWarpRollerCklist
|
||||||
HeaderAlignmentHorz = taCenter
|
HeaderAlignmentHorz = taCenter
|
||||||
Width = 68
|
Width = 68
|
||||||
end
|
end
|
||||||
|
object Tv1Column16: TcxGridDBColumn
|
||||||
|
Caption = #26159#21542#25171#21360
|
||||||
|
DataBinding.FieldName = 'DYFlag'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 89
|
||||||
|
end
|
||||||
|
object Tv1Column15: TcxGridDBColumn
|
||||||
|
Caption = #22791#27880
|
||||||
|
DataBinding.FieldName = 'Note'
|
||||||
|
HeaderAlignmentHorz = taCenter
|
||||||
|
Width = 81
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object cxGrid1Level1: TcxGridLevel
|
object cxGrid1Level1: TcxGridLevel
|
||||||
GridView = Tv1
|
GridView = Tv1
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,8 @@ type
|
||||||
Tv1Column14: TcxGridDBColumn;
|
Tv1Column14: TcxGridDBColumn;
|
||||||
ToolButton1: TToolButton;
|
ToolButton1: TToolButton;
|
||||||
CDS_Print: TClientDataSet;
|
CDS_Print: TClientDataSet;
|
||||||
|
Tv1Column15: TcxGridDBColumn;
|
||||||
|
Tv1Column16: TcxGridDBColumn;
|
||||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure TBAddClick(Sender: TObject);
|
procedure TBAddClick(Sender: TObject);
|
||||||
|
|
@ -119,6 +121,9 @@ type
|
||||||
procedure N1Click(Sender: TObject);
|
procedure N1Click(Sender: TObject);
|
||||||
procedure N2Click(Sender: TObject);
|
procedure N2Click(Sender: TObject);
|
||||||
procedure ToolButton1Click(Sender: TObject);
|
procedure ToolButton1Click(Sender: TObject);
|
||||||
|
procedure Tv1CustomDrawCell(Sender: TcxCustomGridTableView;
|
||||||
|
ACanvas: TcxCanvas; AViewInfo: TcxGridTableDataCellViewInfo;
|
||||||
|
var ADone: Boolean);
|
||||||
private
|
private
|
||||||
procedure InitGrid();
|
procedure InitGrid();
|
||||||
procedure InitForm();
|
procedure InitForm();
|
||||||
|
|
@ -141,6 +146,7 @@ procedure TfrmWarpRollerCklist.InitForm();
|
||||||
var
|
var
|
||||||
fsj: string;
|
fsj: string;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
readCxGrid(self.Caption + 'TV1', Tv1, '仓储管理');
|
readCxGrid(self.Caption + 'TV1', Tv1, '仓储管理');
|
||||||
fsj := 'select distinct(CRType) name from CK_WarpBeam_CR where CRFlag=''出库'' ';
|
fsj := 'select distinct(CRType) name from CK_WarpBeam_CR where CRFlag=''出库'' ';
|
||||||
SInitComBoxBySql(ADOQueryCmd, CRType, False, fsj);
|
SInitComBoxBySql(ADOQueryCmd, CRType, False, fsj);
|
||||||
|
|
@ -195,6 +201,7 @@ begin
|
||||||
end;
|
end;
|
||||||
free;
|
free;
|
||||||
end;
|
end;
|
||||||
|
InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmWarpRollerCklist.OrderNoChange(Sender: TObject);
|
procedure TfrmWarpRollerCklist.OrderNoChange(Sender: TObject);
|
||||||
|
|
@ -350,6 +357,212 @@ begin
|
||||||
SelOKNo(CDS_Main, False);
|
SelOKNo(CDS_Main, False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
//procedure TfrmWarpRollerCklist.ToolButton1Click(Sender: TObject);
|
||||||
|
//var
|
||||||
|
// fPrintFile, Txt, fImagePath, JYRKIDSql: string;
|
||||||
|
// Moudle: THandle;
|
||||||
|
// Makebar: TMakebar;
|
||||||
|
// Mixtext: TMixtext;
|
||||||
|
// SelectedCount: Integer;
|
||||||
|
//begin
|
||||||
|
// if CDS_Main.IsEmpty then
|
||||||
|
// Exit;
|
||||||
|
//
|
||||||
|
// if CDS_Main.Locate('SSel', True, []) = False then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// SelectedCount := 0;
|
||||||
|
// JYRKIDSql := '';
|
||||||
|
// CDS_Main.DisableControls;
|
||||||
|
//
|
||||||
|
// try
|
||||||
|
// with CDS_Main do
|
||||||
|
// begin
|
||||||
|
// First;
|
||||||
|
// while Locate('SSel', True, [loCaseInsensitive]) do
|
||||||
|
// begin
|
||||||
|
// // 构建JZRKID的IN条件
|
||||||
|
// if JYRKIDSql <> '' then
|
||||||
|
// JYRKIDSql := JYRKIDSql + ',' + QuotedStr(Trim(FieldByName('JZRKID').AsString))
|
||||||
|
// else
|
||||||
|
// JYRKIDSql := ' and A.JZRKID in (' + QuotedStr(Trim(FieldByName('JZRKID').AsString));
|
||||||
|
//
|
||||||
|
// Inc(SelectedCount);
|
||||||
|
//
|
||||||
|
// Edit;
|
||||||
|
// FieldByName('SSel').Value := False;
|
||||||
|
// Post;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// finally
|
||||||
|
// CDS_Main.EnableControls;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// if JYRKIDSql <> '' then
|
||||||
|
// JYRKIDSql := JYRKIDSql + ')'
|
||||||
|
// else
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('未选择任何数据!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// // 执行查询
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// SQL.Clear;
|
||||||
|
//
|
||||||
|
// SQL.Add(' select A.* ,edzdfNo,edtKaNo,C_TouWen,ZJPiLen,C_ShangPai,C_PiE,C_Len,APMachineNo ,edZDFNo ');
|
||||||
|
// SQL.Add(',CarNo2=(SELECT MACHNO FROM BS_Machine k where k.machid= ');
|
||||||
|
// SQL.Add(' (SELECT top 1 CARNO FROM CK_YgCl E WHERE E.MJID=A.PCID AND CLTYPE=''上轴''))');
|
||||||
|
// SQL.Add(',P_CODE=(select TOP 1 P_CODE from PD_Plan_SUB e ');
|
||||||
|
// SQL.Add(' where e.SUBID=(select TOP 1 SUBID from PD_Plan_Card_MS f where f.pcid=A.pcid))');
|
||||||
|
// SQL.Add(',P_codeNAME=(select TOP 1 P_codeNAME from PD_Plan_SUB e ');
|
||||||
|
// SQL.Add(' where e.SUBID=(select TOP 1 SUBID from PD_Plan_Card_MS f where f.pcid=A.pcid))');
|
||||||
|
// SQL.Add(' from CK_WarpBeam_CR A LEFT JOIN PD_PLAN_cARD B ON A.PCID=B.PCID ');
|
||||||
|
// SQL.Add(' where A.CRFlag=''出库'' ');
|
||||||
|
// SQL.Add(JYRKIDSql);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Open;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// if ADOQueryCmd.IsEmpty then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('未找到对应的整经轴数据!', '提示信息', MB_ICONINFORMATION);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// SCreateCDS20(ADOQueryCmd, CDS_Print);
|
||||||
|
// SInitCDSData20(ADOQueryCmd, CDS_Print);
|
||||||
|
//
|
||||||
|
// with ADOQueryTmp do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// SQL.Clear;
|
||||||
|
// SQL.Add('UPDATE CK_WarpBeam_CR set DYFLAG=''已打印'' where JZRKID in (' + JYRKIDSql + ')');
|
||||||
|
// ExecSQL;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\经轴出库清单.rmf';
|
||||||
|
// ExportFtErpFile('经轴出库清单.rmf', ADOQueryTmp);
|
||||||
|
//
|
||||||
|
// if FileExists(fPrintFile) then
|
||||||
|
// begin
|
||||||
|
// RM1.LoadFromFile(fPrintFile);
|
||||||
|
// RM1.ShowReport;
|
||||||
|
// end
|
||||||
|
// else
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox(PChar('未找到报表文件:' + #13#10 + fPrintFile), '提示', MB_ICONWARNING);
|
||||||
|
// end;
|
||||||
|
//end;
|
||||||
|
//procedure TfrmWarpRollerCklist.ToolButton1Click(Sender: TObject);
|
||||||
|
//var
|
||||||
|
// fPrintFile, Txt, fImagePath, JYRKIDSql: string;
|
||||||
|
// Moudle: THandle;
|
||||||
|
// Makebar: TMakebar;
|
||||||
|
// Mixtext: TMixtext;
|
||||||
|
// SelectedCount: Integer;
|
||||||
|
//begin
|
||||||
|
// if CDS_Main.IsEmpty then
|
||||||
|
// Exit;
|
||||||
|
//
|
||||||
|
// if CDS_Main.Locate('SSel', True, []) = False then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// SelectedCount := 0;
|
||||||
|
// JYRKIDSql := '';
|
||||||
|
// CDS_Main.DisableControls;
|
||||||
|
//
|
||||||
|
// try
|
||||||
|
// CDS_Main.First;
|
||||||
|
// while not CDS_Main.Eof do
|
||||||
|
// begin
|
||||||
|
// if CDS_Main.FieldByName('SSel').AsBoolean then 中
|
||||||
|
// begin
|
||||||
|
// if JYRKIDSql = '' then
|
||||||
|
// JYRKIDSql := ' and A.JZRKID in (' + QuotedStr(Trim(CDS_Main.FieldByName('JZRKID').AsString))
|
||||||
|
// else
|
||||||
|
// JYRKIDSql := JYRKIDSql + ',' + QuotedStr(Trim(CDS_Main.FieldByName('JZRKID').AsString));
|
||||||
|
//
|
||||||
|
// Inc(SelectedCount);
|
||||||
|
// CDS_Main.Edit;
|
||||||
|
// CDS_Main.FieldByName('SSel').Value := False;
|
||||||
|
// CDS_Main.Post;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// CDS_Main.Next;
|
||||||
|
// end;
|
||||||
|
// if JYRKIDSql <> '' then
|
||||||
|
// JYRKIDSql := JYRKIDSql + ')';
|
||||||
|
//
|
||||||
|
// finally
|
||||||
|
// CDS_Main.EnableControls;
|
||||||
|
// end;
|
||||||
|
// if SelectedCount = 0 then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('未选择任何数据!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// SQL.Clear;
|
||||||
|
//
|
||||||
|
// SQL.Add(' select A.* ,edzdfNo,edtKaNo,C_TouWen,ZJPiLen,C_ShangPai,C_PiE,C_Len,APMachineNo ,edZDFNo ');
|
||||||
|
// SQL.Add(',CarNo2=(SELECT MACHNO FROM BS_Machine k where k.machid= ');
|
||||||
|
// SQL.Add(' (SELECT top 1 CARNO FROM CK_YgCl E WHERE E.MJID=A.PCID AND CLTYPE=''上轴''))');
|
||||||
|
// SQL.Add(',P_CODE=(select TOP 1 P_CODE from PD_Plan_SUB e ');
|
||||||
|
// SQL.Add(' where e.SUBID=(select TOP 1 SUBID from PD_Plan_Card_MS f where f.pcid=A.pcid))');
|
||||||
|
// SQL.Add(',P_codeNAME=(select TOP 1 P_codeNAME from PD_Plan_SUB e ');
|
||||||
|
// SQL.Add(' where e.SUBID=(select TOP 1 SUBID from PD_Plan_Card_MS f where f.pcid=A.pcid))');
|
||||||
|
// SQL.Add(' from CK_WarpBeam_CR A LEFT JOIN PD_PLAN_cARD B ON A.PCID=B.PCID ');
|
||||||
|
// SQL.Add(' where A.CRFlag=''出库'' ');
|
||||||
|
// SQL.Add(JYRKIDSql);
|
||||||
|
//
|
||||||
|
// Open;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// if ADOQueryCmd.IsEmpty then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('未找到对应的整经轴数据!', '提示信息', MB_ICONINFORMATION);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// SCreateCDS20(ADOQueryCmd, CDS_Print);
|
||||||
|
// SInitCDSData20(ADOQueryCmd, CDS_Print);
|
||||||
|
//
|
||||||
|
// with ADOQueryTmp do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// SQL.Clear;
|
||||||
|
// SQL.Add('UPDATE CK_WarpBeam_CR set DYFLAG=''已打印'' where JZRKID in (' +
|
||||||
|
// Copy(JYRKIDSql, Pos('(', JYRKIDSql) + 1, Length(JYRKIDSql)));
|
||||||
|
// ExecSQL;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\经轴出库清单.rmf';
|
||||||
|
// ExportFtErpFile('经轴出库清单.rmf', ADOQueryTmp);
|
||||||
|
//
|
||||||
|
// if FileExists(fPrintFile) then
|
||||||
|
// begin
|
||||||
|
// RM1.LoadFromFile(fPrintFile);
|
||||||
|
// RM1.ShowReport;
|
||||||
|
// end
|
||||||
|
// else
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox(PChar('未找到报表文件:' + #13#10 + fPrintFile), '提示', MB_ICONWARNING);
|
||||||
|
// end;
|
||||||
|
//end;
|
||||||
|
|
||||||
procedure TfrmWarpRollerCklist.ToolButton1Click(Sender: TObject);
|
procedure TfrmWarpRollerCklist.ToolButton1Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
fPrintFile, Txt, fImagePath, JYRKIDSql: string;
|
fPrintFile, Txt, fImagePath, JYRKIDSql: string;
|
||||||
|
|
@ -372,37 +585,38 @@ begin
|
||||||
CDS_Main.DisableControls;
|
CDS_Main.DisableControls;
|
||||||
|
|
||||||
try
|
try
|
||||||
with CDS_Main do
|
CDS_Main.First;
|
||||||
|
while not CDS_Main.Eof do
|
||||||
begin
|
begin
|
||||||
First;
|
if CDS_Main.FieldByName('SSel').AsBoolean then
|
||||||
while Locate('SSel', True, [loCaseInsensitive]) do
|
|
||||||
begin
|
begin
|
||||||
// 构建JZRKID的IN条件
|
if JYRKIDSql = '' then
|
||||||
if JYRKIDSql <> '' then
|
JYRKIDSql := ' and A.JZRKID in (' + QuotedStr(Trim(CDS_Main.FieldByName('JZRKID').AsString))
|
||||||
JYRKIDSql := JYRKIDSql + ',' + QuotedStr(Trim(FieldByName('JZRKID').AsString))
|
|
||||||
else
|
else
|
||||||
JYRKIDSql := ' and A.JZRKID in (' + QuotedStr(Trim(FieldByName('JZRKID').AsString));
|
JYRKIDSql := JYRKIDSql + ',' + QuotedStr(Trim(CDS_Main.FieldByName('JZRKID').AsString));
|
||||||
|
|
||||||
Inc(SelectedCount);
|
Inc(SelectedCount);
|
||||||
|
CDS_Main.Edit;
|
||||||
|
CDS_Main.FieldByName('SSel').Value := False;
|
||||||
|
CDS_Main.Post;
|
||||||
|
end;
|
||||||
|
|
||||||
Edit;
|
CDS_Main.Next;
|
||||||
FieldByName('SSel').Value := False;
|
|
||||||
Post;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if JYRKIDSql <> '' then
|
||||||
|
JYRKIDSql := JYRKIDSql + ')';
|
||||||
|
|
||||||
finally
|
finally
|
||||||
CDS_Main.EnableControls;
|
CDS_Main.EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if JYRKIDSql <> '' then
|
if SelectedCount = 0 then
|
||||||
JYRKIDSql := JYRKIDSql + ')'
|
|
||||||
else
|
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('未选择任何数据!', '提示', 0);
|
Application.MessageBox('未选择任何数据!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// 执行查询
|
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
|
|
@ -419,7 +633,6 @@ begin
|
||||||
SQL.Add(' where A.CRFlag=''出库'' ');
|
SQL.Add(' where A.CRFlag=''出库'' ');
|
||||||
SQL.Add(JYRKIDSql);
|
SQL.Add(JYRKIDSql);
|
||||||
|
|
||||||
|
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -432,6 +645,15 @@ begin
|
||||||
SCreateCDS20(ADOQueryCmd, CDS_Print);
|
SCreateCDS20(ADOQueryCmd, CDS_Print);
|
||||||
SInitCDSData20(ADOQueryCmd, CDS_Print);
|
SInitCDSData20(ADOQueryCmd, CDS_Print);
|
||||||
|
|
||||||
|
with ADOQueryTmp do
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
SQL.Clear;
|
||||||
|
SQL.Add('UPDATE CK_WarpBeam_CR set DYFLAG=''已打印'' where JZRKID in (' +
|
||||||
|
Copy(JYRKIDSql, Pos('(', JYRKIDSql) + 1, Length(JYRKIDSql)));
|
||||||
|
ExecSQL;
|
||||||
|
end;
|
||||||
|
|
||||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\经轴出库清单.rmf';
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\经轴出库清单.rmf';
|
||||||
ExportFtErpFile('经轴出库清单.rmf', ADOQueryTmp);
|
ExportFtErpFile('经轴出库清单.rmf', ADOQueryTmp);
|
||||||
|
|
||||||
|
|
@ -439,6 +661,9 @@ begin
|
||||||
begin
|
begin
|
||||||
RM1.LoadFromFile(fPrintFile);
|
RM1.LoadFromFile(fPrintFile);
|
||||||
RM1.ShowReport;
|
RM1.ShowReport;
|
||||||
|
|
||||||
|
InitGrid();
|
||||||
|
Application.MessageBox(PChar('成功打印 ' + IntToStr(SelectedCount) + ' 条记录!'), '提示', MB_ICONINFORMATION);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
|
@ -446,5 +671,13 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrmWarpRollerCklist.Tv1CustomDrawCell(
|
||||||
|
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||||
|
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
begin
|
||||||
|
if '已打印' = AViewInfo.GridRecord.Values[Tv1Column16.Index] then
|
||||||
|
ACanvas.Brush.Color := $0080FF80;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
object frmWarpRollerkCList: TfrmWarpRollerkCList
|
object frmWarpRollerkCList: TfrmWarpRollerkCList
|
||||||
Left = 366
|
Left = 246
|
||||||
Top = 268
|
Top = 181
|
||||||
Width = 1290
|
Width = 1290
|
||||||
Height = 643
|
Height = 643
|
||||||
Caption = #32463#36724#24211#23384
|
Caption = #32463#36724#24211#23384
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user