250120
This commit is contained in:
parent
1251492f45
commit
cddfa57f45
Binary file not shown.
Binary file not shown.
|
|
@ -78,6 +78,7 @@ begin
|
|||
DConString := 'Provider=SQLOLEDB.1;Password=' + pswd + ';Persist Security Info=True;User ID=' + user + ';Initial Catalog=' + dtbase + ';Data Source=' + server;
|
||||
// Parameters1 := '录入';
|
||||
// Parameters2 := '理单';
|
||||
Parameters1 := '管理';
|
||||
// DName:='ADMIN';
|
||||
end
|
||||
else
|
||||
|
|
|
|||
|
|
@ -943,7 +943,8 @@ inherited frmTradePlanInPut: TfrmTradePlanInPut
|
|||
#22823#36135#29983#20135
|
||||
#20844#21496#22791#36135
|
||||
#33258#20027#24320#21457
|
||||
#23458#38656#24320#21457)
|
||||
#23458#38656#24320#21457
|
||||
#22823#36135#29983#20135'('#25104#21697')')
|
||||
end
|
||||
object ShippMent: TEdit
|
||||
Tag = 2
|
||||
|
|
|
|||
|
|
@ -502,17 +502,21 @@ end;
|
|||
|
||||
function TfrmTradePlanInPut.SaveData(): Boolean;
|
||||
var
|
||||
maxno, Smaxno, maxorderno, MaxFNo, Fdate, FOrdeNo: string;
|
||||
maxno, Smaxno, maxorderno, MaxFNo, Fdate, FOrdeNo, FProcessingType: string;
|
||||
begin
|
||||
|
||||
try
|
||||
ADOCmd.Connection.BeginTrans;
|
||||
///±£´æÖ÷±í
|
||||
|
||||
if Trim(FMainId) = '' then
|
||||
begin
|
||||
Fdate := FormatDateTime('yy', SGetServerDate(ADOTemp));
|
||||
if ProcessingType.Text <> '大货生产' then
|
||||
FProcessingType := ProcessingType.Text;
|
||||
if (FProcessingType <> '大货生产') and (FProcessingType <> '大货生产(成品)') then
|
||||
begin
|
||||
// if (FProcessingType <> '大货生产(成品)') then
|
||||
// begin
|
||||
if GetLSNo(ADOCmd, maxno, 'FDH', 'Trade_Plan_Main', 5, 0) = False then
|
||||
raise Exception.Create('È¡×î´óºÅʧ°Ü!');
|
||||
with ADOQuery1 do
|
||||
|
|
@ -524,18 +528,33 @@ begin
|
|||
end;
|
||||
FOrderNo := Trim(Fdate) + ADOQuery1.FieldByName('S').ASString;
|
||||
|
||||
if ProcessingType.text = '公司备货' then
|
||||
if FProcessingType = '公司备货' then
|
||||
begin
|
||||
OrderNo.text := 'BH' + Trim(FOrderNo);
|
||||
end
|
||||
else if ProcessingType.text = '自主开发' then
|
||||
else if FProcessingType = '自主开发' then
|
||||
begin
|
||||
OrderNo.text := 'KF' + Trim(FOrderNo);
|
||||
end
|
||||
else if ProcessingType.text = '客需开发' then
|
||||
else if FProcessingType = '客需开发' then
|
||||
begin
|
||||
OrderNo.text := 'KX' + Trim(FOrderNo);
|
||||
end;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// if GetLSNo(ADOCmd, maxno, Trim(ConNo.Text), 'Trade_Plan_Main', 2, 0) = False then
|
||||
// raise Exception.Create('取最大号失败!');
|
||||
// with ADOQuery1 do
|
||||
// begin
|
||||
// Close;
|
||||
// sql.Clear;
|
||||
// SQL.Add('select Cast(Right(''' + Trim(maxno) + ''',2) AS INT) AS S');
|
||||
// Open;
|
||||
// end;
|
||||
// ForderNo := 'C-' + Trim(ConNo.Text) + '-' + ADOQuery1.FieldByName('S').ASString;
|
||||
// OrderNo.text := Trim(FOrderNo);
|
||||
// end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
|
@ -548,7 +567,14 @@ begin
|
|||
SQL.Add('select Cast(Right(''' + Trim(maxno) + ''',2) AS INT) AS S');
|
||||
Open;
|
||||
end;
|
||||
if ProcessingType.Text = '大货生产(成品)' then
|
||||
begin
|
||||
ForderNo := 'C-' + Trim(ConNo.Text) + '-' + ADOQuery1.FieldByName('S').ASString;
|
||||
end
|
||||
else
|
||||
begin
|
||||
ForderNo := Trim(ConNo.Text) + '-' + ADOQuery1.FieldByName('S').ASString;
|
||||
end;
|
||||
OrderNo.text := Trim(FOrderNo);
|
||||
end;
|
||||
end
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue
Block a user