~
This commit is contained in:
parent
1d34518150
commit
3dfa897b34
|
@ -110,7 +110,7 @@ begin
|
|||
mborderstyle := bsSizeable;
|
||||
end;
|
||||
////////////////////
|
||||
/////////////////////
|
||||
/////////////////////
|
||||
//调用子模块窗口
|
||||
case FormID of
|
||||
201: //生产指示单
|
||||
|
|
|
@ -256,10 +256,18 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
|
|||
ImageIndex = 75
|
||||
OnClick = TBExportClick
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
object ToolButton14: TToolButton
|
||||
Left = 1054
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #25171#21360#26631#31614#30721#21333
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton14Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 1165
|
||||
Top = 30
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
|
|
|
@ -227,6 +227,7 @@ type
|
|||
PIH: TEdit;
|
||||
Tv1Column3: TcxGridDBColumn;
|
||||
CustomerNoName: TEdit;
|
||||
ToolButton14: TToolButton;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
@ -288,6 +289,7 @@ type
|
|||
procedure Button8Click(Sender: TObject);
|
||||
procedure Button14Click(Sender: TObject);
|
||||
procedure Button13Click(Sender: TObject);
|
||||
procedure ToolButton14Click(Sender: TObject);
|
||||
// procedure Edit5Click(Sender: TObject);
|
||||
// procedure CheckBox3Click(Sender: TObject);
|
||||
private
|
||||
|
@ -392,7 +394,7 @@ begin
|
|||
with ADOQueryMain do
|
||||
begin
|
||||
Close;
|
||||
Filtered := False;
|
||||
Filtered := False;
|
||||
sql.Clear;
|
||||
sql.Add('select A.*,C.CustomerNoName,');
|
||||
SQL.Add('cast(A.MJSTR4 as varchar(20)) as gangno,');
|
||||
|
@ -2308,5 +2310,120 @@ begin
|
|||
|
||||
end;
|
||||
|
||||
procedure TfrmJYOrderCDOne.ToolButton14Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile, fPrintFile10, FMainID: string;
|
||||
sqlStr: string;
|
||||
begin
|
||||
if Order_Main.IsEmpty then
|
||||
Exit;
|
||||
|
||||
if Order_Main.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\标签码单.rmf';
|
||||
|
||||
ExportFtErpFile('标签码单.rmf', ADOQueryCmd);
|
||||
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('delete TBSubID where DName=''' + Trim(DCode) + '''');
|
||||
ExecSQL;
|
||||
end;
|
||||
with ADOQueryCmd do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add('SELECT * FROM TBSubID where 1=2 ');
|
||||
open;
|
||||
end;
|
||||
sqlStr := '';
|
||||
FMainID := '';
|
||||
Order_Main.DisableControls;
|
||||
try
|
||||
ADOQueryCmd.Connection.BeginTrans;
|
||||
with Order_Main do
|
||||
begin
|
||||
First;
|
||||
while not Eof do
|
||||
begin
|
||||
if Fieldbyname('Ssel').AsBoolean then
|
||||
begin
|
||||
if FMainID = '' then
|
||||
begin
|
||||
FMainID := Trim(Order_Main.fieldbyname('mainID').AsString);
|
||||
end
|
||||
else
|
||||
begin
|
||||
// if Trim(Order_Main.fieldbyname('mainID').AsString) <> FMainID then
|
||||
// begin
|
||||
// application.MessageBox('选择的不是同一个指示单,不能一起打印!', '提示信息', 0);
|
||||
// ADOQueryCmd.Connection.RollbackTrans;
|
||||
// EnableControls;
|
||||
// exit;
|
||||
// end;
|
||||
end;
|
||||
sqlStr := sqlStr + 'insert into TBSubID(SubId,Dname) ';
|
||||
sqlStr := sqlStr + ' values( ';
|
||||
sqlStr := sqlStr + ' ''' + Trim(Order_Main.fieldbyname('MJID').AsString) + ''', ';
|
||||
sqlStr := sqlStr + ' ''' + Trim(DCode) + ''' ';
|
||||
sqlStr := sqlStr + ' ) ';
|
||||
end;
|
||||
Next;
|
||||
end;
|
||||
end;
|
||||
ADOQueryCmd.Connection.CommitTrans;
|
||||
except
|
||||
ADOQueryCmd.Connection.RollbackTrans;
|
||||
end;
|
||||
|
||||
Order_Main.EnableControls;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.Add(sqlStr);
|
||||
// showmessage(sql.text);
|
||||
ExecSQL;
|
||||
end;
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_CKMDYDL_BQ ');
|
||||
sql.add('@DName=' + quotedstr(Trim(DCode)));
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_HZ);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_HZ);
|
||||
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Do_PrintMd_HZ ');
|
||||
sql.add('@mainID=' + quotedstr(Trim('')));
|
||||
sql.add(',@DName=' + quotedstr(Trim(DCode)));
|
||||
sql.add(',@flag=''2'' ');
|
||||
Open;
|
||||
end;
|
||||
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM1.LoadFromFile(fPrintFile);
|
||||
RM1.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('没有找' + fPrintFile), '提示', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
@ -2313,7 +2313,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Height = 30
|
||||
AutoSize = True
|
||||
ButtonHeight = 30
|
||||
ButtonWidth = 105
|
||||
ButtonWidth = 115
|
||||
Caption = 'ToolBar1'
|
||||
Color = clSkyBlue
|
||||
EdgeInner = esNone
|
||||
|
@ -2333,13 +2333,13 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
object Panel9: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 557
|
||||
Width = 515
|
||||
Height = 30
|
||||
BevelOuter = bvNone
|
||||
Color = clSkyBlue
|
||||
TabOrder = 0
|
||||
object Label49: TLabel
|
||||
Left = 337
|
||||
Left = 322
|
||||
Top = 7
|
||||
Width = 84
|
||||
Height = 20
|
||||
|
@ -2352,7 +2352,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
ParentFont = False
|
||||
end
|
||||
object Label50: TLabel
|
||||
Left = 479
|
||||
Left = 453
|
||||
Top = 3
|
||||
Width = 14
|
||||
Height = 25
|
||||
|
@ -2378,9 +2378,9 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
ParentFont = False
|
||||
end
|
||||
object MaxRollNo: TEdit
|
||||
Left = 493
|
||||
Left = 469
|
||||
Top = 1
|
||||
Width = 57
|
||||
Width = 43
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
|
@ -2393,9 +2393,9 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
OnKeyPress = MaxRollNoKeyPress
|
||||
end
|
||||
object MinRollNo: TEdit
|
||||
Left = 422
|
||||
Left = 407
|
||||
Top = 1
|
||||
Width = 57
|
||||
Width = 45
|
||||
Height = 28
|
||||
Font.Charset = GB2312_CHARSET
|
||||
Font.Color = clWindowText
|
||||
|
@ -2425,7 +2425,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
object Button6: TButton
|
||||
Left = 213
|
||||
Top = 4
|
||||
Width = 61
|
||||
Width = 60
|
||||
Height = 26
|
||||
Caption = #36873#25321
|
||||
Font.Charset = GB2312_CHARSET
|
||||
|
@ -2440,7 +2440,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
object Button5: TButton
|
||||
Left = 273
|
||||
Top = 4
|
||||
Width = 64
|
||||
Width = 48
|
||||
Height = 26
|
||||
Caption = #30830#23450
|
||||
Font.Charset = GB2312_CHARSET
|
||||
|
@ -2454,45 +2454,53 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
end
|
||||
end
|
||||
object ToolButton2: TToolButton
|
||||
Left = 557
|
||||
Left = 515
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = ' '#20462#25913' '
|
||||
Caption = #20462#25913
|
||||
ImageIndex = 54
|
||||
OnClick = ToolButton2Click
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 666
|
||||
Left = 594
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = ' '#21024#38500' '
|
||||
Caption = #21024#38500
|
||||
ImageIndex = 48
|
||||
OnClick = ToolButton3Click
|
||||
end
|
||||
object TBCD: TToolButton
|
||||
Left = 765
|
||||
Left = 673
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = ' '#37325#25171' '
|
||||
Caption = #37325#25171
|
||||
ImageIndex = 132
|
||||
OnClick = TBCDClick
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 864
|
||||
object ToolButton1: TToolButton
|
||||
Left = 752
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26085#24535
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton4Click
|
||||
Caption = #26631#31614#30721#21333
|
||||
ImageIndex = 57
|
||||
OnClick = ToolButton1Click
|
||||
end
|
||||
object TBClose: TToolButton
|
||||
Left = 943
|
||||
Left = 871
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #20851#38381
|
||||
ImageIndex = 55
|
||||
OnClick = TBCloseClick
|
||||
end
|
||||
object ToolButton4: TToolButton
|
||||
Left = 950
|
||||
Top = 0
|
||||
AutoSize = True
|
||||
Caption = #26085#24535
|
||||
ImageIndex = 72
|
||||
OnClick = ToolButton4Click
|
||||
end
|
||||
end
|
||||
object Panel6: TPanel
|
||||
Left = 0
|
||||
|
@ -3087,4 +3095,29 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
|
|||
Top = 544
|
||||
ReportData = {}
|
||||
end
|
||||
object RMDBHZ: TRMDBDataSet
|
||||
Visible = True
|
||||
DataSet = CDS_HZ
|
||||
Left = 324
|
||||
Top = 636
|
||||
end
|
||||
object CDS_HZ: TClientDataSet
|
||||
Aggregates = <>
|
||||
Params = <>
|
||||
Left = 324
|
||||
Top = 592
|
||||
end
|
||||
object ADOQueryCmd: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
Parameters = <>
|
||||
Left = 440
|
||||
Top = 356
|
||||
end
|
||||
object ADOQueryTemp: TADOQuery
|
||||
Connection = DataLink_TradeManage.ADOLink
|
||||
LockType = ltReadOnly
|
||||
Parameters = <>
|
||||
Left = 404
|
||||
Top = 276
|
||||
end
|
||||
end
|
||||
|
|
|
@ -265,6 +265,11 @@ type
|
|||
Memo1: TMemo;
|
||||
SpeedButton19: TSpeedButton;
|
||||
Memo2: TMemo;
|
||||
ToolButton1: TToolButton;
|
||||
RMDBHZ: TRMDBDataSet;
|
||||
CDS_HZ: TClientDataSet;
|
||||
ADOQueryCmd: TADOQuery;
|
||||
ADOQueryTemp: TADOQuery;
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TBCloseClick(Sender: TObject);
|
||||
|
@ -323,11 +328,12 @@ type
|
|||
procedure Timer1Timer(Sender: TObject);
|
||||
procedure TBCDClick(Sender: TObject);
|
||||
procedure Edit5Click(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
|
||||
FColumn, FBanZu, FAPID, FMainId, FSubId, FFFMJID: string;
|
||||
FJZ, FJC, FDC: Double;
|
||||
FJZ, FJC, FDC, FSzhiguan: Double;
|
||||
fRollType, fRollType1, fbaotype, fbaosx: string;
|
||||
isCommopen, IsJsMessage: boolean;
|
||||
MValue, FCDName, MggCDFalg: string;
|
||||
|
@ -1057,14 +1063,14 @@ begin
|
|||
FieldByName('MJQty1').Value := StrToFloatdef(trim(MJQty1.Text), 0);
|
||||
FieldByName('MJQty2').Value := StrToFloatdef(trim(MJQty2.Text), 0);
|
||||
FieldByName('MJQty3').Value := StrToFloatdef(trim(MJQty3.Text), 0);
|
||||
FieldByName('MJQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0) + fjZ;
|
||||
FieldByName('MJQty4').Value := StrToFloatdef(trim(MJQty4.Text), 0); // + fjZ + FSzhiguan
|
||||
if Trim(MJFK.Text) <> '' then
|
||||
begin
|
||||
FieldByName('MJFK').Value := MJFK.Text;
|
||||
end;
|
||||
if Trim(MJMaoZ.Text) <> '' then
|
||||
begin
|
||||
FieldByName('MJMaoZ').Value := StrToFloat(MJMaoZ.Text) + fjz;
|
||||
FieldByName('MJMaoZ').Value := StrToFloat(MJMaoZ.Text) + fjz; //+ FSzhiguan
|
||||
end;
|
||||
if Trim(MJSJKZ.Text) <> '' then
|
||||
begin
|
||||
|
@ -1635,7 +1641,7 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
with ADOTmp do
|
||||
with ADOTmp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
|
@ -2505,6 +2511,7 @@ begin
|
|||
FMainId := Trim(ADOTmp.fieldbyname('MainId').AsString);
|
||||
FSubId := Trim(ADOTmp.fieldbyname('SubId').AsString);
|
||||
FJZ := ADOTmp.fieldbyname('jiazhong').AsFloat;
|
||||
FSzhiguan := ADOTmp.fieldbyname('Szhiguan').AsFloat;
|
||||
FJC := ADOTmp.fieldbyname('jiachang').AsFloat;
|
||||
FDC := StrToFloatDef(ADOTmp.fieldbyname('DC').asstring, 0);
|
||||
fbaotype := Trim(ADOTmp.fieldbyname('baotype').AsString);
|
||||
|
@ -3035,5 +3042,55 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmMJManageNewFDNewSF.ToolButton1Click(Sender: TObject);
|
||||
var
|
||||
fPrintFile, fPrintFile10: string;
|
||||
sqlStr: string;
|
||||
begin
|
||||
// if Order_MJ.IsEmpty then
|
||||
// Exit;
|
||||
fPrintFile := ExtractFilePath(Application.ExeName) + 'Report\깃푯쯤데.rmf';
|
||||
ExportFtErpFile('깃푯쯤데.rmf', ADOQueryCmd);
|
||||
|
||||
with ADOQueryTemp do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_JYJT_BQ ');
|
||||
sql.add('@mainID=' + quotedstr(Trim(FMainId)));
|
||||
sql.add(',@subid=' + quotedstr(Trim(Fsubid)));
|
||||
sql.add(',@mjstr4=' + quotedstr(Trim(mjstr4.text)));
|
||||
sql.add(',@DName=' + quotedstr(Trim(DCode)));
|
||||
// showmessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
SCreateCDS20(ADOQueryTemp, CDS_HZ);
|
||||
SInitCDSData20(ADOQueryTemp, CDS_HZ);
|
||||
|
||||
with ADOQueryPrint do
|
||||
begin
|
||||
Close;
|
||||
sql.Clear;
|
||||
sql.add('exec P_Print_JYJT_BQ_HZ ');
|
||||
sql.add('@mainID=' + quotedstr(Trim(FMainID)));
|
||||
sql.add(',@subid=' + quotedstr(Trim(Fsubid)));
|
||||
sql.add(',@mjstr4=' + quotedstr(Trim(mjstr4.text)));
|
||||
sql.add(',@DName=' + quotedstr(Trim(DCode)));
|
||||
sql.add(',@flag=''2'' ');
|
||||
// showmessage(sql.Text);
|
||||
Open;
|
||||
end;
|
||||
|
||||
if FileExists(fPrintFile) then
|
||||
begin
|
||||
RM2.LoadFromFile(fPrintFile);
|
||||
RM2.ShowReport;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Application.MessageBox(PChar('청唐冷' + fPrintFile), '瓊刻', 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
|
|
@ -1583,7 +1583,7 @@ object frmOrderInPut: TfrmOrderInPut
|
|||
Options.BorderPen.Style = psDash
|
||||
end
|
||||
end
|
||||
object SPiZhong: TEdit
|
||||
object Szhiguan: TEdit
|
||||
Tag = 12
|
||||
Left = 272
|
||||
Top = 34
|
||||
|
|
|
@ -193,7 +193,7 @@ type
|
|||
QryCheckNet: TADOQuery;
|
||||
Tv1Column1: TcxGridDBColumn;
|
||||
lbl1: TLabel;
|
||||
SPiZhong: TEdit;
|
||||
Szhiguan: TEdit;
|
||||
Tv1Column2: TcxGridDBColumn;
|
||||
Label56: TLabel;
|
||||
jiazhong: TEdit;
|
||||
|
@ -510,7 +510,7 @@ begin
|
|||
end;
|
||||
|
||||
if PState = 0 then
|
||||
begin
|
||||
begin
|
||||
OrdDate.DateTime := SGetServerDateTime(ADOTemp);
|
||||
DlyDate.DateTime := OrdDate.DateTime;
|
||||
OrdDefDate1.DateTime := OrdDate.DateTime;
|
||||
|
@ -519,6 +519,11 @@ begin
|
|||
end
|
||||
else
|
||||
begin
|
||||
if jiazhong.text = '0' then
|
||||
jiazhong.text := '';
|
||||
if Szhiguan.text = '0' then
|
||||
Szhiguan.text := '';
|
||||
|
||||
end;
|
||||
if CopyInt = 99 then
|
||||
begin
|
||||
|
@ -848,7 +853,7 @@ begin
|
|||
FieldByName('khOrderNO').Value := trim(Order_Sub.FieldByName('khOrderNO').AsString);
|
||||
// FieldByName('SLBName').Value := ExtractFileName(trim(SLBName.Text));
|
||||
FieldByName('JIAZhong').Value := StrToFloatdef((JIAZhong.Text), 0);
|
||||
FieldByName('SPiZhong').Value := StrToFloatdef((SPiZhong.Text), 0);
|
||||
FieldByName('Szhiguan').Value := StrToFloatdef((Szhiguan.Text), 0);
|
||||
FieldByName('SLBName').Value := ExtractFileName(trim(SLBName.Text));
|
||||
FieldByName('SLBName').Value := '²¼À³¿ËÒÁ±êÇ©.rmf';
|
||||
Post;
|
||||
|
@ -1869,7 +1874,7 @@ begin
|
|||
// end;
|
||||
// SCreateCDS20(ADOQueryTmp, CDS_Con);
|
||||
// SInitCDSData20(ADOQueryTmp, CDS_CON);
|
||||
// if CDS_Con.IsEmpty then
|
||||
// if CDS_Con.IsEmpty then
|
||||
// cxGrid4.Visible := False
|
||||
// else
|
||||
// cxGrid4.Visible := True;
|
||||
|
|
|
@ -592,7 +592,7 @@ begin
|
|||
FMainId := '';
|
||||
fFlileFlag := self.fFlileFlag;
|
||||
if ShowModal = 1 then
|
||||
begin
|
||||
begin
|
||||
InitGrid();
|
||||
end;
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue
Block a user