fugong
This commit is contained in:
parent
6f219d26d4
commit
c7a02def1c
|
|
@ -1,6 +1,6 @@
|
||||||
object frmShaOutList: TfrmShaOutList
|
object frmShaOutList: TfrmShaOutList
|
||||||
Left = 245
|
Left = 219
|
||||||
Top = 178
|
Top = 147
|
||||||
Width = 1356
|
Width = 1356
|
||||||
Height = 884
|
Height = 884
|
||||||
Caption = #32433#32447#20986#24211#21015#34920
|
Caption = #32433#32447#20986#24211#21015#34920
|
||||||
|
|
@ -649,7 +649,7 @@ object frmShaOutList: TfrmShaOutList
|
||||||
end
|
end
|
||||||
object RMDBMain: TRMDBDataSet
|
object RMDBMain: TRMDBDataSet
|
||||||
Visible = True
|
Visible = True
|
||||||
DataSet = CDS_Main
|
DataSet = CDS_PRT
|
||||||
Left = 424
|
Left = 424
|
||||||
Top = 232
|
Top = 232
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,7 @@ end;
|
||||||
procedure TfrmShaOutList.TBCloseClick(Sender: TObject);
|
procedure TfrmShaOutList.TBCloseClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
WriteCxGrid('纱线出库列表121', Tv1, '纱线仓库');
|
WriteCxGrid('纱线出库列表121', Tv1, '纱线仓库');
|
||||||
|
//ReadCxGrid('纱线出库列表121', Tv1, '纱线仓库');
|
||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -231,7 +232,7 @@ begin
|
||||||
TBEdit.Visible := False;
|
TBEdit.Visible := False;
|
||||||
cxTabControl1.Visible := False;
|
cxTabControl1.Visible := False;
|
||||||
end;
|
end;
|
||||||
//ReadCxGrid('纱线出库列表121', Tv1, '纱线仓库');
|
ReadCxGrid('纱线出库列表121', Tv1, '纱线仓库');
|
||||||
if Trim(FFY_ID) <> '' then
|
if Trim(FFY_ID) <> '' then
|
||||||
begin
|
begin
|
||||||
TBAdd.Visible := False;
|
TBAdd.Visible := False;
|
||||||
|
|
@ -661,6 +662,101 @@ end;
|
||||||
// end;
|
// end;
|
||||||
//end;
|
//end;
|
||||||
|
|
||||||
|
//procedure TfrmShaOutList.ToolButton1Click(Sender: TObject);
|
||||||
|
//var
|
||||||
|
// fPrintFile, Txt, fImagePath, YIDSql: string;
|
||||||
|
// Moudle: THandle;
|
||||||
|
// Makebar: TMakebar;
|
||||||
|
// Mixtext: TMixtext;
|
||||||
|
// SelectedCount: Integer;
|
||||||
|
//begin
|
||||||
|
// if CDS_Main.IsEmpty then
|
||||||
|
// Exit;
|
||||||
|
//
|
||||||
|
// if CDS_Main.Locate('SSel', True, []) = False then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('没有选择数据!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// SelectedCount := 0;
|
||||||
|
// YIDSql := '';
|
||||||
|
// CDS_Main.DisableControls;
|
||||||
|
//
|
||||||
|
// try
|
||||||
|
// with CDS_Main do
|
||||||
|
// begin
|
||||||
|
// First;
|
||||||
|
// //while Locate('SSel', True, [loCaseInsensitive]) do
|
||||||
|
// while Locate('SSel', True, []) do
|
||||||
|
// begin
|
||||||
|
// // 构建Y_ID的IN条件
|
||||||
|
// if YIDSql <> '' then
|
||||||
|
// YIDSql := YIDSql + ',' + QuotedStr(Trim(FieldByName('Y_ID').AsString))
|
||||||
|
// else
|
||||||
|
// YIDSql := QuotedStr(Trim(FieldByName('Y_ID').AsString));
|
||||||
|
//
|
||||||
|
// Inc(SelectedCount);
|
||||||
|
//
|
||||||
|
// Edit;
|
||||||
|
// FieldByName('SSel').Value := False;
|
||||||
|
// Post;
|
||||||
|
// end;
|
||||||
|
// end;
|
||||||
|
// finally
|
||||||
|
// CDS_Main.EnableControls;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// if YIDSql = '' then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('未选择任何数据!', '提示', 0);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// with ADOQueryCmd do
|
||||||
|
// begin
|
||||||
|
// Close;
|
||||||
|
// SQL.Clear;
|
||||||
|
//
|
||||||
|
// sql.Add(' select A.* ');
|
||||||
|
// sql.Add(' from CK_Yarn_CR A');
|
||||||
|
// sql.Add(' where isnull(CKName,'''')=''纱线''');
|
||||||
|
// SQL.Add(' and CRFlag=''出库''');
|
||||||
|
//
|
||||||
|
// // 添加日期范围条件(根据您的需求可选)
|
||||||
|
// // sql.Add(' and A.CRTime>=''' + FormatDateTime('yyyy-MM-dd', begdate.Date) + '''');
|
||||||
|
// // sql.Add(' and A.CRTime<''' + FormatDateTime('yyyy-MM-dd', enddate.Date + 1) + '''');
|
||||||
|
//
|
||||||
|
// // 添加勾选数据条件
|
||||||
|
// SQL.Add(' and A.Y_ID in (' + YIDSql + ')');
|
||||||
|
//
|
||||||
|
// SQL.Add(' order by CRTime desc');
|
||||||
|
// Open;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// if ADOQueryCmd.IsEmpty then
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox('未找到对应的纱线出库数据!', '提示信息', MB_ICONINFORMATION);
|
||||||
|
// Exit;
|
||||||
|
// end;
|
||||||
|
//
|
||||||
|
// SCreateCDS20(ADOQueryCmd, CDS_PRT); // 使用CDS_PRT而不是CDS_Main
|
||||||
|
// SInitCDSData20(ADOQueryCmd, CDS_PRT);
|
||||||
|
//
|
||||||
|
// fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\纱线出库报表.rmf';
|
||||||
|
// ExportFtErpFile('纱线出库报表.rmf', ADOQueryTemp);
|
||||||
|
//
|
||||||
|
// if FileExists(fPrintFile) then
|
||||||
|
// begin
|
||||||
|
// RM1.LoadFromFile(fPrintFile);
|
||||||
|
// RM1.ShowReport;
|
||||||
|
// end
|
||||||
|
// else
|
||||||
|
// begin
|
||||||
|
// Application.MessageBox(PChar('未找到报表文件:' + #13#10 + fPrintFile), '提示', MB_ICONWARNING);
|
||||||
|
// end;
|
||||||
|
//end;
|
||||||
|
|
||||||
procedure TfrmShaOutList.ToolButton1Click(Sender: TObject);
|
procedure TfrmShaOutList.ToolButton1Click(Sender: TObject);
|
||||||
var
|
var
|
||||||
fPrintFile, Txt, fImagePath, YIDSql: string;
|
fPrintFile, Txt, fImagePath, YIDSql: string;
|
||||||
|
|
@ -686,31 +782,36 @@ begin
|
||||||
with CDS_Main do
|
with CDS_Main do
|
||||||
begin
|
begin
|
||||||
First;
|
First;
|
||||||
while Locate('SSel', True, [loCaseInsensitive]) do
|
while not Eof do
|
||||||
begin
|
begin
|
||||||
// 构建Y_ID的IN条件
|
if FieldByName('SSel').AsBoolean then
|
||||||
if YIDSql <> '' then
|
begin
|
||||||
YIDSql := YIDSql + ',' + QuotedStr(Trim(FieldByName('Y_ID').AsString))
|
if YIDSql <> '' then
|
||||||
else
|
YIDSql := YIDSql + ',' + QuotedStr(Trim(FieldByName('Y_ID').AsString))
|
||||||
YIDSql := QuotedStr(Trim(FieldByName('Y_ID').AsString));
|
else
|
||||||
|
YIDSql := QuotedStr(Trim(FieldByName('Y_ID').AsString));
|
||||||
Inc(SelectedCount);
|
|
||||||
|
Inc(SelectedCount);
|
||||||
Edit;
|
end;
|
||||||
FieldByName('SSel').Value := False;
|
Next;
|
||||||
Post;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
CDS_Main.EnableControls;
|
CDS_Main.EnableControls;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if YIDSql = '' then
|
if YIDSql = '' then
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('未选择任何数据!', '提示', 0);
|
Application.MessageBox('未选择任何数据!', '提示', 0);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if SelectedCount = 0 then
|
||||||
|
begin
|
||||||
|
Application.MessageBox('未选择任何数据!', '提示', 0);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
with ADOQueryCmd do
|
with ADOQueryCmd do
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
|
|
@ -720,15 +821,11 @@ begin
|
||||||
sql.Add(' from CK_Yarn_CR A');
|
sql.Add(' from CK_Yarn_CR A');
|
||||||
sql.Add(' where isnull(CKName,'''')=''纱线''');
|
sql.Add(' where isnull(CKName,'''')=''纱线''');
|
||||||
SQL.Add(' and CRFlag=''出库''');
|
SQL.Add(' and CRFlag=''出库''');
|
||||||
|
|
||||||
// 添加日期范围条件(根据您的需求可选)
|
|
||||||
// sql.Add(' and A.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(' and A.Y_ID in (' + YIDSql + ')');
|
||||||
|
|
||||||
SQL.Add(' order by CRTime desc');
|
SQL.Add(' order by CRTime desc');
|
||||||
|
//ShowMessage(sql.text);
|
||||||
Open;
|
Open;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
@ -738,21 +835,24 @@ begin
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
SCreateCDS20(ADOQueryCmd, CDS_PRT); // 使用CDS_PRT而不是CDS_Main
|
SCreateCDS20(ADOQueryCmd, CDS_PRT);
|
||||||
SInitCDSData20(ADOQueryCmd, CDS_PRT);
|
SInitCDSData20(ADOQueryCmd, CDS_PRT);
|
||||||
|
|
||||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\纱线出库报表.rmf';
|
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\纱线出库报表.rmf';
|
||||||
ExportFtErpFile('纱线出库报表.rmf', ADOQueryTemp);
|
|
||||||
|
|
||||||
|
|
||||||
if FileExists(fPrintFile) then
|
if FileExists(fPrintFile) then
|
||||||
begin
|
begin
|
||||||
RM1.LoadFromFile(fPrintFile);
|
RM1.LoadFromFile(fPrintFile);
|
||||||
|
|
||||||
|
|
||||||
RM1.ShowReport;
|
RM1.ShowReport;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
Application.MessageBox(PChar('未找到报表文件:' + #13#10 + fPrintFile), '提示', MB_ICONWARNING);
|
Application.MessageBox(PChar('未找到报表文件:' + #13#10 + fPrintFile), '提示', MB_ICONWARNING);
|
||||||
end;
|
end;
|
||||||
|
InitGrid();
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
object frmShaRKList: TfrmShaRKList
|
object frmShaRKList: TfrmShaRKList
|
||||||
Left = 646
|
Left = 429
|
||||||
Top = 283
|
Top = 403
|
||||||
Width = 1396
|
Width = 1396
|
||||||
Height = 649
|
Height = 668
|
||||||
Caption = #32433#32447#20837#24211#21015#34920
|
Caption = #32433#32447#20837#24211#21015#34920
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = GB2312_CHARSET
|
Font.Charset = GB2312_CHARSET
|
||||||
|
|
@ -308,7 +308,7 @@ object frmShaRKList: TfrmShaRKList
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 125
|
Top = 125
|
||||||
Width = 1380
|
Width = 1380
|
||||||
Height = 485
|
Height = 504
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object Tv1: TcxGridDBTableView
|
object Tv1: TcxGridDBTableView
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user