D7snShanfengT/山峰贸易管理/U_JGPBCKKCList_SJGZCX.pas
DESKTOP-E401PHE\Administrator c363cb75a7 调整之后的山凤水泥厂
2026-02-26 09:41:35 +08:00

386 lines
12 KiB
ObjectPascal
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

unit U_JGPBCKKCList_SJGZCX;
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, cxCheckBox, RM_Common,
RM_Class, RM_e_Xls, RM_Dataset, RM_System, RM_GridReport, Menus,
cxCalendar, cxButtonEdit, cxTextEdit, cxPC;
type
TfrmJGPBCKKCList_SJGZCX = class(TForm)
ToolBar1: TToolBar;
TBRafresh: TToolButton;
TBFind: TToolButton;
TBClose: TToolButton;
Panel1: TPanel;
ADOQueryCmd: TADOQuery;
ADOQueryMain: TADOQuery;
ADOQueryTemp: TADOQuery;
DataSource1: TDataSource;
cxGridPopupMenu1: TcxGridPopupMenu;
CDS_Main: TClientDataSet;
RM1: TRMGridReport;
RMDBMain: TRMDBDataSet;
RMXLSExport1: TRMXLSExport;
RMDBHZ: TRMDBDataSet;
CDS_HZ: TClientDataSet;
CDS_PRT: TClientDataSet;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
Label3: TLabel;
CheHao: TEdit;
ToolButton2: TToolButton;
Label2: TLabel;
cxStyleRepository1: TcxStyleRepository;
cxStyle1: TcxStyle;
cxStyle2: TcxStyle;
Label1: TLabel;
BegDate: TDateTimePicker;
ADOQuery1: TADOQuery;
cxStyle3: TcxStyle;
cxStyle4: TcxStyle;
Label4: TLabel;
SJName: TEdit;
cxGrid2: TcxGrid;
TV1: TcxGridDBBandedTableView;
V1CheHao: TcxGridDBBandedColumn;
V1SJName: TcxGridDBBandedColumn;
V1Qty1: TcxGridDBBandedColumn;
VJYQty1: TcxGridDBBandedColumn;
V1YH1: TcxGridDBBandedColumn;
V1Qty2: TcxGridDBBandedColumn;
V1JYQty2: TcxGridDBBandedColumn;
V1YH2: TcxGridDBBandedColumn;
V1Qty3: TcxGridDBBandedColumn;
V1JYQty3: TcxGridDBBandedColumn;
V1YH3: TcxGridDBBandedColumn;
V1Qty4: TcxGridDBBandedColumn;
V1JYQty4: TcxGridDBBandedColumn;
V1YH4: TcxGridDBBandedColumn;
V1Qty5: TcxGridDBBandedColumn;
V1JYQty5: TcxGridDBBandedColumn;
V1YH5: TcxGridDBBandedColumn;
V1Qty6: TcxGridDBBandedColumn;
V1JYQty6: TcxGridDBBandedColumn;
V1MYH6: TcxGridDBBandedColumn;
V1Qty7: TcxGridDBBandedColumn;
V1JYQty7: TcxGridDBBandedColumn;
V1YH7: TcxGridDBBandedColumn;
V1Qty8: TcxGridDBBandedColumn;
V1JYQty8: TcxGridDBBandedColumn;
V1YH8: TcxGridDBBandedColumn;
V1Qty9: TcxGridDBBandedColumn;
V1JYQty9: TcxGridDBBandedColumn;
V1YH9: TcxGridDBBandedColumn;
V1Qty10: TcxGridDBBandedColumn;
V1JYQty10: TcxGridDBBandedColumn;
V1YH10: TcxGridDBBandedColumn;
V1Qty11: TcxGridDBBandedColumn;
V1JYQty11: TcxGridDBBandedColumn;
V1YH11: TcxGridDBBandedColumn;
V1Qty12: TcxGridDBBandedColumn;
V1JYQty12: TcxGridDBBandedColumn;
V1YH12: TcxGridDBBandedColumn;
cxGrid2Level1: TcxGridLevel;
Panel2: TPanel;
procedure FormDestroy(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure TBRafreshClick(Sender: TObject);
procedure ConNoMChange(Sender: TObject);
procedure TBCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure TBFindClick(Sender: TObject);
procedure MPRTCodeNameChange(Sender: TObject);
procedure N1Click(Sender: TObject);
procedure N2Click(Sender: TObject);
procedure SXBatchNOChange(Sender: TObject);
procedure FactoryNameChange(Sender: TObject);
procedure Tv1CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
procedure ToolButton2Click(Sender: TObject);
procedure RadioGroup1Click(Sender: TObject);
procedure V1Qty14CompareRowValuesForCellMerging(Sender: TcxGridColumn;
ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties;
const AValue1: Variant; ARow2: TcxGridDataRow;
AProperties2: TcxCustomEditProperties; const AValue2: Variant;
var AAreEqual: Boolean);
procedure V1Money14CompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
procedure V1Qty18CompareRowValuesForCellMerging(Sender: TcxGridColumn;
ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties;
const AValue1: Variant; ARow2: TcxGridDataRow;
AProperties2: TcxCustomEditProperties; const AValue2: Variant;
var AAreEqual: Boolean);
procedure V1Money18CompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
procedure V1Qty15CompareRowValuesForCellMerging(Sender: TcxGridColumn;
ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties;
const AValue1: Variant; ARow2: TcxGridDataRow;
AProperties2: TcxCustomEditProperties; const AValue2: Variant;
var AAreEqual: Boolean);
procedure V1Money15CompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
procedure V1ZMoneyCompareRowValuesForCellMerging(Sender: TcxGridColumn;
ARow1: TcxGridDataRow; AProperties1: TcxCustomEditProperties;
const AValue1: Variant; ARow2: TcxGridDataRow;
AProperties2: TcxCustomEditProperties; const AValue2: Variant;
var AAreEqual: Boolean);
procedure V1ZJMoneyCompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
private
procedure InitGrid();
{ Private declarations }
public
{ Public declarations }
end;
var
frmJGPBCKKCList_SJGZCX: TfrmJGPBCKKCList_SJGZCX;
implementation
uses
U_DataLink,U_RTFun,U_JGSXKNewList_CPCKCX,U_CLShuiPiao_CX;
{$R *.dfm}
procedure TfrmJGPBCKKCList_SJGZCX.FormDestroy(Sender: TObject);
begin
frmJGPBCKKCList_SJGZCX:=nil;
end;
procedure TfrmJGPBCKKCList_SJGZCX.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action:=caFree;
end;
procedure TfrmJGPBCKKCList_SJGZCX.InitGrid();
var FSJName:string;
begin
ToolBar1.SetFocus;
Panel2.Visible:=True;
Panel2.Refresh;
try
ADOQueryMain.DisableControls;
with ADOQueryMain do
begin
Filtered:=False;
Close;
sql.Clear;
sql.Add('exec P_SJGYGZ');
sql.Add(' @Month='''+trim(FormatDateTime('yyyy',BegDate.Date))+'''');
Open;
end;
SCreateCDS20(ADOQueryMain,CDS_Main);
SInitCDSData20(ADOQueryMain,CDS_Main);
finally;
ADOQueryMain.EnableControls;
end;
Panel2.Visible:=false;
end;
procedure TfrmJGPBCKKCList_SJGZCX.TBRafreshClick(Sender: TObject);
begin
ToolBar1.SetFocus;
InitGrid();
end;
procedure TfrmJGPBCKKCList_SJGZCX.ConNoMChange(Sender: TObject);
begin
if ADOQueryMain.Active then
begin
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
end;
end;
procedure TfrmJGPBCKKCList_SJGZCX.TBCloseClick(Sender: TObject);
begin
WriteCxBandedGrid('<27><>ʻԱ<CABB><D4B1>ϸ21',Tv1,<>ϲֿ<CFB2>');
Close;
end;
procedure TfrmJGPBCKKCList_SJGZCX.FormShow(Sender: TObject);
begin
ReadCxBandedGrid('<27><>ʻԱ<CABB><D4B1>ϸ21',Tv1,<>ϲֿ<CFB2>');
BegDate.Date:=SGetServerDate(ADOQueryTemp);
//InitGrid();
end;
procedure TfrmJGPBCKKCList_SJGZCX.TBFindClick(Sender: TObject);
begin
SDofilter(ADOQueryMain,SGetFilters(Panel1,1,2));
SCreateCDS20(ADOQueryMain,CDS_Main);
SInitCDSData20(ADOQueryMain,CDS_Main);
end;
procedure TfrmJGPBCKKCList_SJGZCX.MPRTCodeNameChange(Sender: TObject);
begin
TBFind.Click;
end;
procedure TfrmJGPBCKKCList_SJGZCX.N1Click(Sender: TObject);
begin
SelOKNo(CDS_Main,True);
end;
procedure TfrmJGPBCKKCList_SJGZCX.N2Click(Sender: TObject);
begin
SelOKNo(CDS_Main,False);
end;
procedure TfrmJGPBCKKCList_SJGZCX.SXBatchNOChange(Sender: TObject);
begin
TBFind.Click;
end;
procedure TfrmJGPBCKKCList_SJGZCX.FactoryNameChange(Sender: TObject);
begin
TBFind.Click;
end;
procedure TfrmJGPBCKKCList_SJGZCX.Tv1CellDblClick(Sender: TcxCustomGridTableView;
ACellViewInfo: TcxGridTableDataCellViewInfo; AButton: TMouseButton;
AShift: TShiftState; var AHandled: Boolean);
begin
ModalResult:=1;
end;
procedure TfrmJGPBCKKCList_SJGZCX.ToolButton2Click(Sender: TObject);
begin
ToolBar1.SetFocus;
if CDS_Main.IsEmpty then exit;
TcxGridToExcel('<27><>ʻԱ<CABB>ͺ<EFBFBD>ͳ<EFBFBD><CDB3><EFBFBD>б<EFBFBD>',cxGrid2);
end;
procedure TfrmJGPBCKKCList_SJGZCX.RadioGroup1Click(Sender: TObject);
begin
InitGrid();
end;
procedure TfrmJGPBCKKCList_SJGZCX.V1Qty14CompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
begin
inherited;
if ARow1.Values[2] = ARow2.Values[2] then
AAreEqual := True
else
AAreEqual := False;
end;
procedure TfrmJGPBCKKCList_SJGZCX.V1Money14CompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
begin
inherited;
if ARow1.Values[2] = ARow2.Values[2] then
AAreEqual := True
else
AAreEqual := False;
end;
procedure TfrmJGPBCKKCList_SJGZCX.V1Qty18CompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
begin
inherited;
if ARow1.Values[2] = ARow2.Values[2] then
AAreEqual := True
else
AAreEqual := False;
end;
procedure TfrmJGPBCKKCList_SJGZCX.V1Money18CompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
begin
inherited;
if ARow1.Values[2] = ARow2.Values[2] then
AAreEqual := True
else
AAreEqual := False;
end;
procedure TfrmJGPBCKKCList_SJGZCX.V1Qty15CompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
begin
inherited;
if ARow1.Values[2] = ARow2.Values[2] then
AAreEqual := True
else
AAreEqual := False;
end;
procedure TfrmJGPBCKKCList_SJGZCX.V1Money15CompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
begin
inherited;
if ARow1.Values[2] = ARow2.Values[2] then
AAreEqual := True
else
AAreEqual := False;
end;
procedure TfrmJGPBCKKCList_SJGZCX.V1ZMoneyCompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
begin
inherited;
if ARow1.Values[2] = ARow2.Values[2] then
AAreEqual := True
else
AAreEqual := False;
end;
procedure TfrmJGPBCKKCList_SJGZCX.V1ZJMoneyCompareRowValuesForCellMerging(
Sender: TcxGridColumn; ARow1: TcxGridDataRow;
AProperties1: TcxCustomEditProperties; const AValue1: Variant;
ARow2: TcxGridDataRow; AProperties2: TcxCustomEditProperties;
const AValue2: Variant; var AAreEqual: Boolean);
begin
inherited;
if ARow1.Values[2] = ARow2.Values[2] then
AAreEqual := True
else
AAreEqual := False;
end;
end.