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