This commit is contained in:
DESKTOP-E401PHE\Administrator 2026-01-09 15:55:23 +08:00
parent a02f5cc3ec
commit cc16aeef9a
2 changed files with 74 additions and 14 deletions

View File

@ -1795,6 +1795,17 @@ begin
Open; Open;
end; end;
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 else
begin begin
with ADOQueryBaseTemp do with ADOQueryBaseTemp do
@ -1861,9 +1872,15 @@ end;
procedure TfrmMachRollMain.ToolButton2Click(Sender: TObject); procedure TfrmMachRollMain.ToolButton2Click(Sender: TObject);
var var
cxPacketCIID: string; cxPacketCIID: string;
PDetailPs: string;
begin begin
if CDS_3.IsEmpty then if CDS_3.IsEmpty then
Exit; Exit;
if CDS_3.Locate('SSel', True, []) = False then
begin
Application.MessageBox('没有选择数据!', '提示', 0);
Exit;
end;
if Application.MessageBox('确定要撤销打包吗?', '提示', 32 + 4) <> IDYES then if Application.MessageBox('确定要撤销打包吗?', '提示', 32 + 4) <> IDYES then
Exit; Exit;
with CDS_3 do with CDS_3 do
@ -1881,9 +1898,9 @@ begin
SQL.Add('WHERE CIID=' + QuotedStr(trim(cds_3.fieldbyName('CIID').AsString))); 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('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('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) + ') '); 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); // showmessage(sql.text);
execsql; execsql;
end; end;
@ -1932,18 +1949,20 @@ var
begin begin
if cds_3.IsEmpty then if cds_3.IsEmpty then
exit; exit;
// if Trim(cds_3.FieldByName('packetid').AsString) <> '' then if Trim(cds_3.FieldByName('packetid').AsString) <> '' then
// begin begin
// if Application.MessageBox(pchar('确定要删除选择的整个包【' + Trim(cds_3.FieldByName('packetNo').AsString) + '】卷数据吗?'), '提示', 32 + 4) <> IDYES then // if Application.MessageBox(pchar('确定要删除选择的整个包【' + Trim(cds_3.FieldByName('packetNo').AsString) + '】卷数据吗?'), '提示', 32 + 4) <> IDYES then
// exit; // exit;
// deletePack(Trim(cds_3.FieldByName('packetid').AsString)); // deletePack(Trim(cds_3.FieldByName('packetid').AsString));
// exit; // exit;
// end if Application.MessageBox('确定要删除选择的已经打包的卷数据吗?', '提示', 32 + 4) <> IDYES then
// else exit;
// begin end
// if Application.MessageBox('确定要删除选择的卷数据吗?', '提示', 32 + 4) <> IDYES then else
// exit; begin
// end; if Application.MessageBox('确定要删除选择的卷数据吗?', '提示', 32 + 4) <> IDYES then
exit;
end;
ADOQueryBaseCmd.Connection.BeginTrans; ADOQueryBaseCmd.Connection.BeginTrans;
try try
mCiid := trim(cds_3.fieldbyName('CIID').AsString); mCiid := trim(cds_3.fieldbyName('CIID').AsString);
@ -2014,7 +2033,11 @@ procedure TfrmMachRollMain.TeditClick(Sender: TObject);
begin begin
if cds_3.IsEmpty then if cds_3.IsEmpty then
exit; exit;
if BTPrint.Caption = '提 交' then
begin
if Application.MessageBox('确定要修改选择的卷数据吗?', '提示', 32 + 4) <> IDYES then
exit;
end;
InitJTM(cds_3.fieldbyName('CIID').AsString); InitJTM(cds_3.fieldbyName('CIID').AsString);
initEditPiece(); initEditPiece();
@ -2735,6 +2758,7 @@ var
MInputWeight, MGrossWeight, MNetWeight, MTare, Maddwet, maddLen: double; MInputWeight, MGrossWeight, MNetWeight, MTare, Maddwet, maddLen: double;
mYardStick: double; mYardStick: double;
mPresentLen, mpresentWeight: double; mPresentLen, mpresentWeight: double;
mDetailMs: string;
begin begin
Result := false; Result := false;
Maddwet := strTofloatDef(trim(addwet.text), 0); // Faddwet; Maddwet := strTofloatDef(trim(addwet.text), 0); // Faddwet;
@ -3083,11 +3107,25 @@ begin
/// /////////////// 更新卷号疵点信息 ////////////////// /// /////////////// 更新卷号疵点信息 //////////////////
/// ///
/// /////////////// 更新开卡 ////////////////// /// /////////////// 更新开卡 //////////////////
with ADOQueryBaseCmd do with ADOQueryBaseCmd do
begin begin
Close; Close;
SQL.Clear; 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; ExecSQL;
end; end;
/// /////////////// 更新开卡 ////////////////// /// /////////////// 更新开卡 //////////////////
@ -3563,6 +3601,17 @@ begin
Open; Open;
end; end;
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 else if FRulePackNo = '按颜色生成' then
begin begin
with ADOQueryBaseTemp do with ADOQueryBaseTemp do
@ -3625,6 +3674,17 @@ begin
Open; Open;
end; end;
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 else if FRulePackNo = '按颜色生成' then
begin begin
with ADOQueryBaseTemp do with ADOQueryBaseTemp do