From 1d3cb2226ffbb2bb7d6692e57ade3b7e4e210eb7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-E401PHE\\Administrator" Date: Fri, 28 Nov 2025 10:05:44 +0800 Subject: [PATCH] 1 --- 打卷检验管理/FieldExportSet/检验报告.INI | 2 +- 打卷检验管理/ProjectGroup1.bpg | 8 +- 打卷检验管理/ProjectGroup1.~bpg | 23 +++++ 打卷检验管理/U_JYOrderCDOne.dfm | 20 +++-- 打卷检验管理/U_JYOrderCDOne.pas | 108 ++++++++++++++++++++++- 打卷检验管理/U_testdll.dfm | 6 +- 打卷检验管理/testDll.cfg | 4 +- 打卷检验管理/testDll.dof | 2 +- 8 files changed, 154 insertions(+), 19 deletions(-) create mode 100644 打卷检验管理/ProjectGroup1.~bpg diff --git a/打卷检验管理/FieldExportSet/检验报告.INI b/打卷检验管理/FieldExportSet/检验报告.INI index 0961376..0606f67 100644 --- a/打卷检验管理/FieldExportSet/检验报告.INI +++ b/打卷检验管理/FieldExportSet/检验报告.INI @@ -1,2 +1,2 @@ [] -ֶ=Begin +ֶ=Begin/ѡ//ͻ/Ʒ/׺/ɫ/ɫ/////Ƥ//ë//ȵλ//ͺ//ŷ//õ/õ/۷//ʱ/ͻ/Ⱦ׺/ע//״̬ diff --git a/打卷检验管理/ProjectGroup1.bpg b/打卷检验管理/ProjectGroup1.bpg index 7c050f6..091c62d 100644 --- a/打卷检验管理/ProjectGroup1.bpg +++ b/打卷检验管理/ProjectGroup1.bpg @@ -9,15 +9,15 @@ MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** DCC = $(ROOT)\bin\dcc32.exe $** BRCC = $(ROOT)\bin\brcc32.exe $** #------------------------------------------------------------------------------ -PROJECTS = testDll.exe ProductPrice.dll +PROJECTS = TradeManage.dll testDll.exe #------------------------------------------------------------------------------ default: $(PROJECTS) #------------------------------------------------------------------------------ +TradeManage.dll: TradeManage.dpr + $(DCC) + testDll.exe: testDll.dpr $(DCC) -ProductPrice.dll: ProductPrice.dpr - $(DCC) - diff --git a/打卷检验管理/ProjectGroup1.~bpg b/打卷检验管理/ProjectGroup1.~bpg new file mode 100644 index 0000000..7c050f6 --- /dev/null +++ b/打卷检验管理/ProjectGroup1.~bpg @@ -0,0 +1,23 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = testDll.exe ProductPrice.dll +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +testDll.exe: testDll.dpr + $(DCC) + +ProductPrice.dll: ProductPrice.dpr + $(DCC) + + diff --git a/打卷检验管理/U_JYOrderCDOne.dfm b/打卷检验管理/U_JYOrderCDOne.dfm index a2371b9..1a12b01 100644 --- a/打卷检验管理/U_JYOrderCDOne.dfm +++ b/打卷检验管理/U_JYOrderCDOne.dfm @@ -21,7 +21,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne object ToolBar1: TToolBar Left = 0 Top = 0 - Width = 1392 + Width = 1384 Height = 62 AutoSize = True ButtonHeight = 30 @@ -250,23 +250,31 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne Left = 991 Top = 30 AutoSize = True - Caption = #23548#20986 + Caption = #21246#36873#23548#20986 ImageIndex = 75 OnClick = TBExportClick end object TBClose: TToolButton - Left = 1054 + Left = 1078 Top = 30 AutoSize = True Caption = #20851#38381 ImageIndex = 55 OnClick = TBCloseClick end + object ToolButton14: TToolButton + Left = 1141 + Top = 30 + AutoSize = True + Caption = #23548#20986 + ImageIndex = 75 + OnClick = ToolButton14Click + end end object Panel1: TPanel Left = 0 Top = 62 - Width = 1392 + Width = 1384 Height = 88 Align = alTop BevelInner = bvRaised @@ -781,8 +789,8 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne object cxGrid1: TcxGrid Left = 0 Top = 150 - Width = 1392 - Height = 576 + Width = 1384 + Height = 568 Align = alClient PopupMenu = PopupMenu1 TabOrder = 3 diff --git a/打卷检验管理/U_JYOrderCDOne.pas b/打卷检验管理/U_JYOrderCDOne.pas index 8d787d6..bcb1885 100644 --- a/打卷检验管理/U_JYOrderCDOne.pas +++ b/打卷检验管理/U_JYOrderCDOne.pas @@ -223,6 +223,7 @@ type ComboBox3: TComboBox; Edit6: TEdit; Tv1Column2: TcxGridDBColumn; + ToolButton14: TToolButton; procedure FormDestroy(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormCreate(Sender: TObject); @@ -284,6 +285,7 @@ type procedure Button8Click(Sender: TObject); procedure Button14Click(Sender: TObject); procedure Button13Click(Sender: TObject); + procedure ToolButton14Click(Sender: TObject); // procedure Edit5Click(Sender: TObject); // procedure CheckBox3Click(Sender: TObject); private @@ -405,7 +407,7 @@ begin sql.add('and mjtype=''Ʒ'' '); end; sql.add('order by A.mainid,B.prtcolor,gangno,A.mjxh'); - + Open; end; SCreateCDS20(ADOQueryMain, Order_Main); @@ -510,9 +512,104 @@ begin end; procedure TfrmJYOrderCDOne.TBExportClick(Sender: TObject); +var + FMainID,sqlStr:string; begin if ADOQueryMain.IsEmpty then Exit; + with ADOQueryCmd do + begin + Close; + sql.Clear; + sql.Add('delete TBSubID where DName=''' + Trim(DCode) + ''''); + ExecSQL; + end; + with ADOQueryCmd do + begin + Close; + sql.Clear; + sql.Add('SELECT * FROM TBSubID where 1=2 '); + open; + end; + sqlStr := ''; + FMainID := ''; + Order_Main.DisableControls; + try + ADOQueryCmd.Connection.BeginTrans; + with Order_Main do + begin + First; + while not Eof do + begin + if Fieldbyname('Ssel').AsBoolean then + begin + if FMainID = '' then + begin + FMainID := Trim(Order_Main.fieldbyname('mainID').AsString); + end + else + begin +// if Trim(Order_Main.fieldbyname('mainID').AsString) <> FMainID then +// begin +// application.MessageBox('ѡIJͬһָʾһӡ', 'ʾϢ', 0); +// ADOQueryCmd.Connection.RollbackTrans; +// EnableControls; +// exit; +// end; + end; + sqlStr := sqlStr + 'insert into TBSubID(SubId,Dname) '; + sqlStr := sqlStr + ' values( '; + sqlStr := sqlStr + ' ''' + Trim(Order_Main.fieldbyname('MJID').AsString) + ''', '; + sqlStr := sqlStr + ' ''' + Trim(DCode) + ''' '; + sqlStr := sqlStr + ' ) '; + end; + Next; + end; + end; + ADOQueryCmd.Connection.CommitTrans; + except + ADOQueryCmd.Connection.RollbackTrans; + end; + Order_Main.EnableControls; + + with ADOQueryTemp do + begin + Close; + sql.Clear; + sql.Add(sqlStr); +// showmessage(sql.text); + ExecSQL; + end; + try + ADOQueryMain.DisableControls; + with ADOQueryMain do + begin + Close; + Filtered := False; + sql.Clear; + sql.Add('select A.*,'); + SQL.Add('cast(A.MJSTR4 as varchar(20)) as gangno,'); + sql.Add('C.OrderNo,C.CustomerNoName,C.MPRTCodeName,C.MPRTMF,C.MPRTKZ,B.*,'); + sql.Add('KouFenQty=(select Sum(X.KouFenQty) from WFB_MJJY_CD X where X.MJID=A.MJID),'); + sql.Add('CDQty=(select count(X.MJID) from WFB_MJJY_CD X where X.MJID=A.MJID)'); + SQL.Add('from WFB_MJJY A'); + sql.Add('inner join JYOrder_sub B on B.subID=A.subID '); + sql.Add('inner join JYOrder_Main C on C.MainID=A.MainID '); +// sql.Add('where A.FillTime>=''' + FormatDateTime('yyyy-MM-dd', BegDate.DateTime) + ''' '); +// sql.Add('and A.FillTime<''' + FormatDateTime('yyyy-MM-dd', enddate.DateTime + 1) + ''' '); + sql.Add(' where EXISTS(select SubId from TBSubID X where X.SubId=A.MJID and X.DName='''+Trim(DCode)+''' )'); + + + sql.add('order by A.mainid,B.prtcolor,gangno,A.mjxh'); +// ShowMessage(sql.text); + Open; + end; + SCreateCDS20(ADOQueryMain, Order_Main); + SInitCDSData20(ADOQueryMain, Order_Main); + finally + ADOQueryMain.EnableControls; + end; + SelExportData(Tv1, ADOQueryMain, '鱨'); end; @@ -1694,7 +1791,7 @@ begin end; end; - if (trim(ComboBox1.Text) = '뵥()') then + if (trim(ComboBox1.Text) = '뵥()') then begin with ADOQueryTemp do begin @@ -2399,5 +2496,12 @@ begin end; +procedure TfrmJYOrderCDOne.ToolButton14Click(Sender: TObject); +begin + if ADOQueryMain.IsEmpty then + Exit; + SelExportData(Tv1, ADOQueryMain, '鱨'); +end; + end. diff --git a/打卷检验管理/U_testdll.dfm b/打卷检验管理/U_testdll.dfm index b1d8f4c..46e43f9 100644 --- a/打卷检验管理/U_testdll.dfm +++ b/打卷检验管理/U_testdll.dfm @@ -1,6 +1,6 @@ object Form1: TForm1 - Left = 153 - Top = 124 + Left = 553 + Top = 312 Width = 791 Height = 554 Caption = 'Form1' @@ -21,7 +21,7 @@ object Form1: TForm1 object ToolBar1: TToolBar Left = 0 Top = 0 - Width = 783 + Width = 775 Height = 25 ButtonWidth = 57 Caption = 'ToolBar1' diff --git a/打卷检验管理/testDll.cfg b/打卷检验管理/testDll.cfg index 6c57635..e9c1cc1 100644 --- a/打卷检验管理/testDll.cfg +++ b/打卷检验管理/testDll.cfg @@ -31,8 +31,8 @@ -M -$M16384,1048576 -K$00400000 --LE"c:\program files\borland\delphi7\Projects\Bpl" --LN"c:\program files\borland\delphi7\Projects\Bpl" +-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl" +-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl" -w-UNSAFE_TYPE -w-UNSAFE_CODE -w-UNSAFE_CAST diff --git a/打卷检验管理/testDll.dof b/打卷检验管理/testDll.dof index f452c6e..8c6a483 100644 --- a/打卷检验管理/testDll.dof +++ b/打卷检验管理/testDll.dof @@ -101,7 +101,7 @@ DebugSourceDirs= UsePackages=0 [Parameters] RunParams= -HostApplication=D:\selfware_83398\selfware\ֿ\Ŀ\self\·չó׹\testDll.exe +HostApplication=D:\Dp7Repo\Ŀ\D7DJshunyang\\testDll.exe Launcher= UseLauncher=0 DebugCWD=