1
This commit is contained in:
parent
298ffe5dca
commit
a68893445e
|
|
@ -1,6 +1,6 @@
|
|||
object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
||||
Left = 309
|
||||
Top = 334
|
||||
Left = 316
|
||||
Top = 303
|
||||
Width = 1621
|
||||
Height = 863
|
||||
Caption = #25104#21697#20986#24211#21015#34920
|
||||
|
|
@ -62,44 +62,50 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
ImageIndex = 4
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object ComboBox1: TComboBox
|
||||
object Panel4: TPanel
|
||||
Left = 317
|
||||
Top = 1
|
||||
Width = 128
|
||||
Height = 27
|
||||
Style = csDropDownList
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = [fsBold]
|
||||
ItemHeight = 19
|
||||
ItemIndex = 0
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Text = #25104#21697#20986#24211#21333
|
||||
Items.Strings = (
|
||||
#25104#21697#20986#24211#21333
|
||||
#25104#21697#20986#24211#27719#24635#21333)
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 445
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
Width = 259
|
||||
Height = 30
|
||||
BevelInner = bvRaised
|
||||
BevelOuter = bvLowered
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label12: TLabel
|
||||
Left = 3
|
||||
Top = 7
|
||||
Width = 80
|
||||
Height = 19
|
||||
Caption = #30721#21333#21517#31216
|
||||
end
|
||||
object MDName: TBtnEditA
|
||||
Left = 89
|
||||
Top = 1
|
||||
Width = 164
|
||||
Height = 28
|
||||
ReadOnly = True
|
||||
TabOrder = 0
|
||||
OnBtnClick = MDNameBtnClick
|
||||
end
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 524
|
||||
Left = 576
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26085#24535
|
||||
ImageIndex = 22
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object TBExport: TToolButton
|
||||
Left = 655
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #23548#20986
|
||||
ImageIndex = 68
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 603
|
||||
Left = 734
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
|
|
@ -265,7 +271,7 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
Left = 518
|
||||
Top = 8
|
||||
Width = 90
|
||||
Height = 30
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
|
|
@ -310,7 +316,7 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
Left = 326
|
||||
Top = 36
|
||||
Width = 90
|
||||
Height = 30
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
|
|
@ -325,7 +331,7 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
Left = 667
|
||||
Top = 36
|
||||
Width = 90
|
||||
Height = 30
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
|
|
@ -340,7 +346,7 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
Left = 326
|
||||
Top = 8
|
||||
Width = 90
|
||||
Height = 30
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
|
|
@ -377,7 +383,7 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
Left = 1017
|
||||
Top = 8
|
||||
Width = 80
|
||||
Height = 30
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
|
|
@ -455,7 +461,7 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
Left = 667
|
||||
Top = 8
|
||||
Width = 90
|
||||
Height = 30
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
|
|
@ -470,7 +476,7 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
Left = 518
|
||||
Top = 36
|
||||
Width = 90
|
||||
Height = 30
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
|
|
@ -485,7 +491,7 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
Left = 1017
|
||||
Top = 36
|
||||
Width = 80
|
||||
Height = 30
|
||||
Height = 27
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -19
|
||||
|
|
@ -831,34 +837,34 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
Connection = DataLink_FinishedClothWarehouse.ADOLink
|
||||
CommandTimeout = 600
|
||||
Parameters = <>
|
||||
Left = 1124
|
||||
Top = 64
|
||||
Left = 628
|
||||
Top = 309
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_FinishedClothWarehouse.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 1148
|
||||
Top = 40
|
||||
Left = 710
|
||||
Top = 309
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_FinishedClothWarehouse.ADOLink
|
||||
LockType = ltReadOnly
|
||||
CommandTimeout = 6000
|
||||
Parameters = <>
|
||||
Left = 1188
|
||||
Top = 40
|
||||
Left = 338
|
||||
Top = 253
|
||||
end
|
||||
object DataSource1: TDataSource
|
||||
DataSet = CDS_Main
|
||||
Left = 872
|
||||
Top = 200
|
||||
Left = 874
|
||||
Top = 371
|
||||
end
|
||||
object CDS_Main: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 656
|
||||
Top = 224
|
||||
Left = 628
|
||||
Top = 371
|
||||
end
|
||||
object RMXLSExport1: TRMXLSExport
|
||||
ShowAfterExport = True
|
||||
|
|
@ -871,12 +877,12 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
ScaleX = 1.000000000000000000
|
||||
ScaleY = 1.000000000000000000
|
||||
CompressFile = False
|
||||
Left = 408
|
||||
Top = 264
|
||||
Left = 628
|
||||
Top = 495
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Left = 304
|
||||
Top = 264
|
||||
Left = 628
|
||||
Top = 433
|
||||
object N1: TMenuItem
|
||||
Caption = #20840#36873
|
||||
OnClick = N1Click
|
||||
|
|
@ -887,41 +893,41 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
end
|
||||
end
|
||||
object DS_JuanPRT: TDataSource
|
||||
Left = 360
|
||||
Top = 384
|
||||
Left = 956
|
||||
Top = 371
|
||||
end
|
||||
object cxGridPopupMenu2: TcxGridPopupMenu
|
||||
Grid = cxGrid2
|
||||
PopupMenus = <>
|
||||
Left = 352
|
||||
Top = 304
|
||||
Left = 792
|
||||
Top = 371
|
||||
end
|
||||
object ADOQueryPrint: TADOQuery
|
||||
Connection = DataLink_FinishedClothWarehouse.ADOLink
|
||||
CommandTimeout = 600
|
||||
Parameters = <>
|
||||
Left = 1180
|
||||
Top = 77
|
||||
Left = 792
|
||||
Top = 309
|
||||
end
|
||||
object RMDB_Main: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ADOQueryPrint
|
||||
Left = 696
|
||||
Top = 392
|
||||
Left = 874
|
||||
Top = 433
|
||||
end
|
||||
object RMDBHZ: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_HZ
|
||||
Left = 432
|
||||
Top = 512
|
||||
DataSet = ADOQueryPrint
|
||||
Left = 710
|
||||
Top = 433
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 400
|
||||
Top = 516
|
||||
Left = 956
|
||||
Top = 309
|
||||
end
|
||||
object RM3: TRMGridReport
|
||||
object RM1: TRMGridReport
|
||||
ThreadPrepareReport = True
|
||||
InitialZoom = pzDefault
|
||||
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbPageSetup, pbExit, pbSaveToXLS, pbExport, pbNavigator]
|
||||
|
|
@ -937,20 +943,47 @@ object frmCKProductBCPOutList: TfrmCKProductBCPOutList
|
|||
CompressThread = False
|
||||
LaterBuildEvents = True
|
||||
OnlyOwnerDataSet = False
|
||||
Left = 468
|
||||
Top = 444
|
||||
Left = 956
|
||||
Top = 433
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBPRT: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_PRT
|
||||
Left = 440
|
||||
Top = 444
|
||||
Left = 792
|
||||
Top = 433
|
||||
end
|
||||
object CDS_PRT: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 396
|
||||
Top = 448
|
||||
Left = 710
|
||||
Top = 371
|
||||
end
|
||||
object ADOQuery1: TADOQuery
|
||||
Connection = DataLink_FinishedClothWarehouse.ADOLink
|
||||
CommandTimeout = 600
|
||||
Parameters = <>
|
||||
Left = 344
|
||||
Top = 429
|
||||
end
|
||||
object ADOQuery2: TADOQuery
|
||||
Connection = DataLink_FinishedClothWarehouse.ADOLink
|
||||
CommandTimeout = 600
|
||||
Parameters = <>
|
||||
Left = 368
|
||||
Top = 325
|
||||
end
|
||||
object ADOQueryPrint1: TADOQuery
|
||||
Connection = DataLink_FinishedClothWarehouse.ADOLink
|
||||
CommandTimeout = 600
|
||||
Parameters = <>
|
||||
Left = 384
|
||||
Top = 533
|
||||
end
|
||||
object RMDBHZ1: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = ADOQueryPrint1
|
||||
Left = 432
|
||||
Top = 536
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -14,18 +14,17 @@ uses
|
|||
Clipbrd, cxLookAndFeels, cxLookAndFeelPainters, 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;
|
||||
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, BtnEdit;
|
||||
|
||||
type
|
||||
TfrmCKProductBCPOutList = class(TForm)
|
||||
|
|
@ -91,7 +90,7 @@ type
|
|||
v1rkplace: TcxGridDBColumn;
|
||||
RMDBHZ: TRMDBDataSet;
|
||||
CDS_HZ: TClientDataSet;
|
||||
RM3: TRMGridReport;
|
||||
RM1: TRMGridReport;
|
||||
RMDBPRT: TRMDBDataSet;
|
||||
CDS_PRT: TClientDataSet;
|
||||
Label22: TLabel;
|
||||
|
|
@ -108,12 +107,18 @@ type
|
|||
ganghao: TEdit;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
ComboBox1: TComboBox;
|
||||
LBCPAP: TLabel;
|
||||
Label1: TLabel;
|
||||
v1Column13: TcxGridDBColumn;
|
||||
Label8: TLabel;
|
||||
MLConNo: TEdit;
|
||||
Panel4: TPanel;
|
||||
Label12: TLabel;
|
||||
MDName: TBtnEditA;
|
||||
ADOQuery1: TADOQuery;
|
||||
ADOQuery2: TADOQuery;
|
||||
ADOQueryPrint1: TADOQuery;
|
||||
RMDBHZ1: TRMDBDataSet;
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TBRafreshClick(Sender: TObject);
|
||||
|
|
@ -135,6 +140,7 @@ type
|
|||
procedure edtSMNOKeyPress(Sender: TObject; var Key: Char);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure MDNameBtnClick(Sender: TObject);
|
||||
private
|
||||
FLeft, FTop: Integer;
|
||||
CurrentPage, RecordsNumber: Integer;
|
||||
|
|
@ -151,7 +157,7 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
U_DataLink, U_RTFun, U_SysLogHelp, U_Fun;
|
||||
U_DataLink, U_RTFun, U_SysLogHelp, U_Fun, U_ZDYHelp;
|
||||
|
||||
|
||||
{$R *.dfm}
|
||||
|
|
@ -452,47 +458,172 @@ end;
|
|||
|
||||
procedure TfrmCKProductBCPOutList.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile, fPrintFile10, FMainID, FKHName, FFPNo: string;
|
||||
fPrintFile, FCKNO: string;
|
||||
begin
|
||||
ExportFtErpFile(trim(ComboBox1.Text) + '.rmf', ADOQueryTemp);
|
||||
if trim(ComboBox1.Text) = '成品出库单' then
|
||||
if CDS_Main.IsEmpty then
|
||||
Exit;
|
||||
{ if CustomerNoName.Text = '' then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMDWSQ1 ');
|
||||
sql.add('@CKOrdNo=' + quotedstr(Trim(Trim(CDS_Main.fieldbyname('CKOrdNo').AsString))));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||
end;
|
||||
if trim(ComboBox1.Text) = '成品出库汇总单' then
|
||||
application.MessageBox('查询条件客户不能为空', '提示');
|
||||
exit;
|
||||
end; }
|
||||
if CDS_Main.Locate('ssel', True, []) = false then
|
||||
begin
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMDWSQ2 ');
|
||||
sql.add('@CKOrdNo=' + quotedstr(Trim(Trim(CDS_Main.fieldbyname('CKOrdNo').AsString))));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||
application.MessageBox('没有选择数据', '提示');
|
||||
exit;
|
||||
end;
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(ComboBox1.Text) + '.rmf';
|
||||
if Trim(MDName.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox('码单名称不能为空!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete TBSubID where DName=''' + Trim(DCode) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
{if CheckBox1.Checked=False then
|
||||
begin
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\销售码单新.rmf';
|
||||
end else
|
||||
begin
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\销售码单新无单价.rmf';
|
||||
end; }
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\' + Trim(MDName.Text) + '.rmf';
|
||||
|
||||
RMXLSExport1 := TRMXLSExport.Create(RMXLSExport1);
|
||||
FCKNO := '';
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete TbForBatch where DName=' + quotedstr(Trim(DName)));
|
||||
SQL.Add('and MainType=' + quotedstr('样品码单'));
|
||||
ExecSQL;
|
||||
end;
|
||||
with CDS_Main do
|
||||
begin
|
||||
first;
|
||||
while not Eof do
|
||||
begin
|
||||
if FieldByName('Ssel').AsBoolean = true then
|
||||
begin
|
||||
if Trim(FCKNO) = '' then
|
||||
begin
|
||||
FCKNO := Trim(CDS_Main.fieldbyname('CKOrdNo').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
if FCKNO <> Trim(CDS_Main.fieldbyname('CKOrdNo').AsString) then
|
||||
begin
|
||||
if Trim(CDS_Main.fieldbyname('FeeName').AsString) <> '单面料' then
|
||||
begin
|
||||
Application.MessageBox('不能选择不同出库单号!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
Filtered := False;
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(' select distinct D.MJID');
|
||||
// sql.Add(' from CK_YCL_CR A ');
|
||||
sql.Add(' from CK_MLCP_CR D ');
|
||||
// sql.Add(' inner join CK_YCL_CR_Main B on A.SMID=B.SMID ');
|
||||
// sql.Add(' left join CK_MLCP_CR D on D.CKOrdNo=B.CKNo');
|
||||
// sql.add(' where B.CKNO=''' + Trim(FCKNO) + '''');
|
||||
sql.add(' where D.CKOrdNo=''' + Trim(FCKNO) + '''');
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('SELECT * FROM TBSubID where 1=2 ');
|
||||
open;
|
||||
end;
|
||||
with ADOQuery1 do
|
||||
begin
|
||||
first;
|
||||
while not eof do
|
||||
begin
|
||||
ADOQueryCmd.append;
|
||||
ADOQueryCmd.fieldbyname('SubId').Value := Trim(ADOQuery1.fieldbyname('MJID').AsString);
|
||||
ADOQueryCmd.fieldbyname('Dname').Value := Trim(DCode);
|
||||
ADOQueryCmd.post;
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
|
||||
// if Trim(CDS_Main.fieldbyname('FeeName').AsString) = '单面料' then
|
||||
// begin
|
||||
// with ADOQuery2 do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// sql.Add(' insert into TbForBatch(DName,MainType,Value1,Filltime) ');
|
||||
// sql.Add(' values( ' + quotedstr(Trim(DName)) + ',' + quotedstr('样品码单') + ',' + quotedstr(Trim(CDS_Main.fieldbyname('SPID').AsString)) + ',getdate()' + ')');
|
||||
// ExecSQL;
|
||||
// end;
|
||||
// end;
|
||||
end;
|
||||
next;
|
||||
end;
|
||||
end;
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMD4 ');
|
||||
sql.add('@mainID=' + quotedstr(Trim('')));
|
||||
sql.add(',@DName=' + quotedstr(Trim(DCode)));
|
||||
sql.add(',@CKOrdNO=' + quotedstr(Trim(FCKNO)));
|
||||
// ShowMessage(SQL.Text);
|
||||
Open;
|
||||
end;
|
||||
with ADOQueryPrint1 do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMD7 ');
|
||||
sql.add('@DName=' + quotedstr(Trim(DName)));
|
||||
Open;
|
||||
end;
|
||||
// SCreateCDS20(ADOQueryTemp, CDS_PRT);
|
||||
// SInitCDSData20(ADOQueryTemp, CDS_PRT);
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM3.LoadFromFile(fPrintFile);
|
||||
RMVariables['Filler'] := trim(DName);
|
||||
RM3.ShowReport;
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RMVariables['ZJJE'] := ADOQueryPrint.FIELDBYNAME('sumMoney').ASFLOAT + ADOQueryPrint1.FIELDBYNAME('MoneyHZ').ASFLOAT;
|
||||
RMVariables['ZJQty'] := ADOQueryPrint.FIELDBYNAME('sumQty').ASFLOAT + ADOQueryPrint1.FIELDBYNAME('QtyHZ').ASFLOAT;
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找到' + fPrintFile), '提示', 0);
|
||||
Application.MessageBox(PChar('没有找' + ExtractFilePath(Application.ExeName) + 'Report\销售码单新.rmf'), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmCKProductBCPOutList.MDNameBtnClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
frmZDYHelp := TfrmZDYHelp.Create(Application);
|
||||
with frmZDYHelp do
|
||||
begin
|
||||
flag := 'MDName';
|
||||
flagname := '码单名称';
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
Self.MDName.Text := Trim(frmZDYHelp.ClientDataSet1.fieldbyname('ZdyName').AsString);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
frmZDYHelp.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,18 +67,23 @@ begin
|
|||
SetLength(dtbase, 255);
|
||||
SetLength(user, 255);
|
||||
SetLength(pswd, 255);
|
||||
|
||||
server := '106.14.113.234,7781';
|
||||
if Trim(DataBaseStr) = '' then
|
||||
begin
|
||||
server := '106.14.113.234,7781';
|
||||
// server := '.';
|
||||
dtbase := 'yunxiangdata';
|
||||
user := 'sa';
|
||||
pswd := 'rightsoft@123';
|
||||
dtbase := 'yunxiangdata';
|
||||
user := 'sa';
|
||||
pswd := 'rightsoft@123';
|
||||
// pswd := 'rightsoft';
|
||||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||
DConString := DataBaseStr;
|
||||
// DName:='ÖܸßÏé';
|
||||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||
|
||||
// DName:='ÖܸßÏé';
|
||||
//DParameters1:='高权限';
|
||||
end
|
||||
else
|
||||
begin
|
||||
DConString := DataBaseStr;
|
||||
end;
|
||||
|
||||
if not ConnData() then
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -20,12 +20,12 @@ object frmZDYHelp: TfrmZDYHelp
|
|||
object cxGrid1: TcxGrid
|
||||
Left = 0
|
||||
Top = 73
|
||||
Width = 449
|
||||
Height = 416
|
||||
Width = 457
|
||||
Height = 424
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object TV1: TcxGridDBTableView
|
||||
NavigatorButtons.ConfirmDelete = False
|
||||
Navigator.Buttons.CustomButtons = <>
|
||||
OnCellDblClick = TV1CellDblClick
|
||||
DataController.DataSource = DataSource1
|
||||
DataController.Summary.DefaultGroupSummaryItems = <>
|
||||
|
|
@ -134,7 +134,7 @@ object frmZDYHelp: TfrmZDYHelp
|
|||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 449
|
||||
Width = 457
|
||||
Height = 29
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 59
|
||||
|
|
@ -145,7 +145,7 @@ object frmZDYHelp: TfrmZDYHelp
|
|||
Font.Height = -12
|
||||
Font.Name = #23435#20307
|
||||
Font.Style = []
|
||||
Images = DataLink_PBMDDJ.ThreeImgList
|
||||
Images = DataLink_FinishedClothWarehouse.ThreeImgList
|
||||
List = True
|
||||
ParentFont = False
|
||||
ShowCaptions = True
|
||||
|
|
@ -197,7 +197,7 @@ object frmZDYHelp: TfrmZDYHelp
|
|||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 449
|
||||
Width = 457
|
||||
Height = 44
|
||||
Align = alTop
|
||||
BevelInner = bvRaised
|
||||
|
|
@ -236,21 +236,21 @@ object frmZDYHelp: TfrmZDYHelp
|
|||
end
|
||||
end
|
||||
object ADOQueryMain: TADOQuery
|
||||
Connection = DataLink_PBMDDJ.ADOLink
|
||||
Connection = DataLink_FinishedClothWarehouse.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 48
|
||||
Top = 136
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_PBMDDJ.ADOLink
|
||||
Connection = DataLink_FinishedClothWarehouse.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 80
|
||||
Top = 144
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_PBMDDJ.ADOLink
|
||||
Connection = DataLink_FinishedClothWarehouse.ADOLink
|
||||
Parameters = <>
|
||||
Left = 112
|
||||
Top = 152
|
||||
|
|
|
|||
|
|
@ -9,7 +9,22 @@ uses
|
|||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||||
cxClasses, cxControls, cxGridCustomView, cxGrid, DBClient, ADODB, ImgList,
|
||||
StdCtrls, ExtCtrls, cxTextEdit, cxGridCustomPopupMenu, cxGridPopupMenu,
|
||||
cxTimeEdit;
|
||||
cxTimeEdit, 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
|
||||
TfrmZDYHelp = class(TForm)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user