汇总页面优化

This commit is contained in:
DESKTOP-E401PHE\Administrator 2026-01-19 11:46:10 +08:00
parent e4e69a19db
commit 9c241d2aa8
8 changed files with 187 additions and 120 deletions

View File

@ -101,7 +101,7 @@ DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
HostApplication=D:\陈亿项目代码\项目代码\叶州复合\打卷检验管理\testDll.exe
HostApplication=D:\Dp7Repo\项目代码\D7DJyezhoufh\打卷检验管理\testDll.exe
Launcher=
UseLauncher=0
DebugCWD=

View File

@ -186,7 +186,7 @@ object frmCKProductJYHZList: TfrmCKProductJYHZList
Top = 16
Width = 36
Height = 12
Caption = #21512#21516#21495
Caption = #23458' '#25143
end
object Label15: TLabel
Left = 616
@ -194,6 +194,7 @@ object frmCKProductJYHZList: TfrmCKProductJYHZList
Width = 18
Height = 12
Caption = 'PO#'
Visible = False
end
object MPRTCodeName: TEdit
Tag = 2
@ -301,7 +302,7 @@ object frmCKProductJYHZList: TfrmCKProductJYHZList
TabOrder = 10
OnChange = MPRTCodeNameChange
end
object conNo: TEdit
object CustomerNoName: TEdit
Tag = 2
Left = 638
Top = 12
@ -317,6 +318,7 @@ object frmCKProductJYHZList: TfrmCKProductJYHZList
Width = 80
Height = 20
TabOrder = 12
Visible = False
OnChange = MPRTCodeNameChange
end
end
@ -377,14 +379,8 @@ object frmCKProductJYHZList: TfrmCKProductJYHZList
Width = 72
end
object v1Column9: TcxGridDBColumn
Caption = #21512#21516#21495
DataBinding.FieldName = 'conNo'
HeaderAlignmentHorz = taCenter
Width = 80
end
object v1Column10: TcxGridDBColumn
Caption = 'PO#'
DataBinding.FieldName = 'khconNO'
Caption = #23458#25143
DataBinding.FieldName = 'CustomerNoName'
HeaderAlignmentHorz = taCenter
Width = 80
end

View File

@ -4,14 +4,26 @@ interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData,
cxDataStorage, cxEdit, DB, cxDBData, cxGridCustomTableView,
cxGridTableView, cxGridBandedTableView, cxGridDBBandedTableView,
cxGridLevel, cxClasses, cxControls, cxGridCustomView, cxGridDBTableView,
cxGrid, StdCtrls, ComCtrls, ExtCtrls, ToolWin, cxGridCustomPopupMenu,
cxGridPopupMenu, ADODB, DBClient, cxDropDownEdit, MovePanel, cxButtonEdit,
cxCalendar, RM_System, RM_Common, RM_Class, RM_GridReport,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator;
Dialogs, cxStyles, cxCustomData, cxGraphics, cxFilter, cxData, cxDataStorage,
cxEdit, DB, cxDBData, cxGridCustomTableView, cxGridTableView,
cxGridBandedTableView, cxGridDBBandedTableView, cxGridLevel, cxClasses,
cxControls, cxGridCustomView, cxGridDBTableView, cxGrid, StdCtrls, ComCtrls,
ExtCtrls, ToolWin, cxGridCustomPopupMenu, cxGridPopupMenu, ADODB, DBClient,
cxDropDownEdit, MovePanel, cxButtonEdit, cxCalendar, RM_System, RM_Common,
RM_Class, RM_GridReport, cxLookAndFeels, cxLookAndFeelPainters, cxNavigator,
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
TfrmCKProductJYHZList = class(TForm)
@ -73,8 +85,7 @@ type
RichEdit1: TRichEdit;
v1Column2: TcxGridDBColumn;
v1Column9: TcxGridDBColumn;
v1Column10: TcxGridDBColumn;
conNo: TEdit;
CustomerNoName: TEdit;
Label14: TLabel;
KHCONNO: TEdit;
Label15: TLabel;
@ -95,15 +106,11 @@ type
procedure TBExportClick(Sender: TObject);
procedure TBFindClick(Sender: TObject);
procedure MPRTCodeNameChange(Sender: TObject);
procedure v1Column5PropertiesButtonClick(Sender: TObject;
AButtonIndex: Integer);
procedure v1Column5PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
procedure PRTColorChange(Sender: TObject);
procedure Image2Click(Sender: TObject);
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
procedure Tv1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
procedure Tv1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure TBPrintClick(Sender: TObject);
procedure ToolButton1Click(Sender: TObject);
private
@ -118,6 +125,7 @@ var
frmCKProductJYHZList: TfrmCKProductJYHZList;
implementation
uses
U_DataLink, U_Fun, U_ZDYHelp, U_JYOrderCDOne;
@ -128,8 +136,7 @@ begin
frmCKProductJYHZList := nil;
end;
procedure TfrmCKProductJYHZList.FormClose(Sender: TObject;
var Action: TCloseAction);
procedure TfrmCKProductJYHZList.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
end;
@ -150,22 +157,22 @@ begin
Close;
sql.Clear;
Filtered := False;
sql.Add('select convert(char(10),A.fillTime,120) as CRTime,A.MJType as CPType,A.MainId,A.MJTypeother as QtyUnit,A.Mjstr4,C.OrderNo,C.ConNO,D.PRTCodeName,D.PrtColor,D.PrtHX,D.SOrddefstr4, ');
sql.Add('select convert(char(10),A.fillTime,120) as CRTime,A.MJType as CPType,A.MainId,A.MJTypeother as QtyUnit,A.Mjstr4,C.OrderNo,C.ConNO,C.CustomerNoName,D.PRTCodeName,D.PrtColor,D.PrtHX,D.SOrddefstr4, ');
sql.Add('count(A.MainId) as JQty,SUM(A.MJLen) as Qty,SUM(A.MJMaoZ) as KGQty,SUM(A.MJQty4) as MJQty4,');
sql.Add('JQty=(select count(*) from WFB_MJJY X where X.SubId=A.SubId),');
sql.Add('SCKROLL=(select sum(mjlen) from WFB_MJJY X where X.SubId=A.SubId and X.ckflag=''已出库''),');
sql.Add('SkcROLL=(select sum(mjlen) from WFB_MJJY X where X.SubId=A.SubId and X.ckflag=''未出库''),');
sql.Add('CKROLL=(select count(*) from WFB_MJJY X where X.SubId=A.SubId and X.ckflag=''已出库''),');
sql.Add('KCROLL=(select count(*) from WFB_MJJY X where X.SubId=A.SubId and X.ckflag=''未出库''),');
sql.Add('khconNO=(select top 1 khconNo from JYOrderCon_Main X where X.conNO=C.conNO)');
sql.Add('SUM(CASE WHEN ckflag = ''已出库'' THEN MJLen ELSE 0 END) AS SCKROLL,');
sql.Add(' SUM(CASE WHEN ckflag = ''未出库'' THEN MJLen ELSE 0 END) AS SkcROLL,');
sql.Add(' SUM(CASE WHEN ckflag = ''已出库'' THEN 1 ELSE 0 END) AS CKROLL,');
sql.Add(' SUM(CASE WHEN ckflag = ''未出库'' THEN 1 ELSE 0 END) AS KCROLL');
// sql.Add('khconNO=(select top 1 khconNo from JYOrderCon_Main X where X.conNO=C.conNO)');
sql.Add('from WFB_MJJY A ');
sql.Add('inner join JYOrder_Main C on C.MainId=A.MainId ');
sql.Add('inner join JYOrder_sub D on D.subID=A.subID ');
Sql.add('where A.fillTime>=''' + formatdateTime('yyyy-MM-dd', begdate.Date) + ''' ');
Sql.add('and A.fillTime<''' + formatdateTime('yyyy-MM-dd', enddate.Date + 1) + ''' ');
Sql.add('group by convert(char(10),A.fillTime,120),A.SubId,A.MJType,A.MainId,A.MJTypeother,A.Mjstr4,C.OrderNo,C.ConNO,D.PRTCodeName,D.PrtColor,D.PrtHX,D.SOrddefstr4');
Open;
Sql.add('group by convert(char(10),A.fillTime,120),A.SubId,A.MJType,A.MainId,A.MJTypeother,A.Mjstr4,C.OrderNo,C.ConNO,C.CustomerNoName,D.PRTCodeName,D.PrtColor,D.PrtHX,D.SOrddefstr4');
// ShowMessage(SQL.Text);
Open;
end;
SCreateCDS20(ADOQueryMain, CDS_Main);
SInitCDSData20(ADOQueryMain, CDS_Main);
@ -204,7 +211,8 @@ begin
if Trim(DParameters2) = '¹ÜÀí' then
begin
//v1Column5.Options.Focusing:=True;
end else
end
else
begin
//v1Column5.Options.Focusing:=False;
end;
@ -213,7 +221,8 @@ end;
procedure TfrmCKProductJYHZList.TBExportClick(Sender: TObject);
begin
if ADOQueryMain.IsEmpty then exit;
if ADOQueryMain.IsEmpty then
exit;
TcxGridToExcel('¿â´æ»ã×ÜÁбí', cxGrid2);
end;
@ -232,8 +241,7 @@ begin
TBFind.Click;
end;
procedure TfrmCKProductJYHZList.v1Column5PropertiesButtonClick(
Sender: TObject; AButtonIndex: Integer);
procedure TfrmCKProductJYHZList.v1Column5PropertiesButtonClick(Sender: TObject; AButtonIndex: Integer);
begin
try
frmZDYHelp := TfrmZDYHelp.Create(Application);
@ -273,10 +281,7 @@ begin
Panel4.Visible := False;
end;
procedure TfrmCKProductJYHZList.Tv1CellDblClick(
Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
procedure TfrmCKProductJYHZList.Tv1CellDblClick(Sender: TcxCustomGridTableView; ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton; AShift: TShiftState; var AHandled: Boolean);
begin
Panel4.Left := FLeft;
Panel4.Top := FTop + 110;
@ -286,8 +291,7 @@ begin
application.ProcessMessages;
end;
procedure TfrmCKProductJYHZList.Tv1MouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure TfrmCKProductJYHZList.Tv1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
FLeft := X;
FTop := Y;
@ -300,7 +304,8 @@ end;
procedure TfrmCKProductJYHZList.ToolButton1Click(Sender: TObject);
begin
if cds_main.IsEmpty then Exit;
if cds_main.IsEmpty then
Exit;
frmJYOrderCDOne := TfrmJYOrderCDOne.Create(Application);
with frmJYOrderCDOne do
begin
@ -316,3 +321,4 @@ begin
end;
end.

View File

@ -4,7 +4,21 @@ interface
uses
SysUtils, Classes, DB, ADODB, ImgList, Controls, cxStyles, cxLookAndFeels,
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses, ExtCtrls,SyncObjs;
Windows,Messages,forms,OleCtnrs,DateUtils, cxClasses, ExtCtrls,SyncObjs,
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;
type
TMyThread = class(TThread)
protected

View File

@ -21,7 +21,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 1392
Width = 1384
Height = 62
AutoSize = True
ButtonHeight = 30
@ -268,7 +268,7 @@ object frmJYOrderCDOne: TfrmJYOrderCDOne
object Panel1: TPanel
Left = 0
Top = 62
Width = 1392
Width = 1384
Height = 88
Align = alTop
BevelInner = bvRaised
@ -783,8 +783,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

View File

@ -11,7 +11,20 @@ uses
cxGrid, DBClient, cxCheckBox, cxCalendar, cxSplitter, RM_Dataset, RM_System,
RM_Common, RM_Class, RM_GridReport, RM_e_Xls, Menus, MovePanel, cxTextEdit,
cxLookAndFeels, cxLookAndFeelPainters, cxNavigator, cxContainer, ShellAPI,
cxCurrencyEdit, MMSystem;
cxCurrencyEdit, MMSystem, 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
TfrmJYOrderCDOne = class(TForm)
@ -1630,7 +1643,31 @@ begin
Open;
end;
end;
if (trim(ComboBox1.Text) = '¼ìÑéÂëµ¥(¸×ºÅ)') then
begin
with ADOQueryTemp do
begin
Close;
sql.Clear;
sql.add('exec P_Print_CKMD_GH ');
sql.add('@mainID=' + quotedstr(Trim('')));
sql.add(',@DName=' + quotedstr(Trim(DCode)));
Open;
end;
SCreateCDS20(ADOQueryTemp, CDS_HZ);
SInitCDSData20(ADOQueryTemp, CDS_HZ);
with ADOQueryPrint do
begin
Close;
sql.Clear;
sql.add('exec P_Do_PrintMd_HZ ');
sql.add('@mainID=' + quotedstr(Trim('')));
sql.add(',@DName=' + quotedstr(Trim(DCode)));
sql.add(',@flag=''22'' ');
Open;
end;
end;
if (trim(ComboBox1.Text) = '秊碌쯤데(奈<>)') then
begin
with ADOQueryTemp do

View File

@ -21,7 +21,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 0
Top = 87
Width = 214
Height = 744
Height = 736
Align = alLeft
TabOrder = 0
object Tv3: TcxGridDBTableView
@ -125,8 +125,8 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
object ScrollBox1: TScrollBox
Left = 633
Top = 87
Width = 725
Height = 744
Width = 717
Height = 736
Align = alClient
Color = clWhite
ParentColor = False
@ -977,7 +977,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 428
Top = 87
Width = 205
Height = 744
Height = 736
Align = alLeft
BevelInner = bvRaised
BevelOuter = bvLowered
@ -2019,7 +2019,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 214
Top = 87
Width = 214
Height = 744
Height = 736
Align = alLeft
BevelInner = bvRaised
BevelOuter = bvLowered
@ -2028,7 +2028,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
Left = 2
Top = 2
Width = 210
Height = 419
Height = 411
Align = alClient
TabOrder = 0
object Tv2: TcxGridDBTableView
@ -2136,7 +2136,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object Panel8: TPanel
Left = 2
Top = 421
Top = 413
Width = 210
Height = 28
Align = alBottom
@ -2151,7 +2151,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
end
object AOrdDefNote1: TRichEdit
Left = 2
Top = 449
Top = 441
Width = 210
Height = 293
Align = alBottom
@ -2364,7 +2364,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
object ToolBar1: TToolBar
Left = 0
Top = 0
Width = 1358
Width = 1350
Height = 30
AutoSize = True
ButtonHeight = 30
@ -2552,7 +2552,7 @@ object frmMJManageNewFDNewSF: TfrmMJManageNewFDNewSF
object Panel6: TPanel
Left = 0
Top = 30
Width = 1358
Width = 1350
Height = 57
Align = alTop
BevelInner = bvRaised

View File

@ -10,7 +10,21 @@ uses
cxControls, cxGridCustomView, cxGrid, RM_Common, RM_Class, RM_GridReport,
RM_System, RM_Dataset, ADODB, DBClient, cxGridCustomPopupMenu, cxGridPopupMenu,
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
TfrmMJManageNewFDNewSF = class(TForm)
@ -1055,7 +1069,7 @@ begin
if (trim(MC.Text) <> '') and (trim(MC.Text) <> '0') then
begin
FieldByName('MJLen').value := format('%.0f', [(StrToFloatdef(trim(MJLen.Text), 0) / (StrToFloatdef(trim(MC.Text), 100) / 100)) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc]);
FieldByName('MJLen').value := format('%.' + trim(fxsws) + 'f', [(StrToFloatdef(trim(MJLen.Text), 0) / (StrToFloatdef(trim(MC.Text), 100) / 100)) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc]);
end;
// FieldByName('MJLen').value := (StrToFloatdef(trim(MJLen.Text), 0) / (StrToFloatdef(trim(MC.Text), 100) / 100)) - StrToFloatdef(trim(MJQty2.Text), 0) + fjc;
end;