From bf59918d3049fbe17e1d782dddc90ae2b66a336c Mon Sep 17 00:00:00 2001 From: "DESKTOP-E401PHE\\Administrator" Date: Fri, 19 Sep 2025 09:45:42 +0800 Subject: [PATCH] ~ --- 检验管理/U_MJManageNewFDNew.dfm | 68 ++++++++++++++++++++++++++++++--- 检验管理/U_MJManageNewFDNew.pas | 27 +++++++++++-- 2 files changed, 86 insertions(+), 9 deletions(-) diff --git a/检验管理/U_MJManageNewFDNew.dfm b/检验管理/U_MJManageNewFDNew.dfm index ecca417..24159d2 100644 --- a/检验管理/U_MJManageNewFDNew.dfm +++ b/检验管理/U_MJManageNewFDNew.dfm @@ -2431,7 +2431,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF object Panel9: TPanel Left = 0 Top = 0 - Width = 491 + Width = 713 Height = 30 BevelOuter = bvNone Color = clSkyBlue @@ -2475,6 +2475,32 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF Font.Style = [fsBold] ParentFont = False end + object Label54: TLabel + Left = 489 + Top = 5 + Width = 84 + Height = 20 + Caption = #21253#21495#33539#22260 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -20 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end + object Label55: TLabel + Left = 631 + Top = 5 + Width = 14 + Height = 25 + Caption = '-' + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -25 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + end object MaxRollNo: TEdit Left = 431 Top = 1 @@ -2535,9 +2561,39 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF TabOrder = 3 OnClick = Button6Click end + object MinbaoNo: TEdit + Left = 575 + Top = 2 + Width = 57 + Height = 28 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -20 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 4 + OnClick = Edit1Click + OnKeyPress = MaxRollNoKeyPress + end + object MaxbaoNo: TEdit + Left = 648 + Top = 2 + Width = 57 + Height = 28 + Font.Charset = GB2312_CHARSET + Font.Color = clWindowText + Font.Height = -20 + Font.Name = #23435#20307 + Font.Style = [fsBold] + ParentFont = False + TabOrder = 5 + OnClick = Edit1Click + OnKeyPress = MaxRollNoKeyPress + end end object ToolButton2: TToolButton - Left = 491 + Left = 713 Top = 0 AutoSize = True Caption = ' '#20462#25913' ' @@ -2545,7 +2601,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF OnClick = ToolButton2Click end object ToolButton3: TToolButton - Left = 600 + Left = 822 Top = 0 AutoSize = True Caption = ' '#21024#38500' ' @@ -2553,7 +2609,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF OnClick = ToolButton3Click end object TBCD: TToolButton - Left = 699 + Left = 921 Top = 0 AutoSize = True Caption = ' '#37325#25171' ' @@ -2561,7 +2617,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF OnClick = TBCDClick end object ToolButton4: TToolButton - Left = 798 + Left = 1020 Top = 0 AutoSize = True Caption = #26085#24535 @@ -2569,7 +2625,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF OnClick = ToolButton4Click end object TBClose: TToolButton - Left = 877 + Left = 1099 Top = 0 AutoSize = True Caption = #20851#38381 diff --git a/检验管理/U_MJManageNewFDNew.pas b/检验管理/U_MJManageNewFDNew.pas index 92936f3..27af7f2 100644 --- a/检验管理/U_MJManageNewFDNew.pas +++ b/检验管理/U_MJManageNewFDNew.pas @@ -265,6 +265,10 @@ type Tv3Column5: TcxGridDBColumn; Edit13: TEdit; Tv3Column6: TcxGridDBColumn; + Label54: TLabel; + Label55: TLabel; + MinbaoNo: TEdit; + MaxbaoNo: TEdit; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure TBCloseClick(Sender: TObject); @@ -900,7 +904,23 @@ begin exit; end; end; + if MinbaoNo.Text <> '' then + begin + if StrToIntDef(MinbaoNo.Text, 0) > StrToIntDef(baoNo.Text, 0) then + begin + Application.MessageBox('ССţܱ棡', 'ʾ', 0); + exit; + end; + end; + if MaxbaoNo.Text <> '' then + begin + if StrToIntDef(MaxbaoNo.Text, 0) < StrToIntDef(baoNo.Text, 0) then + begin + Application.MessageBox('ѳţܱ棡', 'ʾ', 0); + exit; + end; + end; try ADOCmd.Connection.BeginTrans; if PState = 2 then @@ -2874,7 +2894,7 @@ begin // CDS_MJID.First; with ADOQueryPrint do begin - Close; + Close; SQL.Clear; sql.Add('select A.Baoid,A.BaoNo,A.MJTypeOther as QtyUnit,D.OrderNo,D.conNo,D.customerNoName,D.MprtCodeName,D.Mprtspec,D.OrdPerson1,D.MPRTKuanNO,D.LBName,D.NLBName,C.KHorderNo,'); sql.Add('PRTCodeName=DBO.F_Get_Order_SubStr(BaoID,''BNCodeName''),'); @@ -2920,7 +2940,7 @@ begin exit; end; - with ADOTmp do + with ADOTmp do begin close; sql.Clear; @@ -2932,7 +2952,8 @@ begin end; open; end; - baoNo.Text := inttostr(ADOTmp.fieldbyname('maxbaoNO').AsInteger + 1); + baoNo.Text := inttostr(strTointdef(trim(baoNo.Text), 0) + 1); +// baoNo.Text := inttostr(ADOTmp.fieldbyname('maxbaoNO').AsInteger + 1); if GetLSNo(ADOTmp, FBaoID, 'BI', 'WFB_MJJY', 3, 1) = False then begin Application.MessageBox('ȡʧܣ', 'ʾ', 0);