This commit is contained in:
DESKTOP-E401PHE\Administrator 2026-02-05 17:13:04 +08:00
parent ca7744c3a0
commit cecb181ee5
2 changed files with 68 additions and 11 deletions

View File

@ -1674,6 +1674,20 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
TabOrder = 20 TabOrder = 20
OnClick = Button7Click OnClick = Button7Click
end end
object lastMJLen: TEdit
Left = 169
Top = 33
Width = 90
Height = 36
Font.Charset = GB2312_CHARSET
Font.Color = clWindowText
Font.Height = -28
Font.Name = #23435#20307
Font.Style = [fsBold]
ParentFont = False
TabOrder = 21
Visible = False
end
end end
object MovePanel1: TMovePanel object MovePanel1: TMovePanel
Left = 634 Left = 634
@ -3052,4 +3066,10 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Top = 544 Top = 544
ReportData = {} ReportData = {}
end end
object Timer2: TTimer
Interval = 500
OnTimer = Timer2Timer
Left = 1145
Top = 285
end
end end

View File

@ -10,7 +10,20 @@ uses
cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport, cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport,
RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu, RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu,
ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox, ExtCtrls, ComCtrls, ToolWin, cxTextEdit, Buttons, cxSplitter, cxCheckBox,
MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, ShellAPI; MovePanel, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, ShellAPI,
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven,
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
dxSkinXmas2008Blue, dxSkinscxPCPainter;
type type
TfrmMJManageNewFDNewSF = class(TForm) TfrmMJManageNewFDNewSF = class(TForm)
@ -249,6 +262,8 @@ type
RM3: TRMGridReport; RM3: TRMGridReport;
Edit5: TEdit; Edit5: TEdit;
Label43: TLabel; Label43: TLabel;
Timer2: TTimer;
lastMJLen: TEdit;
procedure FormDestroy(Sender: TObject); procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBCloseClick(Sender: TObject); procedure TBCloseClick(Sender: TObject);
@ -307,6 +322,7 @@ type
procedure Timer1Timer(Sender: TObject); procedure Timer1Timer(Sender: TObject);
procedure TBCDClick(Sender: TObject); procedure TBCDClick(Sender: TObject);
procedure Edit5Click(Sender: TObject); procedure Edit5Click(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
private private
{ Private declarations } { Private declarations }
FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer; FInt, PState, PrintInt, SCInitGrid, FState, FCK: Integer;
@ -335,6 +351,7 @@ type
function JsXj(str1: string): string; function JsXj(str1: string): string;
public public
fmanage: string; fmanage: string;
FMBlen: Double;
{ Public declarations } { Public declarations }
end; end;
@ -1038,12 +1055,13 @@ begin
// FieldByName('MJLen').Value := StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc; // FieldByName('MJLen').Value := StrToFloatdef(trim(MJLen.Text), 0) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc;
if Fmbxs > 0 then if Fmbxs > 0 then
begin begin
FieldByName('MJLen').Value := format('%.' + trim(fxsws) + 'f', [(StrToFloatdef(trim(MJLen.Text), 0) / Fmbxs) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc]); // FieldByName('MJLen').Value := format('%.' + trim(fxsws) + 'f', [(StrToFloatdef(trim(MJLen.Text), 0) / Fmbxs) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc]);
FieldByName('MJLen').Value := format('%.' + trim(fxsws) + 'f', [(FMBlen / Fmbxs) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc]);
end end
else else
begin begin
FieldByName('MJLen').Value := format('%.' + trim(fxsws) + 'f', [(StrToFloatdef(trim(MJLen.Text), 0)) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc]); // FieldByName('MJLen').Value := format('%.' + trim(fxsws) + 'f', [(StrToFloatdef(trim(MJLen.Text), 0)) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc]);
// FieldByName('Sjcd').Value := format('%.' + trim(fxsws) + 'f', [(StrToFloatdef(trim(MJLen.Text), 0)) - StrToFloatdef(trim(MJQty2.Text), 0)]); FieldByName('MJLen').Value := format('%.' + trim(fxsws) + 'f', [FMBlen - StrToFloatdef(trim(MJQty2.Text), 0) + fjc]);
end; end;
end; end;
@ -1574,8 +1592,16 @@ var
mvalue1: integer; mvalue1: integer;
i: Integer; i: Integer;
begin begin
if Abs(StrToFloatDEF(MJLen.Text, 0) - StrToFloatDEF(lastMJLen.Text, 0)) > 5 then
begin
if Application.MessageBox('与最大米数超过5M是否继续提交', '提示', 32 + 4) <> IDYES then
begin
Exit;
end;
end;
FMBlen := StrToFloatDEF(MJLen.Text, 0);
if (strtofloatdef(trim(MJLen.Text), 0) = 0) and (strtofloatdef(trim(mjqty4.Text), 0) = 0) then if (FMBlen = 0) and (strtofloatdef(trim(mjqty4.Text), 0) = 0) then
begin begin
application.MessageBox('长度或者重量不能都为零!', '提示信息', 0); application.MessageBox('长度或者重量不能都为零!', '提示信息', 0);
exit; exit;
@ -1735,7 +1761,7 @@ begin
end; end;
end; end;
lastMJLen.text := '';
Label16.Caption := ''; Label16.Caption := '';
BTAdd.Click; BTAdd.Click;
MJLen.SetFocus; MJLen.SetFocus;
@ -2514,6 +2540,7 @@ begin
Exit; Exit;
end; end;
APID.Text := ''; APID.Text := '';
LASTMJLEN.Text := '';
BTAdd.Click; BTAdd.Click;
end; end;
@ -2986,5 +3013,15 @@ begin
end; end;
end; end;
procedure TfrmMJManageNewFDNewSF.Timer2Timer(Sender: TObject);
begin
if StrToFloatDEF(MJLen.Text, 0) > StrToFloatDEF(lastMJLen.Text, 0) then
begin
LASTMJLEN.Text := MJLEN.Text;
end;
end;
end. end.