~
This commit is contained in:
parent
a02f5cc3ec
commit
cc16aeef9a
Binary file not shown.
|
|
@ -1795,6 +1795,17 @@ begin
|
|||
Open;
|
||||
end;
|
||||
end
|
||||
else if FRulePackNo = '按客户款号生成' then
|
||||
begin
|
||||
with ADOQueryBaseTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from Trade_Cloth_Inspect X ');
|
||||
sql.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.PacketNo=''' + Trim(edtPacketNo.text) + ''' and X.C_StyleNo=' + quotedstr(Trim(FC_StyleNo)));
|
||||
Open;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
with ADOQueryBaseTemp do
|
||||
|
|
@ -1861,9 +1872,15 @@ end;
|
|||
procedure TfrmMachRollMain.ToolButton2Click(Sender: TObject);
|
||||
var
|
||||
cxPacketCIID: string;
|
||||
PDetailPs: string;
|
||||
begin
|
||||
if CDS_3.IsEmpty then
|
||||
Exit;
|
||||
if CDS_3.Locate('SSel', True, []) = False then
|
||||
begin
|
||||
Application.MessageBox('没有选择数据!', '提示', 0);
|
||||
Exit;
|
||||
end;
|
||||
if Application.MessageBox('确定要撤销打包吗?', '提示', 32 + 4) <> IDYES then
|
||||
Exit;
|
||||
with CDS_3 do
|
||||
|
|
@ -1881,9 +1898,9 @@ begin
|
|||
SQL.Add('WHERE CIID=' + QuotedStr(trim(cds_3.fieldbyName('CIID').AsString)));
|
||||
SQL.Add('Update Trade_Cloth_Stock Set PacketTime=null, PacketNo=null,PacketId=null,PacketCode=null,PacketName=null ');
|
||||
SQL.Add('WHERE CIID=' + QuotedStr(trim(cds_3.fieldbyName('CIID').AsString)));
|
||||
SQL.Add('insert into Trade_Need_Up(UType,UOperation,UDataId,uoperator) values(''检验'',''检验删除'',' + QuotedStr(trim(cds_3.fieldbyName('CIID').AsString)) + ',' + QuotedStr(DName) + ') ');
|
||||
|
||||
// showmessage(sql.text);
|
||||
PDetailPs := '卷条码' + cds_3.FieldByName('CIID').AsString + '包条码' + cds_3.FieldByName('PacketId').AsString + '包号' + cds_3.FieldByName('PacketNo').AsString;
|
||||
SQL.Add('insert into Trade_Need_Up(UType,UOperation,UDataId,uoperator) values(''检验'',''检验撤销打包'',' + QuotedStr(PDetailPs) + ',' + QuotedStr(DName) + ') ');
|
||||
// showmessage(sql.text);
|
||||
execsql;
|
||||
end;
|
||||
|
||||
|
|
@ -1932,18 +1949,20 @@ var
|
|||
begin
|
||||
if cds_3.IsEmpty then
|
||||
exit;
|
||||
// if Trim(cds_3.FieldByName('packetid').AsString) <> '' then
|
||||
// begin
|
||||
// if Application.MessageBox(pchar('确定要删除选择的整个包【' + Trim(cds_3.FieldByName('packetNo').AsString) + '】的卷数据吗?'), '提示', 32 + 4) <> IDYES then
|
||||
if Trim(cds_3.FieldByName('packetid').AsString) <> '' then
|
||||
begin
|
||||
// if Application.MessageBox(pchar('确定要删除选择的整个包的【' + Trim(cds_3.FieldByName('packetNo').AsString) + '】卷数据吗?'), '提示', 32 + 4) <> IDYES then
|
||||
// exit;
|
||||
// deletePack(Trim(cds_3.FieldByName('packetid').AsString));
|
||||
// exit;
|
||||
// end
|
||||
// else
|
||||
// begin
|
||||
// if Application.MessageBox('确定要删除选择的卷数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
// exit;
|
||||
// end;
|
||||
if Application.MessageBox('确定要删除选择的已经打包的卷数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if Application.MessageBox('确定要删除选择的卷数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
exit;
|
||||
end;
|
||||
ADOQueryBaseCmd.Connection.BeginTrans;
|
||||
try
|
||||
mCiid := trim(cds_3.fieldbyName('CIID').AsString);
|
||||
|
|
@ -2014,7 +2033,11 @@ procedure TfrmMachRollMain.TeditClick(Sender: TObject);
|
|||
begin
|
||||
if cds_3.IsEmpty then
|
||||
exit;
|
||||
|
||||
if BTPrint.Caption = '提 交' then
|
||||
begin
|
||||
if Application.MessageBox('确定要修改选择的卷数据吗?', '提示', 32 + 4) <> IDYES then
|
||||
exit;
|
||||
end;
|
||||
InitJTM(cds_3.fieldbyName('CIID').AsString);
|
||||
|
||||
initEditPiece();
|
||||
|
|
@ -2735,6 +2758,7 @@ var
|
|||
MInputWeight, MGrossWeight, MNetWeight, MTare, Maddwet, maddLen: double;
|
||||
mYardStick: double;
|
||||
mPresentLen, mpresentWeight: double;
|
||||
mDetailMs: string;
|
||||
begin
|
||||
Result := false;
|
||||
Maddwet := strTofloatDef(trim(addwet.text), 0); // Faddwet;
|
||||
|
|
@ -3083,11 +3107,25 @@ begin
|
|||
/// /////////////// 更新卷号疵点信息 //////////////////
|
||||
///
|
||||
/// /////////////// 更新开卡 //////////////////
|
||||
|
||||
with ADOQueryBaseCmd do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('insert into Trade_Need_Up(UOperation,UType,UDataId,uoperator) values(''检验'',''机台检验'',' + QuotedStr(maxno) + ',' + QuotedStr(DName) + ') ');
|
||||
|
||||
if BTPrint.Caption = '提 交' then
|
||||
begin
|
||||
SQL.Add('insert into Trade_Need_Up(UOperation,UType,UDataId,uoperator) values(''机台检验'',''检验'',' + QuotedStr(maxno) + ',' + QuotedStr(DName) + ') ');
|
||||
end
|
||||
else
|
||||
begin
|
||||
if cds_3.FieldByName('inputLen').AsFloat <> strToFloatDef(trim(inputLen.Text), 0) then
|
||||
mDetailMs := '长度' + cds_3.FieldByName('inputLen').AsString + '->' + inputLen.Text;
|
||||
if cds_3.FieldByName('inputWeight').AsFloat <> strToFloatDef(trim(inputWeight.Text), 0) then
|
||||
mDetailMs := mDetailMs + ' 重量' + cds_3.FieldByName('inputWeight').AsString + '->' + inputWeight.Text;
|
||||
SQL.Add('insert into Trade_Need_Up(UOperation,UType,UDataId,uoperator,UDetails) values(''检验数据修改'',''检验'',' + QuotedStr(maxno) + ',' + QuotedStr(DName) + ',' + QuotedStr(mDetailMs) + ' ) ');
|
||||
end;
|
||||
|
||||
ExecSQL;
|
||||
end;
|
||||
/// /////////////// 更新开卡 //////////////////
|
||||
|
|
@ -3563,6 +3601,17 @@ begin
|
|||
Open;
|
||||
end;
|
||||
end
|
||||
else if FRulePackNo = '按客户款号生成' then
|
||||
begin
|
||||
with ADOQueryBaseTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select max(cast(isnull(PacketNo,''0'') as int) )+1 as MaxPacketNo from Trade_Cloth_Inspect X ');
|
||||
sql.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.C_StyleNo=' + quotedstr(Trim(FC_StyleNo)));
|
||||
Open;
|
||||
end;
|
||||
end
|
||||
else if FRulePackNo = '按颜色生成' then
|
||||
begin
|
||||
with ADOQueryBaseTemp do
|
||||
|
|
@ -3625,6 +3674,17 @@ begin
|
|||
Open;
|
||||
end;
|
||||
end
|
||||
else if FRulePackNo = '按客户款号生成' then
|
||||
begin
|
||||
with ADOQueryBaseTemp do
|
||||
begin
|
||||
Close;
|
||||
SQL.Clear;
|
||||
SQL.Add('select * from Trade_Cloth_Inspect X ');
|
||||
sql.Add('where X.mainID=''' + Trim(FMainId) + ''' and X.subid=''' + Trim(FSubId) + ''' and X.C_StyleNo=' + quotedstr(Trim(FC_StyleNo)));
|
||||
Open;
|
||||
end;
|
||||
end
|
||||
else if FRulePackNo = '按颜色生成' then
|
||||
begin
|
||||
with ADOQueryBaseTemp do
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user