This commit is contained in:
DESKTOP-E401PHE\Administrator 2025-08-01 14:42:57 +08:00
parent 0347dae504
commit 2793786a07

View File

@ -436,42 +436,48 @@ end;
procedure TfrmJYOrderCDOne.InitSum();
var
sumP, sumLen, sumMZ, sumJZ: double;
sumP: integer;
sumLen, sumJZ, sumMZ: double;
mrecNo: integer;
begin
if Order_Main.IsEmpty then
exit;
mrecNo := Order_Main.RecNo;
try
tv1.BeginUpdate();
Order_Main.DisableControls;
sumP := 0;
sumLen := 0;
sumMZ := 0;
sumJZ := 0;
with Order_Main do
begin
DisableControls;
First;
Order_Main.first;
while not eof do
begin
if Fieldbyname('ssel').AsBoolean then
if Order_Main.FieldByName('ssel').AsBoolean then
begin
sumP := sumP + 1;
sumLen := RoundFloat(sumLen + Order_Main.fieldbyname('mjlen').AsFloat, 2);
sumMZ := sumMZ + Order_Main.fieldbyname('mjmaoz').AsFloat;
sumJZ := sumJZ + Order_Main.fieldbyname('mjqty4').AsFloat;
end;
next;
end;
EnableControls;
end;
label22.Caption := 'Æ¥Êý:' + floattostr(sumP);
label21.Caption := '³¤¶È:' + floattostr(sumLen);
label20.Caption := 'Ã«ÖØ:' + floattostr(sumMZ);
label23.Caption := '¾»ÖØ:' + floattostr(sumJZ);
Order_Main.Locate('mjid', fid, []);
except
application.MessageBox('操作失败!', '提示信息', 0);
end;
finally
Order_Main.RecNo := mrecNo;
Order_Main.EnableControls;
tv1.EndUpdate;
end;
end;
procedure TfrmJYOrderCDOne.InitForm();
@ -1636,8 +1642,7 @@ begin
Open;
end;
end;
if (trim(ComboBox1.Text) = '金超针纺发货码单') or (trim(ComboBox1.Text) = '金超针纺发货码单(净重)')
or (trim(ComboBox1.Text) = '金超针纺发货码单(重量)') or (trim(ComboBox1.Text) = '金超针纺发货码单(毛重)') then
if (trim(ComboBox1.Text) = '金超针纺发货码单') or (trim(ComboBox1.Text) = '金超针纺发货码单(净重)') or (trim(ComboBox1.Text) = '金超针纺发货码单(重量)') or (trim(ComboBox1.Text) = '金超针纺发货码单(毛重)') then
begin
with ADOQueryTemp do
begin